text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="756a7ab6-156e-4f32-b791-29ba40ac7c52" name="Default" comment="" />
    <ignored path="Project5.iws" />
    <ignored path=".idea/workspace.xml" />
    <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="DaemonCodeAnalyzer">
    <disable_hints />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="Project5" />
  </component>
  <component name="FileEditorManager">
    <leaf>
      <file leaf-file-name="Vertex.java" pinned="false" current="true" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/src/Vertex.java">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="-1.5492958" vertical-offset="762" max-vertical-offset="1972">
              <caret line="6" column="0" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Vertex2.java" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/Vertex2.java">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0" vertical-offset="2615" max-vertical-offset="3213">
              <caret line="10" column="0" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" />
              <folding>
                <element signature="imports" expanded="true" />
                <element signature="e#163#164#0" expanded="true" />
                <element signature="e#190#191#0" expanded="true" />
                <element signature="e#785#786#0" expanded="true" />
                <element signature="e#840#841#0" expanded="true" />
                <element signature="e#996#997#0" expanded="true" />
                <element signature="e#1049#1050#0" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Link.java" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/com/project/project5/Link.java">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="-8.035714" vertical-offset="1628" max-vertical-offset="2805">
              <caret line="109" column="43" selection-start-line="109" selection-start-column="43" selection-end-line="109" selection-end-column="43" />
              <folding>
                <element signature="e#304#305#0" expanded="true" />
                <element signature="e#331#332#0" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="FindManager">
    <FindUsagesManager>
      <setting name="OPEN_NEW_TAB" value="true" />
    </FindUsagesManager>
  </component>
  <component name="IdeDocumentHistory">
    <option name="changedFiles">
      <list>
        <option value="$PROJECT_DIR$/src/com/project/project5/HashTree.java" />
        <option value="$PROJECT_DIR$/src/com/project/project5/HashTable.java" />
        <option value="$PROJECT_DIR$/src/com/project/project5/Warshall.java" />
        <option value="$PROJECT_DIR$/src/com/project/project5/Vertex.java" />
        <option value="$PROJECT_DIR$/src/com/project/project5/Link.java" />
        <option value="$PROJECT_DIR$/src/Vertex.java" />
        <option value="$PROJECT_DIR$/src/Vertex2.java" />
      </list>
    </option>
  </component>
  <component name="ProjectFrameBounds">
    <option name="x" value="-8" />
    <option name="y" value="-8" />
    <option name="width" value="1382" />
    <option name="height" value="744" />
  </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="ProjectReloadState">
    <option name="STATE" value="0" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
    </navigator>
    <panes>
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="Project5" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="Project5" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="Project5" />
              <option name="myItemType" value="com.android.tools.idea.gradle.projectView.AndroidPsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="Project5" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="Project5" />
              <option name="myItemType" value="com.android.tools.idea.gradle.projectView.AndroidPsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.android.tools.idea.gradle.projectView.AndroidPsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="Project5" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="Project5" />
              <option name="myItemType" value="com.android.tools.idea.gradle.projectView.AndroidPsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.android.tools.idea.gradle.projectView.AndroidPsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="Vertex.java" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.ClassesTreeStructureProvider$PsiClassOwnerTreeNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="Project5" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="Project5" />
              <option name="myItemType" value="com.android.tools.idea.gradle.projectView.AndroidPsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.android.tools.idea.gradle.projectView.AndroidPsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="project5" />
              <option name="myItemType" value="com.android.tools.idea.gradle.projectView.AndroidPsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="Link.java" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.ClassesTreeStructureProvider$PsiClassOwnerTreeNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="Scope" />
      <pane id="PackagesPane" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="GoToClass.includeLibraries" value="false" />
    <property name="GoToClass.toSaveIncludeLibraries" value="false" />
    <property name="GoToFile.includeJavaFiles" value="false" />
    <property name="MemberChooser.sorted" value="false" />
    <property name="MemberChooser.showClasses" value="true" />
    <property name="MemberChooser.copyJavadoc" value="false" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$/../Project4/src/Node.java" />
    <property name="recentsLimit" value="5" />
    <property name="FullScreen" value="false" />
    <property name="dynamic.classpath" value="false" />
  </component>
  <component name="RunManager" selected="Application.HamiltonApp">
    <configuration default="false" name="WarshallApp" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
      <option name="MAIN_CLASS_NAME" value="com.project.project5.WarshallApp" />
      <option name="VM_PARAMETERS" />
      <option name="PROGRAM_PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="ENABLE_SWING_INSPECTOR" value="false" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <module name="Project5" />
      <envs />
      <RunnerSettings RunnerId="Debug">
        <option name="DEBUG_PORT" value="" />
        <option name="TRANSPORT" value="0" />
        <option name="LOCAL" value="true" />
      </RunnerSettings>
      <RunnerSettings RunnerId="Run" />
      <ConfigurationWrapper RunnerId="Debug" />
      <ConfigurationWrapper RunnerId="Run" />
      <method />
    </configuration>
    <configuration default="false" name="HashTreeApp" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
      <option name="MAIN_CLASS_NAME" value="com.project.project5.HashTreeApp" />
      <option name="VM_PARAMETERS" />
      <option name="PROGRAM_PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="ENABLE_SWING_INSPECTOR" value="false" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <module name="Project5" />
      <envs />
      <RunnerSettings RunnerId="Debug">
        <option name="DEBUG_PORT" value="" />
        <option name="TRANSPORT" value="0" />
        <option name="LOCAL" value="true" />
      </RunnerSettings>
      <RunnerSettings RunnerId="Run" />
      <ConfigurationWrapper RunnerId="Debug" />
      <ConfigurationWrapper RunnerId="Run" />
      <method />
    </configuration>
    <configuration default="false" name="WarshallApp (1)" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
      <option name="MAIN_CLASS_NAME" value="WarshallApp" />
      <option name="VM_PARAMETERS" />
      <option name="PROGRAM_PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="ENABLE_SWING_INSPECTOR" value="false" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <module name="Project5" />
      <envs />
      <RunnerSettings RunnerId="Debug">
        <option name="DEBUG_PORT" value="" />
        <option name="TRANSPORT" value="0" />
        <option name="LOCAL" value="true" />
      </RunnerSettings>
      <RunnerSettings RunnerId="Run" />
      <ConfigurationWrapper RunnerId="Debug" />
      <ConfigurationWrapper RunnerId="Run" />
      <method />
    </configuration>
    <configuration default="false" name="HamiltonApp" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
      <option name="MAIN_CLASS_NAME" value="HamiltonApp" />
      <option name="VM_PARAMETERS" />
      <option name="PROGRAM_PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="ENABLE_SWING_INSPECTOR" value="false" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <module name="Project5" />
      <envs />
      <RunnerSettings RunnerId="Run" />
      <ConfigurationWrapper RunnerId="Run" />
      <method />
    </configuration>
    <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
      <module name="" />
      <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
      <option name="PROGRAM_PARAMETERS" />
      <method />
    </configuration>
    <configuration default="true" type="AndroidTestRunConfigurationType" factoryName="Android Tests">
      <module name="" />
      <option name="TESTING_TYPE" value="0" />
      <option name="INSTRUMENTATION_RUNNER_CLASS" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="PACKAGE_NAME" value="" />
      <option name="TARGET_SELECTION_MODE" value="EMULATOR" />
      <option name="USE_LAST_SELECTED_DEVICE" value="false" />
      <option name="PREFERRED_AVD" value="" />
      <option name="USE_COMMAND_LINE" value="true" />
      <option name="COMMAND_LINE" value="" />
      <option name="WIPE_USER_DATA" value="false" />
      <option name="DISABLE_BOOT_ANIMATION" value="false" />
      <option name="NETWORK_SPEED" value="full" />
      <option name="NETWORK_LATENCY" value="none" />
      <option name="CLEAR_LOGCAT" value="false" />
      <option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
      <option name="FILTER_LOGCAT_AUTOMATICALLY" value="true" />
      <method />
    </configuration>
    <configuration default="true" type="Remote" factoryName="Remote">
      <option name="USE_SOCKET_TRANSPORT" value="true" />
      <option name="SERVER_MODE" value="false" />
      <option name="SHMEM_ADDRESS" value="javadebug" />
      <option name="HOST" value="localhost" />
      <option name="PORT" value="5005" />
      <method />
    </configuration>
    <configuration default="true" type="TestNG" factoryName="TestNG">
      <module name="" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="SUITE_NAME" />
      <option name="PACKAGE_NAME" />
      <option name="MAIN_CLASS_NAME" />
      <option name="METHOD_NAME" />
      <option name="GROUP_NAME" />
      <option name="TEST_OBJECT" value="CLASS" />
      <option name="VM_PARAMETERS" value="-ea" />
      <option name="PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="OUTPUT_DIRECTORY" />
      <option name="ANNOTATION_TYPE" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <option name="TEST_SEARCH_SCOPE">
        <value defaultName="moduleWithDependencies" />
      </option>
      <option name="USE_DEFAULT_REPORTERS" value="false" />
      <option name="PROPERTIES_FILE" />
      <envs />
      <properties />
      <listeners />
      <method />
    </configuration>
    <configuration default="true" type="Applet" factoryName="Applet">
      <module name="" />
      <option name="MAIN_CLASS_NAME" />
      <option name="HTML_FILE_NAME" />
      <option name="HTML_USED" value="false" />
      <option name="WIDTH" value="400" />
      <option name="HEIGHT" value="300" />
      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
      <option name="VM_PARAMETERS" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <method />
    </configuration>
    <configuration default="true" type="Application" factoryName="Application">
      <option name="MAIN_CLASS_NAME" />
      <option name="VM_PARAMETERS" />
      <option name="PROGRAM_PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="ENABLE_SWING_INSPECTOR" value="false" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <module name="" />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="JUnit" factoryName="JUnit">
      <module name="" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="PACKAGE_NAME" />
      <option name="MAIN_CLASS_NAME" />
      <option name="METHOD_NAME" />
      <option name="TEST_OBJECT" value="class" />
      <option name="VM_PARAMETERS" value="-ea" />
      <option name="PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <option name="TEST_SEARCH_SCOPE">
        <value defaultName="moduleWithDependencies" />
      </option>
      <envs />
      <patterns />
      <method />
    </configuration>
    <configuration default="true" type="AndroidRunConfigurationType" factoryName="Android Application">
      <module name="" />
      <option name="ACTIVITY_CLASS" value="" />
      <option name="MODE" value="default_activity" />
      <option name="DEPLOY" value="true" />
      <option name="ARTIFACT_NAME" value="" />
      <option name="TARGET_SELECTION_MODE" value="EMULATOR" />
      <option name="USE_LAST_SELECTED_DEVICE" value="false" />
      <option name="PREFERRED_AVD" value="" />
      <option name="USE_COMMAND_LINE" value="true" />
      <option name="COMMAND_LINE" value="" />
      <option name="WIPE_USER_DATA" value="false" />
      <option name="DISABLE_BOOT_ANIMATION" value="false" />
      <option name="NETWORK_SPEED" value="full" />
      <option name="NETWORK_LATENCY" value="none" />
      <option name="CLEAR_LOGCAT" value="false" />
      <option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
      <option name="FILTER_LOGCAT_AUTOMATICALLY" value="true" />
      <method />
    </configuration>
    <list size="4">
      <item index="0" class="java.lang.String" itemvalue="Application.WarshallApp" />
      <item index="1" class="java.lang.String" itemvalue="Application.HashTreeApp" />
      <item index="2" class="java.lang.String" itemvalue="Application.WarshallApp (1)" />
      <item index="3" class="java.lang.String" itemvalue="Application.HamiltonApp" />
    </list>
    <recent_temporary>
      <list size="4">
        <item index="0" class="java.lang.String" itemvalue="Application.HamiltonApp" />
        <item index="1" class="java.lang.String" itemvalue="Application.WarshallApp (1)" />
        <item index="2" class="java.lang.String" itemvalue="Application.HashTreeApp" />
        <item index="3" class="java.lang.String" itemvalue="Application.WarshallApp" />
      </list>
    </recent_temporary>
    <configuration name="<template>" type="WebApp" default="true" selected="false">
      <Host>localhost</Host>
      <Port>5050</Port>
    </configuration>
  </component>
  <component name="ShelveChangesManager" show_recycled="false" />
  <component name="SvnConfiguration">
    <configuration />
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="756a7ab6-156e-4f32-b791-29ba40ac7c52" name="Default" comment="" />
      <created>1417727785398</created>
      <updated>1417727785398</updated>
    </task>
    <servers />
  </component>
  <component name="ToolWindowManager">
    <frame x="-8" y="-8" width="1382" height="744" extended-state="6" />
    <editor active="true" />
    <layout>
      <window_info id="Palette	" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <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="7" 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.32861635" 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="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="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" 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="2" side_tool="true" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2154088" sideWeight="0.5" order="7" 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="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="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" 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="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" 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.15885799" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2861635" sideWeight="0.5" order="2" 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="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="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="VcsManagerConfiguration">
    <option name="myTodoPanelSettings">
      <TodoPanelSettings />
    </option>
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager>
      <option name="time" value="2" />
    </breakpoint-manager>
  </component>
  <component name="antWorkspaceConfiguration">
    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
    <option name="FILTER_TARGETS" value="false" />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/src/Vertex.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1496">
          <caret line="59" column="6" selection-start-line="59" selection-start-column="6" selection-end-line="59" selection-end-column="6" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/../Project4/src/Node.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="2873" max-vertical-offset="4437">
          <caret line="169" column="20" selection-start-line="169" selection-start-column="20" selection-end-line="169" selection-end-column="20" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/com/project/project5/Link.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="2958" max-vertical-offset="3094">
          <caret line="184" column="27" selection-start-line="184" selection-start-column="27" selection-end-line="184" selection-end-column="27" />
          <folding>
            <element signature="e#304#305#0" expanded="true" />
            <element signature="e#331#332#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/Vertex.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="827" max-vertical-offset="1496">
          <caret line="59" column="6" selection-start-line="59" selection-start-column="6" selection-end-line="59" selection-end-column="6" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/../Project4/src/Node.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="2873" max-vertical-offset="4437">
          <caret line="169" column="20" selection-start-line="169" selection-start-column="20" selection-end-line="169" selection-end-column="20" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/com/project/project5/Link.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="1700" max-vertical-offset="3264">
          <caret line="100" column="24" selection-start-line="100" selection-start-column="24" selection-end-line="100" selection-end-column="24" />
          <folding>
            <element signature="e#304#305#0" expanded="true" />
            <element signature="e#331#332#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/../Project4/src/Node.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="2720" max-vertical-offset="4352">
          <caret line="169" column="20" selection-start-line="169" selection-start-column="20" selection-end-line="169" selection-end-column="20" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/com/project/project5/Link.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-8.035714" vertical-offset="1628" max-vertical-offset="2805">
          <caret line="109" column="43" selection-start-line="109" selection-start-column="43" selection-end-line="109" selection-end-column="43" />
          <folding>
            <element signature="e#304#305#0" expanded="true" />
            <element signature="e#331#332#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/Vertex2.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="2615" max-vertical-offset="3213">
          <caret line="10" column="0" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" />
          <folding>
            <element signature="imports" expanded="true" />
            <element signature="e#163#164#0" expanded="true" />
            <element signature="e#190#191#0" expanded="true" />
            <element signature="e#785#786#0" expanded="true" />
            <element signature="e#840#841#0" expanded="true" />
            <element signature="e#996#997#0" expanded="true" />
            <element signature="e#1049#1050#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/Vertex.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-1.5492958" vertical-offset="762" max-vertical-offset="1972">
          <caret line="6" column="0" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
  </component>
