text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="af477c08-a50c-4f5e-bd00-906289186b90" name="Default" comment="" />
    <ignored path="yz.iws" />
    <ignored path=".idea/workspace.xml" />
    <ignored path=".idea/dataSources.local.xml" />
    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="yz" />
  </component>
  <component name="FileEditorManager">
    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
      <file leaf-file-name="index.php" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/index.php">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="460">
              <caret line="21" column="38" selection-start-line="21" selection-start-column="38" selection-end-line="21" selection-end-column="38" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Router.php" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/yzf/Router.php">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="322">
              <caret line="19" column="44" selection-start-line="19" selection-start-column="44" selection-end-line="19" selection-end-column="44" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Yzf.php" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/yzf/Yzf.php">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="457">
              <caret line="84" column="32" selection-start-line="84" selection-start-column="32" selection-end-line="84" selection-end-column="32" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name=".htaccess" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/.htaccess">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="92">
              <caret line="4" column="24" selection-start-line="4" selection-start-column="24" selection-end-line="4" selection-end-column="24" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Route.php" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/yzf/Route.php">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="598">
              <caret line="26" column="43" selection-start-line="26" selection-start-column="43" selection-end-line="26" selection-end-column="43" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Request.php" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/yzf/Request.php">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="526">
              <caret line="48" column="27" selection-start-line="48" selection-start-column="27" selection-end-line="48" selection-end-column="27" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Response.php" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/yzf/Response.php">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="3427">
              <caret line="147" column="28" selection-start-line="147" selection-start-column="28" selection-end-line="147" selection-end-column="28" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="IdeDocumentHistory">
    <option name="CHANGED_PATHS">
      <list>
        <option value="$PROJECT_DIR$/.htaccess" />
        <option value="$PROJECT_DIR$/yzf/Route.php" />
        <option value="$PROJECT_DIR$/yzf/Response.php" />
        <option value="$PROJECT_DIR$/yzf/Router.php" />
        <option value="$PROJECT_DIR$/yzf/Yzf.php" />
        <option value="$PROJECT_DIR$/yzf/Request.php" />
        <option value="$PROJECT_DIR$/index.php" />
      </list>
    </option>
  </component>
  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
  <component name="JsGulpfileManager">
    <detection-done>true</detection-done>
    <sorting>DEFINITION_ORDER</sorting>
  </component>
  <component name="PhpServers">
    <servers />
  </component>
  <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
  <component name="ProjectFrameBounds">
    <option name="x" value="258" />
    <option name="y" value="23" />
    <option name="width" value="985" />
    <option name="height" value="724" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    <OptionsSetting value="true" id="Add" />
    <OptionsSetting value="true" id="Remove" />
    <OptionsSetting value="true" id="Checkout" />
    <OptionsSetting value="true" id="Update" />
    <OptionsSetting value="true" id="Status" />
    <OptionsSetting value="true" id="Edit" />
    <ConfirmationsSetting value="0" id="Add" />
    <ConfirmationsSetting value="0" id="Remove" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
      <manualOrder />
      <foldersAlwaysOnTop value="true" />
    </navigator>
    <panes>
      <pane id="Scratches" />
      <pane id="Scope" />
      <pane id="ProjectPane">
        <subPane />
      </pane>
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="settings.editor.selected.configurable" value="preferences.keymap" />
    <property name="settings.editor.splitter.proportion" value="0.2" />
  </component>
  <component name="RunManager">
    <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
      <method />
    </configuration>
    <configuration default="true" type="PHPUnitRunConfigurationType" factoryName="PHPUnit">
      <TestRunner />
      <method />
    </configuration>
    <configuration default="true" type="PhpBehatConfigurationType" factoryName="Behat">
      <BehatRunner />
      <method />
    </configuration>
    <configuration default="true" type="PhpLocalRunConfigurationType" factoryName="PHP Console">
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
      <node-interpreter>project</node-interpreter>
      <node-options />
      <gulpfile />
      <tasks />
      <arguments />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.npm" factoryName="npm">
      <command value="run-script" />
      <scripts />
      <node-interpreter value="project" />
      <envs />
      <method />
    </configuration>
  </component>
  <component name="ShelveChangesManager" show_recycled="false">
    <option name="remove_strategy" value="false" />
  </component>
  <component name="SvnConfiguration">
    <configuration />
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="af477c08-a50c-4f5e-bd00-906289186b90" name="Default" comment="" />
      <created>1463764166030</created>
      <option name="number" value="Default" />
      <option name="presentableId" value="Default" />
      <updated>1463764166030</updated>
      <workItem from="1463900520768" duration="1199000" />
      <workItem from="1463901731670" duration="158000" />
      <workItem from="1463901908139" duration="3702000" />
    </task>
    <servers />
  </component>
  <component name="TimeTrackingManager">
    <option name="totallyTimeSpent" value="5059000" />
  </component>
  <component name="ToolWindowManager">
    <frame x="258" y="23" width="985" height="724" extended-state="0" />
    <editor active="true" />
    <layout>
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
    </layout>
  </component>
  <component name="Vcs.Log.UiProperties">
    <option name="RECENTLY_FILTERED_USER_GROUPS">
      <collection />
    </option>
    <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
      <collection />
    </option>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager />
    <watches-manager />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/index.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="414">
          <caret line="18" column="27" selection-start-line="18" selection-start-column="19" selection-end-line="18" selection-end-column="27" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/yzf/Router.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="368">
          <caret line="16" column="5" selection-start-line="16" selection-start-column="5" selection-end-line="16" selection-end-column="5" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/yzf/Yzf.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="621">
          <caret line="27" column="10" selection-start-line="27" selection-start-column="10" selection-end-line="30" selection-end-column="11" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/.htaccess">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="92">
          <caret line="4" column="24" selection-start-line="4" selection-start-column="24" selection-end-line="4" selection-end-column="24" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/yzf/Route.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="598">
          <caret line="26" column="43" selection-start-line="26" selection-start-column="43" selection-end-line="26" selection-end-column="43" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/yzf/Request.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="506">
          <caret line="22" column="56" selection-start-line="22" selection-start-column="56" selection-end-line="22" selection-end-column="56" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/yzf/Response.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="414">
          <caret line="18" column="27" selection-start-line="18" selection-start-column="19" selection-end-line="18" selection-end-column="27" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/yzf/Router.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="368">
          <caret line="16" column="5" selection-start-line="16" selection-start-column="5" selection-end-line="16" selection-end-column="5" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/yzf/Yzf.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="621">
          <caret line="27" column="10" selection-start-line="27" selection-start-column="10" selection-end-line="30" selection-end-column="11" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/.htaccess">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="92">
          <caret line="4" column="24" selection-start-line="4" selection-start-column="24" selection-end-line="4" selection-end-column="24" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/yzf/Route.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="598">
          <caret line="26" column="43" selection-start-line="26" selection-start-column="43" selection-end-line="26" selection-end-column="43" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/yzf/Request.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="506">
          <caret line="22" column="56" selection-start-line="22" selection-start-column="56" selection-end-line="22" selection-end-column="56" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/yzf/Response.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/.htaccess">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="92">
          <caret line="4" column="24" selection-start-line="4" selection-start-column="24" selection-end-line="4" selection-end-column="24" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/yzf/Route.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="598">
          <caret line="26" column="43" selection-start-line="26" selection-start-column="43" selection-end-line="26" selection-end-column="43" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/yzf/Response.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="3427">
          <caret line="147" column="28" selection-start-line="147" selection-start-column="28" selection-end-line="147" selection-end-column="28" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/yzf/Yzf.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="457">
          <caret line="84" column="32" selection-start-line="84" selection-start-column="32" selection-end-line="84" selection-end-column="32" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/yzf/Router.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="322">
          <caret line="19" column="44" selection-start-line="19" selection-start-column="44" selection-end-line="19" selection-end-column="44" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/yzf/Request.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="526">
          <caret line="48" column="27" selection-start-line="48" selection-start-column="27" selection-end-line="48" selection-end-column="27" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="460">
          <caret line="21" column="38" selection-start-line="21" selection-start-column="38" selection-end-line="21" selection-end-column="38" />
          <folding />
        </state>
      </provider>
    </entry>
  </component>
  <component name="masterDetails">
    <states>
      <state key="ScopeChooserConfigurable.UI">
        <settings>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
    </states>
  </component>
