text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="47628c70-b5ed-4cf7-b040-78b3de6f1cbc" name="Default" comment="" />
    <ignored path="golang-challenge-1-drum_machine.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="golang-challenge-1-drum_machine" />
  </component>
  <component name="FileEditorManager">
    <leaf>
      <file leaf-file-name="decoder_test.go" pinned="false" current="true" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/decoder_test.go">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.6486486" vertical-offset="486" max-vertical-offset="1458">
              <caret line="55" column="10" selection-start-line="55" selection-start-column="10" selection-end-line="55" selection-end-column="10" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="drum.go" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/drum.go">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0" vertical-offset="33" max-vertical-offset="810">
              <caret line="3" column="12" selection-start-line="3" selection-start-column="12" selection-end-line="3" selection-end-column="12" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="decoder.go" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/decoder.go">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1764">
              <caret line="75" column="29" selection-start-line="75" selection-start-column="29" selection-end-line="75" selection-end-column="29" />
              <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$/drum.go" />
        <option value="$PROJECT_DIR$/decoder.go" />
      </list>
    </option>
  </component>
  <component name="ProjectFrameBounds">
    <option name="y" value="22" />
    <option name="width" value="1440" />
    <option name="height" value="874" />
  </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" />
    <OptionsSetting value="true" id="Undo Check Out" />
    <OptionsSetting value="true" id="Get Latest Version" />
    <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="PackagesPane" />
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="golang-challenge-1-drum_machine" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="golang-challenge-1-drum_machine" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="golang-challenge-1-drum_machine" />
              <option name="myItemType" value="com.android.tools.idea.gradle.projectView.AndroidPsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="golang-challenge-1-drum_machine" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="golang-challenge-1-drum_machine" />
              <option name="myItemType" value="com.android.tools.idea.gradle.projectView.AndroidPsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="fixtures" />
              <option name="myItemType" value="com.android.tools.idea.gradle.projectView.AndroidPsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="Scope" />
    </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="options.lastSelected" value="preferences.applicationServers" />
    <property name="options.splitter.main.proportions" value="0.3" />
    <property name="options.splitter.details.proportions" value="0.2" />
    <property name="options.searchVisible" value="true" />
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="project.structure.last.edited" value="Project" />
    <property name="project.structure.proportion" value="0.0" />
    <property name="project.structure.side.proportion" value="0.0" />
  </component>
  <component name="RunManager">
    <configuration default="true" type="GoApplicationRunConfiguration" factoryName="Go Application">
      <option name="name" value="Go application" />
      <option name="saveOutputToFile" value="false" />
      <option name="showConsoleOnStdErr" value="false" />
      <option name="showConsoleOnStdOut" value="false" />
      <option name="scriptName" value="" />
      <option name="scriptArguments" value="" />
      <option name="builderArguments" value="" />
      <option name="goBuildBeforeRun" value="false" />
      <option name="goOutputDir" value="" />
      <option name="workingDir" value="" />
      <option name="envVars" value="" />
      <option name="goVetEnabled" value="false" />
      <module name="" />
      <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="GrailsRunConfigurationType" factoryName="Grails">
      <module name="" />
      <setting name="vmparams" value="" />
      <setting name="cmdLine" value="run-app" />
      <setting name="depsClasspath" value="false" />
      <setting name="passParentEnv" value="true" />
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <setting name="launchBrowser" value="false" />
      <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="JavascriptDebugType" factoryName="JavaScript Debug">
      <method />
    </configuration>
    <configuration default="true" type="TestNG" factoryName="TestNG">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <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="JUnit" factoryName="JUnit">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <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="FlashRunConfigurationType" factoryName="Flash App">
      <option name="BCName" value="" />
      <option name="IOSSimulatorSdkPath" value="" />
      <option name="adlOptions" value="" />
      <option name="airProgramParameters" value="" />
      <option name="appDescriptorForEmulator" value="Android" />
      <option name="debugTransport" value="USB" />
      <option name="debuggerSdkRaw" value="BC SDK" />
      <option name="emulator" value="NexusOne" />
      <option name="emulatorAdlOptions" value="" />
      <option name="fastPackaging" value="true" />
      <option name="fullScreenHeight" value="0" />
      <option name="fullScreenWidth" value="0" />
      <option name="launchUrl" value="false" />
      <option name="launcherParameters">
        <LauncherParameters>
          <option name="browser" value="a7bb68e0-33c0-4d6f-a81a-aac1fdb870c8" />
          <option name="launcherType" value="OSDefault" />
          <option name="newPlayerInstance" value="false" />
          <option name="playerPath" value="/Applications/Flash Player Debugger.app" />
        </LauncherParameters>
      </option>
      <option name="mobileRunTarget" value="Emulator" />
      <option name="moduleName" value="" />
      <option name="overriddenMainClass" value="" />
      <option name="overriddenOutputFileName" value="" />
      <option name="overrideMainClass" value="false" />
      <option name="runTrusted" value="true" />
      <option name="screenDpi" value="0" />
      <option name="screenHeight" value="0" />
      <option name="screenWidth" value="0" />
      <option name="url" value="http://" />
      <option name="usbDebugPort" value="7936" />
      <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="FlexUnitRunConfigurationType" factoryName="FlexUnit" appDescriptorForEmulator="Android" class_name="" emulatorAdlOptions="" method_name="" package_name="" scope="Class">
      <option name="BCName" value="" />
      <option name="launcherParameters">
        <LauncherParameters>
          <option name="browser" value="a7bb68e0-33c0-4d6f-a81a-aac1fdb870c8" />
          <option name="launcherType" value="OSDefault" />
          <option name="newPlayerInstance" value="false" />
          <option name="playerPath" value="/Applications/Flash Player Debugger.app" />
        </LauncherParameters>
      </option>
      <option name="moduleName" value="" />
      <option name="trusted" value="true" />
      <method />
    </configuration>
    <configuration default="true" type="GoTestConfiguration" factoryName="Go Test">
      <option name="name" value="Go Test" />
      <option name="saveOutputToFile" value="false" />
      <option name="showConsoleOnStdErr" value="false" />
      <option name="showConsoleOnStdOut" value="false" />
      <option name="envVars" value="" />
      <option name="testRunnerArgs" value="" />
      <option name="testTargetType" value="Package" />
      <option name="packageName" value="" />
      <option name="packageDir" value="" />
      <option name="testFile" value="" />
      <option name="testArgs" value="" />
      <option name="workingDir" value="" />
      <option name="executeWhat" value="Test" />
      <option name="filter" value="" />
      <option name="useShortRun" value="false" />
      <option name="testBeforeBenchmark" value="false" />
      <option name="goVetEnabled" value="false" />
      <module name="" />
      <method />
    </configuration>
    <configuration default="true" type="CucumberJavaRunConfigurationType" factoryName="Cucumber java">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <option name="myFilePath" />
      <option name="GLUE" />
      <option name="myNameFilter" />
      <option name="myGeneratedName" />
      <option name="MAIN_CLASS_NAME" />
      <option name="VM_PARAMETERS" />
      <option name="PROGRAM_PARAMETERS" />
      <option name="WORKING_DIRECTORY" />
      <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="Application" factoryName="Application">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <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="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="0" />
    <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="47628c70-b5ed-4cf7-b040-78b3de6f1cbc" name="Default" comment="" />
      <created>1425781339606</created>
      <updated>1425781339606</updated>
      <workItem from="1425781340356" duration="95000" />
      <workItem from="1425781438147" duration="9440000" />
    </task>
    <servers />
  </component>
  <component name="TimeTrackingManager">
    <option name="totallyTimeSpent" value="9535000" />
  </component>
  <component name="ToolWindowManager">
    <frame x="0" y="22" width="1440" height="874" 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="Database" 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="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="IDEtalk Messages" 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="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="IDEtalk" 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="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="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.12083333" 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.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <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="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" />
    </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 />
  </component>
  <component name="XSLT-Support.FileAssociations.UIState">
    <PATH>
      <PATH_ELEMENT>
        <option name="myItemId" value="golang-challenge-1-drum_machine" />
        <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
      </PATH_ELEMENT>
      <PATH_ELEMENT>
        <option name="myItemId" value="golang-challenge-1-drum_machine" />
        <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
      </PATH_ELEMENT>
    </PATH>
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/decoder_test.go">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1458">
          <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$/drum.go">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="54" max-vertical-offset="162">
          <caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/decoder.go">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="810">
          <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:///usr/local/Cellar/go/1.3.3/libexec/src/pkg/io/ioutil/ioutil.go">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="605" max-vertical-offset="3078">
          <caret line="47" column="18" selection-start-line="44" selection-start-column="29" selection-end-line="47" selection-end-column="18" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file:///usr/local/Cellar/go/1.3.3/libexec/src/pkg/os/file.go">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="1361" max-vertical-offset="4734">
          <caret line="89" column="58" selection-start-line="87" selection-start-column="23" selection-end-line="89" selection-end-column="58" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file:///usr/local/Cellar/go/1.3.3/libexec/src/pkg/builtin/builtin.go">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.33333334" vertical-offset="2135" max-vertical-offset="4716">
          <caret line="133" column="5" selection-start-line="133" selection-start-column="5" selection-end-line="133" selection-end-column="5" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/drum.go">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="810">
          <caret line="3" column="12" selection-start-line="3" selection-start-column="12" selection-end-line="3" selection-end-column="12" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file:///usr/local/Cellar/go/1.3.3/libexec/src/pkg/fmt/print.go">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.3101673" vertical-offset="3521" max-vertical-offset="21690">
          <caret line="209" column="35" selection-start-line="208" selection-start-column="43" selection-end-line="209" selection-end-column="35" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/decoder.go">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1764">
          <caret line="75" column="29" selection-start-line="75" selection-start-column="29" selection-end-line="75" selection-end-column="29" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/decoder_test.go">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.6486486" vertical-offset="486" max-vertical-offset="1458">
          <caret line="55" column="10" selection-start-line="55" selection-start-column="10" selection-end-line="55" selection-end-column="10" />
          <folding />
        </state>
      </provider>
    </entry>
  </component>
  <component name="masterDetails">
    <states>
      <state key="ArtifactsStructureConfigurable.UI">
        <settings>
          <artifact-editor />
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="FacetStructureConfigurable.UI">
        <settings>
          <last-edited>No facets are configured</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="GlobalLibrariesConfigurable.UI">
        <settings>
          <last-edited>actionmailer (v4.0.10, rbenv: 2.0.0-p451) [gem]</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="JdkListConfigurable.UI">
        <settings>
          <last-edited>Go SDK go1.3.3 darwin/amd64</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="ModuleStructureConfigurable.UI">
        <settings>
          <last-edited>drum</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
                <option value="0.6" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="ProjectLibrariesConfigurable.UI">
        <settings>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="ScopeChooserConfigurable.UI">
        <settings>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
    </states>
  </component>
