text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="c1fa14e6-6f27-4bdd-aeb7-36f1f272921b" name="Default" comment="">
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.gitignore" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/.name" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/.rakeTasks" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.rspec" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.travis.yml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/CODE_OF_CONDUCT.md" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/FrontalLobe.gemspec" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/FrontalLobe.iml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/FrontalLobe.rb" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/FrontalLobe_spec.rb" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/Gemfile" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/LICENSE.txt" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/README.md" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/Rakefile" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/bin/console" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/modules.xml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/bin/setup" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/spec_helper.rb" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/FrontalLobe/version.rb" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
    </list>
    <ignored path="FrontalLobe.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="CoverageDataManager">
    <SUITE FILE_PATH="coverage/FrontalLobe@Run_spec__FrontalLobe_spec___FrontalLobe.coverage" NAME="Run spec 'FrontalLobe_spec': FrontalLobe Coverage Results" MODIFIED="1448895303926" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="FrontalLobe" />
  </component>
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="FrontalLobe" />
  </component>
  <component name="FileEditorManager">
    <leaf>
      <file leaf-file-name=".gitignore" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/.gitignore">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.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>
      </file>
    </leaf>
  </component>
  <component name="Git.Settings">
    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
  </component>
  <component name="IdeDocumentHistory">
    <option name="CHANGED_PATHS">
      <list>
        <option value="$PROJECT_DIR$/lib/FrontalLobe/version.rb" />
        <option value="$PROJECT_DIR$/FrontalLobe.gemspec" />
      </list>
    </option>
  </component>
  <component name="JsBuildToolGruntFileManager" detection-done="true" />
  <component name="JsGulpfileManager">
    <detection-done>true</detection-done>
  </component>
  <component name="NamedScopeManager">
    <order />
  </component>
  <component name="ProjectFrameBounds">
    <option name="y" value="23" />
    <option name="width" value="1920" />
    <option name="height" value="1173" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="true">
    <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 />
    </navigator>
    <panes>
      <pane id="Scope">
        <subPane subId="Project Files">
          <PATH>
            <PATH_ELEMENT USER_OBJECT="Root">
              <option name="myItemId" value="" />
              <option name="myItemType" value="" />
            </PATH_ELEMENT>
            <PATH_ELEMENT USER_OBJECT="FrontalLobe">
              <option name="myItemId" value="" />
              <option name="myItemType" value="" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="Scratches" />
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="FrontalLobe" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="FrontalLobe" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="FrontalLobe" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="FrontalLobe" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="FrontalLobe" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="lib" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="FrontalLobe" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="FrontalLobe" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="lib" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="FrontalLobe" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="FrontalLobe" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="FrontalLobe" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="bin" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
    <property name="settings.editor.splitter.proportion" value="0.2" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$/spec" />
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="recentsLimit" value="5" />
    <property name="restartRequiresConfirmation" value="true" />
  </component>
  <component name="RunManager" selected="RSpec.Run spec 'FrontalLobe_spec': FrontalLobe">
    <configuration default="false" name="Run spec 'FrontalLobe_spec': FrontalLobe" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
      <predefined_log_file id="RUBY_RSPEC" enabled="true" />
      <module name="FrontalLobe" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
      <envs>
        <env name="JRUBY_OPTS" value="-X+O" />
      </envs>
      <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
      <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
      <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
        <COVERAGE_PATTERN ENABLED="true">
          <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
        </COVERAGE_PATTERN>
      </EXTENSION>
      <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="$MODULE_DIR$/spec" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/FrontalLobe_spec.rb" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
      <method />
    </configuration>
    <configuration default="false" name="FrontalLobe: FrontalLobe" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
      <predefined_log_file id="RUBY_RSPEC" enabled="true" />
      <module name="FrontalLobe" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
      <envs>
        <env name="JRUBY_OPTS" value="-X+O" />
      </envs>
      <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
      <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
      <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
        <COVERAGE_PATTERN ENABLED="true">
          <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
        </COVERAGE_PATTERN>
      </EXTENSION>
      <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="$MODULE_DIR$/spec" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/FrontalLobe_spec.rb" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="FrontalLobe" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
      <method />
    </configuration>
    <configuration default="true" type="CucumberRunConfigurationType" factoryName="Cucumber">
      <predefined_log_file id="RUBY_CUCUMBER" enabled="true" />
      <module name="" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
      <envs />
      <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
      <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
      <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
        <COVERAGE_PATTERN ENABLED="true">
          <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
        </COVERAGE_PATTERN>
      </EXTENSION>
      <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*.feature" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TAGS_FILTER" VALUE="" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_NAME_FILTER" VALUE="" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_ARGS" VALUE="--color -r features" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="VERBOSE_OPTION" VALUE="false" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_RUNNER_PATH" VALUE="" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_RUNNER" VALUE="false" />
      <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SETTINGS_VERSION" VALUE="2" />
      <method />
    </configuration>
    <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
      <method />
    </configuration>
    <configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
      <predefined_log_file id="RUBY_RSPEC" enabled="true" />
      <module name="FrontalLobe" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
      <envs />
      <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
      <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
      <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
        <COVERAGE_PATTERN ENABLED="true">
          <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
        </COVERAGE_PATTERN>
      </EXTENSION>
      <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="$MODULE_DIR$/spec" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="ALL_IN_FOLDER" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
      <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
      <method />
    </configuration>
    <configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
      <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
      <module name="" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
      <envs />
      <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
      <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
      <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
        <COVERAGE_PATTERN ENABLED="true">
          <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
        </COVERAGE_PATTERN>
      </EXTENSION>
      <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
      <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
      <method />
    </configuration>
    <list size="2">
      <item index="0" class="java.lang.String" itemvalue="RSpec.Run spec 'FrontalLobe_spec': FrontalLobe" />
      <item index="1" class="java.lang.String" itemvalue="RSpec.FrontalLobe: FrontalLobe" />
    </list>
    <recent_temporary>
      <list size="2">
        <item index="0" class="java.lang.String" itemvalue="RSpec.Run spec 'FrontalLobe_spec': FrontalLobe" />
        <item index="1" class="java.lang.String" itemvalue="RSpec.FrontalLobe: FrontalLobe" />
      </list>
    </recent_temporary>
  </component>
  <component name="ShelveChangesManager" show_recycled="false" />
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="c1fa14e6-6f27-4bdd-aeb7-36f1f272921b" name="Default" comment="" />
      <created>1448894884396</created>
      <option name="number" value="Default" />
      <updated>1448894884396</updated>
    </task>
    <servers />
  </component>
  <component name="ToolWindowManager">
    <frame x="0" y="23" width="1920" height="1173" extended-state="6" />
    <editor active="false" />
    <layout>
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.13631523" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32985783" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32985783" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" 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" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" 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" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" 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" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
    </layout>
  </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$/bin/console">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.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$/bin/setup">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.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$/Rakefile">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.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$/README.md">
      <provider editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.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>
      <provider selected="true" editor-type-id="MarkdownPreviewEditor">
        <state />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/CODE_OF_CONDUCT.md">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.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>
      <provider editor-type-id="MarkdownPreviewEditor">
        <state />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/LICENSE.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.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>
      <provider editor-type-id="com.intellij.database.editor.CsvTableFileEditorProvider">
        <state />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/lib/FrontalLobe.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.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$/lib/FrontalLobe/version.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.026509574">
          <caret line="1" column="16" selection-start-line="1" selection-start-column="16" selection-end-line="1" selection-end-column="16" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/spec/FrontalLobe_spec.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.106038295">
          <caret line="4" column="25" selection-start-line="4" selection-start-column="25" selection-end-line="4" selection-end-column="25" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/FrontalLobe.gemspec">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.84830636">
          <caret line="32" column="0" selection-start-line="32" selection-start-column="0" selection-end-line="32" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Gemfile">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.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$/.gitignore">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.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>
  </component>