</project>


text:
from re import compile as regex

def matches(patts, filename):
  for p in patts:
    if not p.match(filename) is None:
      return True
  return False

class SpecialSection():

  def __init__(self, name, pathPatterns, filePatterns, all_conditions = False):
    self.name = name
    self.allcond = all_conditions
    self.fpat = []
    self.ppat = []
    for pat in filePatterns:
      self.fpat.append(regex(pat))
    for pat in pathPatterns:
      self.ppat.append(regex(pat))

  def match(self, filename, path):
    fmatch = matches(self.fpat, filename)
    if fmatch and not self.allcond:
      return True
    pmatch = matches(self.ppat, path)
    if pmatch and (fmatch or not self.allcond):
      return True
    return False

specialSections = [
  SpecialSection("Прилагательное", [], ["^.*quests/generated/pools/guardthemes\.config$"]),
  SpecialSection("Винительный падеж", [], ["^.*quests/generated/pools/weapon\.config$"]),
  SpecialSection("Имена персонажей", [], ["^.*namegen\.config$", "^.*\.namesource$"]),
  SpecialSection("Наречие", [], ["^.*pools/hatadjectives.config$"]),
  SpecialSection("Регулярное выражение (не для перевода, а для поддержки названий на кирилице)", ["^.*/regex$"], ["^.*\.config$"], True),
  SpecialSection("Привязанное к полу прилагательное",
    ["^.*generatedText/fluff/2/.*$"],
    ["^.*quests/generated/templates/spread_rumors.questtemplate$"], True),
  SpecialSection("Предложный падеж", ["^.*generatedText/fluff/3/.*$"],
    ["^.*quests/generated/templates/escort\.questtemplate$"], True),
  SpecialSection("Предложный падеж", [".*generatedText/fluff/5/.*$"],
    ["^.*quests/generated/templates/kidnapping\.questtemplate$"], True),
  SpecialSection("Множественное число", ["^.*generatedText/fluff/3/.*$"],
    ["^.*kill_monster_group\.questtemplate$"], True),
  SpecialSection("Родительный падеж", ["^.+/name$"],
    ["^.*pools/monsterthreats\.config$"], True),
  SpecialSection("Префикс названия банды", ["^.*Prefix/.*"], ["^.*quests/bounty/gang\.config"], True),
  SpecialSection("Основная часть названия банды", ["^.*Mid/.*"], ["^.*quests/bounty/gang\.config"], True),
  SpecialSection("Окончание названия банды", ["^.*suffix/.*"], ["^.*quests/bounty/gang\.config"], True),
  SpecialSection("Префикс главаря банды", ["^.*prefix/.*"], ["^.*quests/bounty/bounty\.config"], True),
  SpecialSection("Окончание главаря банды", ["^.*suffix/.*"], ["^.*quests/bounty/bounty\.config"], True),
]

