text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="CMakeRunConfigurationManager" shouldGenerate="true" shouldDeleteObsolete="true" buildAllGenerated="true">
    <generated>
      <config projectName="Project" targetName="hydro" />
      <config projectName="Project" targetName="psychic-sniffle" />
      <config projectName="Project" targetName="schwefel" />
    </generated>
  </component>
  <component name="CMakeSettings" AUTO_RELOAD="true">
    <configurations>
      <configuration CONFIG_NAME="Release" />
      <configuration CONFIG_NAME="Debug" />
    </configurations>
  </component>
  <component name="ChangeListManager">
    <list default="true" id="2304b9ae-02e4-487d-b123-90504f5e9241" name="Default" comment="changed Schwefel termination condition (+ve only)">
      <change type="DELETED" beforePath="$PROJECT_DIR$/.idea/.name" afterPath="" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
    </list>
    <ignored path="psychic-sniffle.iws" />
    <ignored path=".idea/workspace.xml" />
    <ignored path="$PROJECT_DIR$/cmake-build-release/" />
    <ignored path="$PROJECT_DIR$/cmake-build-debug/" />
    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="FavoritesManager">
    <favorites_list name="psychic-sniffle" />
  </component>
  <component name="FileEditorManager">
    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
      <file leaf-file-name="sniffle.h" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/sniffle.h">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="600">
              <caret line="40" column="0" lean-forward="false" selection-start-line="40" selection-start-column="0" selection-end-line="40" selection-end-column="0" />
              <folding>
                <element signature="e#173#192#0" expanded="true" />
                <element signature="e#5301#5385#0" expanded="true" />
                <element signature="e#5348#5361#0" expanded="true" />
                <element signature="e#6962#6974#0" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="main.cpp" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/schwefel/main.cpp">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="765">
              <caret line="51" column="47" lean-forward="false" selection-start-line="51" selection-start-column="47" selection-end-line="51" selection-end-column="47" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="main.cpp" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/src/hydro/main.cpp">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="165">
              <caret line="42" column="28" lean-forward="false" selection-start-line="42" selection-start-column="28" selection-end-line="42" selection-end-column="28" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="FindInProjectRecents">
    <findStrings>
      <find>Release</find>
      <find>eSum0</find>
      <find>buildSamplerTable</find>
      <find>fSum</find>
      <find>PSYCHICSNIFFLE_SNIFFLE_H</find>
      <find>stateAnalyser</find>
    </findStrings>
    <replaceStrings>
      <replace>PSYCHICSNIFFLE_PSYCHIC_H</replace>
    </replaceStrings>
  </component>
  <component name="Git.Settings">
    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
    <option name="RECENT_BRANCH_BY_REPOSITORY">
      <map>
        <entry key="$PROJECT_DIR$" value="unified" />
      </map>
    </option>
  </component>
  <component name="IdeDocumentHistory">
    <option name="CHANGED_PATHS">
      <list>
        <option value="$PROJECT_DIR$/taus88.h" />
        <option value="$PROJECT_DIR$/schwefel.h" />
        <option value="$PROJECT_DIR$/main.cpp" />
        <option value="$PROJECT_DIR$/sniffle.h" />
        <option value="$PROJECT_DIR$/src/main.cpp" />
        <option value="$PROJECT_DIR$/CMakeLists.txt" />
        <option value="$PROJECT_DIR$/src/taus88.h" />
        <option value="$PROJECT_DIR$/src/splice.h" />
        <option value="$PROJECT_DIR$/src/samplertable.h" />
        <option value="$PROJECT_DIR$/src/nselector.h" />
        <option value="$PROJECT_DIR$/src/psychic.h" />
        <option value="$PROJECT_DIR$/src/hydro/math.h" />
        <option value="$PROJECT_DIR$/src/sniffle.h" />
        <option value="$PROJECT_DIR$/src/schwefel/main.cpp" />
        <option value="$PROJECT_DIR$/src/hydro/main.cpp" />
      </list>
    </option>
  </component>
  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
  <component name="JsGulpfileManager">
    <detection-done>true</detection-done>
    <sorting>DEFINITION_ORDER</sorting>
  </component>
  <component name="OCFindUsagesOptions" text="true" ivars="false" properties="true" derivedClasses="false" />
  <component name="ProjectFrameBounds">
    <option name="x" value="-1" />
    <option name="y" value="25" />
    <option name="width" value="1026" />
    <option name="height" value="744" />
  </component>
  <component name="ProjectInspectionProfilesVisibleTreeState">
    <entry key="Project Default">
      <profile-state>
        <expanded-state>
          <State>
            <id />
          </State>
          <State>
            <id>XML</id>
          </State>
          <State>
            <id>XPath</id>
          </State>
        </expanded-state>
        <selected-state>
          <State>
            <id>C/C++</id>
          </State>
        </selected-state>
      </profile-state>
    </entry>
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
      <manualOrder />
      <foldersAlwaysOnTop value="true" />
    </navigator>
    <panes>
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="psychic-sniffle" />
              <option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$MyProjectTreeStructure$1" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="psychic-sniffle" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="psychic-sniffle" />
              <option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$MyProjectTreeStructure$1" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="psychic-sniffle" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="psychic-sniffle" />
              <option name="myItemType" value="com.jetbrains.cidr.projectView.CidrFilesViewHelper$MyProjectTreeStructure$1" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="psychic-sniffle" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="hydro" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="settings.editor.selected.configurable" value="CMakeSettings" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
  </component>
  <component name="RunDashboard">
    <option name="ruleStates">
      <list>
        <RuleState>
          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
        </RuleState>
        <RuleState>
          <option name="name" value="StatusDashboardGroupingRule" />
        </RuleState>
      </list>
    </option>
  </component>
  <component name="RunManager" selected="Application.Release">
    <configuration name="Debug" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" CONFIG_NAME="Debug" EXPLICIT_BUILD_TARGET_NAME="all">
      <envs />
    </configuration>
    <configuration name="MinSizeRel" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="Project" TARGET_NAME="psychicsniffle" CONFIG_NAME="MinSizeRel" RUN_TARGET_PROJECT_NAME="Project" RUN_TARGET_NAME="psychicsniffle">
      <envs />
    </configuration>
    <configuration name="RelWithDebInfo" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="Project" TARGET_NAME="psychicsniffle" CONFIG_NAME="RelWithDebInfo" RUN_TARGET_PROJECT_NAME="Project" RUN_TARGET_NAME="psychicsniffle">
      <envs />
    </configuration>
    <configuration name="Release" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" CONFIG_NAME="Release" RUN_TARGET_PROJECT_NAME="Project" RUN_TARGET_NAME="hydro" EXPLICIT_BUILD_TARGET_NAME="all">
      <envs />
    </configuration>
    <configuration default="true" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="Project" TARGET_NAME="psychicsniffle" CONFIG_NAME="Release">
      <envs />
    </configuration>
    <configuration default="true" type="CMakeGoogleTestRunConfigurationType" factoryName="Google Test" PASS_PARENT_ENVS_2="true" PROJECT_NAME="Project" TARGET_NAME="psychicsniffle" CONFIG_NAME="Debug" TEST_MODE="SUITE_TEST">
      <envs />
    </configuration>
    <configuration default="true" type="CLion_Remote" factoryName="GDB Remote Debug" remoteCommand="" symbolFile="" sysroot="">
      <method />
    </configuration>
    <configuration default="true" type="CMakeCatchTestRunConfigurationType" factoryName="Catch Test" PASS_PARENT_ENVS_2="true" TEST_MODE="SUITE_TEST">
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="CompoundRunConfigurationType" factoryName="Compound Run Configuration">
      <method />
    </configuration>
    <configuration default="true" type="PythonConfigurationType" factoryName="Python">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs>
        <env name="PYTHONUNBUFFERED" value="1" />
      </envs>
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="psychic-sniffle" />
      <option name="SCRIPT_NAME" value="" />
      <option name="PARAMETERS" value="" />
      <option name="SHOW_COMMAND_LINE" value="false" />
      <option name="EMULATE_TERMINAL" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="Tox" factoryName="Tox">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="psychic-sniffle" />
      <method />
    </configuration>
    <configuration default="true" type="XSLT" factoryName="XSLT">
      <option name="myOutputFile" />
      <option name="myOpenOutputFile" value="false" />
      <option name="myOpenInBrowser" value="false" />
      <option name="mySmartErrorHandling" value="true" />
      <option name="myRunnerPort" value="34873" />
      <option name="myVmArguments" />
      <option name="myWorkingDirectory" />
      <option name="myModule" />
      <option name="myJdk" />
      <parameters />
      <OutputType value="CONSOLE" save-to-file="false" />
      <FileType name="XML" />
      <JdkChoice value="FROM_MODULE" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Doctests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="psychic-sniffle" />
      <option name="SCRIPT_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="FOLDER_NAME" value="" />
      <option name="TEST_TYPE" value="TEST_SCRIPT" />
      <option name="PATTERN" value="" />
      <option name="USE_PATTERN" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Nosetests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="psychic-sniffle" />
      <option name="_new_regexPattern" value="""" />
      <option name="_new_additionalArguments" value="""" />
      <option name="_new_target" value=""."" />
      <option name="_new_targetType" value=""PATH"" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Unittests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="psychic-sniffle" />
      <option name="_new_additionalArguments" value="""" />
      <option name="_new_target" value=""."" />
      <option name="_new_targetType" value=""PATH"" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="py.test">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="psychic-sniffle" />
      <option name="_new_keywords" value="""" />
      <option name="_new_additionalArguments" value="""" />
      <option name="_new_target" value=""."" />
      <option name="_new_targetType" value=""PATH"" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Attests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="psychic-sniffle" />
      <option name="SCRIPT_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="FOLDER_NAME" value="" />
      <option name="TEST_TYPE" value="TEST_SCRIPT" />
      <option name="PATTERN" value="" />
      <option name="USE_PATTERN" value="false" />
      <method />
    </configuration>
    <list size="4">
      <item index="0" class="java.lang.String" itemvalue="Application.Debug" />
      <item index="1" class="java.lang.String" itemvalue="Application.MinSizeRel" />
      <item index="2" class="java.lang.String" itemvalue="Application.RelWithDebInfo" />
      <item index="3" class="java.lang.String" itemvalue="Application.Release" />
    </list>
  </component>
  <component name="ShelveChangesManager" show_recycled="false">
    <option name="remove_strategy" value="false" />
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="2304b9ae-02e4-487d-b123-90504f5e9241" name="Default" comment="" />
      <created>1480890389980</created>
      <option name="number" value="Default" />
      <option name="presentableId" value="Default" />
      <updated>1480890389980</updated>
      <workItem from="1480890391855" duration="165000" />
      <workItem from="1480890608624" duration="251000" />
      <workItem from="1480890897225" duration="9730000" />
      <workItem from="1480901187304" duration="15000" />
      <workItem from="1480901391613" duration="565000" />
      <workItem from="1480902119111" duration="291000" />
      <workItem from="1480902502408" duration="2618000" />
      <workItem from="1480987208978" duration="1805000" />
      <workItem from="1481003407872" duration="4453000" />
      <workItem from="1481043472655" duration="7565000" />
      <workItem from="1481165756925" duration="6620000" />
      <workItem from="1484029184952" duration="3290000" />
      <workItem from="1484033452377" duration="64000" />
      <workItem from="1484033577993" duration="98000" />
      <workItem from="1484799827342" duration="1744000" />
      <workItem from="1485124777082" duration="3193000" />
      <workItem from="1485409935749" duration="6388000" />
      <workItem from="1485495973583" duration="1642000" />
      <workItem from="1485578499104" duration="102000" />
      <workItem from="1485578626375" duration="2312000" />
      <workItem from="1489618340911" duration="599000" />
      <workItem from="1489620058990" duration="36000" />
      <workItem from="1489620116541" duration="4627000" />
      <workItem from="1489635839957" duration="2724000" />
      <workItem from="1489692390927" duration="1538000" />
      <workItem from="1489958752243" duration="629000" />
      <workItem from="1489960933199" duration="3923000" />
      <workItem from="1490303206330" duration="745000" />
      <workItem from="1490303995531" duration="6762000" />
      <workItem from="1490586604190" duration="2504000" />
      <workItem from="1491188016845" duration="1220000" />
    </task>
    <task id="LOCAL-00001" summary="cmake adjustments, fixed omp overparallelization, fixed memory under-allocation">
      <created>1480900763033</created>
      <option name="number" value="00001" />
      <option name="presentableId" value="LOCAL-00001" />
      <option name="project" value="LOCAL" />
      <updated>1480900763033</updated>
    </task>
    <task id="LOCAL-00002" summary="Added object  that does random draws, without replacement. Used it in the binary splice group.">
      <created>1485421275507</created>
      <option name="number" value="00002" />
      <option name="presentableId" value="LOCAL-00002" />
      <option name="project" value="LOCAL" />
      <updated>1485421275507</updated>
    </task>
    <option name="localTasksCounter" value="3" />
    <servers />
  </component>
  <component name="TimeTrackingManager">
    <option name="totallyTimeSpent" value="78218000" />
  </component>
  <component name="ToolWindowManager">
    <frame x="-1" y="25" width="1026" height="744" extended-state="0" />
    <editor active="true" />
    <layout>
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.22903885" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.5534884" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="CMake" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3015873" 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" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
      <window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.4527132" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3504" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39583334" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Find" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.42628205" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
    </layout>
    <layout-to-restore>
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.17948718" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="CMake" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3015873" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="true" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3504" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.45352563" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.22977023" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Find" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.42628205" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3968254" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
    </layout-to-restore>
  </component>
  <component name="TypeScriptGeneratedFilesManager">
    <option name="processedProjectFiles" value="true" />
  </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">
    <MESSAGE value="cmake adjustments, fixed omp overparallelization, fixed memory under-allocation" />
    <MESSAGE value="Added object  that does random draws, without replacement. Used it in the binary splice group." />
    <option name="LAST_COMMIT_MESSAGE" value="Added object  that does random draws, without replacement. Used it in the binary splice group." />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager>
      <breakpoints-dialog>
        <breakpoints-dialog />
      </breakpoints-dialog>
      <option name="time" value="35" />
    </breakpoint-manager>
    <watches-manager />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/sniffle.h" />
    <entry file="file://$PROJECT_DIR$/main.cpp" />
    <entry file="file://$PROJECT_DIR$/schwefel.h" />
    <entry file="file://$PROJECT_DIR$/sniffle.h" />
    <entry file="file://$PROJECT_DIR$/main.cpp" />
    <entry file="file://$PROJECT_DIR$/schwefel.h" />
    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/taus88.h" />
    <entry file="file://$PROJECT_DIR$/sniffle.h" />
    <entry file="file://$PROJECT_DIR$/main.cpp" />
    <entry file="file://$PROJECT_DIR$/schwefel.h" />
    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="165">
          <caret line="11" column="0" lean-forward="true" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/taus88.h" />
    <entry file="file://$PROJECT_DIR$/sniffle.h" />
    <entry file="file://$PROJECT_DIR$/main.cpp" />
    <entry file="file://$PROJECT_DIR$/schwefel.h" />
    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="135">
          <caret line="9" column="0" lean-forward="false" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/taus88.h" />
    <entry file="file://$PROJECT_DIR$/sniffle.h" />
    <entry file="file://$PROJECT_DIR$/main.cpp" />
    <entry file="file://$PROJECT_DIR$/schwefel.h" />
    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="135">
          <caret line="9" column="0" lean-forward="false" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/taus88.h" />
    <entry file="file://$PROJECT_DIR$/sniffle.h" />
    <entry file="file://$PROJECT_DIR$/main.cpp" />
    <entry file="file://$PROJECT_DIR$/schwefel.h" />
    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file:///usr/lib/gcc/x86_64-linux-gnu/5/include/omp.h">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="795">
          <caret line="75" column="0" lean-forward="false" selection-start-line="75" selection-start-column="0" selection-end-line="75" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/cmake-build-debug/CMakeCache.txt" />
    <entry file="file:///usr/include/c++/5/functional">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="34005">
          <caret line="2267" column="0" lean-forward="false" selection-start-line="2267" selection-start-column="0" selection-end-line="2267" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/schwefel.h" />
    <entry file="file://$PROJECT_DIR$/main.cpp" />
    <entry file="file://$PROJECT_DIR$/taus88.h" />
    <entry file="file://$PROJECT_DIR$/sniffle.h" />
    <entry file="file://$PROJECT_DIR$/src/main.cpp" />
    <entry file="file://$PROJECT_DIR$/inc/sniffle.h" />
    <entry file="file://$PROJECT_DIR$/inc/schwefel.h" />
    <entry file="file://$PROJECT_DIR$/src/cpuinfo.h">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="75">
          <caret line="5" column="0" lean-forward="false" selection-start-line="5" selection-start-column="0" selection-end-line="5" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/schwefel/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/splice.h">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="75">
          <caret line="5" column="91" lean-forward="false" selection-start-line="5" selection-start-column="91" selection-end-line="5" selection-end-column="91" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/samplertable.h">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="60">
          <caret line="4" column="60" lean-forward="false" selection-start-line="4" selection-start-column="60" selection-end-line="4" selection-end-column="60" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/taus88.h">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="165">
          <caret line="11" column="14" lean-forward="false" selection-start-line="11" selection-start-column="14" selection-end-line="11" selection-end-column="14" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/hydro/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="90">
          <caret line="6" column="0" lean-forward="true" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/nselector.h">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="-35">
          <caret line="10" column="0" lean-forward="true" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="71">
          <caret line="9" column="0" lean-forward="true" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/psychic.h" />
    <entry file="file://$PROJECT_DIR$/src/hydro/math.h">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="47">
          <caret line="12" column="0" lean-forward="true" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/sniffle.h">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="600">
          <caret line="40" column="0" lean-forward="false" selection-start-line="40" selection-start-column="0" selection-end-line="40" selection-end-column="0" />
          <folding>
            <element signature="e#173#192#0" expanded="true" />
            <element signature="e#5301#5385#0" expanded="true" />
            <element signature="e#5348#5361#0" expanded="true" />
            <element signature="e#6962#6974#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/schwefel/main.cpp">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="765">
          <caret line="51" column="47" lean-forward="false" selection-start-line="51" selection-start-column="47" selection-end-line="51" selection-end-column="47" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/hydro/main.cpp">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="165">
          <caret line="42" column="28" lean-forward="false" selection-start-line="42" selection-start-column="28" selection-end-line="42" selection-end-column="28" />
          <folding />
        </state>
      </provider>
    </entry>
  </component>
</project>


text:
module OnStomp::Failover::FailoverEvents
  include OnStomp::Interfaces::EventManager

  # We do this one using `class << self` instead of the `self.included` hook
  # because we need `create_client_event_method` immediately.
  class << self
    # Creates a forwarded binding for client events.
    def create_client_event_method name
      module_eval "def #{name}(&block); bind_client_event(:#{name}, block); end"
    end
  end

  # Create forwarded bindings for all {OnStomp::Client} events.
  OnStomp::Interfaces::ClientEvents.event_methods.each do |ev|
    create_client_event_method ev
  end

  # Binds a callback to {OnStomp::Client#on_connction_established}. This has
  # to be handled directly because :on_connection_established isn't a true
  # event.
  def on_connection_established &block
    bind_client_event(:on_connection_established, block)
  end
  # Binds a callback to {OnStomp::Client#on_connection_died}. This has
  # to be handled directly because :on_connection_died isn't a true
  # event.
  def on_connection_died &block
    bind_client_event(:on_connection_died, block)
  end
  # Binds a callback to {OnStomp::Client#on_connection_terminated}. This has
  # to be handled directly because :on_connection_terminated isn't a true
  # event.
  def on_connection_terminated &block
    bind_client_event(:on_connection_terminated, block)
  end
  # Binds a callback to {OnStomp::Client#on_connection_closed}. This has
  # to be handled directly because :on_connection_closed isn't a true
  # event.
  def on_connection_closed &block
    bind_client_event(:on_connection_closed, block)
  end

  # Sets up a forwarded event binding, applying it to all clients in
  # {OnStomp::Failover::Client#client_pool}.
  def bind_client_event(name, block)
    client_pool.each do |client|
      client.__send__ name do |*args|
        if client == active_client
          block.call *args
        end
      end
    end
  end

  # Binds a callback to be invoked when a failover client is attempting to
  # connect through a new {OnStomp::Client client} in its
  # {OnStomp::Failover::Client#pool}.
  # @yield [failover, attempt, client] callback invoked when event is triggered
  # @yieldparam [OnStomp::Failover::Client] failover
  # @yieldparam [Fixnum] attempt
  # @yieldparam [OnStomp::Client] client
  create_event_methods :failover_retry, :before, :after
  # Binds a callback to be invoked when a failover client fails to establish
  # a connection through a {OnStomp::Client client} while reconnecting.
  # @yield [failover, client, error_message] callback invoked when event is triggered
  # @yieldparam [OnStomp::Failover::Client] failover
  # @yieldparam [OnStomp::Client] client
  # @yieldparam [String] error_message
  create_event_methods :failover_connect_failure, :on
  #create_event_methods :failover_retries_exceeded, :on
  # Binds a callback to be invoked when an established connection through a
  # client is lost.
  # @yield [failover, client] callback invoked when event is triggered
  # @yieldparam [OnStomp::Failover::Client] failover
  # @yieldparam [OnStomp::Client] client
  create_event_methods :failover_lost, :on
  # Binds a callback to be invoked when a connection through a
  # client is established.
  # @yield [failover, client] callback invoked when event is triggered
  # @yieldparam [OnStomp::Failover::Client] failover
  # @yieldparam [OnStomp::Client] client
  create_event_methods :failover_connected, :on
  # Binds a callback to be invoked when the maximum retries has been
  # exceeded.
  # @yield [failover] callback invoked when event is triggered
  # @yieldparam [OnStomp::Failover::Client] failover
  create_event_methods :failover_retries_exceeded, :on

  # Triggers a failover retry event
  def trigger_failover_retry pref, attempt
    trigger_failover_event :retry, pref, attempt, self.active_client
  end

  # Triggers a general failover event
  def trigger_failover_event ev, pref, *args
    trigger_event :"#{pref}_failover_#{ev}", self, *args
  end
end

redpajama_set_name: RedPajamaGithub


text:
export const ADD_SUCCESS = "point/ADD_SUCCESS";
export const ADD_REQUEST = "point/ADD_REQUEST";
export const ADD_ERROR = "point/ADD_ERROR";

export const FIND_SUCCESS = "point/FIND_SUCCESS";
export const FIND_REQUEST = "point/FIND_REQUEST";

export const FIND_ONE_SUCCESS = "point/FIND_ONE_SUCCESS";
export const FIND_ONE_REQUEST = "point/FIND_ONE_REQUEST";

export const UPDATE_SUCCESS = "point/UPDATE_SUCCESS";
export const UPDATE_REQUEST = "point/UPDATE_REQUEST";

export const REMOVE_SUCCESS = "point/REMOVE_SUCCESS";
export const REMOVE_REQUEST = "point/REMOVE_REQUEST";

export const ERROR = "point/ERROR";
export const RESET = "point/RESET";


text:
package evaluator

import (
	"encoding/json"
	"errors"
	"fmt"
	"regexp"
	"strings"
)

var variableFormatRegex = regexp.MustCompile(`\(\(\s([-\w\p{L}]+)\s\)\)`)

func Evaluate(aviatorFile []byte, vars map[string]string) ([]byte, error) {
	var err error
	return variableFormatRegex.ReplaceAllFunc(aviatorFile, func(match []byte) []byte {
		key := string(variableFormatRegex.FindSubmatch(match)[1])

		val, ok := vars[key]
		if !ok {
			err = errors.New(fmt.Sprintf("Variable (( %s )) not provided", key))
		}

		var replace []byte
		if strings.Contains(val, "\n") {
			replace, _ = json.Marshal(val)
		} else {
			replace = []byte(val)
		}

		return []byte(replace)
	}), err
}


text:
//==============================================================================
static void* juce_libjackHandle = nullptr;

static void* juce_loadJackFunction (const char* const name)
{
    if (juce_libjackHandle == nullptr)
        return nullptr;

    return dlsym (juce_libjackHandle, name);
}

#define JUCE_DECL_JACK_FUNCTION(return_type, fn_name, argument_types, arguments)  \
  return_type fn_name argument_types                                              \
  {                                                                               \
      typedef return_type (*fn_type) argument_types;                              \
      static fn_type fn = (fn_type) juce_loadJackFunction (#fn_name);             \
      return (fn != nullptr) ? ((*fn) arguments) : (return_type) 0;               \
  }

#define JUCE_DECL_VOID_JACK_FUNCTION(fn_name, argument_types, arguments)          \
  void fn_name argument_types                                                     \
  {                                                                               \
      typedef void (*fn_type) argument_types;                                     \
      static fn_type fn = (fn_type) juce_loadJackFunction (#fn_name);             \
      if (fn != nullptr) (*fn) arguments;                                         \
  }

//==============================================================================
JUCE_DECL_JACK_FUNCTION (jack_client_t*, jack_client_open, (const char* client_name, jack_options_t options, jack_status_t* status, ...), (client_name, options, status));
JUCE_DECL_JACK_FUNCTION (int, jack_client_close, (jack_client_t *client), (client));
JUCE_DECL_JACK_FUNCTION (int, jack_activate, (jack_client_t* client), (client));
JUCE_DECL_JACK_FUNCTION (int, jack_deactivate, (jack_client_t* client), (client));
JUCE_DECL_JACK_FUNCTION (jack_nframes_t, jack_get_buffer_size, (jack_client_t* client), (client));
JUCE_DECL_JACK_FUNCTION (jack_nframes_t, jack_get_sample_rate, (jack_client_t* client), (client));
JUCE_DECL_VOID_JACK_FUNCTION (jack_on_shutdown, (jack_client_t* client, void (*function)(void* arg), void* arg), (client, function, arg));
JUCE_DECL_JACK_FUNCTION (void* , jack_port_get_buffer, (jack_port_t* port, jack_nframes_t nframes), (port, nframes));
JUCE_DECL_JACK_FUNCTION (jack_nframes_t, jack_port_get_total_latency, (jack_client_t* client, jack_port_t* port), (client, port));
JUCE_DECL_JACK_FUNCTION (jack_port_t* , jack_port_register, (jack_client_t* client, const char* port_name, const char* port_type, unsigned long flags, unsigned long buffer_size), (client, port_name, port_type, flags, buffer_size));
JUCE_DECL_VOID_JACK_FUNCTION (jack_set_error_function, (void (*func)(const char*)), (func));
JUCE_DECL_JACK_FUNCTION (int, jack_set_process_callback, (jack_client_t* client, JackProcessCallback process_callback, void* arg), (client, process_callback, arg));
JUCE_DECL_JACK_FUNCTION (const char**, jack_get_ports, (jack_client_t* client, const char* port_name_pattern, const char* type_name_pattern, unsigned long flags), (client, port_name_pattern, type_name_pattern, flags));
JUCE_DECL_JACK_FUNCTION (int, jack_connect, (jack_client_t* client, const char* source_port, const char* destination_port), (client, source_port, destination_port));
JUCE_DECL_JACK_FUNCTION (const char*, jack_port_name, (const jack_port_t* port), (port));
JUCE_DECL_JACK_FUNCTION (void*, jack_set_port_connect_callback, (jack_client_t* client, JackPortConnectCallback connect_callback, void* arg), (client, connect_callback, arg));
JUCE_DECL_JACK_FUNCTION (jack_port_t* , jack_port_by_id, (jack_client_t* client, jack_port_id_t port_id), (client, port_id));
JUCE_DECL_JACK_FUNCTION (int, jack_port_connected, (const jack_port_t* port), (port));
JUCE_DECL_JACK_FUNCTION (int, jack_port_connected_to, (const jack_port_t* port, const char* port_name), (port, port_name));

#if JUCE_DEBUG
 #define JACK_LOGGING_ENABLED 1
#endif

#if JACK_LOGGING_ENABLED
namespace
{
    void jack_Log (const String& s)
    {
        std::cerr << s << std::endl;
    }

    const char* getJackErrorMessage (const jack_status_t status)
    {
        if (status & JackServerFailed
             || status & JackServerError)   return "Unable to connect to JACK server";
        if (status & JackVersionError)      return "Client's protocol version does not match";
        if (status & JackInvalidOption)     return "The operation contained an invalid or unsupported option";
        if (status & JackNameNotUnique)     return "The desired client name was not unique";
        if (status & JackNoSuchClient)      return "Requested client does not exist";
        if (status & JackInitFailure)       return "Unable to initialize client";
        return nullptr;
    }
}
 #define JUCE_JACK_LOG_STATUS(x)    { if (const char* m = getJackErrorMessage (x)) jack_Log (m); }
 #define JUCE_JACK_LOG(x)           jack_Log(x)
#else
 #define JUCE_JACK_LOG_STATUS(x)    {}
 #define JUCE_JACK_LOG(x)           {}
#endif

//==============================================================================
#ifndef JUCE_JACK_CLIENT_NAME
 #define JUCE_JACK_CLIENT_NAME "JUCEJack"
#endif

struct JackPortIterator
{
    JackPortIterator (jack_client_t* const client, const bool forInput)
        : ports (nullptr), index (-1)
    {
        if (client != nullptr)
            ports = juce::jack_get_ports (client, nullptr, nullptr,
                                          forInput ? JackPortIsOutput : JackPortIsInput);
                                            // (NB: This looks like it's the wrong way round, but it is correct!)
    }

    ~JackPortIterator()
    {
        ::free (ports);
    }

    bool next()
    {
        if (ports == nullptr || ports [index + 1] == nullptr)
            return false;

        name = CharPointer_UTF8 (ports[++index]);
        clientName = name.upToFirstOccurrenceOf (":", false, false);
        return true;
    }

    const char** ports;
    int index;
    String name;
    String clientName;
};

class JackAudioIODeviceType;
static Array<JackAudioIODeviceType*> activeDeviceTypes;

//==============================================================================
class JackAudioIODevice   : public AudioIODevice
{
public:
    JackAudioIODevice (const String& deviceName,
                       const String& inId,
                       const String& outId)
        : AudioIODevice (deviceName, "JACK"),
          inputId (inId),
          outputId (outId),
          deviceIsOpen (false),
          callback (nullptr),
          totalNumberOfInputChannels (0),
          totalNumberOfOutputChannels (0)
    {
        jassert (deviceName.isNotEmpty());

        jack_status_t status;
        client = juce::jack_client_open (JUCE_JACK_CLIENT_NAME, JackNoStartServer, &status);

        if (client == nullptr)
        {
            JUCE_JACK_LOG_STATUS (status);
        }
        else
        {
            juce::jack_set_error_function (errorCallback);

            // open input ports
            const StringArray inputChannels (getInputChannelNames());
            for (int i = 0; i < inputChannels.size(); ++i)
            {
                String inputName;
                inputName << "in_" << ++totalNumberOfInputChannels;

                inputPorts.add (juce::jack_port_register (client, inputName.toUTF8(),
                                                          JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0));
            }

            // open output ports
            const StringArray outputChannels (getOutputChannelNames());
            for (int i = 0; i < outputChannels.size (); ++i)
            {
                String outputName;
                outputName << "out_" << ++totalNumberOfOutputChannels;

                outputPorts.add (juce::jack_port_register (client, outputName.toUTF8(),
                                                           JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0));
            }

            inChans.calloc (totalNumberOfInputChannels + 2);
            outChans.calloc (totalNumberOfOutputChannels + 2);
        }
    }

    ~JackAudioIODevice()
    {
        close();
        if (client != nullptr)
        {
            juce::jack_client_close (client);
            client = nullptr;
        }
    }

    StringArray getChannelNames (bool forInput) const
    {
        StringArray names;

        for (JackPortIterator i (client, forInput); i.next();)
            if (i.clientName == getName())
                names.add (i.name.fromFirstOccurrenceOf (":", false, false));

        return names;
    }

    StringArray getOutputChannelNames() override         { return getChannelNames (false); }
    StringArray getInputChannelNames() override          { return getChannelNames (true); }

    Array<double> getAvailableSampleRates() override
    {
        Array<double> rates;

        if (client != nullptr)
            rates.add (juce::jack_get_sample_rate (client));

        return rates;
    }

    Array<int> getAvailableBufferSizes() override
    {
        Array<int> sizes;

        if (client != nullptr)
            sizes.add (juce::jack_get_buffer_size (client));

        return sizes;
    }

    int getDefaultBufferSize() override             { return getCurrentBufferSizeSamples(); }
    int getCurrentBufferSizeSamples() override      { return client != nullptr ? juce::jack_get_buffer_size (client) : 0; }
    double getCurrentSampleRate() override          { return client != nullptr ? juce::jack_get_sample_rate (client) : 0; }

    String open (const BigInteger& inputChannels, const BigInteger& outputChannels,
                 double /* sampleRate */, int /* bufferSizeSamples */) override
    {
        if (client == nullptr)
        {
            lastError = "No JACK client running";
            return lastError;
        }

        lastError.clear();
        close();

        juce::jack_set_process_callback (client, processCallback, this);
        juce::jack_set_port_connect_callback (client, portConnectCallback, this);
        juce::jack_on_shutdown (client, shutdownCallback, this);
        juce::jack_activate (client);
        deviceIsOpen = true;

        if (! inputChannels.isZero())
        {
            for (JackPortIterator i (client, true); i.next();)
            {
                if (inputChannels [i.index] && i.clientName == getName())
                {
                    int error = juce::jack_connect (client, i.ports[i.index], juce::jack_port_name ((jack_port_t*) inputPorts[i.index]));
                    if (error != 0)
                        JUCE_JACK_LOG ("Cannot connect input port " + String (i.index) + " (" + i.name + "), error " + String (error));
                }
            }
        }

        if (! outputChannels.isZero())
        {
            for (JackPortIterator i (client, false); i.next();)
            {
                if (outputChannels [i.index] && i.clientName == getName())
                {
                    int error = juce::jack_connect (client, juce::jack_port_name ((jack_port_t*) outputPorts[i.index]), i.ports[i.index]);
                    if (error != 0)
                        JUCE_JACK_LOG ("Cannot connect output port " + String (i.index) + " (" + i.name + "), error " + String (error));
                }
            }
        }

        return lastError;
    }

    void close() override
    {
        stop();

        if (client != nullptr)
        {
            juce::jack_deactivate (client);
            juce::jack_set_process_callback (client, processCallback, nullptr);
            juce::jack_set_port_connect_callback (client, portConnectCallback, nullptr);
            juce::jack_on_shutdown (client, shutdownCallback, nullptr);
        }

        deviceIsOpen = false;
    }

    void start (AudioIODeviceCallback* newCallback) override
    {
        if (deviceIsOpen && newCallback != callback)
        {
            if (newCallback != nullptr)
                newCallback->audioDeviceAboutToStart (this);

            AudioIODeviceCallback* const oldCallback = callback;

            {
                const ScopedLock sl (callbackLock);
                callback = newCallback;
            }

            if (oldCallback != nullptr)
                oldCallback->audioDeviceStopped();
        }
    }

    void stop() override
    {
        start (nullptr);
    }

    bool isOpen() override                           { return deviceIsOpen; }
    bool isPlaying() override                        { return callback != nullptr; }
    int getCurrentBitDepth() override                { return 32; }
    String getLastError() override                   { return lastError; }

    BigInteger getActiveOutputChannels() const override  { return activeOutputChannels; }
    BigInteger getActiveInputChannels()  const override  { return activeInputChannels;  }

    int getOutputLatencyInSamples() override
    {
        int latency = 0;

        for (int i = 0; i < outputPorts.size(); i++)
            latency = jmax (latency, (int) juce::jack_port_get_total_latency (client, (jack_port_t*) outputPorts [i]));

        return latency;
    }

    int getInputLatencyInSamples() override
    {
        int latency = 0;

        for (int i = 0; i < inputPorts.size(); i++)
            latency = jmax (latency, (int) juce::jack_port_get_total_latency (client, (jack_port_t*) inputPorts [i]));

        return latency;
    }

    String inputId, outputId;

private:
    void process (const int numSamples)
    {
        int numActiveInChans = 0, numActiveOutChans = 0;

        for (int i = 0; i < totalNumberOfInputChannels; ++i)
        {
            if (activeInputChannels[i])
                if (jack_default_audio_sample_t* in
                        = (jack_default_audio_sample_t*) juce::jack_port_get_buffer ((jack_port_t*) inputPorts.getUnchecked(i), numSamples))
                    inChans [numActiveInChans++] = (float*) in;
        }

        for (int i = 0; i < totalNumberOfOutputChannels; ++i)
        {
            if (activeOutputChannels[i])
                if (jack_default_audio_sample_t* out
                        = (jack_default_audio_sample_t*) juce::jack_port_get_buffer ((jack_port_t*) outputPorts.getUnchecked(i), numSamples))
                    outChans [numActiveOutChans++] = (float*) out;
        }

        const ScopedLock sl (callbackLock);

        if (callback != nullptr)
        {
            if ((numActiveInChans + numActiveOutChans) > 0)
                callback->audioDeviceIOCallback (const_cast <const float**> (inChans.getData()), numActiveInChans,
                                                 outChans, numActiveOutChans, numSamples);
        }
        else
        {
            for (int i = 0; i < numActiveOutChans; ++i)
                zeromem (outChans[i], sizeof (float) * numSamples);
        }
    }

    static int processCallback (jack_nframes_t nframes, void* callbackArgument)
    {
        if (callbackArgument != nullptr)
            ((JackAudioIODevice*) callbackArgument)->process (nframes);

        return 0;
    }

    void updateActivePorts()
    {
        BigInteger newOutputChannels, newInputChannels;

        for (int i = 0; i < outputPorts.size(); ++i)
            if (juce::jack_port_connected ((jack_port_t*) outputPorts.getUnchecked(i)))
                newOutputChannels.setBit (i);

        for (int i = 0; i < inputPorts.size(); ++i)
            if (juce::jack_port_connected ((jack_port_t*) inputPorts.getUnchecked(i)))
                newInputChannels.setBit (i);

        if (newOutputChannels != activeOutputChannels
             || newInputChannels != activeInputChannels)
        {
            AudioIODeviceCallback* const oldCallback = callback;

            stop();

            activeOutputChannels = newOutputChannels;
            activeInputChannels  = newInputChannels;

            if (oldCallback != nullptr)
                start (oldCallback);

            sendDeviceChangedCallback();
        }
    }

    static void portConnectCallback (jack_port_id_t, jack_port_id_t, int, void* arg)
    {
        if (JackAudioIODevice* device = static_cast <JackAudioIODevice*> (arg))
            device->updateActivePorts();
    }

    static void threadInitCallback (void* /* callbackArgument */)
    {
        JUCE_JACK_LOG ("JackAudioIODevice::initialise");
    }

    static void shutdownCallback (void* callbackArgument)
    {
        JUCE_JACK_LOG ("JackAudioIODevice::shutdown");

        if (JackAudioIODevice* device = (JackAudioIODevice*) callbackArgument)
        {
            device->client = nullptr;
            device->close();
        }
    }

    static void errorCallback (const char* msg)
    {
        JUCE_JACK_LOG ("JackAudioIODevice::errorCallback " + String (msg));
    }

    static void sendDeviceChangedCallback();

    bool deviceIsOpen;
    jack_client_t* client;
    String lastError;
    AudioIODeviceCallback* callback;
    CriticalSection callbackLock;

    HeapBlock <float*> inChans, outChans;
    int totalNumberOfInputChannels;
    int totalNumberOfOutputChannels;
    Array<void*> inputPorts, outputPorts;
    BigInteger activeInputChannels, activeOutputChannels;
};

//==============================================================================
class JackAudioIODeviceType  : public AudioIODeviceType
{
public:
    JackAudioIODeviceType()
        : AudioIODeviceType ("JACK"),
          hasScanned (false)
    {
        activeDeviceTypes.add (this);
    }

    ~JackAudioIODeviceType()
    {
        activeDeviceTypes.removeFirstMatchingValue (this);
    }

    void scanForDevices()
    {
        hasScanned = true;
        inputNames.clear();
        inputIds.clear();
        outputNames.clear();
        outputIds.clear();

        if (juce_libjackHandle == nullptr)  juce_libjackHandle = dlopen ("libjack.so.0", RTLD_LAZY);
        if (juce_libjackHandle == nullptr)  juce_libjackHandle = dlopen ("libjack.so",   RTLD_LAZY);
        if (juce_libjackHandle == nullptr)  return;

        jack_status_t status;

        // open a dummy client
        if (jack_client_t* const client = juce::jack_client_open ("JuceJackDummy", JackNoStartServer, &status))
        {
            // scan for output devices
            for (JackPortIterator i (client, false); i.next();)
            {
                if (i.clientName != (JUCE_JACK_CLIENT_NAME) && ! inputNames.contains (i.clientName))
                {
                    inputNames.add (i.clientName);
                    inputIds.add (i.ports [i.index]);
                }
            }

            // scan for input devices
            for (JackPortIterator i (client, true); i.next();)
            {
                if (i.clientName != (JUCE_JACK_CLIENT_NAME) && ! outputNames.contains (i.clientName))
                {
                    outputNames.add (i.clientName);
                    outputIds.add (i.ports [i.index]);
                }
            }

            juce::jack_client_close (client);
        }
        else
        {
            JUCE_JACK_LOG_STATUS (status);
        }
    }

    StringArray getDeviceNames (bool wantInputNames) const
    {
        jassert (hasScanned); // need to call scanForDevices() before doing this
        return wantInputNames ? inputNames : outputNames;
    }

    int getDefaultDeviceIndex (bool /* forInput */) const
    {
        jassert (hasScanned); // need to call scanForDevices() before doing this
        return 0;
    }

    bool hasSeparateInputsAndOutputs() const    { return true; }

    int getIndexOfDevice (AudioIODevice* device, bool asInput) const
    {
        jassert (hasScanned); // need to call scanForDevices() before doing this

        if (JackAudioIODevice* d = dynamic_cast <JackAudioIODevice*> (device))
            return asInput ? inputIds.indexOf (d->inputId)
                           : outputIds.indexOf (d->outputId);

        return -1;
    }

    AudioIODevice* createDevice (const String& outputDeviceName,
                                 const String& inputDeviceName)
    {
        jassert (hasScanned); // need to call scanForDevices() before doing this

        const int inputIndex = inputNames.indexOf (inputDeviceName);
        const int outputIndex = outputNames.indexOf (outputDeviceName);

        if (inputIndex >= 0 || outputIndex >= 0)
            return new JackAudioIODevice (outputIndex >= 0 ? outputDeviceName
                                                           : inputDeviceName,
                                          inputIds [inputIndex],
                                          outputIds [outputIndex]);

        return nullptr;
    }

    void portConnectionChange()    { callDeviceChangeListeners(); }

private:
    StringArray inputNames, outputNames, inputIds, outputIds;
    bool hasScanned;

    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JackAudioIODeviceType)
};

void JackAudioIODevice::sendDeviceChangedCallback()
{
    for (int i = activeDeviceTypes.size(); --i >= 0;)
        if (JackAudioIODeviceType* d = activeDeviceTypes[i])
            d->portConnectionChange();
}

//==============================================================================
AudioIODeviceType* AudioIODeviceType::createAudioIODeviceType_JACK()
{
    return new JackAudioIODeviceType();
}


text:
package com.azure.cosmos.implementation.directconnectivity;

import com.azure.cosmos.implementation.DiagnosticsClientContext;
import com.azure.cosmos.implementation.GoneException;
import com.azure.cosmos.implementation.RxDocumentServiceRequest;
import com.azure.cosmos.implementation.guava25.collect.ImmutableList;
import org.mockito.ArgumentMatchers;
import org.mockito.Mockito;
import org.testng.annotations.Test;
import reactor.core.publisher.Mono;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

import static com.azure.cosmos.implementation.TestUtils.mockDiagnosticsClientContext;
import static com.azure.cosmos.implementation.TestUtils.mockDocumentServiceRequest;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;

public class AddressSelectorTest {
    private final static DiagnosticsClientContext clientContext = mockDiagnosticsClientContext();

    @Test(groups = "unit", expectedExceptions = GoneException.class)
    public void getPrimaryUri_NoAddress() throws Exception {
        RxDocumentServiceRequest request = mockDocumentServiceRequest(clientContext);
        Mockito.doReturn(null).when(request).getDefaultReplicaIndex();
        List<AddressInformation>  replicaAddresses = new ArrayList<>();

        AddressSelector.getPrimaryUri(request, replicaAddresses);
    }

    @Test(groups = "unit", expectedExceptions = GoneException.class, expectedExceptionsMessageRegExp =
        ".*\"innerErrorMessage\":\"The requested resource is no longer available at the server. Returned addresses are .*https://cosmos1/,https://cosmos2/}.*")
    public void getPrimaryUri_NoPrimaryAddress() throws Exception {
        RxDocumentServiceRequest request = mockDocumentServiceRequest(clientContext);
        Mockito.doReturn(null).when(request).getDefaultReplicaIndex();

        List<AddressInformation>  replicaAddresses = new ArrayList<>();

        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos1", Protocol.HTTPS));
        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos2", Protocol.HTTPS));

        AddressSelector.getPrimaryUri(request, replicaAddresses);
    }

    @Test(groups = "unit")
    public void getPrimaryUri() throws Exception {
        RxDocumentServiceRequest request = mockDocumentServiceRequest(clientContext);
        Mockito.doReturn(null).when(request).getDefaultReplicaIndex();

        List<AddressInformation>  replicaAddresses = new ArrayList<>();

        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos1", Protocol.HTTPS));
        replicaAddresses.add(new AddressInformation(true, true, "https://cosmos2", Protocol.HTTPS));
        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos3", Protocol.HTTPS));

        Uri res = AddressSelector.getPrimaryUri(request, replicaAddresses);

        assertThat(res).isEqualTo(Uri.create("https://cosmos2/"));
    }

    @Test(groups = "unit")
    public void getPrimaryUri_WithRequestReplicaIndex() throws Exception {
        RxDocumentServiceRequest request = mockDocumentServiceRequest(clientContext);
        Mockito.doReturn(1).when(request).getDefaultReplicaIndex();

        List<AddressInformation>  replicaAddresses = new ArrayList<>();

        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos1", Protocol.HTTPS));
        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos2", Protocol.HTTPS));
        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos3", Protocol.HTTPS));

        Uri res = AddressSelector.getPrimaryUri(request, replicaAddresses);

        assertThat(res).isEqualTo(Uri.create("https://cosmos2/"));
    }

    @Test(groups = "unit")
    public void resolvePrimaryUriAsync() {
        IAddressResolver addressResolver = Mockito.mock(IAddressResolver.class);
        AddressSelector selector = new AddressSelector(addressResolver, Protocol.HTTPS);

        RxDocumentServiceRequest request = mockDocumentServiceRequest(clientContext);
        Mockito.doReturn(null).when(request).getDefaultReplicaIndex();

        List<AddressInformation>  replicaAddresses = new ArrayList<>();

        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos4", Protocol.TCP));
        replicaAddresses.add(new AddressInformation(true, true, "https://cosmos5", Protocol.TCP));
        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos1", Protocol.HTTPS));
        replicaAddresses.add(new AddressInformation(true, true, "https://cosmos2", Protocol.HTTPS));
        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos3", Protocol.HTTPS));

        Mockito.doReturn(Mono.just(replicaAddresses.toArray(new AddressInformation[0]))).when(addressResolver).resolveAsync(Mockito.any(RxDocumentServiceRequest.class), ArgumentMatchers.eq(false));

        Uri res = selector.resolvePrimaryUriAsync(request, false).block();

        assertThat(res).isEqualTo(Uri.create("https://cosmos2/"));
    }

    @Test(groups = "unit")
    public void resolveAllUriAsync() {
        IAddressResolver addressResolver = Mockito.mock(IAddressResolver.class);
        AddressSelector selector = new AddressSelector(addressResolver, Protocol.HTTPS);

        RxDocumentServiceRequest request = mockDocumentServiceRequest(clientContext);
        Mockito.doReturn(null).when(request).getDefaultReplicaIndex();

        List<AddressInformation>  replicaAddresses = new ArrayList<>();

        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos4", Protocol.TCP));
        replicaAddresses.add(new AddressInformation(true, true, "https://cosmos5", Protocol.TCP));
        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos1", Protocol.HTTPS));
        replicaAddresses.add(new AddressInformation(true, true, "https://cosmos2", Protocol.HTTPS));
        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos3", Protocol.HTTPS));

        Mockito.doReturn(Mono.just(replicaAddresses.toArray(new AddressInformation[0])))
               .when(addressResolver)
               .resolveAsync(Mockito.any(RxDocumentServiceRequest.class), ArgumentMatchers.eq(false));

        List<Uri> res = selector.resolveAllUriAsync(request, true, false).block();

        assertThat(res).isEqualTo(ImmutableList.of(Uri.create("https://cosmos1/"), Uri.create("https://cosmos2/"), Uri.create("https://cosmos3/")));
    }

    @Test(groups = "unit")
    public void resolveAddressesAsync() {
        IAddressResolver addressResolver = Mockito.mock(IAddressResolver.class);
        AddressSelector selector = new AddressSelector(addressResolver, Protocol.HTTPS);

        RxDocumentServiceRequest request = mockDocumentServiceRequest(clientContext);
        Mockito.doReturn(null).when(request).getDefaultReplicaIndex();

        List<AddressInformation>  replicaAddresses = new ArrayList<>();

        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos4", Protocol.TCP));
        replicaAddresses.add(new AddressInformation(true, true, "https://cosmos5", Protocol.TCP));
        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos1", Protocol.HTTPS));
        replicaAddresses.add(new AddressInformation(true, true, "https://cosmos2", Protocol.HTTPS));
        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos3", Protocol.HTTPS));

        Mockito.doReturn(Mono.just(replicaAddresses.toArray(new AddressInformation[0])))
               .when(addressResolver)
               .resolveAsync(Mockito.any(RxDocumentServiceRequest.class), ArgumentMatchers.eq(false));

        List<AddressInformation> res = selector.resolveAddressesAsync(request, false).block();

        assertThat(res).isEqualTo(replicaAddresses.stream().filter(a -> a.getProtocolName().equalsIgnoreCase(Protocol.HTTPS.toString())).collect(Collectors.toList()));
    }

    @Test(groups = "unit")
    public void resolveAllUriAsync_RNTBD() {
        IAddressResolver addressResolver = Mockito.mock(IAddressResolver.class);
        AddressSelector selector = new AddressSelector(addressResolver, Protocol.TCP);

        RxDocumentServiceRequest request = mockDocumentServiceRequest(clientContext);
        Mockito.doReturn(null).when(request).getDefaultReplicaIndex();

        List<AddressInformation>  replicaAddresses = new ArrayList<>();

        replicaAddresses.add(new AddressInformation(true, false, "rntbd://cosmos1", Protocol.TCP));
        replicaAddresses.add(new AddressInformation(true, true, "rntbd://cosmos2", Protocol.TCP));
        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos1", Protocol.HTTPS));
        replicaAddresses.add(new AddressInformation(true, true, "https://cosmos2", Protocol.HTTPS));
        replicaAddresses.add(new AddressInformation(true, false, "https://cosmos3", Protocol.HTTPS));

        Mockito.doReturn(Mono.just(replicaAddresses.toArray(new AddressInformation[0])))
               .when(addressResolver).resolveAsync(Mockito.any(RxDocumentServiceRequest.class), ArgumentMatchers.eq(false));

        List<Uri> res = selector.resolveAllUriAsync(request, true, false).block();

        assertThat(res).isEqualTo(ImmutableList.of(Uri.create("rntbd://cosmos1/"), Uri.create("rntbd://cosmos2/")));
    }

}


text:
package io.leangen.graphql.metadata;

import io.leangen.graphql.util.ClassUtils;
import io.leangen.graphql.util.Utils;

import java.lang.reflect.AnnotatedType;
import java.util.Objects;
import java.util.stream.Collectors;

public class InputField {

    private final String name;
    private final String description;
    private final TypedElement typedElement;
    private final AnnotatedType deserializableType;
    private final DefaultValue defaultValue;

    public InputField(String name, String description, TypedElement element, AnnotatedType deserializableType, DefaultValue defaultValue) {
        this.name = Utils.requireNonEmpty(name);
        this.description = description;
        this.typedElement = Objects.requireNonNull(element);
        this.deserializableType = deserializableType != null ? deserializableType : element.getJavaType();
        this.defaultValue = Objects.requireNonNull(defaultValue);
    }

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }

    public AnnotatedType getJavaType() {
        return typedElement.getJavaType();
    }

    public AnnotatedType getDeserializableType() {
        return deserializableType;
    }

    public DefaultValue getDefaultValue() {
        return defaultValue;
    }

    public TypedElement getTypedElement() {
        return typedElement;
    }

    @Override
    public String toString() {
        return String.format("Input field '%s' of type %s bound to [%s]", name, ClassUtils.toString(getJavaType()),
                typedElement.getElements().stream().map(ClassUtils::toString).collect(Collectors.joining()));
    }
}


text:
package com.ninjas.tnpresidential.resources.core;

import com.ninjas.tnpresidential.MainConfiguration;
import org.springframework.beans.factory.annotation.Autowired;

import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import java.util.Locale;

/**
 * @author ayassinov on 03/10/2014.
 */
public class BaseResource {

    /**
     * Jersey creates a fresh resource every request so this is safe
     */
    @Context
    protected UriInfo uriInfo;
    /**
     * Jersey creates a fresh resource every request so this is safe
     */
    @Context
    protected HttpHeaders httpHeaders;

    @Autowired
    protected MainConfiguration configuration;

    /**
     * @return The most appropriate locale for the upstream request (never null)
     */
    public Locale getLocale() {
    	// TODO : This should be a configuration setting
        Locale defaultLocale = Locale.UK;
        Locale locale;
        if (httpHeaders == null) {
            locale = defaultLocale;
        } else {
            locale = httpHeaders.getLanguage();
            if (locale == null) {
                locale = defaultLocale;
            }
        }
        return locale;
    }

    /**
     * @return A suitable exception to represent NOT_FOUND
     */
    protected WebApplicationException notFound() {
        return new WebApplicationException(Response.Status.NOT_FOUND);
    }

    /**
     * @return A suitable exception to represent BAD_REQUEST
     */
    protected WebApplicationException badRequest() {
        return new WebApplicationException(Response.Status.BAD_REQUEST);
    }

}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Tricholoma pseudoargyraceum Velen.

### Remarks
null


text:
var express = require('express');

var accountController = require('../controllers/account');

// Create our Express router
var router = express.Router();

function isLoggedIn(req, res, next) {
	if (req.isAuthenticated())
		return next();

	res.redirect('/');
}

// Create endpoint handlers for /accounts for get autenticated user

router.route('/accounts')
  .get(isLoggedIn, accountController.getAccounts);
  //.post(isLoggedIn, usersController.postAccount)
  //.put(isLoggedIn, usersController.putAccount);

router.route('/accounts/users')
  .get(isLoggedIn, accountController.getUsersAccount);

router.route('/accounts/:id')
  .get(isLoggedIn, accountController.getAccount)
  .delete(isLoggedIn, accountController.deleteAccount);

module.exports = router;


text:
package online.zhaopei.myproject.resource;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * Created by zhaopei on 17/11/9.
 */
@ApiModel(description = "检查身份信息是否一致回执类")
public class PersonalResource {

    private String checkFlag;

    private String info;

    @ApiModelProperty(value = "检查标志,0:不一致,1:一致,2:异常", required = true)
    public String getCheckFlag() {
        return checkFlag;
    }

    public void setCheckFlag(String checkFlag) {
        this.checkFlag = checkFlag;
    }

    @ApiModelProperty(value = "信息说明", required = true)
    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }
}


text:
package opensesim.chart;

import opensesim.old_sesim.ChartDef;
import opensesim.chart.painter.CandleStickChartPainter;
import opensesim.chart.painter.ChartPainter;
import opensesim.chart.painter.XLegendPainter;
import opensesim.chart.painter.ChartCrossPainter;
import opensesim.chart.painter.LineChartPainter;
import opensesim.chart.painter.OHLCChartPainter;
import opensesim.chart.painter.YLegendPainter;
import opensesim.gui.Globals;
import java.util.ArrayList;
import opensesim.old_sesim.Exchange.QuoteReceiver;
import opensesim.old_sesim.Indicator;
import opensesim.old_sesim.MinMax;
import opensesim.old_sesim.OHLCData;
import opensesim.old_sesim.OHLCDataItem;
import opensesim.old_sesim.Quote;
import opensesim.indicators.SMAIndicator;
import java.util.Objects;
import javax.swing.ButtonGroup;
import javax.swing.JRadioButtonMenuItem;
import org.json.JSONObject;

/**
 *
 * @author 7u83 <7u83@mail.ru>
 */
public class MasterChart extends javax.swing.JPanel implements QuoteReceiver {

    private ChartDef chartDef;

    class CompressionVal {

        public final String text;
        public final Integer value;

        CompressionVal(String text, Integer val) {
            this.text = text;
            this.value = val;
        }
    }

    private final CompressionVal cvalues[] = {
        new CompressionVal("5 s", 5 * 1000),
        new CompressionVal("10 s", 10 * 1000),
        new CompressionVal("15 s", 15 * 1000),
        new CompressionVal("30 s", 30 * 1000),
        new CompressionVal("1 m", 1 * 60 * 1000),
        new CompressionVal("2 m", 2 * 60 * 1000),
        new CompressionVal("5 m", 5 * 60 * 1000),
        new CompressionVal("10 m", 10 * 60 * 1000),
        new CompressionVal("1 h", 1 * 3660 * 1000),
        new CompressionVal("2 h", 2 * 3660 * 1000),
        new CompressionVal("4 h", 4 * 3660 * 1000),
        new CompressionVal("1 d", 1 * 24 * 3660 * 1000),
        new CompressionVal("2 d", 2 * 24 * 3660 * 1000),
        new CompressionVal("3 d", 3 * 3660 * 1000),};

    private void initCtxMenu() {
        ButtonGroup group = new ButtonGroup();
        for (int i = 0; i < this.cvalues.length; i++) {
            JRadioButtonMenuItem item = new JRadioButtonMenuItem(this.cvalues[i].text);

        }
    }

    SMAIndicator sma1, sma2;

    class MyOHLCData extends OHLCData {

        SMAIndicator sma;

        MyOHLCData(SMAIndicator sma) {
            this.sma = sma;
        }

        @Override
        public int size() {
            return sma.getData().size();
        }

        @Override
        public OHLCDataItem get(int n) {
            return sma.getData().get(n);
        }

        @Override
        public MinMax getMinMax(int first, int last) {
            return mydata.getMinMax(first, last);
        }

    }

    /**
     * Creates new form MasterChart
     */
    public MasterChart() {
        initComponents();

        chartDef = new ChartDef();
        chartDef.x_unit_width = 3.0;
        chartDef.mainChart=this.chart;

        if (Globals.se == null) {
            return;
        }

        Globals.se.addQuoteReceiver(this);

        this.chart.setChartDef(chartDef);
        this.xLegend.setChartDef(chartDef);
        this.yLegend.setChartDef(chartDef);

        //  this.yLegend.addChartPainter(p);
        //this.yLegend.addChartPainter(pc);
    }
    OHLCData mydata;

    public void reset() {
        this.chart.deleteAllChartPinters();
        this.xLegend.deleteAllChartPinters();
        this.yLegend.deleteAllChartPinters();

        this.chart.setChartDef(chartDef);
        this.xLegend.setChartDef(chartDef);
        this.yLegend.setChartDef(chartDef);

        OHLCChartPainter p;
        mydata = Globals.se.getOHLCdata(Globals.se.getDefaultStock(),60000*1);

        this.xScrollBar.setMaximum(0);

        p = new XLegendPainter();
        p.setOHLCData(mydata);

        xLegend.addChartPainter(p);
        xLegend.setXSCrollBar(xScrollBar);

        OHLCChartPainter pc = new CandleStickChartPainter();
        //pc.setDataProvider(this);
        pc.setOHLCData(mydata);

        chart.addChartPainter(pc);
        chart.setXSCrollBar(xScrollBar);
        chart.addChartPainter(new ChartCrossPainter());

        sma1 = new opensesim.indicators.SMAIndicator();
        sma1.setParent(mydata);

        JSONObject co;
        co = new JSONObject("{\"len\": 60}");
        sma1.putConfig(co);
        MyOHLCData mysma1;
        mysma1 = new MyOHLCData(sma1);
        p = new LineChartPainter();
        p.setOHLCData(mysma1);

        chart.addChartPainter(p);

        sma2 = new opensesim.indicators.SMAIndicator();
        sma2.setParent(mydata);
        co = new JSONObject("{\"len\": 20}");
        sma2.putConfig(co);
        MyOHLCData mysma2;
        mysma2 = new MyOHLCData(sma2);
        p = new LineChartPainter();
        p.setOHLCData(mysma2);
        chart.addChartPainter(p);

        OHLCChartPainter yp = new YLegendPainter(/*chart*/);
//        yp.setDataProvider(this);
        yp.setOHLCData(mydata);

        this.yLegend.addChartPainter(yp);

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        ctxMenu = new javax.swing.JPopupMenu();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        chart = new opensesim.old_sesim.ChartPanel();
        yLegend = new opensesim.old_sesim.ChartPanel();
        xLegend = new opensesim.old_sesim.ChartPanel();
        xScrollBar = new javax.swing.JScrollBar();

        jMenu1.setText("jMenu1");
        ctxMenu.add(jMenu1);

        jMenuItem1.setText("jMenuItem1");
        ctxMenu.add(jMenuItem1);

        addMouseWheelListener(new java.awt.event.MouseWheelListener() {
            public void mouseWheelMoved(java.awt.event.MouseWheelEvent evt) {
                formMouseWheelMoved(evt);
            }
        });
        addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                formMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                formMouseReleased(evt);
            }
        });

        chart.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));
        chart.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                chartMouseMoved(evt);
            }
        });
        chart.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                chartMousePressed(evt);
            }
        });

        javax.swing.GroupLayout chartLayout = new javax.swing.GroupLayout(chart);
        chart.setLayout(chartLayout);
        chartLayout.setHorizontalGroup(
            chartLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        chartLayout.setVerticalGroup(
            chartLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 317, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout yLegendLayout = new javax.swing.GroupLayout(yLegend);
        yLegend.setLayout(yLegendLayout);
        yLegendLayout.setHorizontalGroup(
            yLegendLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 95, Short.MAX_VALUE)
        );
        yLegendLayout.setVerticalGroup(
            yLegendLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        xLegend.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout xLegendLayout = new javax.swing.GroupLayout(xLegend);
        xLegend.setLayout(xLegendLayout);
        xLegendLayout.setHorizontalGroup(
            xLegendLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 561, Short.MAX_VALUE)
        );
        xLegendLayout.setVerticalGroup(
            xLegendLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 37, Short.MAX_VALUE)
        );

        xScrollBar.setOrientation(javax.swing.JScrollBar.HORIZONTAL);
        xScrollBar.addAdjustmentListener(new java.awt.event.AdjustmentListener() {
            public void adjustmentValueChanged(java.awt.event.AdjustmentEvent evt) {
                xScrollBarAdjustmentValueChanged(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(xLegend, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(chart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(yLegend, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addComponent(xScrollBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(chart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(yLegend, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(xLegend, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(xScrollBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void xScrollBarAdjustmentValueChanged(java.awt.event.AdjustmentEvent evt) {//GEN-FIRST:event_xScrollBarAdjustmentValueChanged
        repaint();
    }//GEN-LAST:event_xScrollBarAdjustmentValueChanged

    private void showCtxMenu(java.awt.event.MouseEvent evt) {

        this.ctxMenu.setVisible(true);
        this.ctxMenu.show(this, evt.getX(), evt.getY());

        invalidate();
        repaint();
    }

    private void formMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMousePressed
        if (!evt.isPopupTrigger()) {
            return;
        }
        System.out.printf("ctx menu pressed\n");
        showCtxMenu(evt);
    }//GEN-LAST:event_formMousePressed

    private void formMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMouseReleased
        formMousePressed(evt);
    }//GEN-LAST:event_formMouseReleased

    private void formMouseWheelMoved(java.awt.event.MouseWheelEvent evt) {//GEN-FIRST:event_formMouseWheelMoved
        double n = evt.getPreciseWheelRotation() * (-1.0);

        if (n < 0) {
            if (chartDef.x_unit_width > 0.3) {
                chartDef.x_unit_width += 0.1 * n;
            }
        } else {
            chartDef.x_unit_width += 0.1 * n;
        }

        this.invalidate();
        this.repaint();
    }//GEN-LAST:event_formMouseWheelMoved

    private void chartMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_chartMouseMoved

    }//GEN-LAST:event_chartMouseMoved

    private void chartMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_chartMousePressed
      //  System.out.printf("Mauspress\n");
        this.formMousePressed(evt);
    }//GEN-LAST:event_chartMousePressed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private opensesim.old_sesim.ChartPanel chart;
    private javax.swing.JPopupMenu ctxMenu;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenuItem jMenuItem1;
    private opensesim.old_sesim.ChartPanel xLegend;
    private javax.swing.JScrollBar xScrollBar;
    private opensesim.old_sesim.ChartPanel yLegend;
    // End of variables declaration//GEN-END:variables

    @Override
    public void UpdateQuote(Quote q) {
        if (sma1 != null) {
            sma1.update();
        }

        if (sma2 != null) {
            sma2.update();
        }

        int s = mydata.size();
        this.xScrollBar.setMaximum(s);
        repaint();
    }

}