</project>


text:
package org.pentaho.di.ui.trans.dialog;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * The class painted with this annotation is providing an additional user-interface in the transformation settings dialog
 * in the form of a new tab.
 *
 * @author matt
 *
 */
@Documented
@Retention( RetentionPolicy.RUNTIME )
@Target( ElementType.TYPE )
public @interface TransDialogPlugin {
  String id();

  String name() default "";

  String description() default "";

  String i18nPackageName() default "";

  String classLoaderGroup() default "";
}

redpajama_set_name: RedPajamaGithub


text:
import React from 'react';
import PropTypes from 'prop-types';
import { POSITION_RIGHT, POSITION_LEFT } from '../constants';

//credits https://materialdesignicons.com/icon/chevron-up

export default function IconArrow(_ref) {
  var open = _ref.open,
      position = _ref.position;

  var transform = 0;

  switch (position) {
    case POSITION_LEFT:
      transform = open ? "rotate(225, 12, 13)" : "rotate(45, 12, 13)";
      break;

    case POSITION_RIGHT:
      transform = transform = open ? "rotate(135, 12, 13)" : "rotate(-45, 12, 13)";
  }

  return React.createElement(
    'svg',
    { width: 24, height: 24, stroke: 'currentColor' },
    React.createElement(
      'g',
      { transform: transform },
      React.createElement('path', { fill: '#000000', d: 'M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z' })
    )
  );
}

IconArrow.propTypes = {
  open: PropTypes.bool.isRequired,
  position: PropTypes.oneOf([POSITION_RIGHT, POSITION_LEFT]).isRequired
};


text:
package com.ezz.bean;

import cn.bmob.v3.BmobObject;
import android.R.integer;

public class Scenic extends BmobObject{
	private int id;
	private String scenicname;
	private String describe;
	private int cityid;
	private float avggrade;
	private int gradenum;
	private String scenicview;
	private int scenicprice;
	private  String scenictype;

	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getScenicname() {
		return scenicname;
	}
	public void setScenicname(String scenicname) {
		this.scenicname = scenicname;
	}
	public String getDescribe() {
		return describe;
	}
	public void setDescribe(String describe) {
		this.describe = describe;
	}
	public int getCityid() {
		return cityid;
	}
	public void setCityid(int cityid) {
		this.cityid = cityid;
	}
	public float getAvggrade() {
		return avggrade;
	}
	public void setAvggrade(int avggrade) {
		this.avggrade = avggrade;
	}
	public int getGradenum() {
		return gradenum;
	}
	public void setGradenum(int gradenum) {
		this.gradenum = gradenum;
	}
	public String getScenicview() {
		return scenicview;
	}
	public void setScenicview(String scenicview) {
		this.scenicview = scenicview;
	}
	public int getScenicprice() {
		return scenicprice;
	}
	public void setScenicprice(int scenicprice) {
		this.scenicprice = scenicprice;
	}
	public String getScenictype() {
		return scenictype;
	}
	public void setScenictype(String scenictype) {
		this.scenictype = scenictype;
	}

}


text:
package org.jcodec.movtool.streaming.tracks;
import java.lang.IllegalStateException;
import java.lang.System;

import org.jcodec.common.AudioCodecMeta;
import org.jcodec.common.CodecMeta;
import org.jcodec.common.VideoCodecMeta;
import org.jcodec.common.io.SeekableByteChannel;
import org.jcodec.common.model.Size;
import org.jcodec.containers.mp4.MP4Packet;
import org.jcodec.containers.mp4.boxes.AudioSampleEntry;
import org.jcodec.containers.mp4.boxes.Box;
import org.jcodec.containers.mp4.boxes.Box.LeafBox;
import org.jcodec.containers.mp4.boxes.Edit;
import org.jcodec.containers.mp4.boxes.FielExtension;
import org.jcodec.containers.mp4.boxes.MovieBox;
import org.jcodec.containers.mp4.boxes.NodeBox;
import org.jcodec.containers.mp4.boxes.PixelAspectExt;
import org.jcodec.containers.mp4.boxes.SampleEntry;
import org.jcodec.containers.mp4.boxes.SampleSizesBox;
import org.jcodec.containers.mp4.boxes.TrakBox;
import org.jcodec.containers.mp4.boxes.VideoSampleEntry;
import org.jcodec.containers.mp4.demuxer.AbstractMP4DemuxerTrack;
import org.jcodec.containers.mp4.demuxer.CodecMP4DemuxerTrack;
import org.jcodec.containers.mp4.demuxer.MP4DemuxerTrack;
import org.jcodec.containers.mp4.demuxer.PCMMP4DemuxerTrack;
import org.jcodec.movtool.streaming.VirtualPacket;
import org.jcodec.movtool.streaming.VirtualTrack;

import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.List;

/**
 * This class is part of JCodec ( www.jcodec.org ) This software is distributed
 * under FreeBSD License
 *
 * Track taken from a real movie
 *
 * @author The JCodec project
 *
 */
public class RealTrack implements VirtualTrack {

    private TrakBox trak;
    private ByteChannelPool pool;
    private AbstractMP4DemuxerTrack demuxer;
    private MovieBox movie;
    private CodecMP4DemuxerTrack codedTrack;

    public RealTrack(MovieBox movie, TrakBox trak, ByteChannelPool pool) {
        this.movie = movie;
        SampleSizesBox stsz = NodeBox.findFirstPath(trak, SampleSizesBox.class, Box.path("mdia.minf.stbl.stsz"));
        if (stsz.getDefaultSize() == 0) {
            this.demuxer = new MP4DemuxerTrack(movie, trak, null) {
                @Override
                protected ByteBuffer readPacketData(SeekableByteChannel ch, ByteBuffer buffer, long position, int size)
                        throws IOException {
                    return buffer;
                }
            };
        } else {
            this.demuxer = new PCMMP4DemuxerTrack(movie, trak, null) {
                @Override
                protected ByteBuffer readPacketData(SeekableByteChannel ch, ByteBuffer buffer, long position, int size)
                        throws IOException {
                    return buffer;
                }
            };
        }
        this.codedTrack = new CodecMP4DemuxerTrack(this.demuxer);
        this.trak = trak;
        this.pool = pool;
    }

    @Override
    public VirtualPacket nextPacket() throws IOException {
        MP4Packet pkt = (MP4Packet)codedTrack.nextFrame();
        if (pkt == null)
            return null;
        return new RealPacket(this, pkt);
    }