redpajama_set_name: RedPajamaGithub


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package nl.hmh.OldManOPA.model;

import java.util.ArrayList;

/**
 *
 * @author Pehr
 */
public class Constants {
    public static final String[] operators = {"INPUT_HIGH", "INPUT_LOW", "PROBE", "AND", "OR", "NOT", "NAND", "NOR", "XOR"};
}


text:
<?php

namespace Drupal\Core\Field\Plugin\Field\FieldType;

use Drupal\Component\Utility\Random;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldStorageDefinitionInterface;

/**
 * Defines the 'string_long' field type.
 *
 * @FieldType(
 *   id = "string_long",
 *   label = @Translation("Text (plain, long)"),
 *   description = @Translation("A field containing a long string value."),
 *   category = @Translation("Text"),
 *   default_widget = "string_textarea",
 *   default_formatter = "basic_string",
 * )
 */
class StringLongItem extends StringItemBase {

  /**
   * {@inheritdoc}
   */
  public static function schema(FieldStorageDefinitionInterface $field_definition) {
    return [
      'columns' => [
        'value' => [
          'type' => $field_definition->getSetting('case_sensitive') ? 'blob' : 'text',
          'size' => 'big',
        ],
      ],
    ];
  }

  /**
   * {@inheritdoc}
   */
  public static function generateSampleValue(FieldDefinitionInterface $field_definition) {
    $random = new Random();
    $values['value'] = $random->paragraphs();
    return $values;
  }

}


text:
This small node.js server allow to execute commands on a machine (deployment scripts for example) when a GitLab webhook is triggered (push, issue events, etc..).

The server use a basic configuration file which defines which command should be executed on specific event of a specific repository. The setup time is around 15 minutes.

## Requirements

Node.js (v6 or greater)

## Installation

- Download the content of the current repository
- Execute the following command in the downloaded folder : `npm install`
- Create the file "config.json" and fill it with your configuration (see the server configuration part below)
- If needed, open the port set in the configuration in your firewall in order to allow http request on the server
- Execute the following command in the downloaded folder : `node server.js` (you can also use a process manager like pm2)
- Add the URL of the current server in your gitlab configuration (see the gitlab configuration part below)

## Server configuration

Example of a configuration file :

```
{
  "port": 9000,
  "logfile": "/home/user/gitlab-hook-server.log",
  "hooks": [
    {
      "repository": "my-gitlab-repository",
      "event": "push",
      "token": "my-gitlab-token",
      "command": "sh /home/user/deploy.sh 'firstParam' '${after}' '${repository.name}' --user='${user_name}'"
    }
  ]
}
```