</project>


text:
echo Building dependencies...

mkdir lib/
mkdir lib/Debug/
mkdir lib/Release/

# extract mysql libs
echo Extract mysql libs
unzip -o mysql_libs.zip -d ./

echo Extract mysql++ libs
unzip -o mysqlpp_libs.zip -d ./

# extract libevent libs
echo Extract libevent libs
tar -xzvf libevent-2.0.22-stable.tar.gz
if [ -d ./libevent ]; then
 rm -rf ./libevent
fi

mv libevent-2.0.22-stable libevent

# compiling libevent
cd libevent
chmod -R 755 *
./configure CPPFLAGS=-fPIC --disable-shared --disable-openssl
make

cp -R -f ./.libs/*.a ../lib/Debug/
cp -R -f ./.libs/*.a ../lib/
cp -R -f ./.libs/*.a ../lib/Release/
cd ../

# compiling protobuf
cd protobuf
chmod -R 755 *
./configure CXXFLAGS=-fPIC
make
make check

cp -r -f ./src/.libs/*.so ../../_Out/Debug/
cp -r -f ./src/.libs/*.so.* ../../_Out/Debug/
cp -r -f ./src/.libs/*.so ../../_Out/Release/
cp -r -f ./src/.libs/*.so.* ../../_Out/Release/

cd ../

# compiling Theron
cd Theron
chmod -R 755 *
make library mode=debug boost=off c++11=on posix=on shared=on
cp -r -f ./Lib/libtherond.a ../lib/Debug/
cp -r -f ./Lib/libtherond.a ../lib/
make clean
make library mode=release boost=off c++11=on posix=on shared=on
cp -r -f ./Lib/libtheron.a ../lib/Release/
cp -r -f ./Lib/libtheron.a ../lib/
make clean
cd ../

#mysql
# extract mysql libs
echo Extract mysql libs
unzip -o mysql_libs.zip -d ./

echo Extract mysql++ libs
unzip -o mysqlpp_libs.zip -d ./
# copy libs
cp -R -f ./lib/Release/libmysqlclient.so ../_Out/Debug/
cp -R -f ./lib/Release/libmysqlclient.so ../_Out/Release/

cp -R -f ./lib/Release/libmysqlclient.a ./lib/Debug/
cp -R -f ./lib/Release/libmysqlpp.a ./lib/Debug/

cp -R -f ./lib/Release/libmysqlclient.so ./lib/
cp -R -f ./lib/Release/libmysqlclient.so ./lib/

cp -R -f ./lib/Release/libmysqlclient.a ./lib/
cp -R -f ./lib/Release/libmysqlpp.a ./lib/

# TODO: other libs
unzip -o gperftools-2.5.zip -d ./
cd gperftools-2.5
chmod -R 755 *
./configure --enable-frame-pointers
make
make install
cd ../

# back to main dir
pwd

redpajama_set_name: RedPajamaGithub


text:
package appeng.api.util;

import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

/**
 * Represents a location in the Minecraft Universe
 */
public class DimensionalCoord extends WorldCoord
{

	private final World w;
	private final int dimId;

	public DimensionalCoord(DimensionalCoord s) {
		super( s.x, s.y, s.z );
		w = s.w;
		dimId = s.dimId;
	}

	public DimensionalCoord(TileEntity s) {
		super( s );
		w = s.getWorldObj();
		dimId = w.provider.dimensionId;
	}

	public DimensionalCoord(World _w, int _x, int _y, int _z) {
		super( _x, _y, _z );
		w = _w;
		dimId = _w.provider.dimensionId;
	}

	@Override
	public DimensionalCoord copy()
	{
		return new DimensionalCoord( this );
	}

	public boolean isEqual(DimensionalCoord c)
	{
		return x == c.x && y == c.y && z == c.z && c.w == this.w;
	}

	@Override
	public boolean equals(Object obj)
	{
		return obj instanceof DimensionalCoord && isEqual((DimensionalCoord) obj);
	}

	@Override
	public int hashCode()
	{
		return super.hashCode() ^ dimId;
	}

	public boolean isInWorld(World world)
	{
		return w == world;
	}

	@Override
	public String toString()
	{
		return dimId + "," + super.toString();
	}

	public World getWorld()
	{
		return w;
	}
}


text:
package com.telefonica.euro_iaas.paasmanager.manager.async.impl;

import static com.telefonica.euro_iaas.paasmanager.util.SystemPropertiesProvider.APPLICATION_RELEASE_BASE_URL;
import static com.telefonica.euro_iaas.paasmanager.util.SystemPropertiesProvider.APPLICATION_TYPE_BASE_URL;
import static com.telefonica.euro_iaas.paasmanager.util.SystemPropertiesProvider.ENVIRONMENT_INSTANCE_BASE_URL;
import static com.telefonica.euro_iaas.paasmanager.util.SystemPropertiesProvider.PRODUCT_RELEASE_BASE_URL;