    @Override
    public CodecMeta getCodecMeta() {
        SampleEntry se = trak.getSampleEntries()[0];
        if (se instanceof VideoSampleEntry) {
            VideoSampleEntry vse = (VideoSampleEntry) se;
            PixelAspectExt pasp = NodeBox.findFirst(se, PixelAspectExt.class, "pasp");

            FielExtension fiel = NodeBox.findFirst(se, FielExtension.class, "fiel");
            boolean interlace = false, topField = false;
            if(fiel != null) {
                interlace = fiel.isInterlaced();
                topField = fiel.topFieldFirst();
            }

            ByteBuffer codecPrivate = demuxer.getMeta().getCodecPrivate();
            codecPrivate.reset();
            return VideoCodecMeta.createVideoCodecMeta2(se.getFourcc(), codecPrivate, new Size(vse.getWidth(), vse.getHeight()), pasp != null ? pasp.getRational() : null, interlace, topField);
        } else if (se instanceof AudioSampleEntry) {
            AudioSampleEntry ase = (AudioSampleEntry) se;
            ByteBuffer codecPrivate = null;
            if ("mp4a".equals(ase.getFourcc())) {
                LeafBox lb = NodeBox.findFirst(se, LeafBox.class, "esds");
                if (lb == null) {
                    lb = NodeBox.findFirstPath(se, LeafBox.class, new String[] { null, "esds" });
                }
                codecPrivate = lb.getData();
            }

            return AudioCodecMeta
                    .createAudioCodecMeta(se.getFourcc(), ase.calcSampleSize(), ase.getChannelCount(), (int) ase.getSampleRate(), ase.getEndian(), ase.isPCM(), AudioSampleEntry.getLabelsFromSampleEntry(ase), codecPrivate);
        } else
            throw new RuntimeException("Sample entry '" + se.getFourcc() + "' is not supported.");
    }

    @Override
    public void close() {
//        System.out.println("CLOSING FILE");
        pool.close();
    }

    public static class RealPacket implements VirtualPacket {

        private MP4Packet packet;
		private RealTrack track;

        public RealPacket(RealTrack track, MP4Packet nextFrame) {
            this.track = track;
			this.packet = nextFrame;
        }

        @Override
        public ByteBuffer getData() throws IOException {
            ByteBuffer bb = ByteBuffer.allocate(packet.getSize());
            SeekableByteChannel ch = null;
            try {
                ch = track.pool.getChannel();
                if(packet.getFileOff() >= ch.size())
                    return null;
                ch.setPosition(packet.getFileOff());
                ch.read(bb);
                bb.flip();
                return track.codedTrack.convertPacket(bb);
            } finally {
                if (ch != null)
                    ch.close();
            }
        }

        @Override
        public int getDataLen() {
            return packet.getSize();
        }

        @Override
        public double getPts() {
            return (double) packet.getMediaPts() / packet.getTimescale();
        }

        @Override
        public double getDuration() {
            return (double) packet.getDuration() / packet.getTimescale();
        }

        @Override
        public boolean isKeyframe() {
            return packet.isKeyFrame() || packet.isPsync();
        }

        @Override
        public int getFrameNo() {
            return (int) packet.getFrameNo();
        }
    }

    @Override
    public VirtualEdit[] getEdits() {
        List<Edit> edits = demuxer.getEdits();
        if (edits == null)
            return null;
        VirtualEdit[] result = new VirtualEdit[edits.size()];
        for (int i = 0; i < edits.size(); i++) {
            Edit ee = edits.get(i);
            result[i] = new VirtualEdit((double) ee.getMediaTime() / trak.getTimescale(), (double) ee.getDuration()
                    / movie.getTimescale());
        }
        return result;
    }

    @Override
    public int getPreferredTimescale() {
        return (int) demuxer.getTimescale();
    }
}


text:
use super::arc_wake::ArcWake;
use super::waker::waker_vtable;
use alloc::sync::Arc;
use core::marker::PhantomData;
use core::mem::ManuallyDrop;
use core::ops::Deref;
use core::task::{RawWaker, Waker};

/// A [`Waker`] that is only valid for a given lifetime.
///
/// Note: this type implements [`Deref<Target = Waker>`](std::ops::Deref),
/// so it can be used to get a `&Waker`.
#[derive(Debug)]
pub struct WakerRef<'a> {
    waker: ManuallyDrop<Waker>,
    _marker: PhantomData<&'a ()>,
}

impl<'a> WakerRef<'a> {
    /// Create a new [`WakerRef`] from a [`Waker`] reference.
    pub fn new(waker: &'a Waker) -> Self {
        // copy the underlying (raw) waker without calling a clone,
        // as we won't call Waker::drop either.
        let waker = ManuallyDrop::new(unsafe { core::ptr::read(waker) });
        Self { waker, _marker: PhantomData }
    }

    /// Create a new [`WakerRef`] from a [`Waker`] that must not be dropped.
    ///
    /// Note: this if for rare cases where the caller created a [`Waker`] in
    /// an unsafe way (that will be valid only for a lifetime to be determined
    /// by the caller), and the [`Waker`] doesn't need to or must not be
    /// destroyed.
    pub fn new_unowned(waker: ManuallyDrop<Waker>) -> Self {
        Self { waker, _marker: PhantomData }
    }
}

impl Deref for WakerRef<'_> {
    type Target = Waker;

    fn deref(&self) -> &Waker {
        &self.waker
    }
}

/// Creates a reference to a [`Waker`] from a reference to `Arc<impl ArcWake>`.
///
/// The resulting [`Waker`] will call
/// [`ArcWake.wake()`](ArcWake::wake) if awoken.
#[inline]
pub fn waker_ref<W>(wake: &Arc<W>) -> WakerRef<'_>
where
    W: ArcWake,
{
    // simply copy the pointer instead of using Arc::into_raw,
    // as we don't actually keep a refcount by using ManuallyDrop.<
    let ptr = (&**wake as *const W) as *const ();

    let waker =
        ManuallyDrop::new(unsafe { Waker::from_raw(RawWaker::new(ptr, waker_vtable::<W>())) });
    WakerRef::new_unowned(waker)
}


text:
package swift.indigo.proto;

import java.util.Collection;
import java.util.Collections;

import swift.api.CRDTIdentifier;
import swift.clocks.CausalityClock;
import swift.clocks.Timestamp;
import swift.crdt.core.CRDTObjectUpdatesGroup;
import swift.indigo.ResourceRequest;

public class AcquireResourcesReply {

	public enum AcquireReply {
		IMPOSSIBLE, YES, NO, RELEASED, REPEATED, NO_RESOURCES
	}

	long serial;

	protected Timestamp timestamp;
	protected CausalityClock snapshot;
	protected Collection<CRDTObjectUpdatesGroup<?>> objectUpdateGroups;
	protected AcquireReply status;
	protected Collection<CRDTIdentifier> impossible;

	transient Collection<ResourceRequest<?>> requests;
	transient Timestamp cltTimestamp;

	private long time;

	/**
	 * Fake constructor for Kryo serialization. Do NOT use.
	 */
	public AcquireResourcesReply() {
	}

	public AcquireResourcesReply(boolean dummy) {
		this.time = System.currentTimeMillis();
		this.status = AcquireReply.NO;
		if (dummy != false)
			throw new RuntimeException("Expected false...");
	}

	public AcquireResourcesReply(AcquireReply status, CausalityClock snapshot) {
		this.time = System.currentTimeMillis();
		this.status = status;
		this.snapshot = snapshot;
		this.objectUpdateGroups = Collections.emptyList();
	}

	public AcquireResourcesReply(AcquireReply status, CausalityClock snapshot, Collection<CRDTIdentifier> impossible) {
		this(status, snapshot);
		this.impossible = impossible;
	}

	public AcquireResourcesReply(Timestamp cltTimestamp, Timestamp timestamp, CausalityClock snapshot, Collection<CRDTObjectUpdatesGroup<?>> objectUpdateGroups, Collection<ResourceRequest<?>> requests) {
		this.time = System.currentTimeMillis();
		this.status = AcquireReply.YES;
		this.snapshot = snapshot;
		this.timestamp = timestamp;
		this.cltTimestamp = cltTimestamp;
		this.objectUpdateGroups = objectUpdateGroups;
		this.requests = requests;
	}

	// Used for weak consistency emulation...
	public AcquireResourcesReply(long serial, CausalityClock currentClockEstimate) {
		this.time = System.currentTimeMillis();
		this.serial = serial;
		this.status = AcquireReply.YES;
		this.timestamp = null;
		this.snapshot = currentClockEstimate;
		this.objectUpdateGroups = Collections.emptyList();
	}

	public long serial() {
		return serial;
	}

	public AcquireResourcesReply setSerial(long serial) {
		this.serial = serial;
		return this;
	}

	public Timestamp timestamp() {
		return timestamp;
	}

	public boolean acquiredResources() {
		return status == AcquireReply.YES || status == AcquireReply.NO_RESOURCES || status == AcquireReply.RELEASED;
	}

	public AcquireReply acquiredStatus() {
		return status;
	}

	public Collection<CRDTObjectUpdatesGroup<?>> operations() {
		return objectUpdateGroups;
	}

	/**
	 * @return snapshot point when locks were acquired...
	 */
	public CausalityClock getSnapshot() {
		return snapshot;
	}

	public String toString() {
		return "STATUS " + status + " TS: " + timestamp;
	}
	public Collection<ResourceRequest<?>> getResourcesRequest() {
		return requests;
	}

	public boolean isReleased() {
		return status.equals(AcquireReply.RELEASED);
	}

	public void setReleased() {
		status = AcquireReply.RELEASED;
	}

	public boolean isImpossible() {
		return status.equals(AcquireReply.IMPOSSIBLE);
	}

	public long getPhysicalClock() {
		return time;
	}

	public Collection<CRDTIdentifier> getImpossibleIds() {
		return impossible;
	}

}