- **port**: The port on which the server is gonna be started
- **logfile**: The file in which the logs will be written. Can be a relative path (from the server folder) or an absolute path. (optional. if null, the logs will be displayed in the console)
- **hooks**: List of hooks that you want to bind
  - **repository**: Name of the repository on which the command must be bound (optional. if null, the command will be executed on events of all repositories.
  - **event**: Name of the event on which the command will be executed (see the possible values on the [gitlab documentation](https://gitlab.com/help/user/project/integrations/webhooks)) (optional. if null, the command will be executed on all events)
  - **token**: The gitlab token define in the gitlab configuration (see gitlab configuration part below) (optional)
  - **command**: The command to execute when the hook is triggered. `${tokens}` will be replaced by values from the request body sent by [Gitlab](https://gitlab.com/help/user/project/integrations/webhooks#push-events).

## GitLab Configuration

- Open the repository that you want to bind in the gitlab website
- Go to "Settings", and then "Integrations"
- In the URL field, type the address of the hook server : `http://<server-name>:<port>/event`
- Set a token if needed
- Select the event that you want to trigger
- Click on "Add webhook"
- Once the operation done, click on the "Test" button to check if the binding is working


text:
package org.ovirt.engine.ui.common.presenter;

import java.util.List;
import java.util.logging.Logger;

import org.ovirt.engine.ui.common.uicommon.model.DetailModelProvider;
import org.ovirt.engine.ui.common.uicommon.model.SearchableDetailModelProvider;
import org.ovirt.engine.ui.common.widget.table.ActionTable;
import org.ovirt.engine.ui.common.widget.table.HasActionTable;
import org.ovirt.engine.ui.common.widget.table.OrderedMultiSelectionModel;
import org.ovirt.engine.ui.uicommonweb.models.HasEntity;
import org.ovirt.engine.ui.uicommonweb.models.ListWithDetailsModel;
import org.ovirt.engine.ui.uicompat.Event;
import org.ovirt.engine.ui.uicompat.EventArgs;
import org.ovirt.engine.ui.uicompat.IEventListener;
import org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.GwtEvent.Type;
import com.google.gwt.user.cellview.client.LoadingStateChangeEvent.LoadingState;
import com.google.gwt.view.client.SelectionChangeEvent;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.proxy.PlaceManager;
import com.gwtplatform.mvp.client.proxy.RevealContentHandler;
import com.gwtplatform.mvp.client.proxy.TabContentProxyPlace;
import com.gwtplatform.mvp.shared.proxy.PlaceRequest;

/**
 * Base class for presenters representing sub tabs that react to item selection changes within main tab presenters.
 *
 * @param <T> Main tab table row data type.
 * @param <M> Main model type (extends ListWithDetailsModel)
 * @param <D> Detail model type extends HasEntity
 * @param <V> View type (extends AbstractSubTabPresenter.ViewDef<T>)
 * @param <P> Proxy type (extends TabContentProxyPlace)
 */
public abstract class AbstractSubTabPresenter<T, M extends ListWithDetailsModel, D extends HasEntity, V extends AbstractSubTabPresenter.ViewDef<T>, P extends TabContentProxyPlace<?>>
        extends AbstractTabPresenter<V, P> {

    // TODO(vszocs) use HasActionTable<I> instead of raw type HasActionTable, this will
    // require adding new type parameter to presenter (do later as part of refactoring)
    @SuppressWarnings("rawtypes")
    public interface ViewDef<T> extends View, HasActionTable {

        /**
         * Notifies the view that the main tab item selection has changed.
         */
        void setMainTabSelectedItem(T selectedItem);

    }

    private static final Logger logger = Logger.getLogger(AbstractSubTabPresenter.class.getName());

    private final PlaceManager placeManager;
    private final DetailModelProvider<M, D> modelProvider;

    private List<T> mainTabSelectedItems;

    /**
     * @param eventBus
     * @param view <V> View type (extends AbstractSubTabPresenter.ViewDef<T>)
     * @param proxy <P> Proxy type (extends TabContentProxyPlace)
     * @param placeManager
     * @param modelProvider DetailModelProvider<M, D> <M> Main model type (extends ListWithDetailsModel)
     *                                                <D> Detail model type extends HasEntity
     * @param slot
     */
    public AbstractSubTabPresenter(EventBus eventBus, V view, P proxy,
            PlaceManager placeManager, DetailModelProvider<M, D> modelProvider,
            Type<RevealContentHandler<?>> slot) {
        super(eventBus, view, proxy, slot);
        this.placeManager = placeManager;
        this.modelProvider = modelProvider;
    }

    @Override
    protected ActionTable<?> getTable() {
        return getView().getTable();
    }

    @Override
    protected void onBind() {
        super.onBind();

        OrderedMultiSelectionModel<?> tableSelectionModel = getTable() != null ? getTable().getSelectionModel() : null;
        if (tableSelectionModel != null) {
            registerHandler(tableSelectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
                @Override
                public void onSelectionChange(SelectionChangeEvent event) {
                    // Update detail model selection
                    updateDetailModelSelection();
                }
            }));
        }
        initializeHandlers();
    }

    /**
     * Updates the detail model with items currently selected in the main tab.
     */
    @SuppressWarnings({ "unchecked", "rawtypes" })
    void updateDetailModelSelection() {
        if (modelProvider instanceof SearchableDetailModelProvider) {
            ((SearchableDetailModelProvider) modelProvider).setSelectedItems(getSelectedItems());
        }
    }

    /**
     * We use manual reveal since we want to prevent users from accessing this presenter when there is nothing selected
     * in the main tab.
     */
    @Override
    public boolean useManualReveal() {
        return true;
    }

    @Override
    protected void onReveal() {
        super.onReveal();

        // Notify model provider that the tab has been revealed
        modelProvider.onSubTabSelected();
    }

    @Override
    protected void onHide() {
        super.onHide();
        modelProvider.onSubTabDeselected();
    }

    @Override
    protected void onReset() {
        super.onReset();

        // Clear table selection before starting
        clearSelection();

        if (getTable() != null) {
            getTable().resetScrollPosition();
        }
    }

    @Override
    public void prepareFromRequest(PlaceRequest request) {
        super.prepareFromRequest(request);

        // Reveal presenter only when there is something selected in the main tab
        if (hasMainTabSelection()) {
            getProxy().manualReveal(this);
        } else {
            getProxy().manualRevealFailed();
            placeManager.revealPlace(getMainTabRequest());
        }
    }

    protected boolean hasMainTabSelection() {
        return mainTabSelectedItems != null && !mainTabSelectedItems.isEmpty();
    }

    protected T getMainTabSelectedItem() {
        return hasMainTabSelection() ? mainTabSelectedItems.get(0) : null;
    }

    /**
     * Notifies this sub tab presenter that the main tab selection has changed.
     */
    protected void updateMainTabSelection(List<T> mainTabSelectedItems) {
        this.mainTabSelectedItems = mainTabSelectedItems;

        T firstSelectedItem = getMainTabSelectedItem();

        // Notify view of selection change
        if (firstSelectedItem != null) {
            getView().setMainTabSelectedItem(firstSelectedItem);
        }
    }

    /**
     * Returns the place request associated with the main tab presenter for this sub tab.
     * <p>
     * Will be revealed when the user tries to access this sub tab while there is nothing selected in the main tab.
     */
    protected abstract PlaceRequest getMainTabRequest();

    /**
     * Returns items currently selected in the table or {@code null} if the sub tab view has no table widget associated.
     */
    protected List<?> getSelectedItems() {
        return getTable() != null ? getTable().getSelectionModel().getSelectedList() : null;
    }

    /**
     * Deselects any items currently selected in the table. Does nothing if the sub tab view has no table widget
     * associated.
     */
    protected void clearSelection() {
        if (getTable() != null) {
            getTable().getSelectionModel().clear();
        }
    }

    public void initializeHandlers() {
        // Notify view when the entity of the detail model changes
        modelProvider.getModel().getEntityChangedEvent().addListener(new IEventListener<EventArgs>() {
            @Override
            public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) {
                Object entity = modelProvider.getModel().getEntity();
                if (entity != null) {
                    onDetailModelEntityChange(entity);
                }
            }
        });

        // Notify view when the detail model indicates progress
        modelProvider.getModel().getPropertyChangedEvent().addListener(new IEventListener<PropertyChangedEventArgs>() {
            @Override
            public void eventRaised(Event<? extends PropertyChangedEventArgs> ev, Object sender, PropertyChangedEventArgs args) {
                if (PropertyChangedEventArgs.PROGRESS.equals(args.propertyName)) {
                    if (modelProvider.getModel().getProgress() != null) {
                        Scheduler.get().scheduleDeferred(new ScheduledCommand() {
                            @Override
                            public void execute() {
                                if (getTable() != null) {
                                    getTable().setLoadingState(LoadingState.LOADING);
                                }
                            }
                        });
                    }
                }
            }
        });
    }

    /**
     * Override this method in case the detail model entity type is different from main model item type.
     */
    @SuppressWarnings("unchecked")
    protected void onDetailModelEntityChange(Object entity) {
        try {
            getView().setMainTabSelectedItem((T) entity);
        } catch (ClassCastException ex) {
            // Detail model entity type is different from main model item type.
            // This usually happens with synthetic item types that wrap multiple
            // logical entities into single type. Since views can typically edit
            // a single item type, we can do nothing here.
            logger.warning("Detail model entity type is different from main model item type"); //$NON-NLS-1$
        }
    }

    protected DetailModelProvider<M, D> getModelProvider() {
        return modelProvider;
    }

}


text:
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/ui/metro_pin_tab_helper.h"

#include "base/logging.h"
#include "base/utf_string_conversions.h"
#include "content/public/browser/web_contents.h"

#if defined(OS_WIN)
#include "base/win/metro.h"
#endif

MetroPinTabHelper::MetroPinTabHelper(content::WebContents* web_contents)
    : content::WebContentsObserver(web_contents),
      is_pinned_(false) {}

MetroPinTabHelper::~MetroPinTabHelper() {}

void MetroPinTabHelper::TogglePinnedToStartScreen() {
#if defined(OS_WIN)
  HMODULE metro_module = base::win::GetMetroModule();
  if (metro_module) {
    typedef void (*MetroTogglePinnedToStartScreen)(const string16&,
        const string16&);
    MetroTogglePinnedToStartScreen metro_toggle_pinned_to_start_screen =
        reinterpret_cast<MetroTogglePinnedToStartScreen>(
            ::GetProcAddress(metro_module, "MetroTogglePinnedToStartScreen"));
    if (!metro_toggle_pinned_to_start_screen) {
      NOTREACHED();
      return;
    }

    GURL url = web_contents()->GetURL();
    string16 title = web_contents()->GetTitle();
    VLOG(1) << __FUNCTION__ << " calling pin with title: " << title
            << " and url " << UTF8ToUTF16(url.spec());
    metro_toggle_pinned_to_start_screen(title, UTF8ToUTF16(url.spec()));
    // TODO(benwells): This will update the state incorrectly if the user
    // cancels. To fix this some sort of callback needs to be introduced as
    // the pinning happens on another thread.
    is_pinned_ = !is_pinned_;
    return;
  }
#endif
}

void MetroPinTabHelper::DidNavigateMainFrame(
    const content::LoadCommittedDetails& /*details*/,
    const content::FrameNavigateParams& /*params*/) {
  UpdatePinnedStateForCurrentURL();
}

void MetroPinTabHelper::UpdatePinnedStateForCurrentURL() {
#if defined(OS_WIN)
  HMODULE metro_module = base::win::GetMetroModule();
  if (metro_module) {
    typedef BOOL (*MetroIsPinnedToStartScreen)(const string16&);
    MetroIsPinnedToStartScreen metro_is_pinned_to_start_screen =
        reinterpret_cast<MetroIsPinnedToStartScreen>(
            ::GetProcAddress(metro_module, "MetroIsPinnedToStartScreen"));
    if (!metro_is_pinned_to_start_screen) {
      NOTREACHED();
      return;
    }

    GURL url = web_contents()->GetURL();
    is_pinned_ = metro_is_pinned_to_start_screen(UTF8ToUTF16(url.spec())) != 0;
    VLOG(1) << __FUNCTION__ << " with url " << UTF8ToUTF16(url.spec())
            << " result: " << is_pinned_;
  }
#endif
}


text:
"""Tests for the Discord integration."""

from unittest.mock import AsyncMock, Mock, patch

import nextcord

from homeassistant.components.discord.const import DOMAIN
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_API_TOKEN, CONF_NAME
from homeassistant.core import HomeAssistant

from tests.common import MockConfigEntry

TOKEN = "abc123"
NAME = "Discord Bot"

CONF_INPUT = {CONF_API_TOKEN: TOKEN}

CONF_DATA = {
    CONF_API_TOKEN: TOKEN,
    CONF_NAME: NAME,
}

def create_entry(hass: HomeAssistant) -> ConfigEntry:
    """Add config entry in Home Assistant."""
    entry = MockConfigEntry(
        domain=DOMAIN,
        data=CONF_DATA,
        unique_id="1234567890",
    )
    entry.add_to_hass(hass)
    return entry

def mocked_discord_info():
    """Create mocked discord."""
    mocked_discord = AsyncMock()
    mocked_discord.id = "1234567890"
    mocked_discord.name = NAME
    return patch(
        "homeassistant.components.discord.config_flow.nextcord.Client.application_info",
        return_value=mocked_discord,
    )

def patch_discord_login():
    """Patch discord info."""
    return patch("homeassistant.components.discord.config_flow.nextcord.Client.login")

def mock_exception():
    """Mock response."""
    response = Mock()
    response.status = 404
    return nextcord.HTTPException(response, "")


text:
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

/*
Present displays slide presentations and articles. It runs a web server that
presents slide and article files from the current directory.

It may be run as a stand-alone command or an App Engine app.
The stand-alone version permits the execution of programs from within a
presentation. The App Engine version does not provide this functionality.

Usage of present:
  -base="": base path for slide template and static resources
  -http="127.0.0.1:3999": host:port to listen on

You may use the app.yaml file provided in the root of the go.talks repository
to deploy present to App Engine:
	appcfg.py update -A your-app-id -V your-app-version /path/to/go.talks

Input files are named foo.extension, where "extension" defines the format of
the generated output. The supported formats are:
	.slide        // HTML5 slide presentation
	.article      // article format, such as a blog post

The present file format is documented by the present package:
http://godoc.org/code.google.com/p/go.tools/godoc/present
*/
package main


text:
@interface PodsDummy_Pods_FirstTryUITests_Specta : NSObject
@end
@implementation PodsDummy_Pods_FirstTryUITests_Specta
@end


text: docker run --name magnolia-simple -d -p 8082:8080 -i -t martinschmid/magnolia-cms-simple-docker


text:
package com.example.work.spotifystreamerstage1;

import android.os.CountDownTimer;
import android.util.Log;
import android.widget.SeekBar;

/**
 * Created by work on 7/17/15.
 */
public class playerCountDownTimer extends CountDownTimer {
    private SeekBar sb;
    public long timeRemaining = 0;

    public playerCountDownTimer(long start, long interval, SeekBar sb)
    {
        super(start, interval);
        this.sb = sb;
        //Log.d("playerCountDownTimer", "start " + Long.toString(start) + " interval " + Long.toString(interval));
    }

    @Override
    public void onFinish()
    {
    }

    @Override
    public void onTick(long millisRemaining)
    {
        timeRemaining = millisRemaining;
        // using units of 10 ms to make the bar work better
        int secsRemaining = (int) (millisRemaining);  // make sure the bar completes
        int max = sb.getMax();
        int progress = max - secsRemaining;
        if ( progress > max) progress = max;
        sb.setProgress(progress);
        if (secsRemaining != millisRemaining)
          Log.d("playerCountDownTimer:onTick", "can't handle integer conversion s" + Long.toString(millisRemaining));
    }

}


text:
module DeepStore
  module Errors
    RecordNotFound = Class.new(StandardError)
  end
end


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.camunda.bpm.example</groupId>
  <artifactId>camunda-example-multi-tenancy-tenant-identifier-embedded</artifactId>
  <name>Camunda Platform - Example - Multi Tenancy - Tenant Identifier - Embedded</name>
  <version>0.0.1-SNAPSHOT</version>

  <properties>
    <version.camunda>7.16.0</version.camunda>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <repositories>
    <repository>
      <id>camunda-bpm-nexus</id>
      <name>camunda-bpm-nexus</name>
      <url>https://app.camunda.com/nexus/content/groups/public</url>
    </repository>
  </repositories>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.camunda.bpm</groupId>
        <artifactId>camunda-bom</artifactId>
        <version>${version.camunda}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.camunda.bpm</groupId>
      <artifactId>camunda-engine</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>1.4.190</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.10.19</version>
      <scope>test</scope>
    </dependency>

    <!-- redirect slf4j logging to jdk logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-jdk14</artifactId>
      <version>1.7.26</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

</project>


text:
<?php

namespace UniMapper\Dibi\Adapter;

use UniMapper\Dibi\Date;
use UniMapper\Entity\Reflection;

class Mapping extends \UniMapper\Adapter\Mapping
{

    public function mapValue(Reflection\Property $property, $value)
    {
        if ($value instanceof \DibiDateTime) {
            return new \DateTime($value);
        }
        return $value;
    }

    public function unmapValue(Reflection\Property $property, $value)
    {
        if ($property->getType() === Reflection\Property::TYPE_DATE) {
            return new Date($value);
        }
        return $value;
    }

}


text:
require 'spec_helper'

describe AASM::Core::Invoker do
  let(:target) { nil }
  let(:record) { double }
  let(:args) { [] }

  subject { described_class.new(target, record, args) }

  describe '#with_options' do
    context 'when passing array as a subject' do
      context 'and "guard" option is set to true' do
        let(:target) { [subject_1, subject_2] }

        before { subject.with_options(guard: true) }

        context 'and all the subjects are truthy' do
          let(:subject_1) { Proc.new { true } }
          let(:subject_2) { Proc.new { true } }

          it 'then returns "true" while invoking' do
            expect(subject.invoke).to eq(true)
          end
        end

        context 'and any subject is falsely' do
          let(:subject_1) { Proc.new { false } }
          let(:subject_2) { Proc.new { true } }

          it 'then returns "false" while invoking' do
            expect(subject.invoke).to eq(false)
          end
        end
      end

      context 'and "unless" option is set to true' do
        let(:target) { [subject_1, subject_2] }

        before { subject.with_options(unless: true) }

        context 'and all the subjects are falsely' do
          let(:subject_1) { Proc.new { false } }
          let(:subject_2) { Proc.new { false } }

          it 'then returns "true" while invoking' do
            expect(subject.invoke).to eq(true)
          end
        end

        context 'and any subject is truthy' do
          let(:subject_1) { Proc.new { false } }
          let(:subject_2) { Proc.new { true } }

          it 'then returns "false" while invoking' do
            expect(subject.invoke).to eq(false)
          end
        end
      end
    end
  end

  describe '#with_failures' do
    let(:concrete_invoker) { AASM::Core::Invokers::ProcInvoker }
    let(:target) { Proc.new {} }

    it 'then sets failures buffer for concrete invokers' do
      expect_any_instance_of(concrete_invoker)
        .to receive(:with_failures)
        .and_call_original

      subject.invoke
    end
  end

  describe '#with_default_return_value' do
    context 'when return value is "true"' do
      before { subject.with_default_return_value(true) }

      it 'then returns "true" when was not picked up by any invoker' do
        expect(subject.invoke).to eq(true)
      end
    end

    context 'when return value is "false"' do
      before { subject.with_default_return_value(false) }

      it 'then returns "false" when was not picked up by any invoker' do
        expect(subject.invoke).to eq(false)
      end
    end
  end

  describe '#invoke' do
    context 'when subject is a proc' do
      let(:concrete_invoker) { AASM::Core::Invokers::ProcInvoker }
      let(:target) { Proc.new {} }

      it 'then calls proc invoker' do
        expect_any_instance_of(concrete_invoker)
          .to receive(:invoke)
          .and_call_original

        expect(record).to receive(:instance_exec)

        subject.invoke
      end
    end

    context 'when subject is a class' do
      let(:concrete_invoker) { AASM::Core::Invokers::ClassInvoker }
      let(:target) { Class.new { def call; end } }

      it 'then calls proc invoker' do
        expect_any_instance_of(concrete_invoker)
          .to receive(:invoke)
          .and_call_original

        expect_any_instance_of(target).to receive(:call)

        subject.invoke
      end
    end

    context 'when subject is a literal' do
      let(:concrete_invoker) { AASM::Core::Invokers::LiteralInvoker }
      let(:record) { double(invoke_me: nil) }
      let(:target) { :invoke_me }

      it 'then calls literal invoker' do
        expect_any_instance_of(concrete_invoker)
          .to receive(:invoke)
          .and_call_original

        expect(record).to receive(:invoke_me)

        subject.invoke
      end
    end

    context 'when subject is an array of procs' do
      let(:subject_1) { Proc.new {} }
      let(:subject_2) { Proc.new {} }
      let(:target) { [subject_1, subject_2] }

      it 'then calls each proc' do
        expect(record).to receive(:instance_exec).twice

        subject.invoke
      end
    end

    context 'when subject is an array of classes' do
      let(:subject_1) { Class.new { def call; end } }
      let(:subject_2) { Class.new { def call; end } }
      let(:target) { [subject_1, subject_2] }

      it 'then calls each class' do
        expect_any_instance_of(subject_1).to receive(:call)

        expect_any_instance_of(subject_2).to receive(:call)

        subject.invoke
      end
    end

    context 'when subject is an array of literals' do
      let(:subject_1) { :method_one }
      let(:subject_2) { :method_two }
      let(:record) { double(method_one: nil, method_two: nil) }
      let(:target) { [subject_1, subject_2] }

      it 'then calls each class' do
        expect(record).to receive(:method_one)

        expect(record).to receive(:method_two)

        subject.invoke
      end
    end

    context 'when subject is not supported' do
      let(:target) { nil }

      it 'then just returns default value' do
        expect(subject.invoke).to eq(described_class::DEFAULT_RETURN_VALUE)
      end
    end
  end
end


text:
from .method import wrap_method
from .attribute import Attribute
from .device import Device
from .pausableDevice import PausableDevice
from .runnableDevice import DState, DEvent, RunnableDevice


text:
@interface FeHourGlass ()
{
    CGFloat width;
    CGFloat height;

    // Target, method, object and block
    id targetForExecuting;
    SEL methodForExecuting;
    id objectForExecuting;
    dispatch_block_t completionBlock;
}
// Top
@property (strong, nonatomic) CAShapeLayer *topLayer;

// Bottom
@property (strong, nonatomic) CAShapeLayer *bottomLayer;

// Dash line
@property (strong, nonatomic) CAShapeLayer *lineLayer;

// container Layer
@property (strong, nonatomic) CALayer *containerLayer;

// Container view
@property (weak, nonatomic) UIView *containerView;

// Animaiton
@property (strong, nonatomic) CAKeyframeAnimation *topAnimation;

@property (strong, nonatomic) CAKeyframeAnimation *bottomAnimation;

@property (strong, nonatomic) CAKeyframeAnimation *lineAnimation;

@property(strong, nonatomic) CAKeyframeAnimation *containerAnimation;

///////////
// Init
-(void) initCommon;
-(void) initContainer;
-(void) initTop;
-(void) initBottom;
-(void) initLine;
-(void) initAnimation;
@end

@implementation FeHourGlass

-(instancetype) initWithView:(UIView *)view
{
    self = [super init];
    if (self)
    {
        _containerView = view;

        [self initCommon];

        [self initContainer];

        [self initTop];

        [self initBottom];

        [self initLine];

        [self initAnimation];
    }
    return self;
}
-(void) initCommon
{
    _isShowing = NO;

    self.frame = CGRectMake(0, 0, _containerView.bounds.size.width, _containerView.bounds.size.height);
    self.backgroundColor = [UIColor colorWithHexCode:@"#DB7769"];

    width = sqrtf(kFe_HourGlass_Length * kFe_HourGlass_Length + kFe_HourGlass_Length * kFe_HourGlass_Length);
    height = sqrtf((kFe_HourGlass_Length * kFe_HourGlass_Length) - ((width / 2.0f) * (width / 2.0f)));
}
-(void) initContainer
{
    _containerLayer = [CALayer layer];
    _containerLayer.backgroundColor = [UIColor clearColor].CGColor;
    _containerLayer.frame = CGRectMake(0, 0, width, height * 2);
    _containerLayer.anchorPoint = CGPointMake(0.5f, 0.5f);
    _containerLayer.position = CGPointMake(self.bounds.size.width / 2, self.bounds.size.height / 2);

    [self.layer addSublayer:_containerLayer];
}
-(void) initTop
{
    // BezierPath
    UIBezierPath *path = [UIBezierPath bezierPath];
    [path moveToPoint:CGPointMake(0, 0)];
    [path addLineToPoint:CGPointMake(width, 0)];
    [path addLineToPoint:CGPointMake(width / 2.0f, height)];
    [path addLineToPoint:CGPointMake(0, 0)];

    [path closePath];

    // Top Layer
    _topLayer = [CAShapeLayer layer];
    _topLayer.frame = CGRectMake(0, 0, width, height);
    _topLayer.path = path.CGPath;
    _topLayer.fillColor = [UIColor whiteColor].CGColor;
    _topLayer.strokeColor = [UIColor whiteColor].CGColor;
    _topLayer.lineWidth = 0.0f;
    _topLayer.anchorPoint = CGPointMake(0.5f, 1);
    _topLayer.position = CGPointMake(width / 2.0f, height);

    [_containerLayer addSublayer:_topLayer];
}
-(void) initBottom
{
    // BezierPath
    UIBezierPath *path = [UIBezierPath bezierPath];
    [path moveToPoint:CGPointMake(width / 2, 0)];
    [path addLineToPoint:CGPointMake(width, height)];
    [path addLineToPoint:CGPointMake(0, height )];
    [path addLineToPoint:CGPointMake(width / 2, 0)];

    [path closePath];

    // Top Layer
    _bottomLayer = [CAShapeLayer layer];
    _bottomLayer.frame = CGRectMake(0, height, width, height);
    _bottomLayer.path = path.CGPath;
    _bottomLayer.fillColor = [UIColor whiteColor].CGColor;
    _bottomLayer.strokeColor = [UIColor whiteColor].CGColor;
    _bottomLayer.lineWidth = 0.0f;
    _bottomLayer.anchorPoint = CGPointMake(0.5f, 1.0f);
    _bottomLayer.position = CGPointMake(width / 2.0f, height * 2.0f);
    _bottomLayer.transform = CATransform3DMakeScale(0, 0, 0);

    [_containerLayer addSublayer:_bottomLayer];
}
-(void) initLine
{
    // BezierPath
    UIBezierPath *path = [UIBezierPath bezierPath];
    [path moveToPoint:CGPointMake(width / 2, 0)];
    [path addLineToPoint:CGPointMake(width / 2, height)];

    // Line Layer
    _lineLayer = [CAShapeLayer layer];
    _lineLayer.frame = CGRectMake(0, height, width, height);
    _lineLayer.strokeColor = [UIColor whiteColor].CGColor;
    _lineLayer.lineWidth = 1.0;
    _lineLayer.lineJoin = kCALineJoinMiter;
    _lineLayer.lineDashPattern = [NSArray arrayWithObjects:[NSNumber numberWithInt:1],[NSNumber numberWithInt:1], nil];
    _lineLayer.lineDashPhase = 3.0f;
    _lineLayer.path = path.CGPath;
    _lineLayer.strokeEnd = 0.0f;

    [_containerLayer addSublayer:_lineLayer];
}
-(void) initAnimation
{
    if (YES) // Top Animation
    {
        _topAnimation = [CAKeyframeAnimation animationWithKeyPath:@"transform.scale"];
        _topAnimation.duration = kFe_HourGlass_Duration;
        _topAnimation.repeatCount = HUGE_VAL;
        _topAnimation.keyTimes = @[@0.0f, @0.9f, @1.0f];
        _topAnimation.values = @[@1.0f, @0.0f, @0.0f];
    }
    if (YES) // Bottom Animation
    {
        _bottomAnimation = [CAKeyframeAnimation animationWithKeyPath:@"transform.scale"];
        _bottomAnimation.duration = kFe_HourGlass_Duration;
        _bottomAnimation.repeatCount = HUGE_VAL;
        _bottomAnimation.keyTimes = @[@0.1f, @0.9f, @1.0f];
        _bottomAnimation.values = @[@0.0f, @1.0f, @1.0f];
    }
    if (YES) // Bottom Animation
    {
        _lineAnimation = [CAKeyframeAnimation animationWithKeyPath:@"strokeEnd"];
        _lineAnimation.duration = kFe_HourGlass_Duration;
        _lineAnimation.repeatCount = HUGE_VAL;
        _lineAnimation.keyTimes = @[@0.0f, @0.1f, @0.9f, @1.0f];
        _lineAnimation.values = @[@0.0f, @1.0f, @1.0f, @1.0f];
    }
    if (YES) // Container Animation
    {
        _containerAnimation = [CAKeyframeAnimation animationWithKeyPath:@"transform.rotation.z"];
        _containerAnimation.timingFunction = [CAMediaTimingFunction functionWithControlPoints:0.2f :1 :0.8f :0.0f];
        _containerAnimation.duration = kFe_HourGlass_Duration;
        _containerAnimation.repeatCount = HUGE_VAL;
        _containerAnimation.keyTimes = @[@0.8f, @1.0f];
        _containerAnimation.values = @[[NSNumber numberWithFloat:0.0f], [NSNumber numberWithFloat:M_PI]];
        //_containerAnimation.calculationMode = kCAAnimationCubic;
    }
}
#pragma mark - Action
-(void) show
{
    if (_isShowing)
        return;

    _isShowing =  YES;

    [_topLayer addAnimation:_topAnimation forKey:@"TopAnimatin"];
    [_bottomLayer addAnimation:_bottomAnimation forKey:@"BottomAnimation"];
    [_lineLayer addAnimation:_lineAnimation forKey:@"LineAnimation"];
    [_containerLayer addAnimation:_containerAnimation forKey:@"ContainerAnimation"];
}
-(void) dismiss
{
    if (!_isShowing)
        return;

    _isShowing = NO;

}
-(void) showWhileExecutingBlock:(dispatch_block_t)block
{
    [self showWhileExecutingBlock:block completion:nil];
}
-(void) showWhileExecutingSelector:(SEL)selector onTarget:(id)target withObject:(id)object
{
    [self showWhileExecutingSelector:selector onTarget:target withObject:object completion:nil];

}
-(void) showWhileExecutingBlock:(dispatch_block_t)block completion:(dispatch_block_t)completion
{
    // Check block != nil
    if (block != nil)
    {
        [self show];
        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^
                       {
                           block();

                           // Update UI
                           dispatch_async(dispatch_get_main_queue(), ^{
                               completion();
                               [self dismiss];
                           });
                       });
    }
}
-(void) showWhileExecutingSelector:(SEL)selector onTarget:(id)target withObject:(id)object completion:(dispatch_block_t)completion
{
    // Check Selector is responded
    if ([target respondsToSelector:selector])
    {
        methodForExecuting = selector;
        targetForExecuting = target;
        objectForExecuting = object;
        completionBlock = completion;

        [self show];
        [NSThread detachNewThreadSelector:@selector(executingMethod) toTarget:self withObject:nil];
    }
}
#pragma mark Helper method
-(void) executingMethod
{
    @autoreleasepool {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
		// Start executing the requested task
		[targetForExecuting performSelector:methodForExecuting withObject:objectForExecuting];
#pragma clang diagnostic pop
		// Task completed, update view in main thread (note: view operations should
		// be done only in the main thread)
        dispatch_async(dispatch_get_main_queue(), ^{
            completionBlock();
            [self performSelectorOnMainThread:@selector(cleanUp) withObject:nil waitUntilDone:NO];
        });

	}
}
-(void) cleanUp
{
    NSLog(@"Clean up");
    if (objectForExecuting)
        objectForExecuting = nil;
    if (methodForExecuting)
        methodForExecuting = nil;
    if (targetForExecuting)
        targetForExecuting = nil;
    if (completionBlock)
        completionBlock = nil;
    [self dismiss];
}