import java.text.MessageFormat;
import java.util.Date;
import java.util.logging.Logger;

import org.apache.commons.lang.StringUtils;

import com.telefonica.euro_iaas.commons.dao.AlreadyExistsEntityException;
import com.telefonica.euro_iaas.commons.dao.EntityNotFoundException;
import com.telefonica.euro_iaas.commons.dao.InvalidEntityException;
import com.telefonica.euro_iaas.paasmanager.dao.EnvironmentInstanceDao;
import com.telefonica.euro_iaas.paasmanager.exception.ApplicationTypeNotFoundException;
import com.telefonica.euro_iaas.paasmanager.exception.ProductInstallatorException;
import com.telefonica.euro_iaas.paasmanager.exception.ProductReleaseNotFoundException;
import com.telefonica.euro_iaas.paasmanager.exception.TaskNotFoundException;
import com.telefonica.euro_iaas.paasmanager.manager.ApplicationInstanceManager;
import com.telefonica.euro_iaas.paasmanager.manager.async.ApplicationInstanceAsyncManager;
import com.telefonica.euro_iaas.paasmanager.manager.async.TaskManager;
import com.telefonica.euro_iaas.paasmanager.model.ApplicationInstance;
import com.telefonica.euro_iaas.paasmanager.model.ApplicationRelease;
import com.telefonica.euro_iaas.paasmanager.model.EnvironmentInstance;
import com.telefonica.euro_iaas.paasmanager.model.InstallableInstance;
import com.telefonica.euro_iaas.paasmanager.model.Task;
import com.telefonica.euro_iaas.paasmanager.model.Task.TaskStates;
import com.telefonica.euro_iaas.paasmanager.model.TaskError;
import com.telefonica.euro_iaas.paasmanager.model.TaskReference;
import com.telefonica.euro_iaas.paasmanager.util.SystemPropertiesProvider;
import com.telefonica.euro_iaas.paasmanager.util.TaskNotificator;

/**
 * Application Instance Manager operations: install
 *
 * @author Jesus M. Movilla
 */
public class ApplicationInstanceAsyncManagerImpl implements ApplicationInstanceAsyncManager {

    private static Logger LOGGER = Logger.getLogger(ProductInstanceAsyncManagerImpl.class.getName());
    private ApplicationInstanceManager applicationInstanceManager;
    private TaskManager taskManager;
    private SystemPropertiesProvider propertiesProvider;
    private TaskNotificator taskNotificator;
    private EnvironmentInstanceDao environmentInstanceDao;