</project>


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators SYSTEM "venus-validator-1.0.0.dtd">
<validators>
	<validator type="expression">
	<property name="expression"><![CDATA[ val1 > 0 && val2[1] > 1 && val3=="abc" ]]></property>
	</validator>
</validators>

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using DaveSexton.SettingsSwitcher.Properties;

namespace DaveSexton.SettingsSwitcher
{
	/// <summary>
	/// Generates unique display names for settings files.
	/// </summary>
	public sealed class SettingsFileNameManager : IEnumerable<SettingsFile>
	{
#if DEBUG
		public bool IsSealed
		{
			get
			{
				Contract.Ensures(Contract.Result<bool>() == isSealed);

				return isSealed;
			}
		}
#endif

		private static StringDictionary PersistedLastAccessTimes
		{
			[MethodImpl(MethodImplOptions.Synchronized)]
			get
			{
				Contract.Ensures(Contract.Result<StringDictionary>() != null);

				var lastAccessTimes = Settings.Default.SettingsFilesLastAccessTimes;

				if (lastAccessTimes == null)
				{
					Settings.Default.SettingsFilesLastAccessTimes = lastAccessTimes = new StringDictionary();
				}

				return lastAccessTimes;
			}
		}

		private readonly List<SettingsFile> files = new List<SettingsFile>();
		private readonly Uri autoSettingsFile, oldAutoSettingsFile, originalSettingsFile;
#if DEBUG
		private bool isSealed;
#endif

		/// <summary>
		/// Constructs a new instance of the <see cref="SettingsFileNameManager"/> class.
		/// </summary>
		/// <param name="autoSettingsFile">The path to the auto-save settings file.  The file does not have to exist.</param>
		/// <param name="oldAutoSettingsFile">The path to the old auto-save settings file.  The file does not have to exist.</param>
		/// <param name="originalSettingsFile">The path to the original auto-saved settings file that was created when the extension was initialized for the first time.  The file does not have to exist.</param>
		public SettingsFileNameManager(Uri autoSettingsFile, Uri oldAutoSettingsFile, Uri originalSettingsFile)
		{
			Contract.Requires(autoSettingsFile != null);
			Contract.Requires(autoSettingsFile.IsAbsoluteUri);
			Contract.Requires(autoSettingsFile.IsFile);
			Contract.Requires(oldAutoSettingsFile != null);
			Contract.Requires(oldAutoSettingsFile.IsAbsoluteUri);
			Contract.Requires(oldAutoSettingsFile.IsFile);
			Contract.Requires(originalSettingsFile != null);
			Contract.Requires(originalSettingsFile.IsAbsoluteUri);
			Contract.Requires(originalSettingsFile.IsFile);

			this.autoSettingsFile = autoSettingsFile;
			this.oldAutoSettingsFile = oldAutoSettingsFile;
			this.originalSettingsFile = originalSettingsFile;
		}