@end


text:
package net.sourceforge.marathon.javadriver.scrollpane;

import java.awt.BorderLayout;
import java.util.List;

import javax.swing.JFrame;
import javax.swing.SwingUtilities;

import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import org.testng.AssertJUnit;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import components.ScrollDemo;
import net.sourceforge.marathon.javadriver.JavaDriver;

@Test
public class JScrollBarTest {

    private WebDriver driver;
    protected JFrame frame;

    @BeforeMethod
    public void showDialog() throws Throwable {
        SwingUtilities.invokeAndWait(new Runnable() {
            @Override
            public void run() {
                frame = new JFrame(JScrollBarTest.class.getSimpleName());
                frame.setSize(320, 350);
                frame.setName("frame-" + JScrollBarTest.class.getSimpleName());
                frame.getContentPane().add(new ScrollDemo(), BorderLayout.CENTER);
                // frame.pack();
                frame.setAlwaysOnTop(true);
                frame.setVisible(true);
            }
        });
    }

    @AfterMethod
    public void disposeDriver() throws Throwable {
        SwingUtilities.invokeAndWait(new Runnable() {
            @Override
            public void run() {
                frame.setVisible(false);
                frame.dispose();
            }
        });
        if (driver != null) {
            driver.quit();
        }
    }

    public void getText() throws Throwable {
        driver = new JavaDriver();
        List<WebElement> scrollBars = driver.findElements(By.cssSelector("scroll-bar"));
        WebElement scrollbar = scrollBars.get(0);
        AssertJUnit.assertEquals(null, scrollbar.getText());
    }