    /**
     * Install an applicationRelease on an already existent EnvironmentInstance
     *
     * @param vdc
     *            the vdc where the instance will be installed
     * @param environmentInstanceName
     *            on which applicationRelease is going to be deployed
     * @param applicationRelease
     *            to be deployed
     * @param task
     *            the task which contains the information about the async execution
     * @param callback
     *            if not empty, contains the url where the result of the execution will be sent
     */
    public void install(String org, String vdc, String environmentInstanceName, ApplicationRelease applicationRelease,
            Task task, String callback) {
        LOGGER.info("Install aplication " + applicationRelease.getName() + " " +
                applicationRelease.getVersion() + " on "
                + " enviornment environmentInstance");

        try {
            EnvironmentInstance environmentInstance = environmentInstanceDao.load(environmentInstanceName);

            ApplicationInstance applicationInstance = applicationInstanceManager.install(org, vdc, environmentInstance,
                    applicationRelease);
            updateSuccessTask(task, environmentInstance);
            LOGGER.info("Application " + applicationRelease.getName() + '-' + applicationRelease.getVersion()
                    + " installed successfully " + " on Environment " + environmentInstanceName);
        } catch (EntityNotFoundException e) {
            String errorMsg = e.getMessage();
            updateErrorTask(environmentInstanceName, ENVIRONMENT_INSTANCE_BASE_URL, task, errorMsg, e);
        } catch (ProductReleaseNotFoundException prNFE) {
            String errorMsg = prNFE.getMessage();
            updateErrorTask(prNFE.getProductRelease().getName(), PRODUCT_RELEASE_BASE_URL, task, errorMsg, prNFE);
        } catch (ApplicationTypeNotFoundException atNFE) {
            String errorMsg = atNFE.getMessage();
            updateErrorTask(atNFE.getApplicationType().getName(), APPLICATION_TYPE_BASE_URL, task, errorMsg, atNFE);
        } catch (InvalidEntityException iee) {
            String errorMsg = iee.getMessage();
            updateErrorTask(applicationRelease.getName(), APPLICATION_RELEASE_BASE_URL, task, errorMsg, iee);
        } catch (AlreadyExistsEntityException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (ProductInstallatorException e) {
            String errorMsg = "Error installing an application. Description:" + e.getMessage();
            updateErrorTask("Error installing an application", PRODUCT_RELEASE_BASE_URL, task, errorMsg, e);
        } catch (TaskNotFoundException e) {
            String errorMsg = "Error installing an application. Description:" + e.getMessage();
            updateErrorTask("Error installing an application", PRODUCT_RELEASE_BASE_URL, task, errorMsg, e);
        } finally {
            notifyTask(callback, task);
        }

    }

    public void uninstall(String org, String vdc, String environmentInstanceName, String applicationName, Task task,
            String callback) {

        ApplicationInstance applicationInstance = null;
        try {
            applicationInstance = applicationInstanceManager.load(vdc, applicationName);
            EnvironmentInstance environmentInstance = environmentInstanceDao.load(environmentInstanceName);
            applicationInstanceManager.uninstall(org, vdc, environmentInstance, applicationInstance);
            updateSuccessTask(task, environmentInstance);
            LOGGER.info("Application " + applicationInstance.getName() + '-' + " uninstalled successfully "
                    + " on Environment " + environmentInstanceName);
        } catch (EntityNotFoundException e) {
            String errorMsg = e.getMessage();
            updateErrorTask(environmentInstanceName, ENVIRONMENT_INSTANCE_BASE_URL, task, errorMsg, e);
        } catch (ProductInstallatorException e) {
            String errorMsg = e.getMessage();
            updateErrorTask(environmentInstanceName, ENVIRONMENT_INSTANCE_BASE_URL, task, errorMsg, e);
        } catch (TaskNotFoundException e) {
            String errorMsg = e.getMessage();
            updateErrorTask(environmentInstanceName, ENVIRONMENT_INSTANCE_BASE_URL, task, errorMsg, e);
        }

    }

    private void updateSuccessTask(Task task, EnvironmentInstance environmentInstance) throws TaskNotFoundException {
        InstallableInstance productInstance;
        Task loadedTask;
        String piResource = MessageFormat.format(propertiesProvider.getProperty(ENVIRONMENT_INSTANCE_BASE_URL),
                environmentInstance.getVdc(), environmentInstance.getName()); // the
        // vdc

        try {
            loadedTask = taskManager.load(task.getId());
        } catch (EntityNotFoundException e) {
            throw new TaskNotFoundException(e.getMessage(), task);
        }

        // Uncommented - Could not commit JPA transaction; nested exception is
        // javax.persistence.RollbackException: Transaction marked as
        // rollbackOnly
        // loadedTask.setResult(new TaskReference(piResource));
        loadedTask.setEndTime(new Date());
        loadedTask.setStatus(TaskStates.SUCCESS);
        taskManager.updateTask(loadedTask);
    }

    /**
     * Update the task with necessary information when the task is wrong because the environmentInstance does not exist
     * in the system.
     */
    private void updateErrorTask(String resourceName, String baseUrl, Task task, String message, Throwable t) {
        String piResource = MessageFormat.format(propertiesProvider.getProperty(baseUrl), resourceName); // the name
        task.setResult(new TaskReference(piResource));
        updateErrorTask(task, message, t);
    }

    /**
     * Update the task with necessary information when the task is wrong.
     */
    private void updateErrorTask(Task task, String message, Throwable t) {
        TaskError error = new TaskError(message);
        error.setMajorErrorCode(t.getMessage());
        error.setMinorErrorCode(t.getClass().getSimpleName());
        task.setEndTime(new Date());
        task.setStatus(TaskStates.ERROR);
        task.setError(error);
        taskManager.updateTask(task);
        LOGGER.info("An error occurs while installing an application release on a" + " environment. See task "
                + task.getHref() + " for more information");
    }

    private void notifyTask(String url, Task task) {
        if (!StringUtils.isEmpty(url)) {
            taskNotificator.notify(url, task);
        }
    }

    // ////////// I.O.C ////////////

    /**
     * @param applicationInstanceManager
     *            the productInstanceManager to set
     */
    public void setApplicationInstanceManager(ApplicationInstanceManager applicationInstanceManager) {
        this.applicationInstanceManager = applicationInstanceManager;
    }

    /**
     * @param environmentInstanceDao
     *            the environmentInstanceDao to set
     */
    public void setEnvironmentInstanceDao(EnvironmentInstanceDao environmentInstanceDao) {
        this.environmentInstanceDao = environmentInstanceDao;
    }

    /**
     * @param taskManager
     *            the taskManager to set
     */
    public void setTaskManager(TaskManager taskManager) {
        this.taskManager = taskManager;
    }

    /**
     * @param propertiesProvider
     *            the propertiesProvider to set
     */
    public void setPropertiesProvider(SystemPropertiesProvider propertiesProvider) {
        this.propertiesProvider = propertiesProvider;
    }

    /**
     * @param taskNotificator
     *            the taskNotificator to set
     */
    public void setTaskNotificator(TaskNotificator taskNotificator) {
        this.taskNotificator = taskNotificator;
    }

}


text:
from argparse import Namespace
import sys
import os
from os import path
import re
import logging
from typing import TYPE_CHECKING
from packaging.version import parse

from datetime import date
from ci_tools.functions import discover_targeted_packages
from ci_tools.parsing import ParsedSetup
from ci_tools.variables import discover_repo_root

from subprocess import run

VERSION_PY = "_version.py"
# Auto generated code has version maintained in version.py.
# We need to handle this old file name until generated code creates _version.py for all packages
OLD_VERSION_PY = "version.py"
VERSION_REGEX = r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]'
VERSION_STRING = 'VERSION = "%s"'

DEV_STATUS_REGEX = r'(classifiers=\[(\s)*)(["\']Development Status :: .*["\'])'

logging.getLogger().setLevel(logging.INFO)

from typing import List

def path_excluded(path, additional_excludes):
    return any([excl in path for excl in additional_excludes]) or "tests" in path or is_metapackage(path)

# Metapackages do not have an 'azure' folder within them
def is_metapackage(package_path):
    dir_path = package_path if path.isdir(package_path) else path.split(package_path)[0]

    azure_path = path.join(dir_path, "azure")
    return not path.exists(azure_path)

def get_setup_py_paths(glob_string, base_path, additional_excludes):
    setup_paths = discover_targeted_packages(glob_string, base_path)
    filtered_paths = [path.join(p, "setup.py") for p in setup_paths if not path_excluded(p, additional_excludes)]
    return filtered_paths

def get_packages(
    args: Namespace, package_name: str = "", additional_excludes: List[str] = [], root_dir: str = None
) -> List[ParsedSetup]:
    if root_dir is None:
        root_dir = discover_repo_root()
    # This function returns list of path to setup.py and setup info like install requires, version for all packages discovered using glob.
    if args.service:
        target_dir = path.join(root_dir, "sdk", args.service)
    else:
        target_dir = root_dir

    paths = get_setup_py_paths(args.glob_string, target_dir, additional_excludes)

    # Check if package is excluded if a package name param is passed
    if package_name and not any(filter(lambda x: package_name == os.path.basename(os.path.dirname(x)), paths)):
        logging.info("Package {} is excluded from version update tool".format(package_name))
        exit(0)

    packages = []
    for setup_path in paths:
        try:
            setup_info = ParsedSetup.from_path(setup_path)
            packages.append(setup_info)
        except:
            print("Error parsing {}".format(setup_path))
            raise

    return packages

def get_version_py(setup_py_location):
    file_path, _ = path.split(setup_py_location)
    # Find path to _version.py recursively in azure folder of package
    azure_root_path = path.join(file_path, "azure")
    for root, _, files in os.walk(azure_root_path):
        if VERSION_PY in files:
            return path.join(root, VERSION_PY)
        elif OLD_VERSION_PY in files:
            return path.join(root, OLD_VERSION_PY)