		[ContractInvariantMethod]
		[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Required for code contracts.")]
		private void ObjectInvariant()
		{
			Contract.Invariant(files != null);
			Contract.Invariant(autoSettingsFile != null);
			Contract.Invariant(autoSettingsFile.IsAbsoluteUri);
			Contract.Invariant(autoSettingsFile.IsFile);
			Contract.Invariant(oldAutoSettingsFile != null);
			Contract.Invariant(oldAutoSettingsFile.IsAbsoluteUri);
			Contract.Invariant(oldAutoSettingsFile.IsFile);
			Contract.Invariant(originalSettingsFile != null);
			Contract.Invariant(originalSettingsFile.IsAbsoluteUri);
			Contract.Invariant(originalSettingsFile.IsFile);
		}

		[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Contracts", "Requires-14-129", Justification = "The long value is always written by DateTime itself, so it must be within range, assuming that the XML settings file wasn't changed manually.")]
		[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Contracts", "Requires-40-129", Justification = "The long value is always written by DateTime itself, so it must be within range, assuming that the XML settings file wasn't changed manually.")]
		internal static DateTime GetLastAccessTime(Uri file)
		{
			Contract.Requires(file != null);
			Contract.Requires(file.IsAbsoluteUri);
			Contract.Requires(file.IsFile);
			Contract.Ensures(file.IsAbsoluteUri);
			Contract.Ensures(file.IsFile);

			var times = PersistedLastAccessTimes;

			Contract.Assume(!string.IsNullOrEmpty(file.LocalPath));

			return times.ContainsKey(file.LocalPath)
					 ? DateTime.FromFileTimeUtc(long.Parse(times[file.LocalPath], CultureInfo.InvariantCulture))
					 : File.GetLastAccessTimeUtc(file.LocalPath);		// In practice, Windows may not update file access times with alacrity, or at all, so it's only used as a fallback.
		}

		internal static void SetLastAccessTime(Uri file)
		{
			Contract.Requires(file != null);
			Contract.Requires(file.IsAbsoluteUri);
			Contract.Requires(file.IsFile);
			Contract.Ensures(file.IsAbsoluteUri);
			Contract.Ensures(file.IsFile);

			PersistedLastAccessTimes[file.LocalPath] = DateTime.Now.ToFileTimeUtc().ToString(CultureInfo.InvariantCulture);

			Debug.WriteLine("Saving last access times.", "SettingsFileNameManager");

			Settings.Default.Save();
		}

		internal void AddFile(SettingsFile file)
		{
#if DEBUG
			Contract.Requires(file is SolutionSettingsFile || !IsSealed);
			Contract.Requires(!(file is SolutionSettingsFile) || !Contract.Exists(this, f => f is SolutionSettingsFile));
#endif
			Contract.Requires(file != null);

			files.Add(file);
		}

		/// <summary>
		/// Removes the specified <paramref name="file"/> from the list.
		/// </summary>
		/// <param name="file">The file to be removed.</param>
		/// <returns><see langword="True"/> if the file was found in the list; otherwise, <see langword="false"/>.</returns>
		public bool RemoveFile(SettingsFile file)
		{
#if DEBUG
			Contract.Requires(file is SolutionSettingsFile || !IsSealed);
#endif
			Contract.Requires(file != null);

			return files.Remove(file);
		}

		/// <summary>
		/// Clears the list of files.
		/// </summary>
		public void Clear()
		{
#if DEBUG
			isSealed = false;
#endif

			files.Clear();
		}

		internal string GetDisplayName(SettingsFile file)
		{
			Contract.Requires(file != null);
			Contract.Ensures(Contract.Result<string>() != null);

#if DEBUG
			isSealed = true;
#endif

			/* Display names must be unique.  It seems that Visual Studio can only display strings in
			 * combo commands; therefore, the display name is used to find the selected object.
			 */

			string format;

			if (file.FullPath == autoSettingsFile || file.FullPath == oldAutoSettingsFile || file.FullPath == originalSettingsFile)
			{
				format = Resources.SettingsFileAutoSavedDisplayNameFormat;
			}
			else if (HasFileWithSameName(file))
			{
				format = Resources.SettingsFileRelativeDisplayNameFormat;
			}
			else if (file.SpecialDisplayName != null)
			{
				format = Resources.SettingsFileSpecialDisplayNameFormat;
			}
			else
			{
				format = Resources.SettingsFileDefaultDisplayNameFormat;
			}

			return FormatName(file, format);
		}

		private static string FormatName(SettingsFile file, string format)
		{
			Contract.Requires(file != null);
			Contract.Requires(format != null);
			Contract.Ensures(Contract.Result<string>() != null);

			return string.Format(CultureInfo.CurrentCulture, format, file.Name, Path.GetDirectoryName(file.RelativePath.ToString()), file.SpecialDisplayName);
		}

		private bool HasFileWithSameName(SettingsFile file)
		{
			Contract.Requires(file != null);

			return (from other in files
							where other != file
								 && string.Equals(other.Name, file.Name, StringComparison.OrdinalIgnoreCase)
							select other)
							.Any();
		}

		/// <inheritdoc/>
		public IEnumerator<SettingsFile> GetEnumerator()
		{
			return files.GetEnumerator();
		}

		System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
		{
			return GetEnumerator();
		}
	}
}


text:
<?php
namespace Neos\Flow\Tests\Unit\Utility;

use Neos\Flow\Core\ApplicationContext;
use Neos\Flow\Tests\UnitTestCase;
use Neos\Flow\Utility\Environment;
use Neos\Utility\Files;

/**
 * Testcase for the Utility Environment class
 */
class EnvironmentTest extends UnitTestCase
{
    /**
     * @test
     */
    public function getPathToTemporaryDirectoryReturnsPathWithTrailingSlash()
    {
        $environment = new Environment(new ApplicationContext('Testing'));
        $environment->setTemporaryDirectoryBase(Files::concatenatePaths([sys_get_temp_dir(), 'FlowEnvironmentTest']));
        $path = $environment->getPathToTemporaryDirectory();
        $this->assertEquals('/', substr($path, -1, 1), 'The temporary path did not end with slash.');
    }

    /**
     * @test
     */
    public function getPathToTemporaryDirectoryReturnsAnExistingPath()
    {
        $environment = new Environment(new ApplicationContext('Testing'));
        $environment->setTemporaryDirectoryBase(Files::concatenatePaths([sys_get_temp_dir(), 'FlowEnvironmentTest']));

        $path = $environment->getPathToTemporaryDirectory();
        $this->assertTrue(file_exists($path), 'The temporary path does not exist.');
    }

    /**
     * @test
     */
    public function getMaximumPathLengthReturnsCorrectValue()
    {
        $environment = new Environment(new ApplicationContext('Testing'));
        $expectedValue = PHP_MAXPATHLEN;
        if ((integer)$expectedValue <= 0) {
            $this->fail('The PHP Constant PHP_MAXPATHLEN is not available on your system! Please file a PHP bug report.');
        }
        $this->assertEquals($expectedValue, $environment->getMaximumPathLength());
    }
}


text:
<?php

namespace Laminas\Mvc\Service;

use Interop\Container\ContainerInterface;
use Laminas\ServiceManager\Factory\FactoryInterface;
use Laminas\View\Strategy\JsonStrategy;

class ViewJsonStrategyFactory implements FactoryInterface
{
    /**
     * Create and return the JSON view strategy
     *
     * Retrieves the ViewJsonRenderer service from the service locator, and
     * injects it into the constructor for the JSON strategy.
     *
     * It then attaches the strategy to the View service, at a priority of 100.
     *
     * @param  ContainerInterface $container
     * @param  string $name
     * @param  null|array $options
     * @return JsonStrategy
     */
    public function __invoke(ContainerInterface $container, $name, array $options = null)
    {
        $jsonRenderer = $container->get('ViewJsonRenderer');
        $jsonStrategy = new JsonStrategy($jsonRenderer);
        return $jsonStrategy;
    }
}


text:
package org.apache.hadoop.hive.ql.metadata;

import com.google.common.collect.Lists;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.Warehouse;
import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
import org.apache.hadoop.hive.metastore.api.FieldSchema;
import org.apache.hadoop.hive.metastore.api.MetaException;
import org.apache.hadoop.hive.metastore.api.Partition;
import org.apache.hadoop.hive.metastore.api.Table;
import org.apache.hadoop.hive.metastore.client.TestExchangePartitions;
import org.apache.hadoop.hive.metastore.client.builder.TableBuilder;
import org.apache.hadoop.hive.metastore.minihms.AbstractMetaStoreService;
import org.apache.hadoop.hive.ql.session.SessionState;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

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

/**
 * Test class for exchange partitions related methods on temporary tables.
 */
@RunWith(Parameterized.class)
@Category(MetastoreCheckinTest.class)
public class TestSessionHiveMetastoreClientExchangePartitionsTempTable extends TestExchangePartitions {

  private HiveConf conf;
  private Warehouse wh;

  public TestSessionHiveMetastoreClientExchangePartitionsTempTable(String name, AbstractMetaStoreService metaStore) {
    super(name, metaStore);
  }

  @Before
  @Override
  public void setUp() throws Exception {
    initHiveConf();
    wh = new Warehouse(conf);
    SessionState.start(conf);
    setClient(Hive.get(conf).getMSC());
    getClient().dropDatabase(DB_NAME, true, true, true);
    getMetaStore().cleanWarehouseDirs();
    createTestTables();
  }

  private void initHiveConf() throws Exception{
    conf = Hive.get().getConf();
    conf.setBoolVar(HiveConf.ConfVars.METASTORE_FASTPATH, true);
  }

  @Override
  protected Table createTable(String dbName, String tableName, List<FieldSchema> partCols,
      List<FieldSchema> cols, String location) throws Exception {
    new TableBuilder()
        .setDbName(dbName)
        .setTableName(tableName)
        .setCols(cols)
        .setPartCols(partCols)
        .setLocation(location)
        .setTemporary(true)
        .create(getClient(), getMetaStore().getConf());
    return getClient().getTable(dbName, tableName);
  }

  @Override
  @Test(expected = MetaException.class)
  public void testExchangePartitionsNonExistingPartLocation() throws Exception {
    Map<String, String> partitionSpecs = getPartitionSpec(getPartitions()[1]);
    getMetaStore().cleanWarehouseDirs();
    cleanTempTableDir(getSourceTable());
    cleanTempTableDir(getDestTable());
    getClient().exchange_partitions(partitionSpecs, getSourceTable().getDbName(),
        getSourceTable().getTableName(), getDestTable().getDbName(), getDestTable().getTableName());
  }

  @Override
  @Test
  public void testExchangePartitionsCustomTableAndPartLocation() throws Exception {
    Table source = createTable(DB_NAME, "test_source_table_cust_loc",
        getYearMonthAndDayPartCols(), getMetaStore().getWarehouseRoot() + "/sourceTable");
    Table dest = createTable(DB_NAME, "test_dest_table_cust_loc", getYearMonthAndDayPartCols(),
        getMetaStore().getWarehouseRoot() + "/destTable");
    org.apache.hadoop.hive.metastore.api.Partition[] parts = new Partition[2];
    parts[0] = createPartition(source, Lists.newArrayList("2019", "may", "11"),
        source.getSd().getLocation() + "/2019m11");
    parts[1] = createPartition(source, Lists.newArrayList("2019", "july", "23"),
        source.getSd().getLocation() + "/2019j23");

    Map<String, String> partitionSpecs = getPartitionSpec(parts[1]);
    getClient().exchange_partitions(partitionSpecs, source.getDbName(),
        source.getTableName(), dest.getDbName(), dest.getTableName());

    checkRemainingPartitions(source, dest, Lists.newArrayList(parts[0]));
    List<Partition> destTablePartitions = getClient().listPartitions(dest.getDbName(), dest.getTableName(), (short) -1);
    Assert.assertEquals(1, destTablePartitions.size());
    checkExchangedPartitions(source, dest, Lists.newArrayList(parts[1]));
  }

  @Override
  @Test
  public void testExchangePartitionsCustomPartLocation() throws Exception {
    Table source = createTable(DB_NAME, "test_source_table", getYearMonthAndDayPartCols(), null);
    Table dest = createTable(DB_NAME, "test_dest_table", getYearMonthAndDayPartCols(), null);
    Partition[] parts = new Partition[2];
    parts[0] = createPartition(source, Lists.newArrayList("2019", "march", "15"),
        source.getSd().getLocation() + "/2019m15");
    parts[1] = createPartition(source, Lists.newArrayList("2019", "march", "22"),
        source.getSd().getLocation() + "/2019m22");

    Map<String, String> partitionSpecs = getPartitionSpec(parts[1]);
    getClient().exchange_partitions(partitionSpecs, source.getDbName(),
        source.getTableName(), dest.getDbName(), dest.getTableName());

    checkRemainingPartitions(source, dest, Lists.newArrayList(parts[0]));
    List<Partition> destTablePartitions = getClient().listPartitions(dest.getDbName(), dest.getTableName(), (short) -1);
    Assert.assertEquals(1, destTablePartitions.size());
    checkExchangedPartitions(source, dest, Lists.newArrayList(parts[1]));
  }

  @Override
  @Test
  public void testExchangePartitionsOnlyMonthSetInPartSpec() throws Exception {
    Map<String, String> partitionSpecs = new HashMap<>();
    partitionSpecs.put(YEAR_COL_NAME, "");
    partitionSpecs.put(MONTH_COL_NAME, "march");
    partitionSpecs.put(DAY_COL_NAME, "");

    getClient().exchange_partitions(partitionSpecs, getSourceTable().getDbName(),
        getSourceTable().getTableName(), getDestTable().getDbName(), getDestTable().getTableName());
    checkRemainingPartitions(getSourceTable(), getDestTable(), Lists.newArrayList(getPartitions()[2],
        getPartitions()[3], getPartitions()[4]));
    List<Partition> exchangedPartitions = getClient().listPartitions(getDestTable().getDbName(),
        getDestTable().getTableName(), MAX);
    Assert.assertEquals(2, exchangedPartitions.size());
    checkExchangedPartitions(getSourceTable(), getDestTable(), Lists.newArrayList(getPartitions()[0],
        getPartitions()[1]));
  }

  @Override
  @Test
  public void testExchangePartitionsYearAndDaySetInPartSpec() throws Exception {
    Map<String, String> partitionSpecs = new HashMap<>();
    partitionSpecs.put(YEAR_COL_NAME, "2017");
    partitionSpecs.put(MONTH_COL_NAME, "");
    partitionSpecs.put(DAY_COL_NAME, "22");
    getClient().exchange_partitions(partitionSpecs, getSourceTable().getDbName(),
        getSourceTable().getTableName(), getDestTable().getDbName(), getDestTable().getTableName());
    checkRemainingPartitions(getSourceTable(), getDestTable(), Lists.newArrayList(getPartitions()[0],
        getPartitions()[2], getPartitions()[3], getPartitions()[4]));
    List<Partition> exchangedPartitions = getClient().listPartitions(getDestTable().getDbName(),
        getDestTable().getTableName(), MAX);
    Assert.assertEquals(1, exchangedPartitions.size());
    checkExchangedPartitions(getSourceTable(), getDestTable(), Lists.newArrayList(getPartitions()[1]));
  }

  @Override
  @Test
  public void testExchangePartition() throws Exception {
    Map<String, String> partitionSpecs = getPartitionSpec(getPartitions()[1]);
    Partition exchangedPartition =
        getClient().exchange_partition(partitionSpecs, getSourceTable().getDbName(),
            getSourceTable().getTableName(), getDestTable().getDbName(), getDestTable().getTableName());
    Assert.assertNotNull(exchangedPartition);
    checkExchangedPartitions(getSourceTable(), getDestTable(), Lists.newArrayList(getPartitions()[1]));
    checkRemainingPartitions(getSourceTable(), getDestTable(),
        Lists.newArrayList(getPartitions()[0], getPartitions()[2], getPartitions()[3], getPartitions()[4]));
  }

  @Override
  @Test
  public void testExchangePartitionYearSet() throws Exception {
    Map<String, String> partitionSpecs = getPartitionSpec(Lists.newArrayList("2017", "", ""));
    Partition exchangedPartition =
        getClient().exchange_partition(partitionSpecs, getSourceTable().getDbName(),
            getSourceTable().getTableName(), getDestTable().getDbName(), getDestTable().getTableName());
    Assert.assertNotNull(exchangedPartition);
    checkExchangedPartitions(getSourceTable(), getDestTable(),
        Lists.newArrayList(getPartitions()[0], getPartitions()[1], getPartitions()[2], getPartitions()[3]));
    checkRemainingPartitions(getSourceTable(), getDestTable(), Lists.newArrayList(getPartitions()[4]));
  }

  @Override
  @Test
  public void testExchangePartitionCustomTableAndPartLocation() throws Exception {
    Table source = createTable(DB_NAME, "test_source_table_cust_loc",
        getYearMonthAndDayPartCols(), getMetaStore().getWarehouseRoot() + "/sourceTable");
    Table dest = createTable(DB_NAME, "test_dest_table_cust_loc", getYearMonthAndDayPartCols(),
        getMetaStore().getWarehouseRoot() + "/destTable");
    Partition[] parts = new Partition[2];
    parts[0] = createPartition(source, Lists.newArrayList("2019", "may", "11"),
        source.getSd().getLocation() + "/2019m11");
    parts[1] = createPartition(source, Lists.newArrayList("2019", "july", "23"),
        source.getSd().getLocation() + "/2019j23");

    Map<String, String> partitionSpecs = getPartitionSpec(parts[1]);
    getClient().exchange_partition(partitionSpecs, source.getDbName(),
        source.getTableName(), dest.getDbName(), dest.getTableName());

    checkRemainingPartitions(source, dest, Lists.newArrayList(parts[0]));
    List<Partition> destTablePartitions =
        getClient().listPartitions(dest.getDbName(), dest.getTableName(), (short) -1);
    Assert.assertEquals(1, destTablePartitions.size());
    checkExchangedPartitions(source, dest, Lists.newArrayList(parts[1]));
  }

  @Override
  @Test
  public void testExchangePartitionCustomPartLocation() throws Exception {
    Table source = createTable(DB_NAME, "test_source_table", getYearMonthAndDayPartCols(), null);
    Table dest = createTable(DB_NAME, "test_dest_table", getYearMonthAndDayPartCols(), null);
    Partition[] parts = new Partition[2];
    parts[0] = createPartition(source, Lists.newArrayList("2019", "march", "15"),
        source.getSd().getLocation() + "/2019m15");
    parts[1] = createPartition(source, Lists.newArrayList("2019", "march", "22"),
        source.getSd().getLocation() + "/2019m22");

    Map<String, String> partitionSpecs = getPartitionSpec(parts[1]);
    getClient().exchange_partition(partitionSpecs, source.getDbName(),
        source.getTableName(), dest.getDbName(), dest.getTableName());
    checkRemainingPartitions(source, dest, Lists.newArrayList(parts[0]));
    List<Partition> destTablePartitions =
        getClient().listPartitions(dest.getDbName(), dest.getTableName(), (short) -1);
    Assert.assertEquals(1, destTablePartitions.size());
    checkExchangedPartitions(source, dest, Lists.newArrayList(parts[1]));
  }

  @Override
  @Test(expected = MetaException.class)
  public void testExchangePartitionNonExistingPartLocation() throws Exception {
    Map<String, String> partitionSpecs = getPartitionSpec(getPartitions()[1]);
    cleanTempTableDir(getSourceTable());
    cleanTempTableDir(getDestTable());
    getClient().exchange_partition(partitionSpecs, getSourceTable().getDbName(),
        getSourceTable().getTableName(), getDestTable().getDbName(), getDestTable().getTableName());
  }

  @Override
  @Test
  public void testExchangePartitionOnlyMonthSetInPartSpec() throws Exception {
    Map<String, String> partitionSpecs = new HashMap<>();
    partitionSpecs.put(YEAR_COL_NAME, "");
    partitionSpecs.put(MONTH_COL_NAME, "march");
    partitionSpecs.put(DAY_COL_NAME, "");
    getClient().exchange_partitions(partitionSpecs, getSourceTable().getDbName(),
        getSourceTable().getTableName(), getDestTable().getDbName(), getDestTable().getTableName());
    checkRemainingPartitions(getSourceTable(), getDestTable(),
        Lists.newArrayList(getPartitions()[2], getPartitions()[3], getPartitions()[4]));
    List<Partition> exchangedPartitions = getClient().listPartitions(getDestTable().getDbName(),
        getDestTable().getTableName(), MAX);
    Assert.assertEquals(2, exchangedPartitions.size());
    checkExchangedPartitions(getSourceTable(), getDestTable(),
        Lists.newArrayList(getPartitions()[0], getPartitions()[1]));
  }

  @Override
  @Test
  public void testExchangePartitionYearAndDaySetInPartSpec() throws Exception {
    Map<String, String> partitionSpecs = new HashMap<>();
    partitionSpecs.put(YEAR_COL_NAME, "2017");
    partitionSpecs.put(MONTH_COL_NAME, "");
    partitionSpecs.put(DAY_COL_NAME, "22");
    getClient().exchange_partition(partitionSpecs, getSourceTable().getDbName(),
        getSourceTable().getTableName(), getDestTable().getDbName(), getDestTable().getTableName());
    checkRemainingPartitions(getSourceTable(), getDestTable(),
        Lists.newArrayList(getPartitions()[0], getPartitions()[2], getPartitions()[3], getPartitions()[4]));
    List<Partition> exchangedPartitions = getClient().listPartitions(getDestTable().getDbName(),
        getDestTable().getTableName(), MAX);
    Assert.assertEquals(1, exchangedPartitions.size());
    checkExchangedPartitions(getSourceTable(), getDestTable(), Lists.newArrayList(getPartitions()[1]));
  }

  @Test(expected = MetaException.class)
  public void testExchangePartitionBetweenTempAndNonTemp() throws Exception {
    Table nonTempTable = createNonTempTable(DB_NAME, "nonTempTable", getYearMonthAndDayPartCols(), null);
    Map<String, String> partitionSpecs = new HashMap<>();
    partitionSpecs.put(YEAR_COL_NAME, "2017");
    partitionSpecs.put(MONTH_COL_NAME, "march");
    partitionSpecs.put(DAY_COL_NAME, "22");
    getClient().exchange_partition(partitionSpecs, getSourceTable().getDbName(), getSourceTable().getTableName(),
        nonTempTable.getDbName(), nonTempTable.getTableName());
  }

  @Test(expected = MetaException.class)
  public void testExchangePartitionBetweenNonTempAndTemp() throws Exception {
    Table nonTempTable = createNonTempTable(DB_NAME, "nonTempTable", getYearMonthAndDayPartCols(), null);
    Map<String, String> partitionSpecs = new HashMap<>();
    partitionSpecs.put(YEAR_COL_NAME, "2017");
    partitionSpecs.put(MONTH_COL_NAME, "march");
    partitionSpecs.put(DAY_COL_NAME, "22");
    getClient().exchange_partition(partitionSpecs, nonTempTable.getDbName(), nonTempTable.getTableName(),
        getDestTable().getDbName(), getDestTable().getTableName());
  }

  @Test(expected = MetaException.class)
  public void testExchangePartitionsBetweenTempAndNonTemp() throws Exception {
    Table nonTempTable = createNonTempTable(DB_NAME, "nonTempTable", getYearMonthAndDayPartCols(), null);
    Map<String, String> partitionSpecs = new HashMap<>();
    partitionSpecs.put(YEAR_COL_NAME, "2017");
    partitionSpecs.put(MONTH_COL_NAME, "");
    partitionSpecs.put(DAY_COL_NAME, "23");
    getClient().exchange_partitions(partitionSpecs, getSourceTable().getDbName(), getSourceTable().getTableName(),
        nonTempTable.getDbName(), nonTempTable.getTableName());
  }

  @Test(expected = MetaException.class)
  public void testExchangePartitionsBetweenNonTempAndTemp() throws Exception {
    Table nonTempTable = createNonTempTable(DB_NAME, "nonTempTable", getYearMonthAndDayPartCols(), null);
    Map<String, String> partitionSpecs = new HashMap<>();
    partitionSpecs.put(YEAR_COL_NAME, "2017");
    partitionSpecs.put(MONTH_COL_NAME, "");
    partitionSpecs.put(DAY_COL_NAME, "23");
    getClient().exchange_partitions(partitionSpecs, nonTempTable.getDbName(), nonTempTable.getTableName(),
        getDestTable().getDbName(), getDestTable().getTableName());
  }

  private Table createNonTempTable(String dbName, String tableName, List<FieldSchema> partCols,
      String location) throws Exception {
    List<FieldSchema> cols = new ArrayList<>();
    cols.add(new FieldSchema("test_id", INT_COL_TYPE, "test col id"));
    cols.add(new FieldSchema("test_value", "string", "test col value"));
    new TableBuilder()
        .setDbName(dbName)
        .setTableName(tableName)
        .setCols(cols)
        .setPartCols(partCols)
        .setLocation(location)
        .setTemporary(false)
        .create(getClient(), getMetaStore().getConf());
    return getClient().getTable(dbName, tableName);
  }

  private void cleanTempTableDir(Table table) throws MetaException {
    wh.deleteDir(new Path(table.getSd().getLocation()), true, false, false);
  }

}


text:
**Simula** is the name of two [simulation][0] [programming languages][1], Simula I and Simula 67, developed in the 1960s at the [Norwegian Computing Center][2] in [Oslo][3], by [Ole-Johan Dahl][4] and [Kristen Nygaard][5]. [Syntactically][6], it is a fairly faithful superset of [ALGOL 60][7].[\[1\]][8]:1.3.1

Simula 67 introduced [objects][9],[\[1\]][8]:2, 5.3 [classes][10],[\[1\]][8]:1.3.3, 2 [inheritance][11] and [subclasses][12],[\[1\]][8]:2.2.1 [virtual procedures][13],[\[1\]][8]:2.2.3 [coroutines][14],[\[1\]][8]:9.2 and [discrete event simulation][15],[\[1\]][8]:14.2 and features [garbage collection][16].[\[1\]][8]:9.1 Also other forms of [subtyping][17] (besides inheriting subclasses) were introduced in Simula derivatives.\[_[citation needed][18]_\]

Simula is considered the first [object-oriented][19] [programming][20] language. As its name suggests, Simula was designed for doing [simulations][21], and the needs of that [domain][22] provided the framework for many of the features of object-oriented languages today.

Simula has been used in a wide range of applications such as simulating [VLSI][23] designs, [process modeling][24], [protocols][25], [algorithms][26], and other applications such as [typesetting][27], [computer graphics][28], and [education][29]. The influence of Simula is often understated, and Simula-type objects are reimplemented in [C++][30], [Object Pascal][31], [Java][32], [C\#][33] and several other languages. The creator of C++, [Bjarne Stroustrup][34], has acknowledged that Simula 67 was the greatest influence on him to develop C++, to bring the kind of productivity enhancements offered by Simula to the raw computational speed offered by lower level languages like [BCPL][35].

## History

The following account is based on Jan Rune Holmevik's historical essay.[\[2\]][36][\[3\]][37]

[Kristen Nygaard][5] started writing computer simulation programs in 1957\. Nygaard saw a need for a better way to describe the heterogeneity and the [operation][38] of a [system][39]. To go further with his ideas on a formal [computer language][40] for describing a system, Nygaard realized that he needed someone with more [computer programming][41] skills than he had. [Ole-Johan Dahl][4] joined him on his work January 1962\. The decision of linking the language up to [ALGOL 60][7] was made shortly after. By May 1962 the main concepts for a [simulation][42] [language][1] were set. "SIMULA I" was born, a special purpose [programming language][1] for [simulating][42] discrete event systems.

Kristen Nygaard was invited to [UNIVAC][43] late May 1962 in connection with the marketing of their new [UNIVAC 1107][44] computer. At that visit Nygaard presented the ideas of Simula to [Robert Bemer][45], the director of systems programming at [Univac][46]. Bemer was a sworn [ALGOL][47] fan and found the Simula project compelling. Bemer was also chairing a session at the second international conference on information processing hosted by [IFIP][48]. He invited Nygaard, who presented the paper "SIMULA -- An Extension of ALGOL to the Description of Discrete-Event Networks".

[Norwegian Computing Center][2] got a [UNIVAC 1107][44] August 1963 at a considerable discount, on which Dahl implemented the SIMULA I under contract with UNIVAC. The implementation was based on the UNIVAC [ALGOL 60][7] compiler. SIMULA I was fully operational on the UNIVAC 1107 by January 1965\. In the following couple of years Dahl and Nygaard spent a lot of time teaching Simula. Simula spread to several countries around the world and SIMULA I was later implemented on [Burroughs B5500 computers][49] and the Russian [URAL-16 computer][50].

In 1966 [C. A. R. Hoare][51] introduced the concept of record class construct, which Dahl and Nygaard extended with the concept of prefixing and other features to meet their requirements for a generalized process concept. Dahl and Nygaard presented their paper on [Class][10] and [Subclass][12] Declarations at the [IFIP][48] Working Conference on [simulation languages][0] in [Oslo][3], May 1967\. This paper became the first formal definition of Simula 67\. In June 1967 a conference was held to standardize the language and initiate a number of implementations. Dahl proposed to unify the [type][52] and the class concept. This led to serious discussions, and the proposal was rejected by the board. SIMULA 67 was formally standardized on the first meeting of the SIMULA Standards Group (SSG) in February 1968\.

Simula was influential in the development of [Smalltalk][53] and later [object-oriented programming languages][54]. It also helped inspire the [actor model][55] of concurrent computation although Simula only supports [co-routines][56] and not true [concurrency][57].\[_[citation needed][18]_\]

In the late sixties and the early seventies there were four main implementations of Simula:

These implementations were ported to a wide range of platforms. The [TOPS-10][58] implemented the concept of public, protected, and private member variables and procedures, that later was integrated into Simula 87\. Simula 87 is the latest standard and is ported to a wide range of platforms. There are mainly three implementations:

In November 2001 Dahl and Nygaard were awarded the [IEEE John von Neumann Medal][59] by the [Institute of Electrical and Electronic Engineers][60] "For the introduction of the concepts underlying [object-oriented programming][19] through the design and implementation of SIMULA 67". In February 2002 they received the 2001 A. M. [Turing Award][61] by the [Association for Computing Machinery][62] (ACM), with the citation: "For ideas fundamental to the emergence of object oriented programming, through their design of the programming languages Simula I and Simula 67." Unfortunately neither Dahl, nor Nygaard could make it to the ACM Turing Award Lecture,[\[5\]][63] scheduled to be delivered at the [OOPSLA][64] 2002 conference in Seattle, as they both died within two months of each other in June and August, respectively.[\[6\]][65]

[Simula Research Laboratory][66] is a research institute named after the Simula language, and Nygaard held a part-time position there from the opening in 2001\.

The new Computer Science building at the [University of Oslo][67] is named Ole Johan Dahl's House, after one of the two inventors of Simula. The main auditorium in Ole Johan Dahl's House is named Simula.

Simula is still used for various types of university courses, for instance, Jarek Sklenar teaches Simula to students at University of Malta.[\[7\]][68]

## Sample code

## Minimal program

The empty [computer file][69] is the minimal [program][70] in Simula, measured by the size of the [source code][71]. It consists of one thing only; a dummy [statement][72].

However, the minimal program is more conveniently represented as an empty block:

It begins executing and immediately terminates. The language does not have any [return value][73] from the program itself.

## Classic Hello world

An example of a [Hello world program][74] in Simula:

Simula is [case-insensitive][75].

## Classes, subclasses and virtual procedures

A more realistic example with use of classes,[\[1\]][8]:1.3.3, 2 subclasses[\[1\]][8]:2.2.1 and virtual procedures:[\[1\]][8]:2.2.3

The above example has one [super class][76] (Glyph) with two [subclasses][12] (Char and Line). There is one [virtual procedure][13] with two [implementations][77]. The execution starts by executing the main program. Simula does not have the concept of [abstract classes][78] since classes with [pure virtual procedures][79] can be [instantiated][80]. This means that in the above example all classes can be instantiated. Calling a [pure virtual procedure][79] will however produce a [run-time error][81].

## Call by name

Simula supports [call by name][82][\[1\]][8]:8.2.3 so the [Jensen's Device][83] can easily be implemented. However, the default transmission mode for simple parameter is [call by value][84], contrary to [ALGOL][47] which used [call by name][82]. The source code for the [Jensen's Device][83] must therefore specify [call by name][82] for the parameters when compiled by a Simula compiler.

Another much simpler example is the [summation function ![\sum ](https://wikimedia.org/api/rest_v1/media/math/render/svg/f1d4e06539576633987e902f402ed46728d573b6)][85] which can be implemented as follows:

The above code uses [call by name][82] for the controlling variable (k) and the expression (u). This allows the controlling variable to be used in the expression.

Note that the Simula standard allows for certain restrictions on the controlling variable in a [for loop][86]. The above code therefore uses a while loop for maximum portability.

The following:

![Z=\sum _{i=1}^{100}{1 \over (i+a)^{2}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7e5b4b37fb90cdd6177be7f4c3b1e2f037b248fa)

can then be implemented as follows:

## Simulation

Simula includes a [simulation][42][\[1\]][8]:14.2 package for doing [discrete event simulations][15]. This simulation package is based on Simula's [object oriented][87] features and its [coroutine][14][\[1\]][8]:9.2 concept.

Sam, Sally, and Andy are shopping for clothes. They have to share one fitting room. Each one of them is browsing the store for about 12 minutes and then uses the fitting room exclusively for about three minutes, each following a normal distribution. A simulation of their fitting room experience is as follows:

The main block is prefixed with `Simulation` for enabling simulation. The simulation package can be used on any block and simulations can even be nested when simulating someone doing simulations.

The fitting room object uses a queue (`door`) for getting access to the fitting room. When someone requests the fitting room and it's in use they must wait in this queue (`Wait (door)`). When someone leaves the fitting room the first one (if any) is released from the queue (`**Activate** door.first`) and accordingly removed from the door queue (`door.First.Out`).

Person is a subclass of Process and its activity is described using hold (time for browsing the store and time spent in the fitting room) and calls procedures in the fitting room object for requesting and leaving the fitting room.

The main program creates all the objects and activates all the person objects to put them into the event queue. The main program holds for 100 minutes of simulated time before the program terminates.

## See also

## Notes

## Sources

## Further reading

## External links

[0]: /wiki/Simulation_language "Simulation language"
[1]: /wiki/Programming_language "Programming language"
[2]: /wiki/Norwegian_Computing_Center "Norwegian Computing Center"
[3]: /wiki/Oslo "Oslo"
[4]: /wiki/Ole-Johan_Dahl "Ole-Johan Dahl"
[5]: /wiki/Kristen_Nygaard "Kristen Nygaard"
[6]: /wiki/Syntax_(programming_languages) "Syntax (programming languages)"
[7]: /wiki/ALGOL_60 "ALGOL 60"
[8]: #cite_note-CommonBase-1
[9]: /wiki/Object_(computing) "Object (computing)"
[10]: /wiki/Class_(computer_science) "Class (computer science)"
[11]: /wiki/Inheritance_(object-oriented_programming) "Inheritance (object-oriented programming)"
[12]: /wiki/Subclass_(computer_science) "Subclass (computer science)"
[13]: /wiki/Virtual_function "Virtual function"
[14]: /wiki/Coroutine "Coroutine"
[15]: /wiki/Discrete_event_simulation "Discrete event simulation"
[16]: /wiki/Garbage_collection_(computer_science) "Garbage collection (computer science)"
[17]: /wiki/Subtyping "Subtyping"
[18]: /wiki/Wikipedia:Citation_needed "Wikipedia:Citation needed"
[19]: /wiki/Object-oriented_programming "Object-oriented programming"
[20]: /wiki/Programming_paradigm "Programming paradigm"
[21]: /wiki/Simulations "Simulations"
[22]: /wiki/Problem_domain "Problem domain"
[23]: /wiki/Very-large-scale_integration "Very-large-scale integration"
[24]: /wiki/Process_modeling "Process modeling"
[25]: /wiki/Protocol_(computing) "Protocol (computing)"
[26]: /wiki/Algorithm "Algorithm"
[27]: /wiki/Typesetting "Typesetting"
[28]: /wiki/Computer_graphics "Computer graphics"
[29]: /wiki/Education "Education"
[30]: /wiki/C%2B%2B "C++"
[31]: /wiki/Object_Pascal "Object Pascal"
[32]: /wiki/Java_(programming_language) "Java (programming language)"
[33]: /wiki/C_Sharp_(programming_language) "C Sharp (programming language)"
[34]: /wiki/Bjarne_Stroustrup "Bjarne Stroustrup"
[35]: /wiki/BCPL "BCPL"
[36]: #cite_note-2
[37]: #cite_note-3
[38]: /wiki/Instruction_(computer_science) "Instruction (computer science)"
[39]: /wiki/System "System"
[40]: /wiki/Computer_language "Computer language"
[41]: /wiki/Computer_programming "Computer programming"
[42]: /wiki/Simulation "Simulation"
[43]: /wiki/UNIVAC "UNIVAC"
[44]: /wiki/UNIVAC_1107 "UNIVAC 1107"
[45]: /wiki/Bob_Bemer "Bob Bemer"
[46]: /wiki/Univac "Univac"
[47]: /wiki/ALGOL "ALGOL"
[48]: /wiki/International_Federation_for_Information_Processing "International Federation for Information Processing"
[49]: /wiki/Burroughs_large_systems "Burroughs large systems"
[50]: /wiki/Ural_(computer) "Ural (computer)"
[51]: /wiki/C._A._R._Hoare "C. A. R. Hoare"
[52]: /wiki/Data_type "Data type"
[53]: /wiki/Smalltalk "Smalltalk"
[54]: /wiki/Object-oriented_programming_language "Object-oriented programming language"
[55]: /wiki/Actor_model "Actor model"
[56]: /wiki/Co-routines "Co-routines"
[57]: /wiki/Concurrency_(computer_science) "Concurrency (computer science)"
[58]: /wiki/TOPS-10 "TOPS-10"
[59]: /wiki/IEEE_John_von_Neumann_Medal "IEEE John von Neumann Medal"
[60]: /wiki/Institute_of_Electrical_and_Electronic_Engineers "Institute of Electrical and Electronic Engineers"
[61]: /wiki/Turing_Award "Turing Award"
[62]: /wiki/Association_for_Computing_Machinery "Association for Computing Machinery"
[63]: #cite_note-5
[64]: /wiki/OOPSLA "OOPSLA"
[65]: #cite_note-6
[66]: /wiki/Simula_Research_Laboratory "Simula Research Laboratory"
[67]: /wiki/University_of_Oslo "University of Oslo"
[68]: #cite_note-7
[69]: /wiki/Computer_file "Computer file"
[70]: /wiki/Computer_program "Computer program"
[71]: /wiki/Source_code "Source code"
[72]: /wiki/Statement_(programming) "Statement (programming)"
[73]: /wiki/Return_value "Return value"
[74]: /wiki/Hello_world_program "Hello world program"
[75]: /wiki/Case-insensitive "Case-insensitive"
[76]: /wiki/Superclass_(computer_science) "Superclass (computer science)"
[77]: /wiki/Implementation "Implementation"
[78]: /wiki/Abstract_class "Abstract class"
[79]: /wiki/Pure_virtual_function "Pure virtual function"
[80]: /wiki/Instantiation_(computer_science) "Instantiation (computer science)"
[81]: /wiki/Run-time_error "Run-time error"
[82]: /wiki/Call_by_name "Call by name"
[83]: /wiki/Jensen%27s_Device "Jensen's Device"
[84]: /wiki/Call_by_value "Call by value"
[85]: /wiki/Arithmetic_function#Summation_functions "Arithmetic function"
[86]: /wiki/For_loop "For loop"
[87]: /wiki/Object_oriented "Object oriented"


text:
<?php
declare(strict_types = 1);
/**
 * /tests/Integration/Controller/v1/User/UserGroupsControllerTest.php
 *
 * @author TLe, Tarmo Leppänen <tarmo.leppanen@pinja.com>
 */

namespace App\Tests\Integration\Controller\v1\User;

use App\Controller\v1\User\UserGroupsController;
use App\Entity\User;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Serializer\SerializerInterface;
use Throwable;

/**
 * Class UserGroupsControllerTest
 *
 * @package App\Tests\Integration\Controller\v1\User
 * @author TLe, Tarmo Leppänen <tarmo.leppanen@pinja.com>
 */
class UserGroupsControllerTest extends KernelTestCase
{
    /**
     * @throws Throwable
     *
     * @testdox Test that `__invoke(User $requestUser)` method calls expected service methods
     */
    public function testThatInvokeMethodCallsExpectedMethods(): void
    {
        $user = new User();

        $serializer = $this->getMockBuilder(SerializerInterface::class)->getMock();

        $serializer
            ->expects(self::once())
            ->method('serialize')
            ->with(
                $user->getUserGroups()->getValues(),
                'json',
                [
                    'groups' => ['set.UserGroupBasic'],
                ],
            )
            ->willReturn('[]');

        (new UserGroupsController($serializer))($user);
    }
}


text:
<?php

// autoload.php @generated by Composer

require_once __DIR__ . '/composer' . '/autoload_real.php';

return ComposerAutoloaderInit83849e98ad0def99aaf787cea0257734::getLoader();


text:
<?php

namespace Jackalope\Query;

/**
 * Query implementation for the (deprecated) SQL(1) language.
 *
 * This can never be legally created if the transport does not implement
 * QueryInterface.
 *
 * @license http://www.apache.org/licenses Apache License Version 2.0, January 2004
 * @license http://opensource.org/licenses/MIT MIT License
 */
class Sql1Query extends Query
{

    /**
     * Access the query statement from the transport layer
     *
     * @return string the sql1 query statement
     *
     * @private
     */
    public function getStatementSql()
    {
        return $this->getStatement();
        //TODO: should this expand bind variables? or the transport?
    }

    /**
     * Returns the constant QueryInterface::JCR-SQL
     *
     * @return string the query language.
     */
    public function getLanguage()
    {
       return self::SQL;
    }

}


text:
require 'rexml/document'

module Jekyll

  class Post
    attr_accessor :name

    def full_path_to_source
      File.join(@base, @name)
    end

    def path_to_source
      File.join(@name)
    end

    def location_on_server(my_url)
      "#{my_url}#{url}"
    end
  end

  class Page
    attr_accessor :name

    def full_path_to_source
      File.join(@base, @dir, @name)
    end

    def path_to_source
      File.join(@dir, @name)
    end

    def location_on_server(my_url)
      location = "#{my_url}#{url}"
      location.gsub(/index.html$/, "")
    end
  end

  class Layout
    def full_path_to_source
      File.join(@base, @name)
    end
  end

  # Recover from strange exception when starting server without --auto
  class SitemapFile < StaticFile
    def write(dest)
      true
    end
  end

  class SitemapGenerator < Generator
    priority :lowest

    # Config defaults
    SITEMAP_FILE_NAME = "/sitemap.xml"
    EXCLUDE = ["/atom.xml", "/feed.xml", "/feed/index.xml"]
    INCLUDE_POSTS = ["/index.html"]
    CHANGE_FREQUENCY_NAME = "change_frequency"
    PRIORITY_NAME = "priority"

    # Valid values allowed by sitemap.xml spec for change frequencies
    VALID_CHANGE_FREQUENCY_VALUES = ["always", "hourly", "daily", "weekly",
      "monthly", "yearly", "never"]

    # Goes through pages and posts and generates sitemap.xml file
    #
    # Returns nothing
    def generate(site)
      # Configuration
      sitemap_config = site.config['sitemap'] || {}
      @config = {}
      @config['filename'] = sitemap_config['filename'] || SITEMAP_FILE_NAME
      @config['change_frequency_name'] = sitemap_config['change_frequency_name'] || CHANGE_FREQUENCY_NAME
      @config['priority_name'] = sitemap_config['priority_name'] || PRIORITY_NAME
      @config['exclude'] = sitemap_config['exclude'] || EXCLUDE
      @config['include_posts'] = sitemap_config['include_posts'] || INCLUDE_POSTS

      sitemap = REXML::Document.new << REXML::XMLDecl.new("1.0", "UTF-8")

      urlset = REXML::Element.new "urlset"
      urlset.add_attribute("xmlns",
        "http://www.sitemaps.org/schemas/sitemap/0.9")

      @last_modified_post_date = fill_posts(site, urlset)
      fill_pages(site, urlset)

      sitemap.add_element(urlset)

      # Create destination directory if it doesn't exist yet. Otherwise, we cannot write our file there.
      Dir::mkdir(site.dest) if !File.directory? site.dest

      # File I/O: create sitemap.xml file and write out pretty-printed XML
      filename = @config['filename']
      file = File.new(File.join(site.dest, filename), "w")
      formatter = REXML::Formatters::Pretty.new(4)
      formatter.compact = true
      formatter.write(sitemap, file)
      file.close

      # Keep the sitemap.xml file from being cleaned by Jekyll
      site.static_files << Jekyll::SitemapFile.new(site, site.dest, "/", filename)
    end

    # Create url elements for all the posts and find the date of the latest one
    #
    # Returns last_modified_date of latest post
    def fill_posts(site, urlset)
      last_modified_date = nil
      site.posts.each do |post|
        if !excluded?(site, post.name)
          url = fill_url(site, post)
          urlset.add_element(url)
        end

        path = post.full_path_to_source
        date = File.mtime(path)
        last_modified_date = date if last_modified_date == nil or date > last_modified_date
      end

      last_modified_date
    end

    # Create url elements for all the normal pages and find the date of the
    # index to use with the pagination pages
    #
    # Returns last_modified_date of index page
    def fill_pages(site, urlset)
      site.pages.each do |page|
        if !excluded?(site, page.path_to_source)
          path = page.full_path_to_source
          if File.exists?(path)
            url = fill_url(site, page)
            urlset.add_element(url)
          end
        end
      end
    end

    # Fill data of each URL element: location, last modified,
    # change frequency (optional), and priority.
    #
    # Returns url REXML::Element
    def fill_url(site, page_or_post)
      url = REXML::Element.new "url"

      loc = fill_location(site, page_or_post)
      url.add_element(loc)

      lastmod = fill_last_modified(site, page_or_post)
      url.add_element(lastmod) if lastmod

      if (page_or_post.data[@config['change_frequency_name']])
        change_frequency =
          page_or_post.data[@config['change_frequency_name']].downcase

        if (valid_change_frequency?(change_frequency))
          changefreq = REXML::Element.new "changefreq"
          changefreq.text = change_frequency
          url.add_element(changefreq)
        else
          puts "ERROR: Invalid Change Frequency In #{page_or_post.name}"
        end
      end

      if (page_or_post.data[@config['priority_name']])
        priority_value = page_or_post.data[@config['priority_name']]
        if valid_priority?(priority_value)
          priority = REXML::Element.new "priority"
          priority.text = page_or_post.data[@config['priority_name']]
          url.add_element(priority)
        else
          puts "ERROR: Invalid Priority In #{page_or_post.name}"
        end
      end

      url
    end

    # Get URL location of page or post
    #
    # Returns the location of the page or post
    def fill_location(site, page_or_post)
      loc = REXML::Element.new "loc"
      url = site.config['url'] + site.config['baseurl']
      loc.text = page_or_post.location_on_server(url)

      loc
    end

    # Fill lastmod XML element with the last modified date for the page or post.
    #
    # Returns lastmod REXML::Element or nil
    def fill_last_modified(site, page_or_post)
      path = page_or_post.full_path_to_source

      lastmod = REXML::Element.new "lastmod"
      date = File.mtime(path)
      latest_date = find_latest_date(date, site, page_or_post)

      if @last_modified_post_date == nil
        # This is a post
        lastmod.text = latest_date.iso8601
      else
        # This is a page
        if posts_included?(site, page_or_post.path_to_source)
          # We want to take into account the last post date
          final_date = greater_date(latest_date, @last_modified_post_date)
          lastmod.text = final_date.iso8601
        else
          lastmod.text = latest_date.iso8601
        end
      end
      lastmod
    end

    # Go through the page/post and any implemented layouts and get the latest
    # modified date
    #
    # Returns formatted output of latest date of page/post and any used layouts
    def find_latest_date(latest_date, site, page_or_post)
      layouts = site.layouts
      layout = layouts[page_or_post.data["layout"]]
      while layout
        path = layout.full_path_to_source
        date = File.mtime(path)

        latest_date = date if (date > latest_date)

        layout = layouts[layout.data["layout"]]
      end

      latest_date
    end

    # Which of the two dates is later
    #
    # Returns latest of two dates
    def greater_date(date1, date2)
      if (date1 >= date2)
        date1
      else
        date2
      end
    end

    # Is the page or post listed as something we want to exclude?
    #
    # Returns boolean
    def excluded?(site, name)
      @config['exclude'].include? name
    end

    def posts_included?(site, name)
      @config['include_posts'].include? name
    end

    # Is the change frequency value provided valid according to the spec
    #
    # Returns boolean
    def valid_change_frequency?(change_frequency)
      VALID_CHANGE_FREQUENCY_VALUES.include? change_frequency
    end

    # Is the priority value provided valid according to the spec
    #
    # Returns boolean
    def valid_priority?(priority)
      begin
        priority_val = Float(priority)
        return true if priority_val >= 0.0 and priority_val <= 1.0
      rescue ArgumentError
      end

      false
    end
  end
end


text:
using System.Collections.Generic;

namespace Azure.ResourceManager.Network.Models
{
    /// <summary> Definition of the ExpressRoutePorts peering location resource. </summary>
    public partial class ExpressRoutePortsLocation : Resource
    {
        /// <summary> Initializes a new instance of ExpressRoutePortsLocation. </summary>
        public ExpressRoutePortsLocation()
        {
        }

        /// <summary> Initializes a new instance of ExpressRoutePortsLocation. </summary>
        /// <param name="id"> Resource ID. </param>
        /// <param name="name"> Resource name. </param>
        /// <param name="type"> Resource type. </param>
        /// <param name="location"> Resource location. </param>
        /// <param name="tags"> Resource tags. </param>
        /// <param name="address"> Address of peering location. </param>
        /// <param name="contact"> Contact details of peering locations. </param>
        /// <param name="availableBandwidths"> The inventory of available ExpressRoutePort bandwidths. </param>
        /// <param name="provisioningState"> The provisioning state of the express route port location resource. </param>
        internal ExpressRoutePortsLocation(string id, string name, string type, string location, IDictionary<string, string> tags, string address, string contact, IList<ExpressRoutePortsLocationBandwidths> availableBandwidths, ProvisioningState? provisioningState) : base(id, name, type, location, tags)
        {
            Address = address;
            Contact = contact;
            AvailableBandwidths = availableBandwidths;
            ProvisioningState = provisioningState;
        }

        /// <summary> Address of peering location. </summary>
        public string Address { get; }
        /// <summary> Contact details of peering locations. </summary>
        public string Contact { get; }
        /// <summary> The inventory of available ExpressRoutePort bandwidths. </summary>
        public IList<ExpressRoutePortsLocationBandwidths> AvailableBandwidths { get; set; }
        /// <summary> The provisioning state of the express route port location resource. </summary>
        public ProvisioningState? ProvisioningState { get; }
    }
}


text:
<!DOCTYPE html>

        <title>Login</title>
        <meta charset="UTF-8">
        <link rel="icon" href="favicon.ico" type="image/x-icon" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="rstyle.css"/>
        <link rel="stylesheet" type="text/css" href="scripts/login.min.css"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">

 Login

 Welcome to MedLog.

 An account is required to use MedLog.

        <form method="post" name="loginForm" id="loginForm" autocomplete="on">
            <fieldset>
                <legend>Login Credentials</legend>
                Username
                <input accesskey="u" name="username" type="text" id="username" placeholder="" required/>

                 Password
                <input accesskey="p" name="password" type="password" id="password" placeholder="" required/>

            </fieldset>
            <input type="submit" value="LOGIN" id="btnSubmit" />
            Register

        </form>

        <fieldset id="myinfo" style="display:none;">
            <legend id="loggedinMsg">Welcome back!</legend>
            <form id="userInfos">
                First name:

                <input name="firstName" type="text" readonly id="firstname" placeholder="Enter your first name"  />

                Last name:

                <input name="lastname" type="text" readonly id="lastname" placeholder="Enter your last name" />

                Street<input type="text" readonly id="street" />
                State

                <select id="state">

                    <option value="2">Pennsylvania</option></select>

                Data Returned from AJAX:

                <textarea id="jsraw" rows="5" cols="40" style="width:300px;height:200px;">

                </textarea>

                <input type="button" value="logout" id="btnLogout" />
            </form>
        </fieldset>

                  Working, please wait...


text:
<?php

class D_SearchActionsByName implements IDataset, IDataget
{
    private $data;

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

    public function getOutData()
    {

        $id = $this->data["selected-role-id"];
        $name = $this->data["search-action-name"];

        $query = "SELECT actions.*, 1 as status
                  FROM actions
                  LEFT JOIN roles_actions
                  ON roles_actions.action_name = actions.name
                  WHERE roles_actions.role_id = $id
                  AND actions.name LIKE '%$name%'

                  UNION

                  SELECT actions.*, 0 as status
                  FROM actions
                  WHERE actions.name NOT IN
                  (
                    SELECT actions.name
                    FROM actions
                    LEFT JOIN roles_actions
                    ON roles_actions.action_name = actions.name
                    WHERE roles_actions.role_id = $id
                  ) AND actions.name LIKE '%$name%'
                    ORDER BY actions.name DESC";

        $db = DatabaseFactory::create()->connect();
        return $db->SQLFetchAllArray($query);
    }
}
?>