    public void getAttributes() throws Throwable {
        driver = new JavaDriver();
        List<WebElement> scrollBars = driver.findElements(By.cssSelector("scroll-bar"));
        WebElement scrollbar = scrollBars.get(0);
        AssertJUnit.assertEquals("0", scrollbar.getAttribute("value"));
        new Actions(driver).moveToElement(scrollbar).moveByOffset(0, 40).click().perform();
        int scrollBarValue = Integer.parseInt(scrollbar.getAttribute("value"));
        AssertJUnit.assertTrue(scrollBarValue > 100);

        scrollbar = scrollBars.get(1);
        AssertJUnit.assertEquals("0", scrollbar.getAttribute("value"));
        new Actions(driver).moveToElement(scrollbar).moveByOffset(80, 0).click().perform();
        scrollBarValue = Integer.parseInt(scrollbar.getAttribute("value"));
        AssertJUnit.assertTrue(scrollBarValue > 10);
    }

    @Test(enabled = false)
    public void sendKeys() throws Throwable {
        driver = new JavaDriver();
        List<WebElement> scrollBars = driver.findElements(By.cssSelector("scroll-bar"));
        WebElement scrollbar = scrollBars.get(0);
        AssertJUnit.assertEquals("0", scrollbar.getAttribute("value"));
        scrollbar.sendKeys(Keys.ARROW_DOWN);
        AssertJUnit.assertEquals("28", scrollbar.getAttribute("value"));
        scrollbar.sendKeys(Keys.ARROW_UP);
        AssertJUnit.assertEquals("0", scrollbar.getAttribute("value"));

        scrollbar = scrollBars.get(1);
        AssertJUnit.assertEquals("0", scrollbar.getAttribute("value"));
        scrollbar.sendKeys(Keys.ARROW_RIGHT);
        AssertJUnit.assertEquals("28", scrollbar.getAttribute("value"));
        scrollbar.sendKeys(Keys.ARROW_LEFT);
        AssertJUnit.assertEquals("0", scrollbar.getAttribute("value"));
    }
}