def set_version_py(setup_py_location, new_version):
    version_py_location = get_version_py(setup_py_location)

    version_contents = ""
    with open(version_py_location, "r") as version_py_file:
        version_contents = version_py_file.read()

    with open(version_py_location, "w") as version_py_file:
        replaced_version_contents = re.sub(
            VERSION_REGEX,
            VERSION_STRING % new_version,
            version_contents,
            flags=re.MULTILINE,
        )

        version_py_file.write(replaced_version_contents)

# Get classification for PyPI (https://pypi.org/classifiers/)
def get_classification(version):
    parsed_version = parse(version)
    if not parsed_version.is_prerelease:
        return "Development Status :: 5 - Production/Stable"
    else:
        return "Development Status :: 4 - Beta"

def set_dev_classifier(setup_py_location, version):
    classification = get_classification(version)

    setup_contents = ""
    with open(setup_py_location, "r+") as setup_py_file:
        setup_contents = setup_py_file.read()

        # Reset position and truncate the file for new contents
        setup_py_file.seek(0)
        setup_py_file.truncate()

        replaced_setup_contents = re.sub(DEV_STATUS_REGEX, '\g<1>"{}"'.format(classification), setup_contents)

        setup_py_file.write(replaced_setup_contents)

def update_change_log(
    setup_py_location,
    version,
    service,
    package,
    is_unreleased,
    replace_latest_entry_title,
    release_date=None,
    root_dir=None,
):
    if root_dir is None:
        root_dir = discover_repo_root()

    script = os.path.join(root_dir, "eng", "common", "scripts", "Update-ChangeLog.ps1")
    pkg_root = os.path.abspath(os.path.join(setup_py_location, ".."))
    changelog_path = os.path.join(pkg_root, "CHANGELOG.md")
    commands = [
        "pwsh",
        script,
        "--Version",
        version,
        "--ServiceDirectory",
        service,
        "--PackageName",
        package,
        "--Unreleased:${}".format(is_unreleased),
        "--ReplaceLatestEntryTitle:${}".format(replace_latest_entry_title),
        "--ChangelogPath:{}".format(changelog_path),
    ]
    if release_date is not None:
        commands.append("--ReleaseDate:{}".format(release_date))

    # Run script to update change log
    run(commands, cwd=pkg_root)


text:
<?php

return [
	\App\Models\Order::STATUS_NEW => 'Новый',
	\App\Models\Order::STATUS_CONFIRMED => 'Подтвержден',
	\App\Models\Order::STATUS_SENT => 'Отправлен',
	\App\Models\Order::STATUS_READY => 'Завершен',
	\App\Models\Order::STATUS_CANCELED => 'Отменен'
];


text:
This Pusher client library supports web browsers, web workers, Node.js and
React Native.