text:
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace Docker.DotNet.Models
{
    [DataContract]
    public class PluginConfigArgs // (types.PluginConfigArgs)
    {
        [DataMember(Name = "Description", EmitDefaultValue = false)]
        public string Description { get; set; }

        [DataMember(Name = "Name", EmitDefaultValue = false)]
        public string Name { get; set; }

        [DataMember(Name = "Settable", EmitDefaultValue = false)]
        public IList<string> Settable { get; set; }

        [DataMember(Name = "Value", EmitDefaultValue = false)]
        public IList<string> Value { get; set; }
    }
}


text:
Heroku buildpack: www-ruby-lang
=======================

This is a [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks) for https://www.ruby-lang.org/


text:
import Pyro4

#Weimar settings
WEIMAR_PORT_INSIDE = 2511
WEIMAR_ADDRESS_INSIDE = '192.168.100.26'

WEIMAR_PORT_OUTSIDE = 2511
WEIMAR_ADDRESS_OUTSIDE = '141.72.5.121'

Pyro4.config.SERVERTYPE="thread"
Pyro4.config.THREADING2=True
Pyro4.config.SERIALIZER = 'pickle'
Pyro4.config.HMAC_KEY='weimar-graphstore'
#Pyro4.config.COMMTIMEOUT=10.5
Pyro4.config.COMPRESSION = True