text:
BEGIN_INANITY_NP

#ifdef _MSC_VER
__declspec(thread) State* currentState = nullptr;
__declspec(thread) int currentStateCounter = 0;
#else
thread_local State* currentState = nullptr;
thread_local int currentStateCounter = 0;
#endif

State::Scope::Scope(State* state)
{
	if(currentStateCounter)
	{
		if(currentState != state)
			THROW("Current NPAPI script state already set");
	}
	else
		currentState = state;
	++currentStateCounter;
}

State::Scope::~Scope()
{
	if(!--currentStateCounter)
		currentState = nullptr;
}

State::State(ptr<Platform::NpapiPluginInstance> pluginInstance)
: pluginInstance(pluginInstance)
{
	// create pools
	npObjectWrapperPool = NEW(TypedPool<NPObjectWrapper>());
	npObjectNamespacePool = NEW(TypedPool<NPObjectNamespace>());
	anyPool = NEW(ObjectPool<Any>());

	Scope scope(this);
	rootNamespace = NEW(Namespace(""));
}

State* State::GetCurrent()
{
#ifdef _DEBUG
	if(!currentState)
		THROW("No current NPAPI script state");
#endif
	return currentState;
}

Platform::NpapiPluginInstance* State::GetPluginInstance() const
{
	return pluginInstance;
}

ptr<Function> State::LoadScript(ptr<File> file)
{
	THROW("Not implemented");
}

void State::ReclaimInstance(RefCounted* object)
{
	std::pair<Instances::iterator, Instances::iterator> range = instances.equal_range(object);
	for(Instances::iterator i = range.first; i != range.second; ++i)
		i->second->object = nullptr;
	instances.erase(range.first, range.second);
}

ptr<Script::Any> State::NewBoolean(bool boolean)
{
	return CreateAny(Value<bool>::To(boolean));
}

ptr<Script::Any> State::NewNumber(int number)
{
	return CreateAny(Value<int>::To(number));
}

ptr<Script::Any> State::NewNumber(float number)
{
	return CreateAny(Value<float>::To(number));
}

ptr<Script::Any> State::NewNumber(double number)
{
	return CreateAny(Value<double>::To(number));
}

ptr<Script::Any> State::NewString(const String& string)
{
	return CreateAny(Value<String>::To(string));
}

ptr<Script::Any> State::NewArray(int length)
{
	THROW("Not implemented");
}

ptr<Script::Any> State::NewDict()
{
	THROW("Not implemented");
}

void State::Register(MetaProvider::ClassBase* classMeta)
{
	Scope scope(this);

	const char* name = classMeta->GetFullName();
	// loop for namespaces
	ptr<Namespace> nm = rootNamespace;
	for(;;)
	{
		// get next word
		int i;
		for(i = 0; name[i] && name[i] != '.'; ++i);
		String word(name, i);

		// open namespace
		nm = nm->OpenNamespace(word);

		// if it's the end
		if(!name[i])
		{
			// set class there
			nm->SetClassMeta(classMeta);
			break;
		}

		// else it's not the end
		name += i + 1;
	}
}

bool State::CheckClass(NPClass* npClass) const
{
	return classes.find(npClass) != classes.end();
}

NPObjectWrapper* State::CreateNPObjectWrapper()
{
	return npObjectWrapperPool->New(this);
}

void State::InvalidateNPObjectWrapper(NPObjectWrapper* wrapper)
{
	if(!wrapper->object)
		return;

	std::pair<Instances::iterator, Instances::iterator> range = instances.equal_range(wrapper->object);
	for(Instances::iterator i = range.first; i != range.second; ++i)
		if(i->second == wrapper)
		{
			instances.erase(i);
			wrapper->object = nullptr;
			return;
		}

	THROW("No NPObject to invalidate");
}

void State::DeleteNPObjectWrapper(NPObjectWrapper* wrapper)
{
	npObjectWrapperPool->Delete(wrapper);
}

NPObjectNamespace* State::CreateNPObjectNamespace()
{
	return npObjectNamespacePool->New(this);
}

void State::DeleteNPObjectNamespace(NPObjectNamespace* wrapper)
{
	npObjectNamespacePool->Delete(wrapper);
}

ptr<Any> State::GetRootNamespace()
{
	NPObjectNamespace* wrapper = rootNamespace->GetWrapper();
	NPVariant variant;
	OBJECT_TO_NPVARIANT(wrapper, variant);
	return CreateAnyViaCopy(variant);
}

void State::DuplicateVariant(NPVariant& variant)
{
	if(NPVARIANT_IS_OBJECT(variant))
		Platform::NpapiPlugin::browserFuncs.retainobject(NPVARIANT_TO_OBJECT(variant));
	else if(NPVARIANT_IS_STRING(variant))
	{
		// copy string
		NPString string = NPVARIANT_TO_STRING(variant);
		NPUTF8* stringCopy = (NPUTF8*)Platform::NpapiPlugin::browserFuncs.memalloc(string.UTF8Length);
		memcpy(stringCopy, string.UTF8Characters, string.UTF8Length);
		STRINGN_TO_NPVARIANT(stringCopy, string.UTF8Length, variant);
	}
}

ptr<Any> State::CreateAny(NPVariant variant)
{
	return anyPool->New(this, variant);
}

ptr<Any> State::CreateAnyViaCopy(NPVariant variant)
{
	DuplicateVariant(variant);
	return CreateAny(variant);
}

NPVariant State::ConvertObject(MetaProvider::ClassBase* classMeta, RefCounted* object)
{
	// if object is null
	if(!object)
	{
		// return null
		NPVariant variant;
		NULL_TO_NPVARIANT(variant);
		return variant;
	}

	// check if the object is already in cache
	std::pair<Instances::const_iterator, Instances::const_iterator> range = instances.equal_range(object);
	// find an object with right meta
	for(Instances::const_iterator i = range.first; i != range.second; ++i)
		if(i->second->GetClassWrapper()->classMeta == classMeta)
		{
			// found an object
			NPVariant variant;
			OBJECT_TO_NPVARIANT(i->second, variant);
			DuplicateVariant(variant);
			return variant;
		}

	// create new object
	NPObject* npObject = Platform::NpapiPlugin::browserFuncs.createobject(
		pluginInstance->GetNpp(),
		classMeta->GetClassWrapper());
	NPObjectWrapper* wrapper = static_cast<NPObjectWrapper*>(npObject);
	wrapper->object = object;

	// ensure that class in classes
	classes.insert(classMeta->GetClassWrapper());

	// save it to cache
	instances.insert(std::make_pair(object, wrapper));

	// return
	NPVariant variant;
	OBJECT_TO_NPVARIANT(wrapper, variant);
	return variant;
}

END_INANITY_NP


text:
using UnityEngine;
using System.Collections;

public class PlayerDied : MonoBehaviour {

	public GUIStyle playerDiedStyle;
	private LTRect playerRect;
	private bool doAnim = false;
	private bool styleInitialized = true;
	private int playerNum = 0;

	// Use this for initialization
	void Start () {

	}

	void OnEnable() {
		Messenger<int>.AddListener(Events.PLAYER_HIT, startPlayerHitAnim);
	}

	void OnDisable() {
		Messenger<int>.RemoveListener(Events.PLAYER_HIT, startPlayerHitAnim);
	}

	void OnGUI() {
		if (!styleInitialized) {
			styleInitialized = true;
			playerRect.setStyle(new GUIStyle(playerDiedStyle));
		}

		if (doAnim) {
			int height = (int)(Screen.height * .25f);
			GUI.Box(new Rect(0, Screen.height / 2 - height / 2, Screen.width, height),"");
			Rect rect = new Rect(Screen.width / 2 - playerRect.width / 2, Screen.height / 2 - playerRect.height / 2, playerRect.width, playerRect.height);
			GUI.Label(rect, new GUIContent("PLAYER " + playerNum + " DIED"), playerRect.style);
		}
	}

	// Update is called once per frame
	void Update () {

	}

	public void startPlayerHitAnim(int playerNum) {
		this.playerNum = playerNum;
		Time.timeScale = 0;
		if (GameData.Instance.PlayerLives <= 0) {
			return;
		}

		doAnim = true;
		playerRect = new LTRect( 0f, 0f, 0f, 0f );
		playerRect.setStyle(new GUIStyle(playerDiedStyle));
		playerRect.setFontScaleToFit(true);
		LeanTween.scale( playerRect, new Vector2(150f,100f), .75f ).setUseEstimatedTime(true).setEase(LeanTweenType.easeOutBack).setOnComplete(delegate() {
			StartCoroutine(resetGameBoard());
		});
	}

	public IEnumerator resetGameBoard() {
		float time = 0;
		float lastTime = Time.realtimeSinceStartup;
		while (time < 2.0f) {
			time += Time.realtimeSinceStartup - lastTime;
			lastTime = Time.realtimeSinceStartup;
			yield return null;
		}

		doAnim = false;
		styleInitialized = false;
		GameObject.FindObjectOfType<BoardAccessor>().resetBoard();
		GameObject.FindObjectOfType<GameStart>().showStartingMessage();
	}
}


text:
import React, { PropTypes } from 'react';
import '~/assets/stylesheets/OutputRow.scss';
import '~/assets/stylesheets/Utility.scss';

const FinderOutputRow = (props) => {
  const s = (props.stamina < 10 ? ' ' : '') + props.stamina;
  const a = (props.attack < 10 ? ' ' : '') + props.attack;
  const d = (props.defense < 10 ? ' ' : '') + props.defense;
  const ap = parseFloat(props.atkPercent).toFixed(0);
  const dp = parseFloat(props.defPercent).toFixed(0);
  const p = parseFloat(props.perfection).toFixed(0);
  const atkFirst = props.options.atkFirst || false;

  let ivDisplay = (

       {s}

         {a}

       {d}

  );

  if (atkFirst) {
    ivDisplay = (

           {a}

         {d}
         {s}

    );
  }

  return (

      {props.displayLevel}
      {ivDisplay}

        {p}%

         {ap}%

         {dp}%

  );
};

FinderOutputRow.propTypes = {
  displayLevel: PropTypes.number.isRequired,
  stamina: PropTypes.number.isRequired,
  attack: PropTypes.number.isRequired,
  defense: PropTypes.number.isRequired,
  atkPercent: PropTypes.number.isRequired,
  defPercent: PropTypes.number.isRequired,
  perfection: PropTypes.number.isRequired,
  options: PropTypes.object.isRequired,
};

export default FinderOutputRow;


text:
using System.Collections.Generic;
using System.Web.Mvc;
using System.Linq;
using Mediachase.Search;
using Mediachase.Commerce.Website.Search;

namespace EPiServer.Reference.Commerce.Site.Features.Search.Models
{
    [ModelBinder(typeof(FilterOptionFormModelBinder))]
    public class FilterOptionFormModel
    {
        public List<FacetGroupOption> FacetGroups { get; set; }
        public IEnumerable<SelectListItem> Sorting { get; set; }
        public string Sort { get; set; }
        public int Page { get; set; }
        public string Q { get; set; }
        public int TotalCount { get; set; }
        public int PageSize { get; set; }
    }
}