If you're looking for the Pusher server library for Node.js, use
[pusher-http-node](https://github.com/pusher/pusher-http-node) instead.

For tutorials and more in-depth information about the Pusher platform, visit
our [official docs](https://pusher.com/docs/javascript_quick_start).

## Usage Overview

The following topics are covered:

* [Installation](https://github.com/pusher/pusher-js#installation)
  * [Web](https://github.com/pusher/pusher-js#web)
  * [React Native](https://github.com/pusher/pusher-js#react-native)
  * [Web Workers](https://github.com/pusher/pusher-js#web-workers)
  * [Node.js](https://github.com/pusher/pusher-js#nodejs)
* [Initialization](https://github.com/pusher/pusher-js#initialization)
* [Configuration](https://github.com/pusher/pusher-js#configuration)
* [Global Configuration](https://github.com/pusher/pusher-js#global-configuration)
* [Connection](https://github.com/pusher/pusher-js#connection)
  * [Socket IDs](https://github.com/pusher/pusher-js#socket-ids)
* [Subscribing to Channels (Public and Private)](https://github.com/pusher/pusher-js#subscribing-to-channels)
* [Binding to Events](https://github.com/pusher/pusher-js#binding-to-events)
* [Default events](https://github.com/pusher/pusher-js#default-events)
* [Developing](https://github.com/pusher/pusher-js#developing)
  * [Core vs. Platform-specific Code](https://github.com/pusher/pusher-js#core-vs-platform-specific-code)
  * [Building](https://github.com/pusher/pusher-js#building)
  * [Testing](https://github.com/pusher/pusher-js#testing)

## Installation

### Web

If you're using Pusher on a web page, you can install the library via:

#### Yarn (or NPM)

You can use any NPM-compatible package manager, including NPM itself and Yarn.

```bash
yarn add pusher-js
```

Then:

```javascript
import Pusher from 'pusher-js';
```

Or, if you're not using ES6 modules:

```javascript
const Pusher = require('pusher-js');
```

#### CDN

```html
<script src="https://js.pusher.com/4.1/pusher.min.js"></script>
```

You can also use [cdnjs.com](https://cdnjs.com/libraries/pusher) if you prefer
or as a fallback.

#### Bower (discouraged)

Or via [Bower](http://bower.io/):

```bash
bower install pusher
```

and then:

```html
<script src="bower_components/pusher/dist/web/pusher.min.js"></script>
```

### React Native

Use a package manager like Yarn or NPM to install `pusher-js` and then import
it as follows:

```javascript
import Pusher from 'pusher-js/react-native';
```

Notes:

* The fallbacks available for this runtime are HTTP streaming and polling.
* This build uses React Native's NetInfo API to detect changes on connectivity state. It will use this to automatically reconnect.

### Web Workers

You can import the worker script (`pusher.worker.js`, not `pusher.js`) from the CDN:

```javascript
importScripts('https://js.pusher.com/4.1/pusher.worker.min.js');
```

### Node.js

Having installed `pusher-js` via an NPM-compatible package manager, simply:

```javascript
import Pusher from 'pusher-js';
```

Notes:

* For standard `WebWorkers`, this build will use HTTP as a fallback.
* For `ServiceWorkers`, as the `XMLHttpRequest` API is unavailable, there is currently no support for HTTP fallbacks. However, we are open to requests for fallbacks using `fetch` if there is demand.

## Initialization

```js
const socket = new Pusher(APP_KEY, {
  cluster: APP_CLUSTER,
});
```

You can get your `APP_KEY` and `APP_CLUSTER` from the [Pusher dashboard](https://dashboard.pusher.com/).

## Configuration

There are a number of configuration parameters which can be set for the Pusher client, which can be passed as an object to the Pusher constructor, i.e.:

```js
const socket = new Pusher(APP_KEY, {
  cluster: APP_CLUSTER,
  authEndpoint: 'http://example.com/pusher/auth',
  encrypted: true
});
```

For most users, there is little need to change these. See [client API guide](http://pusher.com/docs/client_api_guide/client_connect) for more details.

#### `encrypted` (Boolean)

Forces the connection to use encrypted transports.

#### `authEndpoint` (String)

Endpoint on your server that will return the authentication signature needed for private channels.

#### `authTransport` (String)

Defines how the authentication endpoint, defined using authEndpoint, will be called. There are two options available: `ajax` and `jsonp`.

#### `auth` (Hash)

Allows passing additional data to authorizers. Supports query string params and headers (AJAX only). For example, following will pass `foo=bar` via the query string and `baz: boo` via headers:

```js
const socket = new Pusher(APP_KEY, {
  cluster: APP_CLUSTER,
  auth: {
    params: { foo: 'bar' },
    headers: { baz: 'boo' }
  }
});
```

##### CSRF

If you require a CSRF header for incoming requests to the private channel authentication endpoint on your server, you should add a CSRF token to the `auth` hash under `headers`. This is applicable to frameworks which apply CSRF protection by default.

```js
const socket = new Pusher(APP_KEY, {
  cluster: APP_CLUSTER,
  auth: {
    params: { foo: 'bar' },
    headers: { 'X-CSRF-Token': 'SOME_CSRF_TOKEN' }
  }
});
```

#### `authorizer` (Function)

If you need custom authorization behavior you can provide your own `authorizer` function as follows:

```js
const pusher = new Pusher(APP_KEY, {
  cluster: APP_CLUSTER,
  authorizer: function (channel, options) {
    return {
      authorize: function (socketId, callback) {
        // Do some ajax to get the auth information
        callback(false, authInformation);
      }
    };
  }
})
```

#### `cluster` (String)

Allows connecting to a different datacenter by setting up correct hostnames and ports for the connection.

```js
const socket = new Pusher(APP_KEY, {
  cluster: APP_CLUSTER,
});
```

#### `disableStats` (Boolean)

Disables stats collection, so that connection metrics are not submitted to Pusher's servers. These stats are used for internal monitoring only and they do not affect the account stats.

#### `enabledTransports` (Array)

Specifies which transports should be used by Pusher to establish a connection. Useful for applications running in controlled, well-behaving environments. Available transports for web: `ws`, `wss`, `xhr_streaming`, `xhr_polling`, `sockjs`. Additional transports may be added in the future and without adding them to this list, they will be disabled.

```js
// Only use WebSockets
const socket = new Pusher(APP_KEY, {
  cluster: APP_CLUSTER,
  enabledTransports: ['ws']
});
```

#### `disabledTransports` (Array)

Specified which transports must not be used by Pusher to establish a connection. This settings overwrites transports whitelisted via the `enabledTransports` options. Available transports for web: `ws`, `wss`, `xhr_streaming`, `xhr_polling`, `sockjs`. Additional transports may be added in the future and without adding them to this list, they will be enabled.

```js
// Use all transports except for sockjs
const socket = new Pusher(APP_KEY, {
  cluster: APP_CLUSTER,
  disabledTransports: ['sockjs']
});

// Only use WebSockets
const socket = new Pusher(APP_KEY, {
  cluster: APP_CLUSTER,
  enabledTransports: ['ws', 'xhr_streaming'],
  disabledTransports: ['xhr_streaming']
});
```

#### `wsHost`, `wsPort`, `wssPort`, `httpHost`, `httpPort`, `httpsPort`

These can be changed to point to alternative Pusher URLs (used internally for our staging server).

#### `ignoreNullOrigin` (Boolean)

Ignores null origin checks for HTTP fallbacks. Use with care, it should be disabled only if necessary (i.e. PhoneGap).

#### `activityTimeout` (Integer)

After this time (in miliseconds) without any messages received from the server, a ping message will be sent to check if the connection is still working. Default value is is supplied by the server, low values will result in unnecessary traffic.

#### `pongTimeout` (Integer)

Time before the connection is terminated after sending a ping message. Default is 30000 (30s). Low values will cause false disconnections, if latency is high.

## Global configuration

### `Pusher.logToConsole` (Boolean)

Enables logging to the browser console via calls to `console.log`.

### `Pusher.log` (Function)

Assign a custom log handler for the Pusher library logging. For example:

```js
Pusher.log = (msg) => {
  console.log(msg);
};
```

By setting the `log` property you also override the use of `Pusher.enableLogging`.

## Connection

A connection to Pusher is established by providing your `APP_KEY` and `APP_CLUSTER` to the constructor function:

```js
const socket = new Pusher(APP_KEY, {
  cluster: APP_CLUSTER,
});
```

This returns a socket object which can then be used to subscribe to channels.

You may disconnect again by invoking the `disconnect` method:

```js
socket.disconnect();
```

### Socket IDs

Making a connection provides the client with a new `socket_id` that is assigned by the server. This can be used to distinguish the client's own events. A change of state might otherwise be duplicated in the client. More information on this pattern is available [here](http://pusherapp.com/docs/duplicates).

It is also stored within the socket, and used as a token for generating signatures for private channels.

## Subscribing to channels

### Public channels

The default method for subscribing to a channel involves invoking the `subscribe` method of your socket object:

```js
const channel = socket.subscribe('my-channel');
```

This returns a Channel object which events can be bound to.

### Private channels

Private channels are created in exactly the same way as normal channels, except that they reside in the 'private-' namespace. This means prefixing the channel name:

```js
const channel = socket.subscribe('private-my-channel');
```

It is possible to access channels by name, through the `channel` function:

```js
const channel = socket.channel('private-my-channel');
```

It is possible to access all subscribed channels through the `allChannels` function:

```js
socket.allChannels().forEach(channel => console.log(channel.name));
```

Private and presence channels will make a request to your `authEndpoint` (`/pusher/auth`) by default, where you will have to [authenticate the subscription](https://pusher.com/docs/authenticating_users). You will have to send back the correct auth response and a 200 status code.

## Unsubscribing from channels

To unsubscribe from a channel, invoke the `unsubscribe` method of your socket object:

```js
socket.unsubscribe('my-channel');
```

Unsubscribing from private channels is done in exactly the same way, just with the additional `private-` prefix:

```js
socket.unsubscribe('private-my-channel');
```

## Binding to events

Event binding takes a very similar form to the way events are handled in jQuery. You can use the following methods either on a channel object, to bind to events on a particular channel; or on the pusher object, to bind to events on all subscribed channels simultaneously.

### `bind` and `unbind`
Binding to "new-message" on channel: The following logs message data to the console when "new-message" is received
```js
channel.bind('new-message', function (data) {
  console.log(data.message);
});
```

We can also provide the `this` value when calling a handler as a third optional parameter. The following logs "hi Pusher" when "my-event" is fired.

```js
channel.bind('my-event', function () {
  console.log(`hi ${this.name}`);
}, { name: 'Pusher' });
```

Unsubscribe behaviour varies depending on which parameters you provide it with. For example:

```js
// Remove just `handler` for the `new-comment` event
channel.unbind('new-comment', handler);

// Remove all handlers for the `new-comment` event
channel.unbind('new-comment');

// Remove `handler` for all events
channel.unbind(null, handler);

// Remove all handlers for `context`
channel.unbind(null, null, context);

// Remove all handlers on `channel`
channel.unbind();
```

### `bind_global` and `unbind_global`

`bind_global` and `unbind_global` work much like `bind` and `unbind`, but instead of only firing callbacks on a specific event, they fire callbacks on any event, and provide that event along to the handler along with the event data. For example:

```js
channel.bind_global(function (event, data) {
  console.log(`The event ${event} was triggered with data ${data}`);
})
```

`unbind_global` works similarly to `unbind`.

```js
// remove just `handler` from global bindings
channel.unbind_global(handler);

// remove all global bindings
channel.unbind_global();
```

### `unbind_all`

The `unbind_all` method is equivalent to calling `unbind()` and `unbind_global()` together; it removes all bindings, global and event specific.

## Batching auth requests (aka multi-auth)

Currently, pusher-js itself does not support authenticating multiple channels in one HTTP request. However, thanks to @dirkbonhomme you can use the [pusher-js-auth](https://github.com/dirkbonhomme/pusher-js-auth) plugin that buffers subscription requests and sends auth requests to your endpoint in batches.

## Default events

There are a number of events which are used internally, but can also be of use elsewhere:

* subscribe

## Connection Events

To listen for when you connect to Pusher:

```js
socket.connection.bind('connected', callback);
```

And to bind to disconnections:

```js
socket.connection.bind('disconnected', callback);
```

## Self-serving JS files

You can host JavaScript files yourself, but it's a bit more complicated than putting them somewhere and just linking `pusher.js` in the source of your website. Because pusher-js loads fallback files dynamically, the dependency loader must be configured correctly or it will be using `js.pusher.com`.

First, clone this repository and run `npm install && git submodule init && git submodule update`. Then run:

    $ CDN_HTTP='http://your.http.url' CDN_HTTPS='https://your.https.url' make web

In the `dist/web` folder, you should see the files you need: `pusher.js`, `pusher.min.js`, `json2.js`, `json.min.js`, `sockjs.js` and `sockjs.min.js`. `pusher.js` should be built referencing your URLs as the dependency hosts.

First, make sure you expose all files from the `dist` directory. They need to be in a directory with named after the version number. For example, if you're hosting version 4.1.0 under `http://example.com/pusher-js` (and https for SSL), files should be accessible under following URL's:

    http://example.com/pusher-js/4.1.0/pusher.js
    http://example.com/pusher-js/4.1.0/json2.js
    http://example.com/pusher-js/4.1.0/sockjs.js

Minified files should have `.min` in their names, as in the `dist/web` directory:

    http://example.com/pusher-js/4.1.0/pusher.min.js
    http://example.com/pusher-js/4.1.0/json2.min.js
    http://example.com/pusher-js/4.1.0/sockjs.min.js

## SockJS compatibility

Most browsers have a limit of 6 simultaneous connections to a single domain, but Internet Explorer 6 and 7 have a limit of just 2. This means that you can only use a single Pusher connection in these browsers, because SockJS requires an HTTP connection for incoming data and another one for sending. Opening the second connection will break the first one as the client won't be able to respond to ping messages and get disconnected eventually.

All other browsers work fine with two or three connections.

## Developing

Install all dependencies via Yarn:

```bash
yarn install
```

Run a development server which serves bundled javascript from <http://localhost:5555/pusher.js> so that you can edit files in /src freely.

```bash
make serve
```

You can optionally pass a `PORT` environment variable to run the server on a different port. You can also pass `CDN_HTTP` and `CDN_HTTPS` variables if you wish the library to load dependencies from a new host.

This command will serve `pusher.js`, `sockjs.js`, `json2.js`, and their respective minified versions.

### Core Vs. Platform-Specific Code

New to PusherJS 3.1 is the ability for the library to produce builds for different runtimes: classic web, React Native, NodeJS and
Web Workers.

In order for this to happen, we have split the library into two directories: `core/` and `runtimes/`. In `core` we keep anything that is platform-independent. In `runtimes` we keep code that depends on certain runtimes.

Throughout the `core/` directory you'll find this line:

```javascript
import Runtime from "runtime";
```

We use webpack module resolution to make the library look for different versions of this module depending on the build.

For web it will look for `src/runtimes/web/runtime.ts`. For ReactNative, `src/runtimes/react-native/runtime.ts`. For Node:  `src/runtimes/node/runtime.ts`. For worker: `src/runtimes/worker/runtime.ts`.

Each of these runtime files exports an object (conforming to the interface you can see in `src/runtimes/interface.ts`) that abstracts away everything platform-specific. The core library pulls this object in without any knowledge of how it implements it. This means web build can use the DOM underneath, the ReactNative build can use its native NetInfo API, Workers can use `fetch` and so on.

### Building

In order to build SockJS, you must first initialize and update the Git submodule:

```bash
git submodule init
git submodule update
```

Then simply run:

```bash
make web
```

This will build the source files relevant for the web build into `dist/web`.

In order to specify the library version, you can either update `package.json` or pass a `VERSION` environment variable upon building.

Other build commands include:

```bash
make react-native # for the React Native build
make node         # for the NodeJS build
make worker       # for the worker build
```

### Testing

Each test environment contains two types of tests:

1. unit tests,
2. integration tests.

Unit tests are simple, fast and don't need any external dependencies. Integration tests usually connect to production and js-integration-api servers and can use a local server for loading JS files, so they need an Internet connection to work.

There are 3 different testing environments: one for web, one for NodeJS and one for workers. We may consider adding another one for React Native in the future.

The web and worker tests use [Karma](https://github.com/karma-runner/karma) to execute specs in real browsers. The NodeJS tests use [jasmine-node](https://github.com/mhevery/jasmine-node).

To run the tests:

```bash
# For web
make web_unit
make web_integration

# For NodeJS
make node_unit
make node_integration

# For workers
make worker_unit
make worker_integration
```

If you want your Karma tests to automatically reload, then in `spec/karma/config.common.js` set `singleRun` to `false`.


text:
<!---
  category: ControlsLayoutAndText
  samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=620538&clcid=0x409
--->

# Line spacing (DirectWrite) sample

This sample demonstrates how to use different line spacing options that are provided for the DirectWrite text layout API.

In previous versions, DirectWrite supported two different line spacing methods: default and uniform. The uniform method gives the app exact control over line spacing distances, but could not support some common scenarios such as "double" spacing. In Windows 10, a new "proportional" line spacing method is added, with associated APIs for you to specify various input parameters.

Line metrics sound straightforward: line height, ascender and descender. But when you get into details of various scenarios, it's actually somewhat difficult to understand in the abstract. For that reason, in addition to demonstrating use of the DirectWrite APIs, this sample also allows you to explore and see visually how different input parameters affect the computed results.

##Sample project files
The sample is intended to demonstrate how to use the DirectWrite text layout line spacing APIs and the effects of the various input parameters. The app is comprised of two projects:

* The DWriteTextLayoutImplementation project provides the implementation of DirectWrite APIs for text layout and line spacing that are the main focus of this sample. It is implemented as a Windows Runtime Component that wraps around DirectWrite and enables interop with the sample client app. It also uses other DirectX APIs to implement a XAML SurfaceImageSource as a means of displaying the text layout.
* The DWriteLineSpacing Modes project provides the sample app shell, implemented using XAML, that functions as a client of the the DirectWrite APIs being demonstrated.

This organization suits the needs of this sample app, utilizing the simplicity of XAML for UI to navigate between scenarios while keeping the native DirectWrite code that's of primary interest separate and easier for you to focus on.

###DWriteTextLayoutImplementation project
Within the DWriteTextLayoutImplementation project, the following files are significant:

* The TextLayout.h/.cpp files wrap the DirectWrite text layout and related line spacing APIs.
* The TextLayoutImageSource.h/.cpp files implement a XAML SurfaceImageSource using DirectX APIs for rendering the text layout.

###DWriteTextLayoutCloudFont project
Within the DWriteTextLayoutCloudFont project, the following files are significant:

* The Scenario1\_DefaultSpacing.\*, Scenario2\_UniformSpacing.\* and Scenario3\_ProportionalSpacing.\* files each demonstrate a different line spacing method.

Other files are boilerplate files used for UWP sample apps.

##Related topics

[IDWriteTextLayout3 interface](https://msdn.microsoft.com/en-us/library/windows/desktop/dn900405)
[IDWriteTextLayout3::SetLineSpacing method](https://msdn.microsoft.com/en-us/library/windows/desktop/dn900409)
[DWRITE\_LINE\_SPACING structure](https://msdn.microsoft.com/en-us/library/windows/desktop/dn933216)
[DWRITE\_LINE\_SPACING_METHOD enumeration](https://msdn.microsoft.com/en-us/library/windows/desktop/dd368101)
[DWRITE\_FONT\_LINE_GAP\_USAGE enumeration](https://msdn.microsoft.com/en-us/library/windows/desktop/dn933211)
[IDWriteTextLayout3::GetLineMetrics method](https://msdn.microsoft.com/en-us/library/windows/desktop/dn900406)
[DWRITE\_LINE\_METRICS1 structure](https://msdn.microsoft.com/en-us/library/windows/desktop/dn933215)

## System requirements

**Client:** Windows 10

**Server:** Windows Server 2016 Technical Preview

**Phone:** Windows 10

## Build the sample

1. If you download the samples ZIP, be sure to unzip the entire archive, not just the folder with the sample you want to build.
2. Start Microsoft Visual Studio 2015 and select **File** \> **Open** \> **Project/Solution**.
3. Starting in the folder where you unzipped the samples, go to the Samples subfolder, then the subfolder for this specific sample, then the subfolder for your preferred language (C++, C#, or JavaScript). Double-click the Visual Studio 2015 Solution (.sln) file.
4. Press Ctrl+Shift+B, or select **Build** \> **Build Solution**.

## Run the sample

The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.

### Deploying the sample

- Select Build > Deploy Solution.

### Deploying and running the sample

- To run the sample with debugging, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or selectDebug > Start Without Debugging.


text:
package com.abewy.android.apps.klyph.adapter.holder;

import android.widget.ImageView;
import android.widget.TextView;

public class ElementTimelineHolder
{
	private ImageView	elementCoverImage;
	private ImageView	elementProfileImage;
	private TextView	elementDetail1;
	private TextView	elementDetail2;
	private TextView	elementDetail3;
	private TextView	elementDetail4;
	private TextView	likes;
	private TextView	talkAbout;

	public ElementTimelineHolder(ImageView elementCoverImage, ImageView elementProfileImage, TextView elementDetail1,
			TextView elementDetail2, TextView elementDetail3, TextView elementDetail4, TextView likes,
			TextView talkAbout)
	{
		this.elementCoverImage = elementCoverImage;
		this.elementProfileImage = elementProfileImage;
		this.elementDetail1 = elementDetail1;
		this.elementDetail2 = elementDetail2;
		this.elementDetail3 = elementDetail3;
		this.elementDetail4 = elementDetail4;
		this.likes = likes;
		this.talkAbout = talkAbout;
	}

	public ImageView getElementCoverImage()
	{
		return elementCoverImage;
	}

	public ImageView getElementProfileImage()
	{
		return elementProfileImage;
	}

	public TextView getElementDetail1()
	{
		return elementDetail1;
	}

	public TextView getElementDetail2()
	{
		return elementDetail2;
	}

	public TextView getElementDetail3()
	{
		return elementDetail3;
	}

	public TextView getElementDetail4()
	{
		return elementDetail4;
	}

	public TextView getLikes()
	{
		return likes;
	}

	public TextView getTalkAbout()
	{
		return talkAbout;
	}
}