text:
[![exa logo](docs/source/static/logo.png)](https://exa-analytics.github.io)

*A framework for data engineering and science*

# Installation
[![conda Badge](https://anaconda.org/exaanalytics/exa/badges/installer/conda.svg)](https://conda.anaconda.org/exaanalytics)
[![pypi badge](https://badge.fury.io/py/exa.svg)](https://badge.fury.io/py/exa)
Exa is available through [anaconda](https://www.continuum.io/downloads)

    $ conda install -c exaanalytics exa

or [pypi](https://pypi.python.org/pypi).

    $ pip install exa

# Getting Started
See [docs](https://exa-analytics.github.io/exa/) for usage.

Building the docs requires [sphinx](http://www.sphinx-doc.org/en/stable). On Linux or Mac:

    $ ./make-docs.sh

On Windows:

    $ make-docs.bat

# Development
[![Travis-CI](https://travis-ci.org/exa-analytics/exa.svg?branch=master)](https://travis-ci.org/exa-analytics/exa)

[![AppVeyor](https://ci.appveyor.com/api/projects/status/9ufeeu5p623sifmr/branch/master?svg=true)](https://ci.appveyor.com/project/avmarchenko/exa/branch/master)

[![Coveralls](https://coveralls.io/repos/github/exa-analytics/exa/badge.svg)](https://coveralls.io/github/exa-analytics/exa)

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ed53a521ec4f46fbb62abee528b8b4bc)](https://www.codacy.com/gh/exa-analytics/exa?utm_source=github.com&utm_medium=referral&utm_content=exa-analytics/exa&utm_campaign=Badge_Grade)

For a development ready installation:

    $ git clone https://github.com/exa-analytics/exa.git
    $ cd exa
    $ python setup.py develop

# Reference
[![DOI](https://zenodo.org/badge/23807/exa-analytics/exa.svg)](https://zenodo.org/badge/latestdoi/23807/exa-analytics/exa)

# Legal
[![Apache License 2.0](http://img.shields.io/:license-apache-blue.svg?style=flat-square)](http://www.apache.org/licenses/LICENSE-2.0)
Copyright (c) 2015-2020, Exa Analytics Development Team
Distributed under the terms of the Apache License 2.0


text:
package org.mediameter.cliff.places;

public class UnknownGeoNameIdException extends Exception {

    private int geoNameId;

    public UnknownGeoNameIdException(int geoNameId){
        this.geoNameId = geoNameId;
    }

    public int getGeoNameId(){
        return geoNameId;
    }

}


text:
package com.eaglesakura.android.task;

import com.eaglesakura.android.framework.delegate.lifecycle.ServiceLifecycleDelegate;
import com.eaglesakura.android.rx.BackgroundTask;
import com.eaglesakura.android.rx.CallbackTime;
import com.eaglesakura.android.rx.ExecuteTarget;
import com.eaglesakura.android.rx.ParallelTaskGroup;
import com.eaglesakura.lambda.CallbackUtils;
import com.eaglesakura.lambda.CancelCallback;
import com.eaglesakura.lambda.ResultAction1;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * 順不同、かつ複数スレッドでタスクを処理する
 */
@Deprecated
class ParallelStream<Src> {
    final ServiceLifecycleDelegate mDelegate = new ServiceLifecycleDelegate();

    final List<Src> mSource;

    ResultAction1<Src, ?> mAction;

    CancelCallback mCancelCallback;

    ParallelStream(List<Src> source) {
        mDelegate.onCreate();
        mSource = source;
    }

    public ParallelStream<Src> each(ResultAction1<Src, ?> action) {
        mAction = action;
        return this;
    }

    public ParallelStream<Src> cancelSignal(CancelCallback cancelCallback) {
        mCancelCallback = cancelCallback;
        return this;
    }

    public <T> List<T> toList() throws Throwable {
        List<T> result = new ArrayList<>();

        ParallelTaskGroup<?> group = new ParallelTaskGroup<>(new ParallelTaskGroup.Callback<Object>() {
            @Nullable
            @Override
            public BackgroundTask onNextTask(@NonNull ParallelTaskGroup group) throws Throwable {
                Object obj;
                synchronized (mSource) {
                    if (mSource.isEmpty()) {
                        return null;
                    }
                    obj = mSource.remove(0);
                }
                return mDelegate.async(ExecuteTarget.LocalParallel, CallbackTime.Alive, task -> {
                    return mAction.action((Src) obj);
                }).cancelSignal(task -> {
                    return CallbackUtils.isCanceled(mCancelCallback);
                }).start();
            }

            @Override
            public void onTaskCompleted(@NonNull ParallelTaskGroup group, @NonNull BackgroundTask task) throws Throwable {
                result.add((T) task.getResult());
            }
        });

        group.setMaxParallelTasks(8);
        group.await();

        return result;
    }

    /**
     * 開放処理を行なう
     */
    public void dispose() {
        mDelegate.onDestroy();
    }

    public static <T> ParallelStream<T> of(@NonNull Collection<T> items) {
        return new ParallelStream<>(new ArrayList<>(items));
    }
}


text:
if (typeof define !== 'function') { var define = require('amdefine')(module); }
define([
    'knockout',
    'underscore',
], function(ko, _) {
    'use strict';

    var o = ko.observable,
        u = ko.utils.unwrapObservable,
        c = ko.computed,
        w = function(v) { return ko.isObservable(v) ? v : o(v); };

    // FilterReference
    //
    // A filter reference is a "virtual" reference, not actually present on the model, but implicit
    // by filtering the target collection according to some predicate of the model.
    //
    var FilterReference = function(filter) {
        return function(sourceModel, destCollection) {
            _(destCollection).has('models') || die('Collection passed to FilterReference missing `models`:' + destCollection);

            return c(function() {
                return _.chain(destCollection.models())
                    .values()
                    .filter(function(m) { return filter(sourceModel, m); })
                    .value();
            });
        };
    };

    return FilterReference;
});


text:
<!--

    Copyright 2004-2022 the original author or authors.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       https://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
  <id>bundle</id>
  <formats>
    <format>zip</format>
  </formats>
  <files>
    <file>
      <source>target/${project.artifactId}-${project.version}.${project.packaging}</source>
    </file>
    <file>
      <source>target/${project.artifactId}-${project.version}-sources.${project.packaging}</source>
    </file>
    <file>
      <source>LICENSE</source>
    </file>
    <file>
      <source>NOTICE</source>
    </file>
  </files>
  <dependencySets>
    <dependencySet>
      <outputDirectory>optional</outputDirectory>
    </dependencySet>
  </dependencySets>
</assembly>


text:
#import <Foundation/Foundation.h>

@interface TKTask : NSObject

@property (nonatomic, strong) TKTask* nextTask;
@property (nonatomic, copy) TKTask*(^blockToExecute)(id);
@property (nonatomic, strong) id param;
@property (nonatomic, assign) BOOL isMain;
@property (nonatomic, copy) void(^errorBlock)();

- (TKTask*(^)())run;
- (TKTask*(^)())dispatch;
- (void(^)(id))catch;
- (void)execute;
- (void)abortWithError:(NSError*)error;

@end


text:
<?php
/**
 * @author Sergii Bondarenko, <sb@firstvector.org>
 */
namespace Drupal\TqExtension\Utils\Database;

/**
 * Class Database.
 *
 * @package Drupal\TqExtension\Utils\Database
 */
class Database
{
    /**
     * @var Operator
     */
    private $db;
    /**
     * Name of original database.
     *
     * @var string
     */
    private $source = '';
    /**
     * Name of temporary database that will store data from original.
     *
     * @var string
     */
    private $temporary = '';
    /**
     * Indicates that DB was cloned.
     *
     * @var bool
     */
    private $cloned = false;

    /**
     * @param string $connection
     *   Database connection name (key in $databases array from settings.php).
     */
    public function __construct($connection)
    {
        if (!defined('DRUPAL_ROOT') || !function_exists('conf_path')) {
            throw new \RuntimeException('Drupal is not bootstrapped.');
        }

        $databases = [];

        require sprintf('%s/%s/settings.php', DRUPAL_ROOT, conf_path());

        if (empty($databases[$connection])) {
            throw new \InvalidArgumentException(sprintf('The "%s" database connection does not exist.', $connection));
        }

        $db = $databases[$connection]['default'];

        $this->db = new Operator($db['username'], $db['password'], $db['host'], $db['port']);
        $this->source = $db['database'];
        $this->temporary = "tqextension_$this->source";
    }

    /**
     * Clone a database.
     */
    public function __clone()
    {
        // Drop and create temporary DB and copy source into it.
        $this->db->copy($this->source, $this->temporary);
        $this->cloned = true;
    }

    /**
     * Restore original database.
     */
    public function __destruct()
    {
        if ($this->cloned) {
            // Drop and create source DB and copy temporary into it.
            $this->db->copy($this->temporary, $this->source);
            // Kill temporary DB.
            $this->db->drop($this->temporary);
        }
    }
}


text:
using System;

class Test{
public static int Main(){
  int mi_RetCode;
  B b = new B();
  mi_RetCode = b.Test();

  if(mi_RetCode == 100)
    Console.WriteLine("Pass");
  else
    Console.WriteLine("FAIL");

  return mi_RetCode;
}
}

class A{

  //////////////////////////////
  // Instance Fields
public int FldPubInst;
//private int FldPrivInst;
protected int FldFamInst;          //Translates to "family"
internal int FldAsmInst;           //Translates to "assembly"
protected internal int FldFoaInst; //Translates to "famorassem"

  //////////////////////////////
  // Static Fields
public static int FldPubStat;
//private static int FldPrivStat;
protected static int FldFamStat;   //family
internal static int FldAsmStat;    //assembly
protected internal int FldFoaStat; //famorassem

  //////////////////////////////
  // Instance Methods
public int MethPubInst(){
  Console.WriteLine("A::MethPubInst()");
  return 100;
}

private int MethPrivInst(){
  Console.WriteLine("A::MethPrivInst()");
  return 100;
}

protected int MethFamInst(){
  Console.WriteLine("A::MethFamInst()");
  return 100;
}

internal int MethAsmInst(){
  Console.WriteLine("A::MethAsmInst()");
  return 100;
}

protected internal int MethFoaInst(){
  Console.WriteLine("A::MethFoaInst()");
  return 100;
}

  //////////////////////////////
  // Static Methods
public static int MethPubStat(){
  Console.WriteLine("A::MethPubStat()");
  return 100;
}

private static int MethPrivStat(){
  Console.WriteLine("A::MethPrivStat()");
  return 100;
}

protected static int MethFamStat(){
  Console.WriteLine("A::MethFamStat()");
  return 100;
}

internal static int MethAsmStat(){
  Console.WriteLine("A::MethAsmStat()");
  return 100;
}

protected internal static int MethFoaStat(){
  Console.WriteLine("A::MethFoaStat()");
  return 100;
}

  //////////////////////////////
  // Virtual Instance Methods
public virtual int MethPubVirt(){
  Console.WriteLine("A::MethPubVirt()");
  return 100;
}

  //@csharp - Note that C# won't compile an illegal private virtual function
  //So there is no negative testing MethPrivVirt() here.

protected virtual int MethFamVirt(){
  Console.WriteLine("A::MethFamVirt()");
  return 100;
}

internal virtual int MethAsmVirt(){
  Console.WriteLine("A::MethAsmVirt()");
  return 100;
}

protected internal virtual int MethFoaVirt(){
  Console.WriteLine("A::MethFoaVirt()");
  return 100;
}
}

class B : A{
public int Test(){
  int mi_RetCode = 100;

  /////////////////////////////////
  // Test instance field access
  FldPubInst = 100;
  if(FldPubInst != 100)
    mi_RetCode = 0;

  //@csharp - Note that C# will not compile an illegal access of FldPrivInst
  //So there is no negative test here, it should be covered elsewhere and
  //should throw a FielAccessException within the runtime.  (IL sources is
  //the most logical, only?, choice)

  FldFamInst = 100;
  if(FldFamInst != 100)
    mi_RetCode = 0;

  FldAsmInst = 100;
  if(FldAsmInst != 100)
    mi_RetCode = 0;

  FldFoaInst = 100;
  if(FldFoaInst != 100)
    mi_RetCode = 0;

  /////////////////////////////////
  // Test static field access
  FldPubStat = 100;
  if(FldPubStat != 100)
    mi_RetCode = 0;

  //@csharp - Again, note C# won't do private field access

  FldFamStat = 100;
  if(FldFamStat != 100)
    mi_RetCode = 0;

  FldAsmStat = 100;
  if(FldAsmStat != 100)
    mi_RetCode = 0;

  FldFoaStat = 100;
  if(FldFoaStat != 100)
    mi_RetCode = 0;

  /////////////////////////////////
  // Test instance method access
  if(MethPubInst() != 100)
    mi_RetCode = 0;

  //@csharp - C# won't do private method access

  if(MethFamInst() != 100)
    mi_RetCode = 0;

  if(MethAsmInst() != 100)
    mi_RetCode = 0;

  if(MethFoaInst() != 100)
    mi_RetCode = 0;

  /////////////////////////////////
  // Test static method access
  if(MethPubStat() != 100)
    mi_RetCode = 0;

  //@csharp - C# won't do private method access

  if(MethFamStat() != 100)
    mi_RetCode = 0;

  if(MethAsmStat() != 100)
    mi_RetCode = 0;

  if(MethFoaStat() != 100)
    mi_RetCode = 0;

  /////////////////////////////////
  // Test virtual method access
  if(MethPubVirt() != 100)
    mi_RetCode = 0;

  //@csharp - C# won't do private method access

  if(MethFamVirt() != 100)
    mi_RetCode = 0;

  if(MethAsmVirt() != 100)
    mi_RetCode = 0;

  if(MethFoaVirt() != 100)
    mi_RetCode = 0;

  return mi_RetCode;
}
}


text:
package ioke.lang;

import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.HashSet;

import ioke.lang.exceptions.ControlFlow;

/**
 *
 * @author Ola Bini
 */
public class DefinitionsBehavior {
    public static void init(IokeObject obj) throws ControlFlow {
        final Runtime runtime = obj.runtime;
        obj.setKind("DefaultBehavior Definitions");

        obj.registerMethod(runtime.newNativeMethod("expects any number of unevaluated arguments. if no arguments at all are given, will just return nil. creates a new method based on the arguments. this method will be evaluated using the context of the object it's called on, and thus the definition can not refer to the outside scope where the method is defined. (there are other ways of achieving this). all arguments except the last one is expected to be names of arguments that will be used in the method. there will possible be additions to the format of arguments later on - including named parameters and optional arguments. the actual code is the last argument given.", new NativeMethod("method") {
                private final DefaultArgumentsDefinition ARGUMENTS = DefaultArgumentsDefinition
                    .builder()
                    .withOptionalPositionalUnevaluated("documentation")
                    .withRestUnevaluated("argumentsAndBody")
                    .getArguments();

                @Override
                public DefaultArgumentsDefinition getArguments() {
                    return ARGUMENTS;
                }

                @Override
                public Object activate(IokeObject method, IokeObject context, IokeObject message, Object on) throws ControlFlow {
                    getArguments().checkArgumentCount(context, message, on);

                    List<Object> args = message.getArguments();

                    if(args.size() == 0) {
                        final Message mx = new Message(context.runtime, "nil", null, false);
                        mx.setFile(Message.file(message));
                        mx.setLine(Message.line(message));
                        mx.setPosition(Message.position(message));
                        final IokeObject mmx = context.runtime.createMessage(mx);
                        return runtime.newMethod(null, runtime.defaultMethod, new DefaultMethod(context, DefaultArgumentsDefinition.empty(), mmx));
                    }

                    String doc = null;

                    List<String> argNames = new ArrayList<String>(args.size()-1);
                    int start = 0;
                    if(args.size() > 1 && ((IokeObject)Message.getArg1(message)).getName().equals("internal:createText")) {
                        start++;
                        String s = ((String)((IokeObject)args.get(0)).getArguments().get(0));
                        doc = s;
                    }

                    DefaultArgumentsDefinition def = DefaultArgumentsDefinition.createFrom(args, start, args.size()-1, message, on, context);

                    return runtime.newMethod(doc, runtime.defaultMethod, new DefaultMethod(context, def, (IokeObject)args.get(args.size()-1)));
                }
            }));

        obj.registerMethod(runtime.newNativeMethod("expects one code argument, optionally preceeded by a documentation string. will create a new DefaultMacro based on the code and return it.", new NativeMethod("macro") {
                private final DefaultArgumentsDefinition ARGUMENTS = DefaultArgumentsDefinition
                    .builder()
                    .withOptionalPositionalUnevaluated("documentation")
                    .withOptionalPositionalUnevaluated("body")
                    .getArguments();

                @Override
                public DefaultArgumentsDefinition getArguments() {
                    return ARGUMENTS;
                }

                @Override
                public Object activate(IokeObject method, IokeObject context, IokeObject message, Object on) throws ControlFlow {
                    getArguments().checkArgumentCount(context, message, on);

                    List<Object> args = message.getArguments();

                    if(args.size() == 0) {
                        final Message mx = new Message(context.runtime, "nil", null, false);
                        mx.setFile(Message.file(message));
                        mx.setLine(Message.line(message));
                        mx.setPosition(Message.position(message));
                        final IokeObject mmx = context.runtime.createMessage(mx);

                        return runtime.newMacro(null, runtime.defaultMacro, new DefaultMacro(context, mmx));
                    }

                    String doc = null;

                    int start = 0;
                    if(args.size() > 1 && ((IokeObject)Message.getArg1(message)).getName().equals("internal:createText")) {
                        start++;
                        String s = ((String)((IokeObject)args.get(0)).getArguments().get(0));
                        doc = s;
                    }

                    return runtime.newMacro(doc, runtime.defaultMacro, new DefaultMacro(context, (IokeObject)args.get(start)));
                }
            }));

        obj.registerMethod(runtime.newNativeMethod("expects one code argument, optionally preceeded by a documentation string. will create a new DefaultSyntax based on the code and return it.", new NativeMethod("syntax") {
                private final DefaultArgumentsDefinition ARGUMENTS = DefaultArgumentsDefinition
                    .builder()
                    .withOptionalPositionalUnevaluated("documentation")
                    .withOptionalPositionalUnevaluated("body")
                    .getArguments();

                @Override
                public DefaultArgumentsDefinition getArguments() {
                    return ARGUMENTS;
                }

                @Override
                public Object activate(IokeObject method, IokeObject context, IokeObject message, Object on) throws ControlFlow {
                    getArguments().checkArgumentCount(context, message, on);

                    List<Object> args = message.getArguments();

                    if(args.size() == 0) {
                        final Message mx = new Message(context.runtime, "nil", null, false);
                        mx.setFile(Message.file(message));
                        mx.setLine(Message.line(message));
                        mx.setPosition(Message.position(message));
                        final IokeObject mmx = context.runtime.createMessage(mx);

                        return runtime.newMacro(null, runtime.defaultSyntax, new DefaultSyntax(context, mmx));
                    }

                    String doc = null;

                    int start = 0;
                    if(args.size() > 1 && ((IokeObject)Message.getArg1(message)).getName().equals("internal:createText")) {
                        start++;
                        String s = ((String)((IokeObject)args.get(0)).getArguments().get(0));
                        doc = s;
                    }

                    return runtime.newMacro(doc, runtime.defaultSyntax, new DefaultSyntax(context, (IokeObject)args.get(start)));
                }
            }));

        obj.registerMethod(runtime.newNativeMethod("expects one code argument, optionally preceeded by a documentation string. will create a new LexicalMacro based on the code and return it.", new NativeMethod("lecro") {
                private final DefaultArgumentsDefinition ARGUMENTS = DefaultArgumentsDefinition
                    .builder()
                    .withOptionalPositionalUnevaluated("documentation")
                    .withOptionalPositionalUnevaluated("body")
                    .getArguments();

                @Override
                public DefaultArgumentsDefinition getArguments() {
                    return ARGUMENTS;
                }

                @Override
                public Object activate(IokeObject method, IokeObject context, IokeObject message, Object on) throws ControlFlow {
                    getArguments().checkArgumentCount(context, message, on);

                    List<Object> args = message.getArguments();

                    if(args.size() == 0) {
                        final Message mx = new Message(context.runtime, "nil", null, false);
                        mx.setFile(Message.file(message));
                        mx.setLine(Message.line(message));
                        mx.setPosition(Message.position(message));
                        final IokeObject mmx = context.runtime.createMessage(mx);

                        return runtime.newMacro(null, runtime.lexicalMacro, new LexicalMacro(context, mmx));
                    }

                    String doc = null;

                    int start = 0;
                    if(args.size() > 1 && ((IokeObject)Message.getArg1(message)).getName().equals("internal:createText")) {
                        start++;
                        String s = ((String)((IokeObject)args.get(0)).getArguments().get(0));
                        doc = s;
                    }

                    return runtime.newMacro(doc, runtime.lexicalMacro, new LexicalMacro(context, (IokeObject)args.get(start)));
                }
            }));

        obj.registerMethod(runtime.newNativeMethod("creates a new lexical block that can be executed at will, while retaining a reference to the lexical closure it was created in. it will always update variables if they exist. there is currently no way of introducing shadowing variables in the local context. new variables can be created though, just like in a method. a lexical block mimics LexicalBlock, and can take arguments. at the moment these are restricted to required arguments, but support for the same argument types as DefaultMethod will come. same as fn()", new NativeMethod("\u028E") {
                private final DefaultArgumentsDefinition ARGUMENTS = DefaultArgumentsDefinition
                    .builder()
                    .withOptionalPositionalUnevaluated("documentation")
                    .withRestUnevaluated("argumentsAndBody")
                    .getArguments();

                @Override
                public DefaultArgumentsDefinition getArguments() {
                    return ARGUMENTS;
                }

                @Override
                public Object activate(IokeObject method, IokeObject context, IokeObject message, Object on) throws ControlFlow {
                    getArguments().checkArgumentCount(context, message, on);

                    List<Object> args = message.getArguments();
                    if(args.isEmpty()) {
                        return runtime.newLexicalBlock(null, runtime.lexicalBlock, new LexicalBlock(context, DefaultArgumentsDefinition.empty(), method.runtime.nilMessage));
                    }

                    IokeObject code = IokeObject.as(args.get(args.size()-1), context);

                    DefaultArgumentsDefinition def = DefaultArgumentsDefinition.createFrom(args, 0, args.size()-1, message, on, context);
                    return runtime.newLexicalBlock(null, runtime.lexicalBlock, new LexicalBlock(context, def, code));
                }
            }));

        obj.registerMethod(runtime.newNativeMethod("creates a new lexical block that can be executed at will, while retaining a reference to the lexical closure it was created in. it will always update variables if they exist. there is currently no way of introducing shadowing variables in the local context. new variables can be created though, just like in a method. a lexical block mimics LexicalBlock, and can take arguments. at the moment these are restricted to required arguments, but support for the same argument types as DefaultMethod will come.", new NativeMethod("fn") {
                private final DefaultArgumentsDefinition ARGUMENTS = DefaultArgumentsDefinition
                    .builder()
                    .withOptionalPositionalUnevaluated("documentation")
                    .withRestUnevaluated("argumentsAndBody")
                    .getArguments();

                @Override
                public DefaultArgumentsDefinition getArguments() {
                    return ARGUMENTS;
                }

                @Override
                public Object activate(IokeObject method, IokeObject context, IokeObject message, Object on) throws ControlFlow {
                    getArguments().checkArgumentCount(context, message, on);

                    List<Object> args = message.getArguments();
                    if(args.isEmpty()) {
                        return runtime.newLexicalBlock(null, runtime.lexicalBlock, new LexicalBlock(context, DefaultArgumentsDefinition.empty(), method.runtime.nilMessage));
                    }

                    String doc = null;

                    List<String> argNames = new ArrayList<String>(args.size()-1);
                    int start = 0;
                    if(args.size() > 1 && ((IokeObject)Message.getArg1(message)).getName().equals("internal:createText")) {
                        start++;
                        String s = ((String)((IokeObject)args.get(0)).getArguments().get(0));
                        doc = s;
                    }

                    IokeObject code = IokeObject.as(args.get(args.size()-1), context);

                    DefaultArgumentsDefinition def = DefaultArgumentsDefinition.createFrom(args, start, args.size()-1, message, on, context);
                    return runtime.newLexicalBlock(doc, runtime.lexicalBlock, new LexicalBlock(context, def, code));
                }
            }));

        obj.registerMethod(runtime.newNativeMethod("Takes two evaluated text or symbol arguments that name the method to alias, and the new name to give it. returns the receiver.", new NativeMethod("aliasMethod") {
                private final DefaultArgumentsDefinition ARGUMENTS = DefaultArgumentsDefinition
                    .builder()
                    .withRequiredPositional("oldName")
                    .withRequiredPositional("newName")
                    .getArguments();

                @Override
                public DefaultArgumentsDefinition getArguments() {
                    return ARGUMENTS;
                }

                @Override
                public Object activate(IokeObject method, IokeObject context, IokeObject message, Object on) throws ControlFlow {
                    List<Object> args = new ArrayList<Object>();
                    getArguments().getEvaluatedArguments(context, message, on, args, new HashMap<String, Object>());

                    String fromName = Text.getText(((Message)IokeObject.data(runtime.asText)).sendTo(runtime.asText, context, args.get(0)));
                    String toName = Text.getText(((Message)IokeObject.data(runtime.asText)).sendTo(runtime.asText, context, args.get(1)));
                    IokeObject.as(on, context).aliasMethod(fromName, toName, message, context);
                    return on;
                }
            }));
    }
}


text:
"""The data layer used during training to train a R*CNN network.

AttributesRoIDataLayer implements a Caffe Python layer.
"""

import caffe
from fast_rcnn.config import cfg
from attr_roi_data_layer.minibatch import get_minibatch
import numpy as np
import yaml
from multiprocessing import Process, Queue
# import pdb

class AttributesRoIDataLayer(caffe.Layer):
    """R*CNN data layer used for training."""

    def _shuffle_roidb_inds(self):
        """Randomly permute the training roidb."""
        self._perm = np.random.permutation(np.arange(len(self._roidb)))
        self._cur = 0

    def _get_next_minibatch_inds(self):
        """Return the roidb indices for the next minibatch."""
        if self._cur + cfg.TRAIN.IMS_PER_BATCH >= len(self._roidb):
            self._shuffle_roidb_inds()

        db_inds = self._perm[self._cur:self._cur + cfg.TRAIN.IMS_PER_BATCH]
        self._cur += cfg.TRAIN.IMS_PER_BATCH
        return db_inds

    def _get_next_minibatch(self):
        """Return the blobs to be used for the next minibatch.

        If cfg.TRAIN.USE_PREFETCH is True, then blobs will be computed in a
        separate process and made available through self._blob_queue.
        """
        if cfg.TRAIN.USE_PREFETCH:
            return self._blob_queue.get()
        else:
            db_inds = self._get_next_minibatch_inds()
            minibatch_db = [self._roidb[i] for i in db_inds]
            return get_minibatch(minibatch_db, self._num_classes)

    def set_roidb(self, roidb):
        """Set the roidb to be used by this layer during training."""
        self._roidb = roidb
        self._shuffle_roidb_inds()
        if cfg.TRAIN.USE_PREFETCH:
            self._blob_queue = Queue(10)
            self._prefetch_process = BlobFetcher(self._blob_queue,
                                                 self._roidb,
                                                 self._num_classes)
            self._prefetch_process.start()
            # Terminate the child process when the parent exists
            def cleanup():
                print 'Terminating BlobFetcher'
                self._prefetch_process.terminate()
                self._prefetch_process.join()
            import atexit
            atexit.register(cleanup)

    def setup(self, bottom, top):
        """Setup the RoIDataLayer."""

        # parse the layer parameter string, which must be valid YAML
        layer_params = yaml.load(self.param_str_)

        self._num_classes = layer_params['num_classes']

        self._name_to_top_map = {
            'data': 0,
            'rois': 1,
            'secondary_rois': 2,
            'labels': 3}

        # data blob: holds a batch of N images, each with 3 channels
        # The height and width (100 x 100) are dummy values
        top[0].reshape(1, 3, 100, 100)

        # rois blob: holds R regions of interest, each is a 5-tuple
        # (n, x1, y1, x2, y2) specifying an image batch index n and a
        # rectangle (x1, y1, x2, y2)
        top[1].reshape(1, 5)

        # secondary rois blob: holds R*C regions of interest, where C is
        # the number of secondary regions
        # (n, x1, y1, x2, y2) specifying an image batch
        top[2].reshape(cfg.TRAIN.CONTEXT_NUM_ROIS, 5)

        # labels blob: R categorical labels in [0, ..., K] for K foreground
        # classes plus background
        top[3].reshape(1, self._num_classes)

    def forward(self, bottom, top):
        """Get blobs and copy them into this layer's top blob vector."""
        blobs = self._get_next_minibatch()

        for blob_name, blob in blobs.iteritems():
            top_ind = self._name_to_top_map[blob_name]
            # Reshape net's input blobs
            top[top_ind].reshape(*(blob.shape))
            # Copy data into net's input blobs
            top[top_ind].data[...] = blob.astype(np.float32, copy=False)

    def backward(self, top, propagate_down, bottom):
        """This layer does not propagate gradients."""
        pass

    def reshape(self, bottom, top):
        """Reshaping happens during the call to forward."""
        pass

class BlobFetcher(Process):
    """Experimental class for prefetching blobs in a separate process."""
    def __init__(self, queue, roidb, num_classes):
        super(BlobFetcher, self).__init__()
        self._queue = queue
        self._roidb = roidb
        self._num_classes = num_classes
        self._perm = None
        self._cur = 0
        self._shuffle_roidb_inds()
        # fix the random seed for reproducibility
        np.random.seed(cfg.RNG_SEED)

    def _shuffle_roidb_inds(self):
        """Randomly permute the training roidb."""
        # TODO(rbg): remove duplicated code
        self._perm = np.random.permutation(np.arange(len(self._roidb)))
        self._cur = 0

    def _get_next_minibatch_inds(self):
        """Return the roidb indices for the next minibatch."""
        # TODO(rbg): remove duplicated code
        if self._cur + cfg.TRAIN.IMS_PER_BATCH >= len(self._roidb):
            self._shuffle_roidb_inds()

        db_inds = self._perm[self._cur:self._cur + cfg.TRAIN.IMS_PER_BATCH]
        self._cur += cfg.TRAIN.IMS_PER_BATCH
        return db_inds

    def run(self):
        print 'BlobFetcher started'
        while True:
            db_inds = self._get_next_minibatch_inds()
            minibatch_db = [self._roidb[i] for i in db_inds]
            blobs = get_minibatch(minibatch_db, self._num_classes)
            self._queue.put(blobs)


text:
package client

import (
	"encoding/json"
	"net/http"
	"net/http/httptest"
	"socialapi/workers/presence"
	"strings"
	"testing"
)

func TestInternalValid(t *testing.T) {
	username, groupName := "testusername", "testgroupName"
	ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		if r.Method != "POST" {
			t.Fatal("Method should be POST")
		}
		if r.URL.Path != presence.EndpointPresencePingPrivate {
			t.Fatalf("Expected url to be %s, got %s", presence.EndpointPresencePingPrivate, r.URL.Path)
		}
		d := &presence.PrivatePing{}
		if err := json.NewDecoder(r.Body).Decode(d); err != nil {
			t.Error(err.Error())
		}
		if d.GroupName != groupName {
			t.Fatalf("expected groupName %q, got %q", groupName, d.GroupName)
		}
		if d.Username != username {
			t.Fatalf("expected username %q, got %q", username, d.Username)
		}
	}))
	defer ts.Close()

	c := NewInternal(ts.URL)
	err := c.Ping(username, groupName)
	if err != nil {
		t.Error(err.Error())
	}
}

func TestInternalBadResponse(t *testing.T) {
	username, groupName := "testusername", "testgroupName"
	ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		http.Error(w, "error", 500)
	}))
	defer ts.Close()

	c := NewInternal(ts.URL)
	err := c.Ping(username, groupName)
	if err != nil && !strings.Contains(err.Error(), "bad response") {
		t.Errorf("excepted bad response error, got %s", err.Error())
	}
}

func TestInternalBadServer(t *testing.T) {
	username, groupName := "testusername", "testgroupName"
	ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}))
	ts.Close()

	c := NewInternal(ts.URL)
	err := c.Ping(username, groupName)
	if err != nil && !strings.Contains(err.Error(), "refused") {
		t.Errorf("excepted conn refused error, got %s", err.Error())
	}
}

func TestInternalInvalidRequest(t *testing.T) {
	ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}))
	defer ts.Close()

	c := NewInternal(ts.URL)

	if err := c.Ping("", "groupName"); err == nil {
		t.Error("ping should fail when identifier is not given")
	}

	if err := c.Ping("username", ""); err == nil {
		t.Error("ping should fail when gorupName is not given")
	}
}

func TestInternalBadURL(t *testing.T) {
	defer func() {
		if out := recover(); out == nil {
			t.Errorf("NewInternal did not panic, but it should with bad url.")
		}
	}()

	NewInternal("bad url $^")
}


text:
package org.squonk.util;

import org.squonk.io.DepictionParameters;
import org.squonk.types.AtomPropertySet;

import java.awt.Color;
import java.util.logging.Logger;

/**
 * Created by timbo on 30/09/2016.
 */
public class Colors {

    private static final Logger LOG = Logger.getLogger(Colors.class.getName());

    public static final Color STEELBLUE = Color.decode("#4682B4");
    public static final Color BROWN = Color.decode("#A52A2A");

    public static String rgbaColorToHex(Color color) {
        return String.format("#%02x%02x%02x%02x",
                color.getAlpha(),
                color.getRed(),
                color.getGreen(),
                color.getBlue());
    }

    public static String rgbColorToHex(Color color) {
        return String.format("#%02x%02x%02x",
                color.getRed(),
                color.getGreen(),
                color.getBlue());
    }

    public static Color rgbaHexToColor(String hex) {
        return new Color(Long.decode(hex).intValue(), true);
    }

    public static Color interpolateRGBLinear(Color start, Color end, float value) {
        int r = interpolateRGBLinear(start.getRed(), end.getRed(), value);
        int g = interpolateRGBLinear(start.getGreen(), end.getGreen(), value);
        int b = interpolateRGBLinear(start.getBlue(), end.getBlue(), value);
        return new Color(r, g, b);
    }

    public static int interpolateRGBLinear(int start, int end, float value) {
        float val = start + ((end - start) * value);
        int i = (int) val;
        if (i < 0) {
            return 0;
        } else if (i > 255) {
            return 255;
        } else {
            return i;
        }
    }

}


text:
using System;
using System.Collections.Generic;
using System.Text;
using Xunit;

namespace Nexmo.Api.Test.Unit.Legacy
{
    public class NumberVerifyTest : TestBase
    {

        [Theory]
        [InlineData(false)]
        [InlineData(true)]
        public void SendControl(bool passCreds)
        {
            //ARRANGE
            var expectedUri = $"{ApiUrl}/verify/control/json?request_id=B41F2D19-913C-4BB3-B825-624E375D2C31&cmd=cancel&api_key={ApiKey}&api_secret={ApiSecret}&";
            var expectedResponseContent = "{\"status\":\"0\",\"command\":\"cancel\"}";
            Setup(uri: expectedUri, responseContent: expectedResponseContent);

            //ACT
            var creds = new Request.Credentials() { ApiKey = ApiKey, ApiSecret = ApiSecret };
            var client = new Client(creds);
            NumberVerify.ControlResponse results;
            if (passCreds)
            {
                results = client.NumberVerify.Control(new NumberVerify.ControlRequest
                {
                    request_id = "B41F2D19-913C-4BB3-B825-624E375D2C31",
                    cmd = "cancel"
                }, creds);
            }
            else
            {
                results = client.NumberVerify.Control(new NumberVerify.ControlRequest
                {
                    request_id = "B41F2D19-913C-4BB3-B825-624E375D2C31",
                    cmd = "cancel"
                });
            }

            //ASSERT
            Assert.Equal("0", results.status);
            Assert.Equal("cancel", results.command);
        }

        [Theory]
        [InlineData(false)]
        [InlineData(true)]
        public void SendVerifyRequest(bool passCreds)
        {
            //ARRANGE
            var expectedUri = $"{ApiUrl}/verify/json?number=12018675309&country=US&brand=AcmeInc&sender_id=ACME&code_length=6&lg=en-US&pin_expiry=240&next_event_wait=120&workflow_id=4&api_key={ApiKey}&api_secret={ApiSecret}&";

            var expectedResult = @"{
              ""request_id"": ""abcdef012345..."",
              ""status"": ""0""
              }";

            Setup(uri: expectedUri, responseContent: expectedResult);

            //ACT
            var request = new NumberVerify.VerifyRequest()
            {
                number = "12018675309",
                brand = "AcmeInc",
                country = "US",
                sender_id = "ACME",
                code_length = "6",
                lg = "en-US",
                pin_expiry = "240",
                next_event_wait = "120",
                workflow_id = "4"
            };
            var creds = new Request.Credentials() { ApiKey = ApiKey, ApiSecret = ApiSecret };
            var client = new Client(creds);
            NumberVerify.VerifyResponse response;
            if (passCreds)
            {
                response = client.NumberVerify.Verify(request);
            }
            else
            {
                response = client.NumberVerify.Verify(request);
            }
            Assert.Equal("0", response.status);
            Assert.Equal("abcdef012345...", response.request_id);
        }
    }
}


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.facebook.presto.tests;

import com.facebook.presto.dispatcher.DispatchManager;
import com.facebook.presto.execution.QueryManager;
import com.facebook.presto.resourceGroups.FileResourceGroupConfigurationManagerFactory;
import com.facebook.presto.server.BasicQueryInfo;
import com.facebook.presto.server.testing.TestingPrestoServer;
import com.facebook.presto.spi.QueryId;
import com.facebook.presto.tests.tpch.TpchQueryRunnerBuilder;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import static com.facebook.presto.execution.QueryLimit.Source.RESOURCE_GROUP;
import static com.facebook.presto.execution.QueryState.FAILED;
import static com.facebook.presto.execution.TestQueryRunnerUtil.createQuery;
import static com.facebook.presto.execution.TestQueryRunnerUtil.waitForQueryState;
import static com.facebook.presto.spi.StandardErrorCode.EXCEEDED_CPU_LIMIT;
import static com.facebook.presto.spi.StandardErrorCode.EXCEEDED_GLOBAL_MEMORY_LIMIT;
import static com.facebook.presto.spi.StandardErrorCode.EXCEEDED_TIME_LIMIT;
import static com.facebook.presto.testing.TestingSession.testSessionBuilder;
import static com.facebook.presto.tpch.TpchMetadata.TINY_SCHEMA_NAME;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;

@Test(singleThreaded = true)
public class TestResourceGroupPerQueryLimitEnforcement
{
    private DistributedQueryRunner queryRunner;

    @BeforeClass
    public void setUp()
            throws Exception
    {
        queryRunner = TpchQueryRunnerBuilder.builder().build();
        TestingPrestoServer server = queryRunner.getCoordinator();
        server.getResourceGroupManager().get().addConfigurationManagerFactory(new FileResourceGroupConfigurationManagerFactory());
        server.getResourceGroupManager().get()
                .setConfigurationManager("file", ImmutableMap.of("resource-groups.config-file", getResourceFilePath("resource_groups_config_simple.json")));
    }

    @AfterClass(alwaysRun = true)
    public void tearDown()
    {
        queryRunner.close();
        queryRunner = null;
    }

    @AfterMethod
    public void cancelAllQueriesAfterTest()
    {
        DispatchManager dispatchManager = queryRunner.getCoordinator().getDispatchManager();
        ImmutableList.copyOf(dispatchManager.getQueries()).forEach(queryInfo -> dispatchManager.cancelQuery(queryInfo.getQueryId()));
    }

    @Test(timeOut = 60_000L)
    public void testQueryCpuLimit()
            throws Exception
    {
        QueryId queryId = createQuery(
                queryRunner,
                testSessionBuilder()
                        .setCatalog("tpch")
                        .setSchema(TINY_SCHEMA_NAME)
                        .setSource("per_query_cpu_limit_test")
                        .build(),
                "SELECT COUNT(*) FROM lineitem");
        waitForQueryState(queryRunner, queryId, FAILED);
        QueryManager queryManager = queryRunner.getCoordinator().getQueryManager();
        BasicQueryInfo queryInfo = queryManager.getQueryInfo(queryId);
        assertEquals(queryInfo.getState(), FAILED);
        assertEquals(queryInfo.getErrorCode(), EXCEEDED_CPU_LIMIT.toErrorCode());
        assertTrue(queryInfo.getFailureInfo().getMessage().contains(RESOURCE_GROUP.name()));
    }

    @Test(timeOut = 60_000L)
    public void testQueryMemoryLimit()
            throws Exception
    {
        QueryId queryId = createQuery(
                queryRunner,
                testSessionBuilder()
                        .setCatalog("tpch")
                        .setSchema(TINY_SCHEMA_NAME)
                        .setSource("per_query_memory_limit_test")
                        .build(),
                "SELECT COUNT(*) FROM lineitem");
        waitForQueryState(queryRunner, queryId, FAILED);
        QueryManager queryManager = queryRunner.getCoordinator().getQueryManager();
        BasicQueryInfo queryInfo = queryManager.getQueryInfo(queryId);
        assertEquals(queryInfo.getState(), FAILED);
        assertEquals(queryInfo.getErrorCode(), EXCEEDED_GLOBAL_MEMORY_LIMIT.toErrorCode());
        assertTrue(queryInfo.getFailureInfo().getMessage().contains(RESOURCE_GROUP.name()));
    }

    @Test(timeOut = 60_000L)
    public void testQueryExecutionTimeLimit()
            throws Exception
    {
        QueryId queryId = createQuery(
                queryRunner,
                testSessionBuilder()
                        .setCatalog("tpch")
                        .setSchema(TINY_SCHEMA_NAME)
                        .setSource("per_query_execution_time_limit_test")
                        .build(),
                "SELECT COUNT(*) FROM lineitem");
        waitForQueryState(queryRunner, queryId, FAILED);
        QueryManager queryManager = queryRunner.getCoordinator().getQueryManager();
        BasicQueryInfo queryInfo = queryManager.getQueryInfo(queryId);
        assertEquals(queryInfo.getState(), FAILED);
        assertEquals(queryInfo.getErrorCode(), EXCEEDED_TIME_LIMIT.toErrorCode());
        assertTrue(queryInfo.getFailureInfo().getMessage().contains(RESOURCE_GROUP.name()));
    }

    private String getResourceFilePath(String fileName)
    {
        return this.getClass().getClassLoader().getResource(fileName).getPath();
    }
}


text:
layout: postag
title: 'VERB'
shortdef: 'verb'
---

Verbs typically inflect for [tense](Tense), [mood](Mood) and
[person](Person) and signal events and actions. Verbs can constitute a
minimal predicate in a clause, and govern the number and types of
other constituents which may occur in the clause.

Auxiliary and modal verbs are not annotated as `VERB` but rather
[AUX]().

#### Examples

* [fi] _juosta, syödä_ "run, eat"
* [fi] _ei_ "no" (negation verb)

#### References

* <http://scripta.kotus.fi/visk/sisallys.php?p=444> (in Finnish)
<!-- Interlanguage links updated Po lis 14 15:34:37 CET 2022 -->