text:
<!DOCTYPE HTML>
<html>

<!--
  Tested class: sap.ui.ux3.ThingInspector
-->

<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>QUnit Page for sap.ui.ux3.ThingInspector</title>

	<script src="../shared-config.js"></script>
	<script id="sap-ui-bootstrap"
			src="../../../../../resources/sap-ui-core.js" data-sap-ui-noConflict="true"
			data-sap-ui-libs="sap.ui.ux3,sap.ui.commons">

	</script>

	<link rel="stylesheet"
		  href="../../../../../resources/sap/ui/thirdparty/qunit.css" type="text/css"
		  media="screen" />
	<script
			src="../../../../../resources/sap/ui/thirdparty/qunit.js"></script>
	<script
			src="../../../../../resources/sap/ui/qunit/qunit-junit.js"></script>
	<script
			src="../../../../../resources/sap/ui/qunit/QUnitUtils.js"></script>

	<script>
	var c = sap.ui.commons; /* shorthand */

	// helper function to create a row with label and text
	function createLMatrixLayoutRowRow(sLabel, sText) {
	var oLabel = new c.Label({
	text : sLabel + ":"
	});
	var oTextView = new c.TextView({
	text : sText
	});

	var oMLCell1 = new c.layout.MatrixLayoutCell({
	hAlign : c.layout.HAlign.End,
	vAlign : c.layout.VAlign.Top,
	content : [ oLabel ]
	});
	var oMLCell2 = new c.layout.MatrixLayoutCell({
	hAlign : c.layout.HAlign.Begin,
	vAlign : c.layout.VAlign.Top,
	content : [ oTextView ]
	});

	return new c.layout.MatrixLayoutRow({
	cells : [ oMLCell1, oMLCell2 ]
	});
	}

	//event handler for facet event, action and standard action events, for close and open event
	function facetSelectedEventHandler(oEvent) {
	assert.ok(true, "facet select event handler has been executed."); // this test tests by just being counted in the respective test
	var id = oEvent.getParameter("id");
	assert.equal(id, facet, facet + " Facet should be selected");
	var oTG1 = new sap.ui.ux3.ThingGroup({
	title : "Block1"
	});
	oTG1.addContent(new c.Button(oThingInspector.getId() + facet + "FacetButton", {
	text : id
	}));
	oThingInspector.addFacetContent(oTG1);
	}
	function actionSelectedEventHandler(oEvent) {
	assert.ok(true, "action select event handler has been executed."); // this test tests by just being counted in the respective test
	var id = oEvent.getParameter("id");
	assert.equal(id, action, action + " Action should be selected");
	}
	function feedSubmitEventHandler(oEvent) {
	assert.ok(true, "feed submit event handler has been executed."); // this test tests by just being counted in the respective test
	var text = oEvent.getParameter("text");
	assert.equal(text, "my feed entry", "Feed text should be 'my feed entry'");
	}
	function closeEventHandler(oEvent) {
	assert.ok(true, "close event handler has been executed."); // this test tests by just being counted in the respective test
	}
	function openEventHandler(oEvent) {
	assert.ok(true, "open event handler has been executed."); // this test tests by just being counted in the respective test
	}
	function openNewEventHandler(oEvent) {
	assert.ok(true, "open new event handler has been executed."); // this test tests by just being counted in the respective test
	}
	</script>

	<!-- Control initialization -->
	<script>
	var oShell = new sap.ui.ux3.Shell("myShell", {
	appTitle : "SAPUI5 UX3 Shell",
	logout : function() {
	alert("Logout Button has been clicked.");
	oShell.forceInvalidation();
	oShell.destroy();
	oThingInspector();
	oThingInspector = null;
	sap.ui.getCore().applyChanges();

	},
	search : function(oEvent) {
	alert("Search triggered: " + oEvent.getParameter("text"));
	},
	feedSubmit : function(oEvent) {
	alert("Feed entry submitted: " + oEvent.getParameter("text"));
	}
	});
	oShell.placeAt("uiArea1");
	var oThingInspector;
	oThingInspector = new sap.ui.ux3.ThingInspector("myThingInspector", {
	icon : "../images/Account_48.png", // put the Account icon
	firstTitle : "My Thing Inspector", // give a title
	type : "Account", // give thing type
	//enableFollowAction:false,
	actions : [ // add some actions
	new sap.ui.ux3.ThingAction("survey", {
	text : "Create Survey"
	}), new sap.ui.ux3.ThingAction("delete", {
	text : "Delete"
	}), new sap.ui.ux3.ThingAction("duplicate", {
	text : "Duplicate"
	}) ],
	facets : [ // add some facets
	new sap.ui.ux3.NavigationItem("overview", {
	key : "overview",
	text : "Overview"
	}), new sap.ui.ux3.NavigationItem("activities", {
	key : "activities",
	text : "Activities"
	}) ],
	actionSelected : actionSelectedEventHandler,
	followSelected : actionSelectedEventHandler,
	flagSelected : actionSelectedEventHandler,
	favoriteSelected : actionSelectedEventHandler,
	feedSubmit : feedSubmitEventHandler,
	close : closeEventHandler,
	openNew : openNewEventHandler
	});

	// set content for the header
	var oTC1 = new sap.ui.ux3.ThingGroup({
	title : "About"
	});
	var oTC2 = new sap.ui.ux3.ThingGroup({
	title : "Contact"
	});
	var oLayout = new c.layout.MatrixLayout();
	oLayout.addRow(createLMatrixLayoutRowRow("Status", "active"));
	oLayout.addRow(createLMatrixLayoutRowRow("Owner", "Erwin M."));
	oLayout.addRow(createLMatrixLayoutRowRow("Territory", "a Contact"));
	oLayout.addRow(createLMatrixLayoutRowRow("Prim. Contact", "Hugo"));
	oLayout.addRow(createLMatrixLayoutRowRow("Web Site", "link!!!"));
	oLayout.addRow(createLMatrixLayoutRowRow("Classification", "a classification"));
	oTC1.addContent(oLayout);
	oThingInspector.addHeaderContent(oTC1);

	var oLayout2 = new c.layout.MatrixLayout();
	oLayout2.addRow(createLMatrixLayoutRowRow("Address", "Irgendwo, Strasse + HNr."));
	oLayout2.addRow(createLMatrixLayoutRowRow("Phone", "06221/23428374"));
	oLayout2.addRow(createLMatrixLayoutRowRow("Fax", "06221/23423432"));
	oLayout2.addRow(createLMatrixLayoutRowRow("Email", "hugo.m@web.de"));
	oTC2.addContent(oLayout2);
	oThingInspector.addHeaderContent(oTC2);

	//TI must be opened after the shell is rendered. Otherwise the sync will not work correctly
	oShell.addDelegate({onAfterRendering:function() {
	oThingInspector.open();
	oThingInspector.attachFacetSelected(facetSelectedEventHandler);
	oThingInspector.attachOpen(openEventHandler);
	}});
	</script>

	<!-- Test functions -->
	<script>
			QUnit.module("Appearance");

			var action;
			var facet;

			QUnit.test("ThingInspector exists", function(assert) {
				assert.equal(true, true, "...");
				var oDomRef = jQuery.sap.domById(oThingInspector.getId());
				assert.ok(oDomRef, "Rendered ThingInspector should exist in the page");
				assert.equal(oDomRef.className, "sapUiUx3Overlay sapUiUx3TI sapUiShd", "Rendered ThingInspector should have the class 'sapUiUx3TI'");
			});

			QUnit.test("Swatch", function(assert) {
				var oSwatch = jQuery.sap.domById(oThingInspector.getId() + "-thingViewer-swatch");
				assert.ok(oSwatch, "Rendered Swatch should exist in the page");
				assert.equal(oSwatch.className, "sapUiUx3TVIcon", "Rendered Swatch should have the class 'sapUiUx3TVIcon'");
			});

			QUnit.test("Facets", function(assert) {
				//number of navigation items must be the same as number of facets
				var facets = oThingInspector.getFacets();
				var $facets = jQuery(".sapUiUx3TIFacetBar");
				for ( var i = 0; i < facets.length; i++) {
					assert.ok(jQuery.sap.domById(facets[i].sId), "Rendered ThingInspector Facet " + facets[i].sId + " should exist in the page");
				}
			});

			QUnit.test("Toolbar",	function(assert) {
				var oActionBar = oThingInspector.getActionBar();
				assert.ok(oActionBar, "ActionBar should exist");
				assert.ok(jQuery(".sapUiUx3ActionBar")[0], "ActionBar rendering ok");
				oThingInspector.setActionBar();
				sap.ui.getCore().applyChanges();
				assert.ok(!jQuery(".sapUiUx3ActionBar")[0], "ActionBar should be destroyed");
				oThingInspector.setActionBar(oActionBar);
			});

			QUnit.module("Behaviour");

			QUnit.test("OpenNew Event", function(assert) {
				assert.expect(1);
				qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-openNew"), "click", 1, 1, 1, 1);
			});

			QUnit.test("OpenNew via Keyboard Event", function(assert) {
				assert.expect(2);
				qutils.triggerKeyboardEvent(oThingInspector.getId() + "-openNew", jQuery.sap.KeyCodes.ENTER, false, false, false);
				qutils.triggerKeyboardEvent(oThingInspector.getId() + "-openNew", jQuery.sap.KeyCodes.SPACE, false, false, false);
			});

			QUnit.test("ActionSelected Event", function(assert) {
				assert.expect(2);
				action = "delete";
				qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-deleteButton"), "click", 1, 1, 1, 1);
			});

			QUnit.test("FavoriteSelected Event", function(assert) {
				assert.expect(7);
				assert.ok(!oThingInspector.getFavoriteState(), "Favorite State is false");
				action = "favorite";
				qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-Favorite"), "click", 1, 1, 1, 1);
				assert.ok(oThingInspector.getFavoriteState(), "Favorite State is true");
				qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-Favorite"), "click", 1, 1, 1, 1);
				assert.ok(!oThingInspector.getFavoriteState(), "Favorite State is false");
			});

			QUnit.test("Disable Favorite Action", function(assert) {
				assert.expect(1);
				oThingInspector.setFavoriteActionEnabled(false);
				assert.ok(!oThingInspector.getFavoriteActionEnabled(), "Favorite Action enabled is false");
			});

			QUnit.test("Favorite Action disabled: no event anymore", function(assert) {
				var done = assert.async();
				assert.expect(1);
				action = "favorite";
				setTimeout(function() {
					assert.ok(!jQuery.sap.byId(oThingInspector.getId() + "-favorite")[0], "Action not rendered anymore");
					qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-favorite"), "click", 1, 1, 1, 1);
					done();
				},500);
			});

			QUnit.test("FlagSelected Event", function(assert) {
				assert.expect(7);
				assert.ok(!oThingInspector.getFlagState(), "Flag State is false");
				action = "flag";
				qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-Flag"), "click", 1, 1, 1, 1);
				assert.ok(oThingInspector.getFlagState(), "Flag State is true");
				qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-Flag"), "click", 1, 1, 1, 1);
				assert.ok(!oThingInspector.getFlagState(), "Flag State is false");
			});

			QUnit.test("FlagSelected via Keyboard Event", function(assert) {
				assert.expect(7);
				assert.ok(!oThingInspector.getFlagState(), "Flag State is false");
				action = "flag";
				//jQuery.sap.byId(oThingInspector.getId() + "-flag").focus();
				qutils.triggerKeyboardEvent(oThingInspector.getId() + "-actionBar-Flag", jQuery.sap.KeyCodes.ENTER, false, false, false);
				assert.ok(oThingInspector.getFlagState(), "Flag State is true");
				qutils.triggerKeyboardEvent(oThingInspector.getId() + "-actionBar-Flag", jQuery.sap.KeyCodes.SPACE, false, false, false);
				assert.ok(!oThingInspector.getFlagState(), "Flag State is false");
			});

			QUnit.test("Disable Flag Action", function(assert) {
				assert.expect(1);
				oThingInspector.setFlagActionEnabled(false);
				assert.ok(!oThingInspector.getFlagActionEnabled(), "Flag Action enabled is false");
			});

			QUnit.test("Flag Action disabled: no event anymore", function(assert) {
				var done = assert.async();
				assert.expect(1);
				action = "flag";
				setTimeout(function() {
					assert.ok(!jQuery.sap.byId(oThingInspector.getId() + "-actionBar-Flag")[0], "Action not rendered anymore");
					qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-Flag"), "click", 1, 1, 1, 1);
					done();
				},500);
			});

			QUnit.test("UpdateSelected Event", function(assert) {
				var done = assert.async();
				assert.expect(2);
				action = "update";
				qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-Update"), "click", 1, 1, 1, 1);
				setTimeout(function() {
					assert.ok(jQuery.sap.domById(oThingInspector.getId() + "-actionBar-UpdateActionPopup"), "Rendered update popup should exist in the page");
					//click again should hide comment popup
					qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-Update"), "click", 1, 1, 1, 1);
					setTimeout(function() {
						assert.equal(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-UpdateActionPopup").length, 0,
								"Rendered update popup was removed in the page");
						done();
					}, 500);
				}, 500);
			});

			QUnit.test("FeedSubmit Event", function(assert) {
				var done = assert.async();
				assert.expect(5);
				action = "update";
				qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-Update"), "click", 1, 1, 1, 1);
				setTimeout(function() {
					assert.ok(jQuery.sap.domById(oThingInspector.getId() + "-actionBar-UpdateActionPopup"), "Rendered update popup should exist in the page");
					jQuery(jQuery(".sapUiFeederInput")[0]).focus();
					setTimeout(function() {
						jQuery(".sapUiFeederInput")[0].innerHTML = "my feed entry";
						setTimeout(function() {
							jQuery(jQuery(".sapUiFeederInput")[0]).keyup();
							setTimeout(function() {
								//click on feed submit button should hide comment popup
								qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + '-actionBar-Feeder-send'), "click", 1, 1, 1, 1);
								setTimeout(function() {
									assert.ok(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-UpdateActionPopup"), "Rendered comment popup should exist in the page");
									assert.equal(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-UpdateActionPopup").length, 0,
											"Rendered update popup was removed in the page");
									done();
								}, 500);
							}, 500);
						}, 500);
					}, 500);
				}, 500);
			});

			QUnit.test("Disable Update Action", function(assert) {
				assert.expect(1);
				oThingInspector.setUpdateActionEnabled(false);
				assert.ok(!oThingInspector.getUpdateActionEnabled(), "Flag Action enabled is false");
			});

			QUnit.test("Update Action disabled: no event anymore", function(assert) {
				var done = assert.async();
				assert.expect(1);
				action = "update";
				setTimeout(function() {
					assert.ok(!jQuery.sap.byId(oThingInspector.getId() + "-update")[0], "Action not rendered anymore");
					qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-update"), "click", 1, 1, 1, 1);
					done();
				},500);
			});

			QUnit.test("Open Method", function(assert) {
				var done = assert.async();
				assert.expect(5);
				facet = "overview";
				oThingInspector.close();
				oThingInspector.setSelectedFacet(null);
				setTimeout(function() {
					oThingInspector.open();
					assert.ok(oThingInspector.isOpen(), "Rendered ThingInspector is open");
					setTimeout(
							function() {
								assert.ok(jQuery.sap.domById(oThingInspector.getId() + facet + "FacetButton"), "Rendered Facet Content for facet " + facet
										+ " should exist in the page");
								done();
							}, 500);
				}, 500);
			});

			QUnit.test("FacetSelected Event", function(assert) {
				var done = assert.async();
				assert.expect(3);
				facet = "activities";
				qutils.triggerMouseEvent(jQuery.sap.domById("activities"), "click", 1, 1, 1, 1);
				setTimeout(
						function() {
							assert.ok(jQuery.sap.domById(oThingInspector.getId() + facet + "FacetButton"), "Rendered Facet Content for facet " + facet
									+ " should exist in the page");
							done();
						}, 500);
			});

			QUnit.test("FollowSelected Event", function(assert) {
				var done = assert.async();
				assert.expect(19);
				assert.equal(oThingInspector.getFollowState(), sap.ui.ux3.FollowActionState.Default, "Follow State is sap.ui.ux3.FollowActionState.Default");
				action = "follow";
				// trigger follow
				qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-Follow"), "click", 1, 1, 1, 1);
				assert.equal(oThingInspector.getFollowState(), sap.ui.ux3.FollowActionState.Follow, "Follow State is sap.ui.ux3.FollowActionState.Follow");
				// menu must exist after click
				qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-Follow"), "click", 1, 1, 1, 1);
				assert.ok(jQuery.sap.domById(oThingInspector.getId() + "-actionBar-followActionMenu"), "Rendered Follow Action menu should exist in the page");

				setTimeout(function() {
					// menu entries with unhold and unfollow must exist
					assert.ok(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-holdState"), "Rendered Follow Action menu with holdState should exist in the page");
					assert.ok(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-unfollowState"), "Rendered Follow Action menu with unfollowState should exist in the page");
					// trigger hold
					qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-holdState"), "click", 1, 1, 1, 1);
					setTimeout(function() {
						assert.equal(oThingInspector.getFollowState(), sap.ui.ux3.FollowActionState.Hold, "Follow State is sap.ui.ux3.FollowActionState.Hold");
						// menu must exist after click
						qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-actionBar-Follow"), "click", 1, 1, 1, 1);
						assert.ok(jQuery.sap.domById(oThingInspector.getId() + "-actionBar-followActionMenu"), "Rendered Follow Action menu should exist in the page");

						setTimeout(
								function() {
									// menu entries with unhold and unfollow must exist
									assert.ok(jQuery.sap.domById(oThingInspector.getId() + "-actionBar-unholdState"),
											"Rendered Follow Action menu with unholdState should exist in the page");
									assert.ok(jQuery.sap.domById(oThingInspector.getId() + "-actionBar-unfollowState"),
											"Rendered Follow Action menu with unfollowState should exist in the page");
									// trigger unfollow
									qutils.triggerMouseEvent(jQuery.sap.domById(oThingInspector.getId() + "-actionBar-unfollowState"), "click", 1, 1, 1, 1);
									assert.equal(oThingInspector.getFollowState(), sap.ui.ux3.FollowActionState.Default, "Follow State is sap.ui.ux3.FollowActionState.Default");

									setTimeout(function() {

										// menu entries with hold, unhold and unfollow must not exist only follow
										assert.ok(!jQuery.sap.domById(oThingInspector.getId() + "-actionBar-holdState"),
												"Rendered Follow Action menu with holdState should not exists in the page");
										assert.ok(!jQuery.sap.domById(oThingInspector.getId() + "-actionBar-unholdState"),
												"Rendered Follow Action menu with unholdState should not exists in the page");
										assert.ok(!jQuery.sap.domById(oThingInspector.getId() + "-actionBar-unfollowState"),
												"Rendered Follow Action menu with unfollowState should not exists in the page");
										done();
									}, 500);
								}, 500);
					}, 500);
				}, 500);

			});

			QUnit.test("Disable Follow Action", function(assert) {
				assert.expect(1);
				oThingInspector.setFollowActionEnabled(false);
				assert.ok(!oThingInspector.getFollowActionEnabled(), "Follow Action enabled is false");
			});

			QUnit.test("Follow Action disabled: no event anymore", function(assert) {
				var done = assert.async();
				assert.expect(1);
				action = "follow";
				setTimeout(function() {
					assert.ok(!jQuery.sap.byId(oThingInspector.getId() + "-follow")[0], "Action not rendered anymore");
					qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-follow"), "click", 1, 1, 1, 1);
					done();
				},500);
			});

			// at the end close
			QUnit.test("Close Event", function(assert) {
				var done = assert.async();
				assert.expect(3);
				assert.ok(oThingInspector.isOpen(), "Rendered ThingInspector is open");

				qutils.triggerMouseEvent(jQuery.sap.byId(oThingInspector.getId() + "-close"), "click", 1, 1, 1, 1);
				setTimeout(function() {
					assert.ok(!oThingInspector.isOpen(), "Rendered ThingInspector is not open");
					done();
				}, 500);
			});

			QUnit.test("Destroy and remove control", function(assert) {
				oThingInspector.destroy();
				sap.ui.getCore().applyChanges();
				var oDomRef = jQuery.sap.domById(oThingInspector.getId());
				assert.ok(!oDomRef, "Rendered ThingInspector should not exist in the page after destruction");
				oShell.destroy();
			});
		QUnit.module("Aggregation overrides", {
			beforeEach : function () {
				this.oTI = new sap.ui.ux3.ThingInspector({

				});
				this.oTI.placeAt("qunit-fixture");
				sap.ui.getCore().applyChanges();
			},
			afterEach : function () {
				this.oTI.destroy();
				this.oTI = null;
			}
		});

		QUnit.test("insertAction",function(assert) {
			var action1 = new sap.ui.ux3.ThingAction("survey1", {
				text : "Create Survey"
			});
			var action2 = new sap.ui.ux3.ThingAction("survey2", {
				text : "Create Survey"
			});

			this.oTI.insertAction(action1, 0);
			this.oTI.insertAction(action2, 1);

			var result = this.oTI.getActions()[0];

			assert.strictEqual(this.oTI.getActions().indexOf(action1), 0, "action is inserted on the correct position");
			assert.strictEqual(this.oTI.getActions().indexOf(action2), 1, "action is inserted on the correct position");
		});

		QUnit.test("removeAction",function(assert) {
			var action = new sap.ui.ux3.ThingAction("survey3", {
				text : "Create Survey"
			});
			this.oTI.insertAction(action, 0);
			this.oTI.removeAction(action);
			assert.strictEqual(this.oTI.getActions().indexOf(action), -1, "action is removed");
		});

		QUnit.test("removeAllActions",function(assert) {
			var action1 = new sap.ui.ux3.ThingAction("survey4", {
				text : "Create Survey"
			});

			var action2 = new sap.ui.ux3.ThingAction("survey5", {
				text : "Create Survey"
			});

			this.oTI.insertAction(action1, 0);
			this.oTI.insertAction(action2, 1);

			this.oTI.removeAllActions();
			assert.strictEqual(this.oTI.getActions().length, 0, "all actions are removed");
		});

		QUnit.test("destroyActions",function(assert) {
			var action1 = new sap.ui.ux3.ThingAction("survey6", {
				text : "Create Survey"
			});

			this.oTI.addAction(action1);

			this.oTI.destroyActions();
			assert.strictEqual(this.oTI.getActions().length, 0, "all actions are destroyed");
		});

		QUnit.test("indexOfAction",function(assert) {
			var action1 = new sap.ui.ux3.ThingAction("action1", {
				text : "Create Survey"
			});

			var action2 = new sap.ui.ux3.ThingAction("action2", {
				text : "Create Survey"
			});

			var action3 = new sap.ui.ux3.ThingAction("action3", {
				text : "Create Survey"
			});

			this.oTI.insertAction(action1, 0);
			this.oTI.insertAction(action2, 1);
			this.oTI.insertAction(action3, 2);

			assert.strictEqual(this.oTI.indexOfAction(action1), 0, "action is inserted on the correct position");
			assert.strictEqual(this.oTI.indexOfAction(action2), 1, "action is inserted on the correct position");
			assert.strictEqual(this.oTI.indexOfAction(action3), 2, "action is inserted on the correct position");
		});

		QUnit.test("getFacets",function(assert) {

			var facet1 = new sap.ui.ux3.NavigationItem("overview1", {
				key: "overview",
				text: "Overview"
			});
			var facet2 = new sap.ui.ux3.NavigationItem("overview2", {
				key: "overview",
				text: "Overview"
			});

			assert.strictEqual(this.oTI.getFacets().length, 0, "there are no facets added");

			this.oTI.addFacet(facet1);
			this.oTI.addFacet(facet2);
			assert.strictEqual(this.oTI.getFacets().length, 2, "there are two facets added");

			var result = this.oTI.getFacets()[0];
			assert.strictEqual(result, facet1, "the added facets exists");

		});

		QUnit.test("insertFacets",function(assert) {

			var facet1 = new sap.ui.ux3.NavigationItem("overview3", {
				key: "overview",
				text: "Overview"
			});
			var facet2 = new sap.ui.ux3.NavigationItem("overview4", {
				key: "overview",
				text: "Overview"
			});

			this.oTI.insertFacet(facet1, 0);
			this.oTI.insertFacet(facet2, 1);

			var result = this.oTI.getFacets()[0];
			assert.strictEqual(this.oTI.getFacets().indexOf(facet1), 0, "the inserted facets exists");
			assert.strictEqual(this.oTI.getFacets().indexOf(facet2), 1, "the inserted facets exists");

		});

		QUnit.test("removeFacet",function(assert) {

			var facet1 = new sap.ui.ux3.NavigationItem("overview5", {
				key: "overview",
				text: "Overview"
			});

			this.oTI.insertFacet(facet1, 0);
			this.oTI.removeFacet(facet1);

			var result = this.oTI.getFacets()[0];
			assert.strictEqual(this.oTI.getFacets().indexOf(facet1), -1, "the facet is removed");

		});
		QUnit.test("removeAllFacets",function(assert) {

			var facet1 = new sap.ui.ux3.NavigationItem("overview6", {
				key: "overview",
				text: "Overview"
			});
			var facet2 = new sap.ui.ux3.NavigationItem("overview7", {
				key: "overview",
				text: "Overview"
			});

			this.oTI.insertFacet(facet1, 0);
			this.oTI.insertFacet(facet2, 1);
			this.oTI.removeAllFacets();

			assert.strictEqual(this.oTI.getFacets().length, 0, "all facets are removed");
		});

		QUnit.test("destroyFacets",function(assert) {

			var facet1 = new sap.ui.ux3.NavigationItem("overview8", {
				key: "overview",
				text: "Overview"
			});
			var facet2 = new sap.ui.ux3.NavigationItem("overview9", {
				key: "overview",
				text: "Overview"
			});

			this.oTI.insertFacet(facet1, 0);
			this.oTI.insertFacet(facet2, 1);
			this.oTI.destroyFacets();

			assert.strictEqual(this.oTI.getFacets().length, 0, "all facets are destroyed");
		});

		QUnit.test("setFollowState",function(assert) {

			assert.strictEqual(this.oTI.getFollowState(), sap.ui.ux3.FollowActionState.Default, "follow state is set correctly");

			this.oTI.setFollowState(sap.ui.ux3.FollowActionState.Follow);
			assert.strictEqual(this.oTI.getFollowState(sap.ui.ux3.FollowActionState.Follow), sap.ui.ux3.FollowActionState.Follow, "follow state is set correctly");

		});

		QUnit.test("setFlagState",function(assert) {

			assert.strictEqual(this.oTI.getFlagState(), false, "flag state is set correctly");

			this.oTI.setFlagState(true);
			assert.strictEqual(this.oTI.getFlagState(), true, "flag state is set correctly");
		});

		QUnit.test("setFavoriteState",function(assert) {
			this.oTI.setFavoriteState(false);
			assert.strictEqual(this.oTI.getFavoriteState(), false, "favorite state is set correctly");
		});

		QUnit.test("setIcon",function(assert) {
			this.oTI.setIcon("sap-icon://home");
			assert.strictEqual(this.oTI.getIcon(), "sap-icon://home", "icon is set correctly");
		});

		QUnit.test("setType",function(assert) {

			assert.strictEqual(this.oTI.getType(), "", "type is set correctly - the default value is null");

			this.oTI.setType("Test type");
			assert.strictEqual(this.oTI.getType(), "Test type", "type is set correctly");

		});

		QUnit.test("insertFacetContent",function(assert) {

			var facet1 = new sap.ui.ux3.ThingGroup("overview10", {
				text: "Overview"
			});

			this.oTI.insertFacetContent(facet1, 0);
			assert.strictEqual(this.oTI.getFacetContent()[0], facet1, "the content is inserted");
		});

		QUnit.test("addFacetContent",function(assert) {

			var facet1 = new sap.ui.ux3.ThingGroup("overview11", {
				text: "Overview"
			});

			this.oTI.addFacetContent(facet1);
			assert.strictEqual(this.oTI.getFacetContent()[0], facet1, "the content is added");
		});

		QUnit.test("removeFacetContent",function(assert) {

			var facet1 = new sap.ui.ux3.ThingGroup("overview12", {
				text: "Overview"
			});

			this.oTI.addFacetContent(facet1);
			this.oTI.removeFacetContent(facet1);

			var result = this.oTI.getFacetContent()[0];
			assert.strictEqual(this.oTI.getFacetContent().indexOf(facet1), -1, "the facet content is removed");
		});

		QUnit.test("removeAllFacetContent",function(assert) {

			var facet1 = new sap.ui.ux3.ThingGroup("overview13", {
				text: "Overview"
			});
			var facet2 = new sap.ui.ux3.ThingGroup("overview14", {
				text: "Overview"
			});

			this.oTI.addFacetContent(facet1);
			this.oTI.addFacetContent(facet2);
			this.oTI.removeAllFacetContent();

			var result = this.oTI.getFacetContent()[0];
			assert.strictEqual(this.oTI.getFacetContent().length, 0, "all facets are removed");
		});

		QUnit.test("destroyFacetContent",function(assert) {

			var facet1 = new sap.ui.ux3.ThingGroup("overview15", {
				text: "Overview"
			});

			this.oTI.addFacetContent(facet1);
			this.oTI.destroyFacetContent(facet1);

			var result = this.oTI.getFacetContent()[0];
			assert.strictEqual(this.oTI.getFacetContent().indexOf(facet1), -1, "the facet content is destroyed");
		});

		QUnit.test("indexOfFacetContent",function(assert) {
			var facet1 = new sap.ui.ux3.ThingGroup("overview16", {
				text: "Overview"
			});

			var facet2 = new sap.ui.ux3.ThingGroup("overview17", {
				text: "Overview"
			});

			var facet3 = new sap.ui.ux3.ThingGroup("overview18", {
				text: "Overview"
			});

			this.oTI.insertFacetContent(facet1, 0);
			this.oTI.insertFacetContent(facet2, 1);
			this.oTI.insertFacetContent(facet3, 2);

			assert.strictEqual(this.oTI.indexOfFacetContent(facet1), 0, "facet content is inserted on the correct position");
			assert.strictEqual(this.oTI.indexOfFacetContent(facet2), 1, "facet content is inserted on the correct position");
			assert.strictEqual(this.oTI.indexOfFacetContent(facet3), 2, "facet content is inserted on the correct position");
		});

		QUnit.test("destroyActionBar",function(assert) {

			var facet1 = new sap.ui.ux3.ActionBar("overview19", {
				text: "Overview"
			});

			this.oTI.setActionBar(facet1);
			this.oTI.destroyActionBar(facet1);

			assert.strictEqual(this.oTI.getActionBar(), null, "the action bar is destroyed");
		});

		QUnit.test("insertHeaderContent",function(assert) {

			var facet1 = new sap.ui.ux3.ThingGroup("overview20", {
				text: "Overview"
			});

			this.oTI.insertHeaderContent(facet1, 0);
			assert.strictEqual(this.oTI.getHeaderContent()[0], facet1, "the header content is inserted");
		});

		QUnit.test("addHeaderContent",function(assert) {

			var facet1 = new sap.ui.ux3.ThingGroup("overview21", {
				text: "Overview"
			});

			this.oTI.addHeaderContent(facet1);
			assert.strictEqual(this.oTI.getHeaderContent()[0], facet1, "the header content is added");
		});

		QUnit.test("removeHeaderContent ",function(assert) {

			var facet1 = new sap.ui.ux3.ThingGroup("overview22", {
				text: "Overview"
			});

			this.oTI.addHeaderContent (facet1);
			assert.strictEqual(this.oTI.getHeaderContent()[0], facet1, "the header content is added");

			this.oTI.removeHeaderContent (facet1);
			assert.strictEqual(this.oTI.getHeaderContent ().indexOf(facet1), -1, "the header content is removed");
		});

		QUnit.test("removeAllHeaderContent",function(assert) {

			var facet1 = new sap.ui.ux3.ThingGroup("overview23", {
				text: "Overview"
			});
			var facet2 = new sap.ui.ux3.ThingGroup("overview24", {
				text: "Overview"
			});

			this.oTI.addHeaderContent(facet1);
			assert.strictEqual(this.oTI.getHeaderContent()[0], facet1, "the header content is added");

			this.oTI.addHeaderContent(facet2);
			this.oTI.removeAllHeaderContent();

			var result = this.oTI.getHeaderContent()[0];
			assert.strictEqual(this.oTI.getHeaderContent().length, 0, "all header content is removed");
		});

		QUnit.test("destroyHeaderContent",function(assert) {

			var facet1 = new sap.ui.ux3.ThingGroup("overview25", {
				text: "Overview"
			});

			this.oTI.addHeaderContent (facet1);
			assert.strictEqual(this.oTI.getHeaderContent()[0], facet1, "the header content is added");

			this.oTI.destroyHeaderContent(facet1);
			assert.strictEqual(this.oTI.getHeaderContent().indexOf(facet1), -1, "the header content is destroyed");
		});

		QUnit.test("indexOfHeaderContent ",function(assert) {
			var facet1 = new sap.ui.ux3.ThingGroup("overview26", {
				text: "Overview"
			});

			var facet2 = new sap.ui.ux3.ThingGroup("overview27", {
				text: "Overview"
			});

			var facet3 = new sap.ui.ux3.ThingGroup("overview28", {
				text: "Overview"
			});

			this.oTI.insertHeaderContent(facet1, 0);
			this.oTI.insertHeaderContent(facet2, 1);
			this.oTI.insertHeaderContent(facet3, 2);

			assert.strictEqual(this.oTI.indexOfHeaderContent(facet1), 0, "header content is inserted on the correct position");
			assert.strictEqual(this.oTI.indexOfHeaderContent(facet2), 1, "header content is inserted on the correct position");
			assert.strictEqual(this.oTI.indexOfHeaderContent(facet3), 2, "header content is inserted on the correct position");
		});

		QUnit.test("setSelectedFacet",function(assert) {

			assert.strictEqual(this.oTI.getSelectedFacet(), null, "selected facet is set originally empty");

			this.oTI.setSelectedFacet("test facet");
			assert.strictEqual(this.oTI.getSelectedFacet(), "test facet", "selected facet is set correctly");
		});

		QUnit.test("setFavoriteActionEnabled",function(assert) {

			assert.strictEqual(this.oTI.getFavoriteActionEnabled(), true, "favorite state is enabled");

			this.oTI.setFavoriteActionEnabled(false);
			assert.strictEqual(this.oTI.getFavoriteActionEnabled(), false, "favorite state is enabled");
		});

		QUnit.test("setFlagActionEnabled",function(assert) {

			assert.strictEqual(this.oTI.getFlagActionEnabled(), true, "flag action is set enabled");

			this.oTI.setFlagActionEnabled(false);
			assert.strictEqual(this.oTI.getFlagActionEnabled(), false, "flag action is set enabled");
		});

		QUnit.test("setUpdateActionEnabled",function(assert) {

			assert.strictEqual(this.oTI.getUpdateActionEnabled(), true, "update action is enabled");

			this.oTI.setUpdateActionEnabled(false);
			assert.strictEqual(this.oTI.getUpdateActionEnabled(), false, "update action is enabled");
		});

		QUnit.test("setFollowActionEnabled",function(assert) {

			assert.strictEqual(this.oTI.getFollowActionEnabled(), true, "follow action is enabled");

			this.oTI.setFollowActionEnabled(false);
			assert.strictEqual(this.oTI.getFollowActionEnabled(), false, "follow action is enabled");
		});

		QUnit.test("setFirstTitle",function(assert) {

			assert.strictEqual(this.oTI.getFirstTitle(), "", "the default value of the first title is set correctly");

			this.oTI.setFirstTitle("title");
			assert.strictEqual(this.oTI.getFirstTitle(), "title", "first title is set correctly");
		});

		QUnit.test("setSecondTitle",function(assert) {

			assert.strictEqual(this.oTI.getSecondTitle(), "", "the default value of the second title is set correctly");

			this.oTI.setSecondTitle("second title");
			assert.strictEqual(this.oTI.getSecondTitle(), "second title", "second title is set correctly");
		});

		QUnit.test("setHeaderType",function(assert) {
			this.oTI.setHeaderType(sap.ui.ux3.ThingViewerHeaderType.Standard);
			assert.strictEqual(this.oTI.getHeaderType(sap.ui.ux3.ThingViewerHeaderType.Standard), sap.ui.ux3.ThingViewerHeaderType.Standard, "the default value of the header type is set correctly");

			this.oTI.setHeaderType(sap.ui.ux3.ThingViewerHeaderType.Horizontal);
			assert.strictEqual(this.oTI.getHeaderType(), sap.ui.ux3.ThingViewerHeaderType.Horizontal, "header type is set correctly");
		});

	</script>
</head>
<body>
<h1 id="qunit-header">QUnit Page for sap.ui.ux3.ThingInspector</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture">test markup, will be hidden</div>
<div id="uiArea1"></div>
</body>
</html>


text:
#ifndef _LINUX_MEI_H
#define _LINUX_MEI_H

#include <linux/uuid.h>

/*
 * This IOCTL is used to associate the current file descriptor with a
 * FW Client (given by UUID). This opens a communication channel
 * between a host client and a FW client. From this point every read and write
 * will communicate with the associated FW client.
 * Only in close() (file_operation release()) the communication between
 * the clients is disconnected
 *
 * The IOCTL argument is a struct with a union the contains
 * the input parameter and the output parameter for this IOCTL.
 *
 * The input parameter is UUID of the FW Client.
 * The output parameter is the properties of the FW client
 * (FW protocol version and max message size).
 *
 */
#define IOCTL_MEI_CONNECT_CLIENT \
	_IOWR('H' , 0x01, struct mei_connect_client_data)

/*
 * Intel MEI client information struct
 */
struct mei_client {
	__u32 max_msg_length;
	__u8 protocol_version;
	__u8 reserved[3];
};

/*
 * IOCTL Connect Client Data structure
 */
struct mei_connect_client_data {
	union {
		uuid_le in_client_uuid;
		struct mei_client out_client_properties;
	};
};

#endif /* _LINUX_MEI_H  */

redpajama_set_name: RedPajamaGithub


text:
from django.conf import settings
from django.db import models
from django.core.urlresolvers import reverse

from . import util

import mimetypes
from datetime import datetime

import os

class Attachment(models.Model):
    """
    a file attachment assiciated with a post
    a post may have many attachments
    """
    filehash = models.CharField(max_length=256, editable=False)
    filename = models.CharField(max_length=256)
    mimetype = models.CharField(max_length=256, default='text/plain')
    width = models.IntegerField(default=0)
    height = models.IntegerField(default=0)
    banned = models.BooleanField(default=False)

    def path(self):
        ext = self.filename.split('.')[-1]
        return '{}.{}'.format(self.filehash, ext)

    def thumb(self, root=settings.MEDIA_URL):
        return '{}thumb-{}.jpg'.format(root, self.path())

    def source(self, root=settings.MEDIA_URL):
        return '{}{}'.format(root, self.path())

    def remove(self):
        """
        remove from filesystem and delete self
        """
        os.unlink(os.path.join(settings.MEDIA_ROOT, self.thumb('')))
        os.unlink(os.path.join(settings.MEDIA_ROOT, self.source('')))
        self.delete()

class Newsgroup(models.Model):
    """
    synonym for board
    """
    name = models.CharField(max_length=256, primary_key=True, editable=False)
    posts_per_page = models.IntegerField(default=10)
    max_pages = models.IntegerField(default=10)
    banned = models.BooleanField(default=False)

    def get_absolute_url(self):
        if self.name == 'ctl':
            return reverse('frontend:modlog')
        return reverse('frontend:board-front', args=[self.name[9:]])

class Post(models.Model):
    """
    a post made anywhere on the boards
    """

    msgid = models.CharField(max_length=256, primary_key=True, editable=False)
    posthash = models.CharField(max_length=256, editable=False)
    reference = models.CharField(max_length=256, default='')
    message = models.TextField(default='')
    subject = models.CharField(max_length=256, default='None')
    name = models.CharField(max_length=256, default='Anonymous')
    pubkey = models.CharField(max_length=64, default='')
    signature = models.CharField(max_length=64, default='')
    newsgroup = models.ForeignKey(Newsgroup)
    attachments = models.ManyToManyField(Attachment)
    posted = models.IntegerField(default=0)
    placeholder = models.BooleanField(default=False)
    last_bumped = models.IntegerField(default=0)

    def has_attachment(self, filehash):
        """
        return True if we own a file attachment by its hash
        """
        for att in self.attachments.all():
            if att.filehash in filehash:
                return True
        return False

    def get_all_replies(self):
        """
        get all replies to this thread
        """
        if self.is_op():
            return Post.objects.filter(reference=self.msgid).order_by('posted')

    def get_board_replies(self, truncate=5):
        """
        get replies to this thread
        truncate to last N replies
        """
        rpls = self.get_all_replies()
        l = len(rpls)
        if l > truncate:
            rpls = rpls[l-truncate:]
        return rpls

    def is_op(self):
        return self.reference == '' or self.reference == self.msgid

    def shorthash(self):
        return self.posthash[:10]

    def postdate(self):
        return datetime.fromtimestamp(self.posted)

    def get_absolute_url(self):
        """
        self explainitory
        """
        if self.is_op():
            op = util.hashid(self.msgid)
            return reverse('frontend:thread', args=[op])
        else:
            op = util.hashid(self.reference)
            frag = util.hashid(self.msgid)
            return reverse('frontend:thread', args=[op]) + '#{}'.format(frag)

    def bump(self, last):
        """
        bump thread
        """
        if self.is_op():
            self.last_bumped = last

    def remove(self):
        """
        remove post and all attachments
        """
        for att in self.attachments.all():
            att.remove()
        self.delete()

class ModPriv(models.Model):
    """
    a record that permits moderation actions on certain boards or globally
    """

    """
    absolute power :^DDDDDDD (does not exist)
    """
    GOD = 0

    """
    node admin
    """
    ADMIN = 1

    """
    can ban, delete and edit posts
    """
    MOD = 2

    """
    can only delete
    """
    JANITOR = 3

    """
    lowest access level for login
    """
    LOWEST = JANITOR

    """
    what board this priviledge is for or 'all' for global
    """
    board = models.CharField(max_length=128, default='all')

    """
    what level of priviledge is granted
    """
    level = models.IntegerField(default=3)

    """
    public key of mod mod user
    """
    pubkey = models.CharField(max_length=256, editable=False)

    @staticmethod
    def has_access(level, pubkey, board_name=None):
        # check global priviledge
        global_priv = ModPriv.objects.filter(pubkey=pubkey, board='all')
        for priv in global_priv:
            if priv.level <= level:
                return True
        # check board level priviledge
        if board_name:
            board_priv = ModPriv.objects.filter(pubkey=pubkey, board=board_name)
            for priv in board_priv:
                if priv.level <= level:
                    return True
        # no access allowed
        return False

    @staticmethod
    def try_delete(pubkey, post):
        """
        try deleting a post, return True if it was deleted otherwise return False
        """
        if ModPriv.has_access(ModPriv.JANITOR, pubkey, post.newsgroup.name):
            # we can do it
            post.remove()
            return True
        return False

    @staticmethod
    def try_edit(pubkey, post, newbody):
        """
        try editing a post by replacing its body with a new one
        returns True if this was done otherwise return False
        """
        if ModPriv.has_access(ModPriv.MOD, pubkey, post.newsgroup.name):
            post.message = newbody
            post.save()
            return True
        return False


text:
/**
 * Fiji subdivision code.
 *
 * ISO 3166-1 alpha-2: FJ
 *
 * @link http://www.geonames.org/FJ/administrative-division-fiji.html
 */
export const FJ: string [] = [
    '01', // Ba Province
    '02', // Bua Province
    '03', // Cakaudrove Province
    '04', // Kadavu Province
    '05', // Lau Province
    '06', // Lomaiviti Province
    '07', // Mathuata Province
    '08', // Nandronga and Navosa Province
    '09', // Naitasiri Province
    '10', // Namosi Province
    '11', // Ra Province
    '12', // Rewa Province
    '13', // Serua Province
    '14', // Tailevu Province
    'C',  // Central Division
    'E',  // Eastern Division
    'N',  // Northern Division
    'R',  // Rotuma
    'W'   // Western Division
];


text:
module System.Build.Access.Extdirs where

class Extdirs r where
  extdirs ::
    [FilePath]
    -> r
    -> r

  getExtdirs ::
    r
    -> [FilePath]


text:
//  Permission is hereby granted, free of charge, to any person obtaining a copy of
//  this software and associated documentation files (the "Software"), to deal in
//  the Software without restriction, including without limitation the rights to
//  use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
//  of the Software, and to permit persons to whom the Software is furnished to do
//  so, subject to the following conditions:

//  The above copyright notice and this permission notice shall be included in all
//  copies or substantial portions of the Software.

//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
//  SOFTWARE.

using System.Collections.Generic;
using System.IO;
using System.Text;
using Xunit;
using YamlDotNet.Core;
using YamlDotNet.RepresentationModel;

namespace YamlDotNet.Test.RepresentationModel
{
    public class YamlStreamTests
    {
        [Fact]
        public void LoadSimpleDocument() {
            var stream = new YamlStream();
            stream.Load(Yaml.StreamFrom("02-scalar-in-imp-doc.yaml"));

            Assert.Equal(1, stream.Documents.Count);
            Assert.IsType<YamlScalarNode>(stream.Documents[0].RootNode);
            Assert.Equal("a scalar", ((YamlScalarNode)stream.Documents[0].RootNode).Value);
        }

        [Fact]
        public void BackwardAliasReferenceWorks() {
            var stream = new YamlStream();
            stream.Load(Yaml.StreamFrom("backwards-alias.yaml"));

            Assert.Equal(1, stream.Documents.Count);
            Assert.IsType<YamlSequenceNode>(stream.Documents[0].RootNode);

            var sequence = (YamlSequenceNode)stream.Documents[0].RootNode;
            Assert.Equal(3, sequence.Children.Count);

            Assert.Equal("a scalar", ((YamlScalarNode)sequence.Children[0]).Value);
            Assert.Equal("another scalar", ((YamlScalarNode)sequence.Children[1]).Value);
            Assert.Equal("a scalar", ((YamlScalarNode)sequence.Children[2]).Value);
            Assert.Same(sequence.Children[0], sequence.Children[2]);
        }

        [Fact]
        public void ForwardAliasReferenceWorks() {
            var stream = new YamlStream();
            stream.Load(Yaml.StreamFrom("forward-alias.yaml"));

            Assert.Equal(1, stream.Documents.Count);
            Assert.IsType<YamlSequenceNode>(stream.Documents[0].RootNode);

            var sequence = (YamlSequenceNode)stream.Documents[0].RootNode;
            Assert.Equal(3, sequence.Children.Count);

            Assert.Equal("a scalar", ((YamlScalarNode)sequence.Children[0]).Value);
            Assert.Equal("another scalar", ((YamlScalarNode)sequence.Children[1]).Value);
            Assert.Equal("a scalar", ((YamlScalarNode)sequence.Children[2]).Value);
            Assert.Same(sequence.Children[0], sequence.Children[2]);
        }

        [Fact]
        public void RoundtripExample1()
        {
            RoundtripTest("01-directives.yaml");
        }

        [Fact]
        public void RoundtripExample2()
        {
            RoundtripTest("02-scalar-in-imp-doc.yaml");
        }

        [Fact]
        public void RoundtripExample3()
        {
            RoundtripTest("03-scalar-in-exp-doc.yaml");
        }

        [Fact]
        public void RoundtripExample4()
        {
            RoundtripTest("04-scalars-in-multi-docs.yaml");
        }

        [Fact]
        public void RoundtripExample5()
        {
            RoundtripTest("06-float-tag.yaml");
        }

        [Fact]
        public void RoundtripExample6()
        {
            RoundtripTest("06-float-tag.yaml");
        }

        [Fact]
        public void RoundtripExample7()
        {
            RoundtripTest("07-scalar-styles.yaml");
        }

        [Fact]
        public void RoundtripExample8()
        {
            RoundtripTest("08-flow-sequence.yaml");
        }

        [Fact]
        public void RoundtripExample9()
        {
            RoundtripTest("09-flow-mapping.yaml");
        }

        [Fact]
        public void RoundtripExample10()
        {
            RoundtripTest("10-mixed-nodes-in-sequence.yaml");
        }

        [Fact]
        public void RoundtripExample11()
        {
            RoundtripTest("11-mixed-nodes-in-mapping.yaml");
        }

        [Fact]
        public void RoundtripExample12()
        {
            RoundtripTest("12-compact-sequence.yaml");
        }

        [Fact]
        public void RoundtripExample13()
        {
            RoundtripTest("13-compact-mapping.yaml");
        }

        [Fact]
        public void RoundtripExample14()
        {
            RoundtripTest("14-mapping-wo-indent.yaml");
        }

        [Fact]
        public void RoundtripBackreference()
        {
            RoundtripTest("backreference.yaml");
        }

        [Fact]
        public void FailBackreference()
        {
            RoundtripTest("fail-backreference.yaml");
        }

        [Fact]
        public void AllAliasesMustBeResolved()
        {
            var original = new YamlStream();
            Assert.Throws<AnchorNotFoundException>(() => original.Load(Yaml.StreamFrom("invalid-reference.yaml")));
        }

        private void RoundtripTest(string yamlFileName)
        {
            var original = new YamlStream();
            original.Load(Yaml.StreamFrom(yamlFileName));

            var buffer = new StringBuilder();
            original.Save(new StringWriter(buffer));

            Dump.WriteLine(buffer);

            var final = new YamlStream();
            final.Load(new StringReader(buffer.ToString()));

            var originalBuilder = new YamlDocumentStructureBuilder();
            original.Accept(originalBuilder);

            var finalBuilder = new YamlDocumentStructureBuilder();
            final.Accept(finalBuilder);

            Dump.WriteLine("The original document produced {0} events.", originalBuilder.Events.Count);
            Dump.WriteLine("The final document produced {0} events.", finalBuilder.Events.Count);
            Assert.Equal(originalBuilder.Events.Count, finalBuilder.Events.Count);

            for (var i = 0; i < originalBuilder.Events.Count; ++i)
            {
                var originalEvent = originalBuilder.Events[i];
                var finalEvent = finalBuilder.Events[i];

                Assert.Equal(originalEvent.Type, finalEvent.Type);
                Assert.Equal(originalEvent.Value, finalEvent.Value);
            }
        }

        private class YamlDocumentStructureBuilder : YamlVisitor
        {
            private readonly List<YamlNodeEvent> events = new List<YamlNodeEvent>();

            public IList<YamlNodeEvent> Events
            {
                get {
                    return events;
                }
            }

            protected override void Visit(YamlScalarNode scalar)
            {
                events.Add(new YamlNodeEvent(YamlNodeEventType.Scalar, scalar.Anchor, scalar.Tag, scalar.Value));
            }

            protected override void Visit(YamlSequenceNode sequence)
            {
                events.Add(new YamlNodeEvent(YamlNodeEventType.SequenceStart, sequence.Anchor, sequence.Tag, null));
            }

            protected override void Visited(YamlSequenceNode sequence)
            {
                events.Add(new YamlNodeEvent(YamlNodeEventType.SequenceEnd, sequence.Anchor, sequence.Tag, null));
            }

            protected override void Visit(YamlMappingNode mapping)
            {
                events.Add(new YamlNodeEvent(YamlNodeEventType.MappingStart, mapping.Anchor, mapping.Tag, null));
            }

            protected override void Visited(YamlMappingNode mapping)
            {
                events.Add(new YamlNodeEvent(YamlNodeEventType.MappingEnd, mapping.Anchor, mapping.Tag, null));
            }
        }

        private class YamlNodeEvent
        {
            public YamlNodeEventType Type { get; private set; }
            public string Anchor { get; private set; }
            public string Tag { get; private set; }
            public string Value { get; private set; }

            public YamlNodeEvent(YamlNodeEventType type, string anchor, string tag, string value) {
                Type = type;
                Anchor = anchor;
                Tag = tag;
                Value = value;
            }
        }

        private enum YamlNodeEventType
        {
            SequenceStart,
            SequenceEnd,
            MappingStart,
            MappingEnd,
            Scalar,
        }
    }
}


text:
var express = require('express')
  , dnode = require('dnode')
  , irc = require('./ircwrap')
  , couch = require('./couch')

var app = express.createServer()
app.get('/', function(req, res) {
  res.send('<script src="/dnode.js" type="text/javascript"></script>')
})
app.listen(1337)

var dnodeServer = dnode(function(remote, conn) {
  var wrapper =
  { getClient: function(userid, password, cb) {
      irc(userid, password, wrapper.conn, cb)
    }
  , fetchChatlines: function(docid, backwards, cb) {
      couch.fetchChatlines(wrapper.conn.user.name, docid, backwards, cb)
    }
  , fetchLastChatlines: function(network, channel, cb) {
      couch.fetchLastChatlines(wrapper.conn.user.name, network, channel, cb)
    }
  }
  Object.defineProperty(wrapper, 'conn', {value: conn})
  return wrapper
})
dnodeServer.listen(app)


text:
<?php

namespace Fi\OracleBundle\DependencyInjection;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author D59495
 */
class fiQuery extends fiOracle {

    private $resultset = array();
    private $numrows = 0;
    private $maxrows = -1;
    private $initialrow = 0;
    private $orasid;
    private $orausr;
    private $orapwd;

    public function __construct($parms) {
        $this->orasid = $parms["connessione"];
        $this->orausr = $parms["utente"];
        $this->orapwd = $parms["password"];
    }

    public function executeSelectQuery($sql, $parms = array()) {
        $this->resultset = array();
        $this->numrows = 0;
        if (!$sql) {
            trigger_error("Non è stata specificata l'istruzione sql da elaborare", E_USER_ERROR);
        }
        $dbOracle = $this->connect($this->orasid, $this->orausr, $this->orapwd);

        $sql_statement = OCIParse($dbOracle, $sql);

        $qParameters = (isset($parms["query_parameters"]) ? $parms["query_parameters"] : array());
        //var_dump($qParameters);exit;
        foreach ($qParameters as $key => $value) {
            oci_bind_by_name($sql_statement, $key, $value);
        }

        $exitcode = OCI_Execute($sql_statement);
        if (!$exitcode) {
            $ex = oci_error($sql_statement);
            trigger_error("Impossibile eseguire la query: " . $sql . "
" . $ex['message'], E_USER_ERROR);
            //trigger_error(htmlentities($ex['message'], ENT_QUOTES), E_USER_ERROR);
        }

        if (isset($parms["fetch_by_column"]) && $parms["fetch_by_column"]) {
            $fetchMode = OCI_FETCHSTATEMENT_BY_COLUMN;
        } else {
            $fetchMode = OCI_FETCHSTATEMENT_BY_ROW;
        }

        $this->numrows = oci_fetch_all($sql_statement, $this->resultset, $this->initialrow, $this->maxrows, $fetchMode + OCI_ASSOC + OCI_RETURN_NULLS);

        /* while (($row = oci_fetch_array($sql_statement, OCI_ASSOC + OCI_RETURN_NULLS))) {
          //Si prendono i dati dal db
          $this->resultset[] = $row;
          } */

        //Si libera la risorsa che conteneva lo statment sql
        oci_free_statement($sql_statement);

        //var_dump($this->lista);
    }

    public function executeQuery($sql) {
        $this->resultset = array();
        $this->numrows = 0;
        if (!$sql) {
            trigger_error("Non è stata specificata l'istruzione sql da elaborare", E_USER_ERROR);
        }
        $dbOracle = $this->connect($this->orasid, $this->orausr, $this->orapwd);

        $sql_statement = OCIParse($dbOracle, $sql);

        $exitcode = OCI_Execute($sql_statement);
        $this->numrows = oci_num_rows($sql_statement);
        if (!$exitcode) {
            $ex = oci_error($sql_statement);
            trigger_error("Impossibile eseguire la query: " . $sql . "
" . $ex['message'], E_USER_ERROR);
            //trigger_error(htmlentities($ex['message'], ENT_QUOTES), E_USER_ERROR);
        }

        //Si libera la risorsa che conteneva lo statment sql
        oci_free_statement($sql_statement);
    }

    public function getResultset() {
        return $this->resultset;
    }

    public function getNumRows() {
        return $this->numrows;
    }

}

?>


text:
using System.Collections.Generic;

namespace ExcelFormulaExpressionParser.Models
{
    public class XRow
    {
        private XSheet Sheet { get; }

        public int Row { get; }

        public List<XCell> Cells { get; set; }

        public XRow(XSheet sheet, int row)
        {
            Sheet = sheet;
            Row = row;
            Cells = new List<XCell>();
        }

        //public XCell this[string address]
        //{
        //    get
        //    {
        //        if (!address.Contains('!'))
        //        {
        //            return Cells.FirstOrDefault(c => c.Address == address);
        //        }

        //        {
        //            var rows = sheets.SelectMany(s => s.Rows);
        //            return rows.SelectMany(r => r.Cells).FirstOrDefault(c => c.FullAddress == address);
        //        }
        //    }
        //}
    }
}


text: <!DOCTYPE html>


text:
import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  TouchableOpacity,
  View
} from 'react-native';

import Style from './Style'

export class Newsticker extends Component {
  constructor() {
    super();
    this.state = {
      render_text: '',
      state: [],
      timers: [],
      tick_timer: '',
      blink_timer: '',
      is_cursor_disp: true,
    }
  }

  componentDidMount() {
    var that = this;
    that.setState({
      text: that.props.text.split(''),
    });
  }
 componentWillReceiveProps(nextProps) {
    var that = this;
    if(nextProps.start) {
      clearInterval(this.state.blink_timer)
    }
  }

  shouldComponentUpdate(nextProps, nextState) {
    return true
  }

  componentDidUpdate(prevProps, prevState) {
    var that = this;
    if(this.props.start) {
      this.controller(prevProps, prevState)
    }
  }
  controller(prevProps, prevState) {
    if(
      (!this.props.back && this.state.text.length > 0) ||
      (this.props.back && this.state.render_text.length > 0) &&
      this.props.start) {
      this.tick()
      } else {
        this.tickEnd()
      }
  }
  tick() {
    var that = this;
     setTimeout(function(){
      that._setText()
      clearInterval(that.state.tick_timer)
    }, this.props.typeInterval);

  }
  _setText() {
    var that = this;
    var text = '';
    if (this.props.back) {
      that.state.text.unshift( that.state.render_text.substr( -1, 1 ) )
      text = that.state.render_text.substr( 0 , (that.state.render_text.length-1) )
    } else {
      text = that.state.render_text + that.state.text.shift()
    }

    that.setState({
      render_text: text
    });
  }

  tickEnd() {
    clearInterval(this.state.blink_timer)
    this.blink();
    if (this.props.onFinish) {
      this.props.onFinish()
    }
    this.setState({is_ticking: false})
  }

  blink() {
    var that = this;
    this.state.blink_timer = setInterval(function(){
      that.setState({
        is_cursor_disp: !that.state.is_cursor_disp,
      });
    }, this.props.blinkInterval)
  }

  render() {
    var cursor = (
      <Text style={[
        Style.cursor,
        this.state.is_cursor_disp && Style.display,
      ]}>|</Text>
    )
    return (
      <View>
        <Text style={[this.props.style]}>
          {this.state.render_text}
          {this.props.cursor && cursor}
        </Text>
      </View>
    );
  }
}

Newsticker.defaultProps = {
  text: '',
  typeInterval: 100,
  blinkInterval: 500,
  start: true,
  callbackDelay: 0,
  onFinish: false,
  cursor: true,
};

module.exports = Newsticker


text:
require 'capistrano/recipes/deploy/scm/base'
require 'yaml'

module Capistrano
  module Deploy
    module SCM

      # Implements the Capistrano SCM interface for the Subversion revision
      # control system (http://subversion.tigris.org).
      class Subversion < Base
        # Sets the default command name for this SCM. Users may override this
        # by setting the :scm_command variable.
        default_command "svn"

        # Subversion understands 'HEAD' to refer to the latest revision in the
        # repository.
        def head
          "HEAD"
        end

        # Returns the command that will check out the given revision to the
        # given destination.
        def checkout(revision, destination)
          scm :checkout, verbose, authentication, "-r#{revision}", repository, destination
        end

        # Returns the command that will do an "svn update" to the given
        # revision, for the working copy at the given destination.
        def sync(revision, destination)
          scm :update, verbose, authentication, "-r#{revision}", destination
        end

        # Returns the command that will do an "svn export" of the given revision
        # to the given destination.
        def export(revision, destination)
          scm :export, verbose, authentication, "-r#{revision}", repository, destination
        end

        # Returns the command that will do an "svn diff" for the two revisions.
        def diff(from, to=nil)
          scm :diff, repository, authentication, "-r#{from}:#{to || head}"
        end

        # Returns an "svn log" command for the two revisions.
        def log(from, to=nil)
          scm :log, repository, authentication, "-r#{from}:#{to || head}"
        end

        # Attempts to translate the given revision identifier to a "real"
        # revision. If the identifier is an integer, it will simply be returned.
        # Otherwise, this will yield a string of the commands it needs to be
        # executed (svn info), and will extract the revision from the response.
        def query_revision(revision)
          return revision if revision =~ /^\d+$/
          command = scm(:info, repository, authentication, "-r#{revision}")
          result = yield(command)
          yaml = YAML.load(result)
          raise "tried to run `#{command}' and got unexpected result #{result.inspect}" unless Hash === yaml
          yaml['Last Changed Rev'] || yaml['Revision']
        end

        # Increments the given revision number and returns it.
        def next_revision(revision)
          revision.to_i + 1
        end

        # Determines what the response should be for a particular bit of text
        # from the SCM. Password prompts, connection requests, passphrases,
        # etc. are handled here.
        def handle_data(state, stream, text)
	        logger.info "[#{stream}] #{text}"
          case text
          when /\bpassword.*:/i
            # subversion is prompting for a password
            "#{scm_password_prompt}\n"
          when %r{\(yes/no\)}
            # subversion is asking whether or not to connect
            "yes\n"
          when /passphrase/i
            # subversion is asking for the passphrase for the user's key
            "#{variable(:scm_passphrase)}\n"
          when /The entry \'(.+?)\' is no longer a directory/
            raise Capistrano::Error, "subversion can't update because directory '#{$1}' was replaced. Please add it to svn:ignore."
          when /accept \(t\)emporarily/
            # subversion is asking whether to accept the certificate
            "t\n"
          end
        end

        private

          # If a username is configured for the SCM, return the command-line
          # switches for that. Note that we don't need to return the password
          # switch, since Capistrano will check for that prompt in the output
          # and will respond appropriately.
          def authentication
            username = variable(:scm_username)
            return "" unless username
            result = "--username #{variable(:scm_username)} "
            result << "--password #{variable(:scm_password)} " unless variable(:scm_prefer_prompt)
            result << "--no-auth-cache " unless variable(:scm_auth_cache)
            result
          end

          # If verbose output is requested, return nil, otherwise return the
          # command-line switch for "quiet" ("-q").
          def verbose
            variable(:scm_verbose) ? nil : "-q"
          end

          def scm_password_prompt
            @scm_password_prompt ||= variable(:scm_password) ||
              variable(:password) ||
              Capistrano::CLI.password_prompt("Subversion password: ")
          end
      end

    end
  end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 297028 $ -->
<refentry xml:id="function.classkit-method-add" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>classkit_method_add</refname>
  <refpurpose>Dynamically adds a new method to a given class</refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>bool</type><methodname>classkit_method_add</methodname>
   <methodparam><type>string</type><parameter>classname</parameter></methodparam>
   <methodparam><type>string</type><parameter>methodname</parameter></methodparam>
   <methodparam><type>string</type><parameter>args</parameter></methodparam>
   <methodparam><type>string</type><parameter>code</parameter></methodparam>
   <methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>CLASSKIT_ACC_PUBLIC</initializer></methodparam>
  </methodsynopsis>
  &warn.experimental.func;
 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>classname</parameter></term>
     <listitem>
      <para>
       The class to which this method will be added
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>methodname</parameter></term>
     <listitem>
      <para>
       The name of the method to add
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>args</parameter></term>
     <listitem>
      <para>
       Comma-delimited list of arguments for the newly-created method
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>code</parameter></term>
     <listitem>
      <para>
       The code to be evaluated when <parameter>methodname</parameter>
       is called
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term><parameter>flags</parameter></term>
     <listitem>
      <para>
       The type of method to create, can be
       <constant>CLASSKIT_ACC_PUBLIC</constant>,
       <constant>CLASSKIT_ACC_PROTECTED</constant> or
       <constant>CLASSKIT_ACC_PRIVATE</constant>
      </para>
      <note>
       <para>
        This parameter is only used as of PHP 5, because, prior to this,
        all methods were public.
       </para>
      </note>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>
 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &return.success;
  </para>
 </refsect1>
 <!-- No changelog: it's only in PECL. -->
 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title><function>classkit_method_add</function> example</title>
    <programlisting role="php">
<![CDATA[
<?php
class Example {
    function foo() {
        echo "foo!\n";
    }
}

// create an Example object
$e = new Example();

// Add a new public method
classkit_method_add(
    'Example',
    'add',
    '$num1, $num2',
    'return $num1 + $num2;',
    CLASSKIT_ACC_PUBLIC
);

// add 12 + 4
echo $e->add(12, 4);
?>
]]>
    </programlisting>
    &example.outputs;
    <screen>
<![CDATA[
16
]]>
    </screen>
   </example>
  </para>
 </refsect1>
 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>classkit_method_copy</function></member>
    <member><function>classkit_method_redefine</function></member>
    <member><function>classkit_method_remove</function></member>
    <member><function>classkit_method_rename</function></member>
    <member><function>create_function</function></member>
   </simplelist>
  </para>
 </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->


text:
<?xml version="1.0"?>

<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Custom Rules"
    xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
    xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">

    <description>
        BRouter PMD Ruleset
    </description>

    <rule ref="rulesets/java/quickstart.xml">
        <exclude name="AbstractClassWithoutAnyMethod" />
        <exclude name="AssignmentInOperand" />
        <exclude name="AssignmentToNonFinalStatic" />
        <exclude name="AvoidBranchingStatementAsLastInLoop" />
        <exclude name="AvoidCatchingThrowable" />
        <exclude name="AvoidProtectedFieldInFinalClass" />
        <exclude name="AvoidUsingVolatile" />
        <exclude name="CloseResource" />
        <exclude name="CompareObjectsWithEquals" />
        <exclude name="ControlStatementBraces" />
        <exclude name="DoNotCallGarbageCollectionExplicitly" />
        <exclude name="EmptyCatchBlock" />
        <exclude name="EmptyControlStatement" />
        <exclude name="ForLoopCanBeForeach" />
        <exclude name="LiteralsFirstInComparisons" />
        <exclude name="MissingOverride" />
        <exclude name="OneDeclarationPerLine" />
        <exclude name="OverrideBothEqualsAndHashcode" />
        <exclude name="PreserveStackTrace" />
        <exclude name="PrimitiveWrapperInstantiation" />
        <exclude name="ReturnEmptyCollectionRatherThanNull" />
        <exclude name="UncommentedEmptyConstructor" />
        <exclude name="UncommentedEmptyMethodBody" />
        <exclude name="UnusedFormalParameter" />
        <exclude name="UnusedLocalVariable" />
        <exclude name="UnusedPrivateField" />
        <exclude name="UnusedPrivateMethod" />
        <exclude name="UseCollectionIsEmpty" />
        <exclude name="UseLocaleWithCaseConversions" />
        <exclude name="UseNotifyAllInsteadOfNotify" />
        <exclude name="UseUtilityClass" />
        <exclude name="UselessParentheses" />

        <!-- Naming -->
        <exclude name="FormalParameterNamingConventions" />
        <exclude name="LocalVariableNamingConventions" />
        <exclude name="MethodNamingConventions" />
    </rule>

</ruleset>


text:
//
//  UIView+Separator.m
//  Separator
//
//  Created by 余河川 on 15/10/21.
//  Copyright © 2015年 余河川. All rights reserved.
//

#import "UIView+Separator.h"
#import <objc/runtime.h>

#pragma mark - LYSeparatorUpdateDelegate
@protocol LYSeparatorUpdateDelegate <NSObject>

- (void)separatorDidUpdate:(LYSeparatorDescription *)separator;

@end

/**
 *  table 分割线 颜色
 */
#define LYTableSeparatorColor [UIColor colorWithRed:200/255.0 green:199/255.0 blue:204/255.0 alpha:1]

#pragma mark - LYSeparatorDescription
@interface LYSeparatorDescription()

@property (nonatomic, weak) id<LYSeparatorUpdateDelegate> delegate;

@end

@implementation LYSeparatorDescription

+ (instancetype)separatorWithName:(NSString *)name {

    LYSeparatorDescription *obj = [LYSeparatorDescription new];
    if (obj) {
        obj->_name = name;
    }
    return obj;

}

- (instancetype)init {

    self = [super init];
    if (self) {

        self->_name = @"_LYSeparatorDescription_";
        self.lineWidth = 0.5;
        self.stokeColor = LYTableSeparatorColor;
        self.stokeStart = 0;
        self.stokeEnd = 1;
        self.relation = LYSeparatorHorizontalBottomSpace;
        self.constant = 0;
        self.instanceCount = 1;
        self.instanceTransform = CATransform3DIdentity;

    }
    return self;

}

- (void)setConstant:(CGFloat)constant {

    _constant = constant;
    [self callDelegateUpdate];

}

- (void)setRelation:(LYSeparatorRelation)relation {

    _relation = relation;
    [self callDelegateUpdate];

}

- (void)setStokeStart:(CGFloat)stokeStart {

    _stokeStart = stokeStart;
    [self callDelegateUpdate];

}

- (void)setStokeEnd:(CGFloat)stokeEnd {

    _stokeEnd = stokeEnd;
    [self callDelegateUpdate];

}

- (void)setStokeColor:(UIColor *)stokeColor {

    _stokeColor = stokeColor ?: LYTableSeparatorColor;
    [self callDelegateUpdate];

}

- (void)setLineWidth:(CGFloat)lineWidth {

    _lineWidth = lineWidth;
    [self callDelegateUpdate];

}

- (void)setStokePath:(UIBezierPath *)stokePath {

    _stokePath = stokePath;
    [self callDelegateUpdate];

}

- (void)setCustomView:(UIView *)customView {

    _customView = customView;
    [self callDelegateUpdate];

}

- (void)callDelegateUpdate {

    if ([_delegate respondsToSelector:@selector(separatorDidUpdate:)]) {
        [_delegate separatorDidUpdate:self];
    }

}

@end

#pragma mark - LYSeparatorLayer
@interface LYSeparatorLayer : CALayer <LYSeparatorUpdateDelegate>

@property (nonatomic, copy) NSArray<LYSeparatorDescription *> *separators;

@end

@implementation LYSeparatorLayer

- (void)setSeparators:(NSArray *)separators {

    _separators = [separators copy];
    if ([_separators count]) {
        [self setNeedsDisplay];
    }

}

- (void)drawInContext:(CGContextRef)ctx {

    [super drawInContext:ctx];
    NSArray *sublayers = [self.sublayers copy];
    [sublayers enumerateObjectsUsingBlock:^(CALayer * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {

        [obj removeFromSuperlayer];

    }];
    [_separators enumerateObjectsUsingBlock:^(LYSeparatorDescription * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
        /**
         *  可以参考 CAReplicatorLayer 的用法
         */
        if (obj.customView) {

            CAReplicatorLayer *repLayer = [CAReplicatorLayer layer];
            [self addSublayer:repLayer];
            repLayer.frame = self.bounds;
            [repLayer addSublayer:obj.customView.layer];
            repLayer.instanceCount = obj.instanceCount;
            repLayer.instanceDelay = obj.instanceDelay;
            repLayer.instanceTransform = obj.instanceTransform;
            repLayer.instanceColor = [obj.instanceColor CGColor];
            repLayer.instanceRedOffset = obj.instanceRedOffset;
            repLayer.instanceGreenOffset = obj.instanceGreenOffset;
            repLayer.instanceBlueOffset = obj.instanceBlueOffset;
            repLayer.instanceAlphaOffset = obj.instanceAlphaOffset;
            [repLayer layoutIfNeeded];

        } else {

            CAShapeLayer *shapeLayer = [CAShapeLayer layer];
            [self addSublayer:shapeLayer];
            shapeLayer.frame = self.bounds;
            UIBezierPath *bezierPath = obj.stokePath ? obj.stokePath : [self bezierPathWithSeparator:obj inRect:self.bounds];
            shapeLayer.path = [bezierPath CGPath];
            shapeLayer.strokeColor = [obj.stokeColor CGColor];
            shapeLayer.strokeStart = obj.stokeStart;
            shapeLayer.strokeEnd = obj.stokeEnd;
            shapeLayer.lineWidth = obj.lineWidth;
            shapeLayer.fillColor = [[UIColor clearColor] CGColor];

        }
        obj.delegate = self;

    }];

}

- (UIBezierPath *)bezierPathWithSeparator:(LYSeparatorDescription *)separator inRect:(CGRect)rect {

    UIBezierPath *bezierPath = [UIBezierPath bezierPath];
    switch (separator.relation) {

        case LYSeparatorVerticalLeftRatio: {

            CGFloat width = CGRectGetWidth(rect) - separator.lineWidth;
            CGFloat height = CGRectGetHeight(rect);

            [bezierPath moveToPoint:CGPointMake(width * separator.constant + 0.5 * separator.lineWidth, 0)];
            [bezierPath addLineToPoint:CGPointMake(width * separator.constant + 0.5 * separator.lineWidth, height)];

        }
            break;

        case LYSeparatorHorizontalTopRatio: {

            CGFloat width = CGRectGetWidth(rect);
            CGFloat height = CGRectGetHeight(rect) - separator.lineWidth;
            [bezierPath moveToPoint:CGPointMake(0, separator.constant * height + 0.5 * separator.lineWidth)];
            [bezierPath addLineToPoint:CGPointMake(width, separator.constant * height + 0.5 * separator.lineWidth)];

        }
            break;

        case LYSeparatorVerticalLeftSpace: {

            CGFloat height = CGRectGetHeight(rect);
            [bezierPath moveToPoint:CGPointMake(separator.constant + 0.5 * separator.lineWidth, 0)];
            [bezierPath addLineToPoint:CGPointMake(separator.constant + 0.5 * separator.lineWidth, height)];

        }
            break;

        case LYSeparatorVerticalRightSpace: {

            CGFloat width = CGRectGetWidth(rect);
            CGFloat height = CGRectGetHeight(rect);
            [bezierPath moveToPoint:CGPointMake(width - separator.constant - 0.5 * separator.lineWidth, 0)];
            [bezierPath addLineToPoint:CGPointMake(width - separator.constant - 0.5 * separator.lineWidth, height)];

        }
            break;

        case LYSeparatorVerticalCenterSpace: {

            CGFloat centerX = CGRectGetMidX(rect);
            CGFloat height = CGRectGetHeight(rect);
            [bezierPath moveToPoint:CGPointMake(centerX + separator.constant, 0)];
            [bezierPath addLineToPoint:CGPointMake(centerX + separator.constant, height)];

        }
            break;

        case LYSeparatorHorizontalTopSpace: {

            CGFloat width = CGRectGetWidth(rect);
            [bezierPath moveToPoint:CGPointMake(0, separator.constant + 0.5 * separator.lineWidth)];
            [bezierPath addLineToPoint:CGPointMake(width, separator.constant + 0.5 * separator.lineWidth)];

        }
            break;

        case LYSeparatorHorizontalBottomSpace: {

            CGFloat width = CGRectGetWidth(rect);
            CGFloat height = CGRectGetHeight(rect) - separator.lineWidth;
            [bezierPath moveToPoint:CGPointMake(0, height - separator.constant - 0.5 * separator.lineWidth)];
            [bezierPath addLineToPoint:CGPointMake(width, height - separator.constant - 0.5 * separator.lineWidth)];

        }
            break;

        case LYSeparatorHorizontalCenterSpace: {

            CGFloat centerY = CGRectGetMidY(rect);
            CGFloat width = CGRectGetWidth(rect);
            [bezierPath moveToPoint:CGPointMake(0, separator.constant + centerY)];
            [bezierPath addLineToPoint:CGPointMake(width, separator.constant + centerY)];

        }
            break;

    }
    return bezierPath;

}

- (void)separatorDidUpdate:(LYSeparatorDescription *)separator {

    [self setNeedsDisplay];

}

@end

#pragma mark - UIView (Separator)
static char *const LYViewSeparatorLayerKey = "SeparatorLayer";
static char *const LYViewSeparatorLayerInsetsKey = "SeparatorLayerInsets";

@implementation UIView (Separator)

#pragma mark load

+ (void)load
{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{

        Method layoutSubviews = class_getInstanceMethod(self, @selector(layoutSubviews));
        Method ly_layoutSubviews = class_getInstanceMethod(self, @selector(ly_layoutSubviews));
        method_exchangeImplementations(layoutSubviews, ly_layoutSubviews);

    });
}

#pragma mark properties

- (CAShapeLayer *)separatorLayer {

    return objc_getAssociatedObject(self, LYViewSeparatorLayerKey);

}

- (UIEdgeInsets)separatorLayerInsets {

    if (!objc_getAssociatedObject(self, LYViewSeparatorLayerInsetsKey)) {
        objc_setAssociatedObject(self, LYViewSeparatorLayerInsetsKey, [NSValue valueWithUIEdgeInsets:UIEdgeInsetsZero], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
    }
    NSValue *value = (NSValue *)objc_getAssociatedObject(self, LYViewSeparatorLayerInsetsKey);
    return [value UIEdgeInsetsValue];

}

- (void)setSeparatorLayerInsets:(UIEdgeInsets)separatorLayerInsets {

    objc_setAssociatedObject(self, LYViewSeparatorLayerInsetsKey, [NSValue valueWithUIEdgeInsets:separatorLayerInsets], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
    [self setNeedsLayout];

}

#pragma mark layout

- (void)ly_layoutSubviews {

    [self ly_layoutSubviews];
    CGRect frame = self.bounds;
    frame.origin.x += self.separatorLayerInsets.left;
    frame.origin.y += self.separatorLayerInsets.top;
    frame.size.width -= (self.separatorLayerInsets.left + self.separatorLayerInsets.right);
    frame.size.height -= (self.separatorLayerInsets.top + self.separatorLayerInsets.bottom);
    self.separatorLayer.frame = frame;
    [self.separatorLayer setNeedsDisplay];

}

#pragma mark add separator

- (void)addSeparator:(LYSeparatorDescription *)separator {

    if (!self.separatorLayer) {

        objc_setAssociatedObject(self, LYViewSeparatorLayerKey, [LYSeparatorLayer layer], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
        [self.layer addSublayer:self.separatorLayer];

    }
    LYSeparatorLayer *separatorLayer = (LYSeparatorLayer *)self.separatorLayer;
    NSMutableArray *array = [separatorLayer.separators mutableCopy];
    if (!array) {
        array = [NSMutableArray array];
    }
    [array addObject:separator];
    separatorLayer.separators = [array copy];

}

- (void)addSeparators:(NSArray<LYSeparatorDescription *> *)separators {

    if (!self.separatorLayer) {

        objc_setAssociatedObject(self, LYViewSeparatorLayerKey, [LYSeparatorLayer layer], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
        [self.layer addSublayer:self.separatorLayer];

    }
    LYSeparatorLayer *separatorLayer = (LYSeparatorLayer *)self.separatorLayer;
    NSMutableArray *array = [separatorLayer.separators mutableCopy];
    if (!array) {
        array = [NSMutableArray array];
    }
    [array addObjectsFromArray:separators];
    separatorLayer.separators = [array copy];

}

#pragma mark extension

- (void)addCellSeparator {

    self.separatorLayerInsets = UIEdgeInsetsMake(0, 15, 0, 0);
    LYSeparatorDescription *separator = [LYSeparatorDescription separatorWithName:@"default cell separator"];
    [self addSeparator:separator];

}

- (void)addTopSeparatorWithEdge:(CGFloat)horizontalEdge color:(UIColor *)color {

    LYSeparatorDescription *separator = [LYSeparatorDescription separatorWithName:@"top separator"];
    if (color) {
        separator.stokeColor = color;
    }
    separator.constant = horizontalEdge;
    separator.relation = LYSeparatorHorizontalTopSpace;
    [self addSeparator:separator];

}

- (void)addBottomSeparatorWithEdge:(CGFloat)horizontalEdge color:(UIColor *)color {

    LYSeparatorDescription *separator = [LYSeparatorDescription separatorWithName:@"bottom separator"];
    if (color) {
        separator.stokeColor = color;
    }
    separator.constant = horizontalEdge;
    separator.relation = LYSeparatorHorizontalBottomSpace;
    [self addSeparator:separator];

}

- (void)addLeftSeparatorWithEdge:(CGFloat)verticalEdge color:(UIColor *)color {

    LYSeparatorDescription *separator = [LYSeparatorDescription separatorWithName:@"left separator"];
    if (color) {
        separator.stokeColor = color;
    }
    separator.constant = verticalEdge;
    separator.relation = LYSeparatorVerticalLeftSpace;
    [self addSeparator:separator];

}

- (void)addRightSeparatorWithEdge:(CGFloat)verticalEdge color:(UIColor *)color {

    LYSeparatorDescription *separator = [LYSeparatorDescription separatorWithName:@"right separator"];
    if (color) {
        separator.stokeColor = color;
    }
    separator.constant = verticalEdge;
    separator.relation = LYSeparatorVerticalRightSpace;
    [self addSeparator:separator];

}

- (void)addHorizontalSeparatorsWithCount:(NSInteger)count color:(UIColor *)color {

    if (count == 0) {
        return ;
    }
    NSMutableArray *array = [NSMutableArray array];
    for (NSInteger idx = 0; idx < count; idx ++) {

        NSString *name = [NSString stringWithFormat:@"horizontal separator %li", (long)idx];
        LYSeparatorDescription *separator = [LYSeparatorDescription separatorWithName:name];
        if (color) {
            separator.stokeColor = color;
        }
        separator.constant = idx / (CGFloat)(count - 1);
        separator.relation = LYSeparatorHorizontalTopRatio;
        [array addObject:separator];

    }
    [self addSeparators:array];

}

- (void)addVerticalSeparatorsWithCount:(NSInteger)count color:(UIColor *)color {

    if (count == 0) {
        return ;
    }
    NSMutableArray *array = [NSMutableArray array];
    for (NSInteger idx = 0; idx < count; idx ++) {

        NSString *name = [NSString stringWithFormat:@"vertical separator %li", (long)idx];
        LYSeparatorDescription *separator = [LYSeparatorDescription separatorWithName:name];
        if (color) {
            separator.stokeColor = color;
        }
        separator.constant = idx / (CGFloat)(count - 1);
        separator.relation = LYSeparatorVerticalLeftRatio;
        [array addObject:separator];

    }
    [self addSeparators:array];

}

@end


text:
"""
Dit is het bestand voor het algemene scherm van de Agenda-App
Het heeft een aantal functies en dezen staat beschreven in de drive.

<LICENSE>
<COPYRIGHT NOTICE>
Animajosser <Animajosser@gmail.com>
"""
__version__="0.5"
__date__="19-06-2017"
__kivyversion__="1.10.0"
__pythonversion__="3.6.1"
##############################################################################################

# imports #

# Most important
#print("Importing Kivy")
import kivy
#print("Checking kivy-version")
kivy.require('1.10.0')

#print("Importing App")
from kivy.app import App

#print("Importing config and disabling multitouch")
from kivy.config import Config
Config.set("input", "mouse", "mouse,disable_multitouch")

#print("Importing Builder")
from kivy.lang.builder import Builder
#print("Importing Properties")
from kivy.properties import ObjectProperty

# Layouts
#print("Importing BoxLayout")
from kivy.uix.boxlayout import BoxLayout
#print("Importing TabbedPanel")
from kivy.uix.tabbedpanel import TabbedPanelItem, TabbedPanel

# Attributes
#print("Importing Label")
from kivy.uix.label import Label
#print("Importing Popup")
from kivy.uix.popup import Popup

# kv's
#print("Load kv File Home Screen")
Builder.load_file('main_screen.kv')

#print("Start Program")

# Classes #

# Main widgets

"""TODO?:
After deleting a tab the width isn't updated.
Sometimes, when there is no tab left, the last tab
stays visible and clickable, resulting in an AttributeError.
"""

class CreditsPopup(Popup):
    pass

class CreateNewAppointment(TabbedPanelItem):
    def close_tab(self):
        # close procedure
        self.parent.remove_widget(self.parent.parent.parent.parent.current_tab)

class RecycleBin(TabbedPanelItem):
    def close_tab(self):
        # close procedure
        self.parent.remove_widget(self.parent.parent.parent.parent.current_tab)

class Appointment(TabbedPanelItem):
    def close_tab(self):
        # close procedure
        self.parent.remove_widget(self.parent.parent.parent.parent.current_tab)

class ProgramSettings(TabbedPanelItem):
    def close_tab(self):
        # close procedure
        self.parent.remove_widget(self.parent.parent.parent.parent.current_tab)

class BaseScreen(BoxLayout):
    creditspopup = CreditsPopup()
    tabsscreens_op = ObjectProperty(None)

    def open_new_tab(self, name):
        """This opens a new tab in de tab side"""

        present = False

        if name == "create_appointment":
            self.tabsscreens_op.add_widget(CreateNewAppointment())
        elif name=="trash":
            for a in self.tabsscreens_op.tab_list:
                if "RecycleBin" in str(a):
                    self.tabsscreens_op.switch_to(RecycleBin())
                    present=True
                    break
            if not present:
                self.tabsscreens_op.add_widget(RecycleBin())
        elif name=="settings":
            for a in self.tabsscreens_op.tab_list:
                if "ProgramSettings" in str(a):
                    self.tabsscreens_op.switch_to(ProgramSettings())
                    present=True
                    break
            if not present:
                self.tabsscreens_op.add_widget(ProgramSettings())
        else:
            print("Can't find tab: ", name)

    def close_tab(self):
        self.tabsscreens_op.remove_widget(self.tabsscreens_op.current_tab)

# Screens

class AgendaApp(App):
    """Home class and home screen"""

    icon = 'icon.ico'
    title = 'Agenda App'

    def build(self):

        return BaseScreen()

# Script

if __name__=='__main__':
    AgendaApp().run()


text:
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Arguments</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../../index.html" title="Chapter 1. Phoenix 3.2.0">
<link rel="up" href="../core.html" title="Core">
<link rel="prev" href="references.html" title="References">
<link rel="next" href="nothing.html" title="Nothing">

Home
Libraries
People
FAQ
More

Arguments

#include <boost/phoenix/core/argument.hpp>

          We use an instance of:

expression::argument<N>::type

          to represent the Nth function argument. The argument placeholder acts as
          an imaginary data-bin where a function argument will be placed.

          Predefined
          Arguments

          There are a few predefined instances of expression::argument<N>::type
          named arg1..argN, and its BLL
          counterpart _1.._N. (where N is a predefined maximum).

          Here are some sample preset definitions of arg1..argN

namespace placeholders
{
    expression::argument<1>::type const arg1 = {};
    expression::argument<2>::type const arg2 = {};
    expression::argument<3>::type const arg3 = {};
}

          and its BLL
          _1.._N
          style counterparts:

namespace placeholders
{
    expression::argument<1>::type const _1 = {};
    expression::argument<2>::type const _2 = {};
    expression::argument<3>::type const _3 = {};
}

Note

            You can set BOOST_PHOENIX_ARG_LIMIT,
            the predefined maximum placeholder index. By default, BOOST_PHOENIX_ARG_LIMIT
            is set to BOOST_PHOENIX_LIMIT
            (See Actor).

          User Defined
          Arguments

          When appropriate, you can define your own argument
          names. For example:

expression::argument<1>::type x; // note one based index

          x may now be used as a
          parameter to a lazy function:

add(x, 6)

          which is equivalent to:

add(arg1, 6)

          Evaluating
          an Argument

          An argument, when evaluated, selects the Nth argument from the those passed
          in by the client.

          For example:

char        c = 'A';
int         i = 123;
const char* s = "Hello World";

cout << arg1(c) << endl;        //  Get the 1st argument: c
cout << arg1(i, s) << endl;     //  Get the 1st argument: i
cout << arg2(i, s) << endl;     //  Get the 2nd argument: s

          will print out:

A
123
Hello World

          Extra
          Arguments

          In C and C++, a function can have extra arguments that are not at all used
          by the function body itself. These extra arguments are simply ignored.

          Phoenix also allows extra arguments to be passed. For example, recall our
          original add function:

add(arg1, arg2)

          We know now that partially applying this function results to a function
          that expects 2 arguments. However, the library is a bit more lenient and
          allows the caller to supply more arguments than is actually required. Thus,
          add actually allows 2
          or more arguments. For instance, with:

add(arg1, arg2)(x, y, z)

          the third argument z is
          ignored. Taking this further, in-between arguments are also ignored. Example:

add(arg1, arg5)(a, b, c, d, e)

          Here, arguments b, c, and d are ignored. The function add
          takes in the first argument (arg1)
          and the fifth argument (arg5).

Note

            There are a few reasons why enforcing strict arity is not desirable.
            A case in point is the callback function. Typical callback functions
            provide more information than is actually needed. Lambda functions are
            often used as callbacks.

Copyright © 2002-2005, 2010, 2014, 2015 Joel de Guzman, Dan Marsden, Thomas
      Heller, John Fletcher

        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


text:
ACCEPTED

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

#### Published in
null

#### Original name
Pouteria xylocarpa C.T.White

### Remarks
null


text:
namespace gpopt
{
//---------------------------------------------------------------------------
//	@class:
//		CLogicalInnerApply
//
//	@doc:
//		Logical Apply operator used in scalar subquery transformations
//
//---------------------------------------------------------------------------
class CLogicalInnerApply : public CLogicalApply
{
private:
public:
	CLogicalInnerApply(const CLogicalInnerApply &) = delete;

	// ctor for patterns
	explicit CLogicalInnerApply(CMemoryPool *mp);

	// ctor
	CLogicalInnerApply(CMemoryPool *mp, CColRefArray *pdrgpcrInner,
					   EOperatorId eopidOriginSubq);

	// dtor
	~CLogicalInnerApply() override;

	// ident accessors
	EOperatorId
	Eopid() const override
	{
		return EopLogicalInnerApply;
	}

	// return a string for operator name
	const CHAR *
	SzId() const override
	{
		return "CLogicalInnerApply";
	}

	// return a copy of the operator with remapped columns
	COperator *PopCopyWithRemappedColumns(CMemoryPool *mp,
										  UlongToColRefMap *colref_mapping,
										  BOOL must_exist) override;

	//-------------------------------------------------------------------------------------
	// Derived Relational Properties
	//-------------------------------------------------------------------------------------

	// derive output columns
	CColRefSet *
	DeriveOutputColumns(CMemoryPool *mp, CExpressionHandle &exprhdl) override
	{
		GPOS_ASSERT(3 == exprhdl.Arity());

		return PcrsDeriveOutputCombineLogical(mp, exprhdl);
	}

	// derive not nullable columns
	CColRefSet *
	DeriveNotNullColumns(CMemoryPool *mp,
						 CExpressionHandle &exprhdl) const override
	{
		return PcrsDeriveNotNullCombineLogical(mp, exprhdl);
	}

	// derive max card
	CMaxCard DeriveMaxCard(CMemoryPool *mp,
						   CExpressionHandle &exprhdl) const override;

	// derive constraint property
	CPropConstraint *
	DerivePropertyConstraint(CMemoryPool *mp,
							 CExpressionHandle &exprhdl) const override
	{
		return PpcDeriveConstraintFromPredicates(mp, exprhdl);
	}

	//-------------------------------------------------------------------------------------
	// Transformations
	//-------------------------------------------------------------------------------------

	// candidate set of xforms
	CXformSet *PxfsCandidates(CMemoryPool *) const override;

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

	// conversion function
	static CLogicalInnerApply *
	PopConvert(COperator *pop)
	{
		GPOS_ASSERT(nullptr != pop);
		GPOS_ASSERT(EopLogicalInnerApply == pop->Eopid());

		return dynamic_cast<CLogicalInnerApply *>(pop);
	}

};	// class CLogicalInnerApply

}  // namespace gpopt

#endif	// !GPOPT_CLogicalInnerApply_H

// EOF


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

<title>I-Index</title>
<meta name="date" content="2016-03-02">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes

A B C D E F G H I L M N O P Q R S T U V W X Y

I

i - Static variable in class dsl.Tip

An id counter.

id - Variable in class communications.FullMessage

The id of the protocol round this message belongs to.

id - Variable in class communications.ShortMessage

The id of the protocol round this message belongs to.

id - Variable in class dsl.Tip

A unique identifier for the tip.

idle - Variable in class compose.ActorPool

idToString(long) - Static method in class communications.ShortMessage

Utilities method to convert an id to a String.

ifFalse - Variable in class dsl.TestNode

ifTrue - Variable in class dsl.TestNode

inBytes(int) - Static method in class segmentation.Util

initialAddressMap - Variable in class dsl.Actor

The mapping between addresses and roles to be used at the beginning of
 each round.

initialAddressMap - Variable in class dsl.Server

The list of addresses for characters that is fixed for all runs of the
 protocol.

initialTips - Variable in class dsl.Causality

inMessageIds - Variable in class dsl.Flowchart

Maps incoming message names to their assigned ids.

inMessageIds - Variable in class dsl.Part

The mapping between incoming message names to numeric ids.

inMessages - Variable in class dsl.Actor

The content of each incoming message, ordered by incoming message id.

inscribeAndAdd(List<Short>, SendNode, String) - Method in class dsl.Flowchart

Adds an incoming message to the part description.

interpretAs(String) - Method in class dsl.Play

Explores the method scene and builds a graph of the calls to send, run
 and test.

interrupt() - Method in class protocols.SocketListener

isActive(A) - Method in class compose.ActorPool

isActiveFor(String) - Method in class dsl.EndNode

isActiveFor(String) - Method in class dsl.Node

Checks if the identifier given equals the identifier of this node.

isActiveFor(String) - Method in class dsl.RootNode

isCausFinal - Variable in class dsl.Part

Indicates whether a certain out message id in the bit set is the last
 message to be sent for the in message id in the array position to be
 receivable.

isEmpty() - Method in class dsl.Tip

Checks if tip is a sink (i.e., has no outgoing edges).

isInitial - Variable in class compose.Connection

isInitial(String) - Method in class dsl.Part

Tests whether a given message name corresponds to an initial message,
 i.e., a message to be received before any action is ever taken.

isMissing() - Method in class segmentation.Buffered

isRunningId(long) - Method in class compose.ActorPool

A B C D E F G H I L M N O P Q R S T U V W X Y

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes