text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="16f1dd19-b5b4-4b9c-841d-3fa7539fd5a9" name="Default" comment="">
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/AppBundle/Command/ApiCommand.php" afterPath="$PROJECT_DIR$/src/AppBundle/Command/ApiCommand.php" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/var/cache/dev/appDevDebugProjectContainer.php" afterPath="$PROJECT_DIR$/var/cache/dev/appDevDebugProjectContainer.php" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/var/cache/dev/appDevDebugProjectContainer.xml" afterPath="$PROJECT_DIR$/var/cache/dev/appDevDebugProjectContainer.xml" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/var/logs/dev.log" afterPath="$PROJECT_DIR$/var/logs/dev.log" />
    </list>
    <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="ComposerSettings" phpInterpreterId="bc1bb306-488d-4560-9bd5-654815ee4cef">
    <pharConfigPath>$PROJECT_DIR$/composer.json</pharConfigPath>
    <pharPath>/usr/local/bin/composer.phar</pharPath>
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FileEditorManager">
    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
      <file leaf-file-name="Posts.php" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/AppBundle/Entity/Posts.php">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="195">
              <caret line="13" column="18" lean-forward="false" selection-start-line="13" selection-start-column="18" selection-end-line="13" selection-end-column="18" />
              <folding>
                <element signature="e#36#80#0#PHP" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="ApiCommand.php" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/AppBundle/Command/ApiCommand.php">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="1114">
              <caret line="91" column="21" lean-forward="true" selection-start-line="91" selection-start-column="21" selection-end-line="91" selection-end-column="21" />
              <folding>
                <element signature="e#6#98#0#PHP" expanded="true" />
                <element signature="e#130#165#0#PHP" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="README.md" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/README.md">
          <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
            <state split_layout="SPLIT">
              <first_editor relative-caret-position="347">
                <caret line="34" column="115" lean-forward="false" selection-start-line="34" selection-start-column="115" selection-end-line="34" selection-end-column="115" />
                <folding />
              </first_editor>
              <second_editor />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="api.feature" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/features/api.feature">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="120">
              <caret line="8" column="48" lean-forward="false" selection-start-line="8" selection-start-column="48" selection-end-line="8" selection-end-column="48" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="FeatureContext.php" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/features/bootstrap/FeatureContext.php">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="164">
              <caret line="18" column="38" lean-forward="false" selection-start-line="18" selection-start-column="38" selection-end-line="18" selection-end-column="38" />
              <folding>
                <element signature="e#7#55#0#PHP" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="FindInProjectRecents">
    <findStrings>
      <find># features/books.feature</find>
      <find>features/books.feature</find>
      <find>format</find>
      <find>features</find>
      <find>Sanpi\Behatch\Extension</find>
      <find>Sanpi\</find>
      <find>FeatureContext</find>
      <find>kerne</find>
      <find>Sanpi\Behatch\Context\JsonContext</find>
      <find>MinkContext</find>
      <find>Symfony2Extension</find>
    </findStrings>
    <replaceStrings>
      <replace />
    </replaceStrings>
  </component>
  <component name="Git.Settings">
    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
  </component>
  <component name="IdeDocumentHistory">
    <option name="CHANGED_PATHS">
      <list>
        <option value="$PROJECT_DIR$/src/AppBundle/Command/Api.php" />
        <option value="$PROJECT_DIR$/src/AppBundle/Entity/ViedemerdeRepository.php" />
        <option value="$PROJECT_DIR$/src/AppBundle/Entity/Viedemerde.php" />
        <option value="$PROJECT_DIR$/app/config/routing.yml" />
        <option value="$PROJECT_DIR$/src/AppBundle/Filter/RegexpFilter.php" />
        <option value="$PROJECT_DIR$/app/config/services.yml" />
        <option value="$PROJECT_DIR$/src/AppBundle/Entity/Posts.php" />
        <option value="$PROJECT_DIR$/tests/AppBundle/hello.feature" />
        <option value="$PROJECT_DIR$/composer.json" />
        <option value="$PROJECT_DIR$/composer.lock" />
        <option value="$PROJECT_DIR$/feature/bootstrap/FeatureContext.php" />
        <option value="$PROJECT_DIR$/behat.yml.dist" />
        <option value="$PROJECT_DIR$/feature/hello.feature" />
        <option value="$PROJECT_DIR$/vendor/behat/behat/features/bootstrap/FeatureContext.php" />
        <option value="$PROJECT_DIR$/behat.yml" />
        <option value="$PROJECT_DIR$/features/hello.feature" />
        <option value="$PROJECT_DIR$/features/bootstrap/FeatureContext.php" />
        <option value="$PROJECT_DIR$/features/api.feature" />
        <option value="$PROJECT_DIR$/src/AppBundle/Command/ApiCommand.php" />
        <option value="$PROJECT_DIR$/README.md" />
      </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="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" interpreter_name="PHP 7.1.1">
    <include_path>
      <path value="$PROJECT_DIR$/vendor/sebastian/resource-operations" />
      <path value="$PROJECT_DIR$/vendor/sebastian/recursion-context" />
      <path value="$PROJECT_DIR$/vendor/sebastian/global-state" />
      <path value="$PROJECT_DIR$/vendor/incenteev/composer-parameter-handler" />
      <path value="$PROJECT_DIR$/vendor/sebastian/exporter" />
      <path value="$PROJECT_DIR$/vendor/sebastian/object-enumerator" />
      <path value="$PROJECT_DIR$/vendor/twig/twig" />
      <path value="$PROJECT_DIR$/vendor/behatch/contexts" />
      <path value="$PROJECT_DIR$/vendor/sebastian/environment" />
      <path value="$PROJECT_DIR$/vendor/sebastian/comparator" />
      <path value="$PROJECT_DIR$/vendor/sebastian/object-reflector" />
      <path value="$PROJECT_DIR$/vendor/sebastian/version" />
      <path value="$PROJECT_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
      <path value="$PROJECT_DIR$/vendor/phpspec/prophecy" />
      <path value="$PROJECT_DIR$/vendor/phpunit/php-file-iterator" />
      <path value="$PROJECT_DIR$/vendor/phpunit/php-timer" />
      <path value="$PROJECT_DIR$/vendor/phpunit/php-text-template" />
      <path value="$PROJECT_DIR$/vendor/phpunit/php-token-stream" />
      <path value="$PROJECT_DIR$/vendor/phpunit/phpunit-mock-objects" />
      <path value="$PROJECT_DIR$/vendor/phpunit/php-code-coverage" />
      <path value="$PROJECT_DIR$/vendor/phpunit/phpunit" />
      <path value="$PROJECT_DIR$/vendor/doctrine/doctrine-cache-bundle" />
      <path value="$PROJECT_DIR$/vendor/doctrine/cache" />
      <path value="$PROJECT_DIR$/vendor/webmozart/assert" />
      <path value="$PROJECT_DIR$/vendor/doctrine/doctrine-bundle" />
      <path value="$PROJECT_DIR$/vendor/doctrine/common" />
      <path value="$PROJECT_DIR$/vendor/monolog/monolog" />
      <path value="$PROJECT_DIR$/vendor/doctrine/collections" />
      <path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-docblock" />
      <path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
      <path value="$PROJECT_DIR$/vendor/phpdocumentor/type-resolver" />
      <path value="$PROJECT_DIR$/vendor/doctrine/annotations" />
      <path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-common" />
      <path value="$PROJECT_DIR$/vendor/theseer/tokenizer" />
      <path value="$PROJECT_DIR$/vendor/doctrine/inflector" />
      <path value="$PROJECT_DIR$/vendor/doctrine/lexer" />
      <path value="$PROJECT_DIR$/vendor/nelmio/cors-bundle" />
      <path value="$PROJECT_DIR$/vendor/dunglas/action-bundle" />
      <path value="$PROJECT_DIR$/vendor/composer" />
      <path value="$PROJECT_DIR$/vendor/container-interop/container-interop" />
      <path value="$PROJECT_DIR$/vendor/behat/symfony2-extension" />
      <path value="$PROJECT_DIR$/vendor/phar-io/manifest" />
      <path value="$PROJECT_DIR$/vendor/behat/mink-extension" />
      <path value="$PROJECT_DIR$/vendor/phar-io/version" />
      <path value="$PROJECT_DIR$/vendor/behat/mink-browserkit-driver" />
      <path value="$PROJECT_DIR$/vendor/behat/transliterator" />
      <path value="$PROJECT_DIR$/vendor/behat/mink" />
      <path value="$PROJECT_DIR$/vendor/behat/gherkin" />
      <path value="$PROJECT_DIR$/vendor/willdurand/negotiation" />
      <path value="$PROJECT_DIR$/vendor/behat/behat" />
      <path value="$PROJECT_DIR$/vendor/api-platform/schema-generator" />
      <path value="$PROJECT_DIR$/vendor/doctrine/orm" />
      <path value="$PROJECT_DIR$/vendor/sensio/framework-extra-bundle" />
      <path value="$PROJECT_DIR$/vendor/sensio/distribution-bundle" />
      <path value="$PROJECT_DIR$/vendor/sensio/generator-bundle" />
      <path value="$PROJECT_DIR$/vendor/friendsofphp/php-cs-fixer" />
      <path value="$PROJECT_DIR$/vendor/doctrine/dbal" />
      <path value="$PROJECT_DIR$/vendor/justinrainbow/json-schema" />
      <path value="$PROJECT_DIR$/vendor/symfony/phpunit-bridge" />
      <path value="$PROJECT_DIR$/vendor/easyrdf/easyrdf" />
      <path value="$PROJECT_DIR$/vendor/api-platform/core" />
      <path value="$PROJECT_DIR$/vendor/league/html-to-markdown" />
      <path value="$PROJECT_DIR$/vendor/sensiolabs/security-checker" />
      <path value="$PROJECT_DIR$/vendor/psr/container" />
      <path value="$PROJECT_DIR$/vendor/psr/cache" />
      <path value="$PROJECT_DIR$/vendor/psr/log" />
      <path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-icu" />
      <path value="$PROJECT_DIR$/vendor/symfony/swiftmailer-bundle" />
      <path value="$PROJECT_DIR$/vendor/symfony/polyfill-php56" />
      <path value="$PROJECT_DIR$/vendor/symfony/polyfill-util" />
      <path value="$PROJECT_DIR$/vendor/paragonie/random_compat" />
      <path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
      <path value="$PROJECT_DIR$/vendor/symfony/monolog-bundle" />
      <path value="$PROJECT_DIR$/vendor/myclabs/deep-copy" />
      <path value="$PROJECT_DIR$/vendor/symfony/symfony" />
      <path value="$PROJECT_DIR$/vendor/symfony/polyfill-php70" />
      <path value="$PROJECT_DIR$/vendor/swiftmailer/swiftmailer" />
      <path value="$PROJECT_DIR$/vendor/jdorn/sql-formatter" />
      <path value="$PROJECT_DIR$/vendor/sebastian/diff" />
      <path value="$PROJECT_DIR$/vendor/behat/mink-selenium2-driver" />
      <path value="$PROJECT_DIR$/vendor/instaclick/php-webdriver" />
      <path value="$PROJECT_DIR$/vendor/behat/mink-goutte-driver" />
      <path value="$PROJECT_DIR$/vendor/psr/http-message" />
      <path value="$PROJECT_DIR$/vendor/fabpot/goutte" />
      <path value="$PROJECT_DIR$/vendor/guzzlehttp/guzzle" />
      <path value="$PROJECT_DIR$/vendor/guzzlehttp/psr7" />
      <path value="$PROJECT_DIR$/vendor/guzzlehttp/promises" />
    </include_path>
  </component>
  <component name="ProjectFrameBounds">
    <option name="y" value="23" />
    <option name="width" value="1440" />
    <option name="height" value="807" />
  </component>
  <component name="ProjectInspectionProfilesVisibleTreeState">
    <entry key="Project Default">
      <profile-state>
        <expanded-state>
          <State>
            <id />
          </State>
          <State>
            <id>Code style issuesJavaScript</id>
          </State>
          <State>
            <id>JavaScript</id>
          </State>
        </expanded-state>
      </profile-state>
    </entry>
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
  <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="api-viedemerde" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="api-viedemerde" />
              <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="api-viedemerde" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="api-viedemerde" />
              <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="api-viedemerde" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="api-viedemerde" />
              <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="AppBundle" />
              <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="api-viedemerde" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="api-viedemerde" />
              <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="AppBundle" />
              <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="Command" />
              <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="api-viedemerde" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="api-viedemerde" />
              <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="app" />
              <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="Scope" />
      <pane id="Scratches" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
    <property name="settings.editor.selected.configurable" value="project.propDebugger" />
  </component>
  <component name="RecentsManager">
    <key name="MoveFile.RECENT_KEYS">
      <recent name="$PROJECT_DIR$/features" />
      <recent name="$PROJECT_DIR$/tests" />
    </key>
    <key name="CopyFile.RECENT_KEYS">
      <recent name="$PROJECT_DIR$" />
      <recent name="$PROJECT_DIR$/src/AppBundle/Entity" />
    </key>
  </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="Behat.features">
    <configuration default="true" type="AppEnginePhpConfigurationType" factoryName="App Engine for PHP" session_id="">
      <method />
    </configuration>
    <configuration default="true" type="CodeceptionConfigurationType" factoryName="Codeception">
      <PhpTestRunnerSettings />
      <method />
    </configuration>
    <configuration default="true" type="JavaScriptTestRunnerJest" factoryName="Jest">
      <node-interpreter value="project" />
      <working-dir value="" />
      <envs />
      <scope-kind value="ALL" />
      <method />
    </configuration>
    <configuration default="true" type="JavaScriptTestRunnerProtractor" factoryName="Protractor">
      <config-file value="" />
      <node-interpreter value="project" />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
      <method />
    </configuration>
    <configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="project" working-dir="">
      <method />
    </configuration>
    <configuration default="true" type="PHPUnitRunConfigurationType" factoryName="PHPUnit">
      <TestRunner />
      <method />
    </configuration>
    <configuration default="true" type="PhpBehatConfigurationType" factoryName="Behat">
      <BehatRunner scenario="" />
      <method />
    </configuration>
    <configuration default="true" type="PhpLocalRunConfigurationType" factoryName="PHP Console">
      <method />
    </configuration>
    <configuration default="true" type="PhpSpecConfigurationType" factoryName="PHPSpec">
      <PhpTestRunnerSettings />
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
      <node-interpreter>project</node-interpreter>
      <node-options />
      <gulpfile />
      <tasks />
      <arguments />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.npm" factoryName="npm">
      <command value="run" />
      <scripts />
      <node-interpreter value="project" />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="mocha-javascript-test-runner" factoryName="Mocha">
      <node-interpreter>project</node-interpreter>
      <node-options />
      <working-directory />
      <pass-parent-env>true</pass-parent-env>
      <envs />
      <ui />
      <extra-mocha-options />
      <test-kind>DIRECTORY</test-kind>
      <test-directory />
      <recursive>false</recursive>
      <method />
    </configuration>
    <configuration default="false" name="features" type="PhpBehatConfigurationType" factoryName="Behat">
      <BehatRunner directory="$PROJECT_DIR$/features" file="$PROJECT_DIR$/features/api.feature" scenario="" />
      <method />
    </configuration>
    <list size="1">
      <item index="0" class="java.lang.String" itemvalue="Behat.features" />
    </list>
  </component>
  <component name="ShelveChangesManager" show_recycled="false">
    <option name="remove_strategy" value="false" />
  </component>
  <component name="SvnConfiguration">
    <configuration>$USER_HOME$/.subversion</configuration>
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="16f1dd19-b5b4-4b9c-841d-3fa7539fd5a9" name="Default" comment="" />
      <created>1497375273239</created>
      <option name="number" value="Default" />
      <option name="presentableId" value="Default" />
      <updated>1497375273239</updated>
      <workItem from="1497375275960" duration="289000" />
      <workItem from="1497375581995" duration="1598000" />
      <workItem from="1497377496205" duration="39436000" />
    </task>
    <servers />
  </component>
  <component name="TestHistory">
    <history-entry file="append_snippets_feature - 2017.06.18 at 13h 04m 20s.xml">
      <configuration name="append_snippets.feature" configurationId="PhpBehatConfigurationType" />
    </history-entry>
    <history-entry file="append_snippets_feature - 2017.06.18 at 13h 07m 07s.xml">
      <configuration name="append_snippets.feature" configurationId="PhpBehatConfigurationType" />
    </history-entry>
    <history-entry file="append_snippets_feature - 2017.06.18 at 13h 08m 08s.xml">
      <configuration name="append_snippets.feature" configurationId="PhpBehatConfigurationType" />
    </history-entry>
    <history-entry file="append_snippets_feature - 2017.06.18 at 13h 08m 31s.xml">
      <configuration name="append_snippets.feature" configurationId="PhpBehatConfigurationType" />
    </history-entry>
    <history-entry file="features - 2017.06.18 at 13h 11m 25s.xml">
      <configuration name="features" configurationId="PhpBehatConfigurationType" />
    </history-entry>
    <history-entry file="features - 2017.06.18 at 13h 11m 45s.xml">
      <configuration name="features" configurationId="PhpBehatConfigurationType" />
    </history-entry>
    <history-entry file="features - 2017.06.18 at 13h 13m 48s.xml">
      <configuration name="features" configurationId="PhpBehatConfigurationType" />
    </history-entry>
    <history-entry file="features - 2017.06.18 at 13h 19m 45s.xml">
      <configuration name="features" configurationId="PhpBehatConfigurationType" />
    </history-entry>
    <history-entry file="features - 2017.06.18 at 17h 23m 45s.xml">
      <configuration name="features" configurationId="PhpBehatConfigurationType" />
    </history-entry>
    <history-entry file="hello_feature - 2017.06.18 at 17h 22m 03s.xml">
      <configuration name="hello.feature" configurationId="PhpBehatConfigurationType" />
    </history-entry>
  </component>
  <component name="TimeTrackingManager">
    <option name="totallyTimeSpent" value="41323000" />
  </component>
  <component name="ToolWindowManager">
    <frame x="0" y="23" width="1440" height="807" extended-state="6" />
    <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.2539342" 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="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.31204644" sideWeight="0.5" order="1" 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.3280116" 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.3280116" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.33962265" sideWeight="0.5" order="7" 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.39912918" 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="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="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" />
    </layout>
  </component>
  <component name="TypeScriptGeneratedFilesManager">
    <option name="processedProjectFiles" value="true" />
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager>
      <option name="time" value="2" />
    </breakpoint-manager>
    <watches-manager />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/src/AppBundle/Entity/Posts.php">
      <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" />
          <folding>
            <element signature="e#36#80#0#PHP" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/AppBundle/Command/ApiCommand.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="300">
          <caret line="20" column="23" lean-forward="true" selection-start-line="20" selection-start-column="23" selection-end-line="20" selection-end-column="23" />
          <folding>
            <element signature="e#6#98#0#PHP" expanded="true" />
            <element signature="e#130#165#0#PHP" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/AppBundle/Entity/Posts.php">
      <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" />
          <folding>
            <element signature="e#36#80#0#PHP" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/AppBundle/Entity/Api.php" />
    <entry file="file://$PROJECT_DIR$/docker-compose.yml">
      <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$/Dockerfile">
      <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/AppBundle/Entity/Foo.php" />
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ContainerAwareCommand.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="375">
          <caret line="34" column="23" lean-forward="false" selection-start-line="34" selection-start-column="23" selection-end-line="34" selection-end-column="23" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Component/DomCrawler/Crawler.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="166">
          <caret line="64" column="20" lean-forward="false" selection-start-line="64" selection-start-column="20" selection-end-line="64" selection-end-column="20" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/.travis.yml">
      <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" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/bin/symfony_requirements">
      <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" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/bin/console">
      <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" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/AppBundle/AppBundle.php">
      <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" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="jar://$APPLICATION_HOME_DIR$/plugins/php/lib/php.jar!/stubs/standard/_types.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="143">
          <caret line="105" column="13" lean-forward="false" selection-start-line="105" selection-start-column="13" selection-end-line="105" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="jar://$APPLICATION_HOME_DIR$/plugins/php/lib/php.jar!/stubs/date/date_c.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="119">
          <caret line="333" column="26" lean-forward="false" selection-start-line="333" selection-start-column="20" selection-end-line="333" selection-end-column="26" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/behatch/contexts/src/class_aliases/Extension.php">
      <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" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/config/routing_dev.yml">
      <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" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/AppBundle/Entity/PostsRepository.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="135">
          <caret line="15" column="6" lean-forward="false" selection-start-line="15" selection-start-column="6" selection-end-line="15" selection-end-column="6" />
          <folding>
            <element signature="e#130#164#0#PHP" expanded="true" />
            <marker date="1497692568000" expanded="true" signature="652:707" ph="ALTER TABLE ${Viedemerde::CLASS_NAME}... " />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/config/routing.yml">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="45">
          <caret line="3" column="4" lean-forward="false" selection-start-line="3" selection-start-column="4" selection-end-line="3" selection-end-column="4" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/AppBundle/Filter/RegexpFilter.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="200">
          <caret line="19" column="5" lean-forward="false" selection-start-line="19" selection-start-column="5" selection-end-line="19" selection-end-column="5" />
          <folding>
            <element signature="e#35#98#0#PHP" expanded="false" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/config/services.yml">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="195">
          <caret line="13" column="73" lean-forward="false" selection-start-line="13" selection-start-column="69" selection-end-line="13" selection-end-column="73" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/behatch/contexts/behat.yml.dist">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="325">
          <caret line="23" column="8" lean-forward="false" selection-start-line="23" selection-start-column="8" selection-end-line="23" selection-end-column="8" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/autoload.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="150">
          <caret line="11" column="0" lean-forward="false" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/features/bootstrap/schema/junit.xsd">
      <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" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Behat-3.3.1/src/Behat/Behat/Context/Context.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="165">
          <caret line="17" column="10" lean-forward="false" selection-start-line="17" selection-start-column="10" selection-end-line="17" selection-end-column="10" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/behat/behat/src/Behat/Behat/Context/Context.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="165">
          <caret line="17" column="10" lean-forward="false" selection-start-line="17" selection-start-column="10" selection-end-line="17" selection-end-column="10" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/feature/bootstrap/FeatureContext.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="141">
          <caret line="20" column="43" lean-forward="false" selection-start-line="20" selection-start-column="32" selection-end-line="20" selection-end-column="43" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/behat/mink-extension/src/Behat/MinkExtension/Context/MinkContext.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="149">
          <caret line="21" column="6" lean-forward="false" selection-start-line="21" selection-start-column="6" selection-end-line="21" selection-end-column="6" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/KernelInterface.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="149">
          <caret line="24" column="10" lean-forward="false" selection-start-line="24" selection-start-column="10" selection-end-line="24" selection-end-column="10" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/behat/behat/features/bootstrap/FeatureContext.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="15">
          <caret line="10" column="32" lean-forward="true" selection-start-line="10" selection-start-column="32" selection-end-line="10" selection-end-column="32" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/phpunit.xml.dist">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="-149">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/composer.json">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="254">
          <caret line="47" column="31" lean-forward="false" selection-start-line="47" selection-start-column="31" selection-end-line="47" selection-end-column="31" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/behatch/contexts/src/Context/RestContext.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="143">
          <caret line="190" column="20" lean-forward="false" selection-start-line="190" selection-start-column="20" selection-end-line="190" selection-end-column="20" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/AppBundle/Command/ApiCommand.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="1114">
          <caret line="91" column="21" lean-forward="true" selection-start-line="91" selection-start-column="21" selection-end-line="91" selection-end-column="21" />
          <folding>
            <element signature="e#6#98#0#PHP" expanded="true" />
            <element signature="e#130#165#0#PHP" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/config/config.yml">
      <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" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/config/parameters.yml">
      <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" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/behat.yml">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="237">
          <caret line="16" column="39" lean-forward="false" selection-start-line="16" selection-start-column="39" selection-end-line="16" selection-end-column="39" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/behat.yml.dist">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="8" lean-forward="false" selection-start-line="0" selection-start-column="8" selection-end-line="0" selection-end-column="8" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/composer.lock">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="968">
          <caret line="3236" column="28" lean-forward="false" selection-start-line="3236" selection-start-column="28" selection-end-line="3236" selection-end-column="28" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/features/api.feature">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="120">
          <caret line="8" column="48" lean-forward="false" selection-start-line="8" selection-start-column="48" selection-end-line="8" selection-end-column="48" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/features/bootstrap/FeatureContext.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="164">
          <caret line="18" column="38" lean-forward="false" selection-start-line="18" selection-start-column="38" selection-end-line="18" selection-end-column="38" />
          <folding>
            <element signature="e#7#55#0#PHP" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/AppBundle/Entity/Posts.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="195">
          <caret line="13" column="18" lean-forward="false" selection-start-line="13" selection-start-column="18" selection-end-line="13" selection-end-column="18" />
          <folding>
            <element signature="e#36#80#0#PHP" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/README.md">
      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
        <state split_layout="SPLIT">
          <first_editor relative-caret-position="347">
            <caret line="34" column="115" lean-forward="false" selection-start-line="34" selection-start-column="115" selection-end-line="34" selection-end-column="115" />
            <folding />
          </first_editor>
          <second_editor />
        </state>
      </provider>
    </entry>
  </component>
</project>


text:
from cbsh import client

async def main(session):
    """
    Test remote management of Docker running on a CF node.
    """
    nodes = await session.call(
        u'crossbarfabriccenter.mrealm.get_nodes', status=u'online')
    for node_id in nodes:

        node_status = await session.call(
            u'crossbarfabriccenter.remote.node.get_status', node_id)

        if node_status[u'has_docker']:
            docker_status = await session.call(
                u'crossbarfabriccenter.remote.docker.get_status', node_id)
            session.log.info(
                'Node "{node_id}" has Docker enabled with status: {docker_status}',
                node_id=node_id,
                docker_status=docker_status)

            docker_images = await session.call(
                u'crossbarfabriccenter.remote.docker.get_images', node_id)
            for image_id in docker_images:
                docker_image = await session.call(
                    u'crossbarfabriccenter.remote.docker.get_image', node_id,
                    image_id)
                session.log.info(
                    'Found Docker image: {image_id}',
                    image_id=image_id,
                    docker_image=docker_image)

            docker_containers = await session.call(
                u'crossbarfabriccenter.remote.docker.get_containers', node_id)
            for container_id in docker_containers:
                docker_container = await session.call(
                    u'crossbarfabriccenter.remote.docker.get_container',
                    node_id, container_id)
                session.log.info(
                    'Found Docker container: {container_id}',
                    container_id=container_id,
                    docker_container=docker_container)

        else:
            session.log.info(
                'Node "{node_id}" does not have Docker (enabled)',
                node_id=node_id)

if __name__ == '__main__':
    client.run(main)

redpajama_set_name: RedPajamaGithub


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

namespace Intentor.Yamapper {
    /// <summary>
    /// Expressão SQL.
    /// </summary>
    /// <remarks>Utilizar o curinga {param} para indicação do ponto de substituição do nome do parâmetro.</remarks>
    public class SqlExpression : IExpression {
        /// <summary>
        /// Expressão SQL.
        /// </summary>
        private string _sql;

        /// <summary>
        /// Valor do parâmetro na expressão SQL.
        /// </summary>
        private object _value;

        /// <summary>
        /// Cria uma expressão SQL.
        /// </summary>
        /// <param name="sql">Expressão SQL</param>
        public SqlExpression(string sql)
            : this(sql, null) { }

        /// <summary>
        /// Cria uma expressão SQL.
        /// </summary>
        /// <param name="sql">Expressão SQL.</param>
        /// <param name="value">Valor do parâmetro na expressão SQL</param>
        public SqlExpression(string sql, object value) {
            _sql = sql;
            _value = value;
        }

        public string ToSqlString<T>(string parameterPrefix, List<ParameterData> parameters) {
            if (_value != null) {
                string paramName = String.Concat("pCustom", parameters.Count);
                parameters.Add(new ParameterData(paramName, _value));
                _sql = _sql.Replace("{param}", String.Concat(parameterPrefix, paramName));
            }

            return _sql;
        }
    }
}


text:
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title></title>
    <script type="text/javascript" src="https://code.jquery.com/jquery-2.2.3.js"></script>
</head>

<body>
    <script type="text/javascript">
        navigator.geolocation.getCurrentPosition(success, error);

        function success(position) {
            console.log(position.coords.latitude)
            console.log(position.coords.longitude)

            var GEOCODING = 'https://maps.googleapis.com/maps/api/geocode/json?latlng=' + position.coords.latitude + '%2C' + position.coords.longitude + '&language=en';

            $.getJSON(GEOCODING).done(function(location) {
                console.log(location)
            })

        }

        function error(err) {
            console.log(err)
        }
    </script>
</body>

</html>


text:
Ben Bitdiddle tried to implement `fibMetered` with global variables, to count the number of recursive calls needed for each Fibonacci number calculated. But he made a mistake in using the global variable! Examine his code below carefully and then answer the questions:

```
def fibMetered(x):
    global numCalls
    numCalls += 1
    if x == 0 or x == 1:
        return 1
    else:
        return fibMetered(x-1) + fibMetered(x-2)

def testFib(n):
    global numCalls
    numCalls = 0
    for i in range(n+1):
        print('fib of ' + str(i) + ' = ' + str(fibMetered(i)))
        print ('fib called ' + str(numCalls) + ' times')

testFib(10)
```

What function is the mistake in?

`testFib`

What line should be changed to make this code work? Paste the original line in the following box:

`numCalls = 0`

What do the printed numCall values in this buggy code stand for?

Number of recursive function calls to fibMetered that have happened up to that point


text:
'use strict';
const mongoose = require('mongoose');
const passport = require('koa-passport');
const config = require('../config/env');
const jwt = require('koa-jwt');
const compose = require('koa-compose');
const User = mongoose.model('User');

function authToken() {
  return compose([
    function *(next) {
      if(this.query && this.query.access_token){
          this.headers.authorization = 'Bearer ' + this.query.access_token;
      }
      yield next;
    },
    jwt({ secret: config.session.secrets, passthrough: true })
  ])
}

function isAuthenticated() {
  return compose([
      authToken(),
      function *(next) {
        if(!this.state.user) this.throw('请登录', 401);
        yield next;
      },
      function *(next) {
        var user = yield User.findById(this.state.user._id);
        if (!user) this.throw('请登录', 401);
        this.req.user = user;
        yield next;
      }
    ])
}

function mayAuthenticated() {
  return compose([
      authToken(),
      function *(next) {
        if(!this.state.user) {
          yield next;
        } else {
          const user = yield User.findById(this.state.user._id);
          if (user) {
            this.req.user = user;
          }
          yield next;
        }
      }
    ])
}

function hasRole(roleRequired) {
  if (!roleRequired) this.throw('Required role needs to be set');
  return compose([
      isAuthenticated(),
      function *(next) {
        if (config.userRoles.indexOf(this.req.user.role) >= config.userRoles.indexOf(roleRequired)) {
          yield next;
        }else {
          this.throw(403);
        }
      }
    ])
}

function signToken(id) {
  return jwt.sign({ _id: id }, config.session.secrets, { expiresIn: '1y' });
}

/**
 * sns登录传递参数
 */
function snsPassport() {
  return compose([
      authToken(),
      function *(next) {
        this.session.passport = {
          redirectUrl: this.query.redirectUrl || '/'
        };
        if(this.state.user){
          this.session.passport.userId = this.state.user._id
        }
        yield next;
      }
    ])
}

exports.isAuthenticated = isAuthenticated;
exports.mayAuthenticated = mayAuthenticated;
exports.hasRole = hasRole;
exports.signToken = signToken;
exports.snsPassport = snsPassport;


text:
layout: page
title: Savage Trade Party
date: 2016-05-24
author: Joseph Sandoval
tags: weekly links, java
status: published
summary: Etiam suscipit dui quis venenatis blandit. Etiam in maximus.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 03/21/2017
  endDate: 03/25/2017
  ctyhocn: SGFSSHX
  groupCode: STP
published: true
---
Proin semper vehicula nulla at eleifend. Integer eleifend nec diam id dignissim. Vivamus vitae condimentum enim. Praesent at diam nec sapien facilisis dignissim sed ut lectus. Maecenas eu accumsan nisi, quis sollicitudin mi. Curabitur id diam ac odio maximus imperdiet. Maecenas sed cursus augue. Maecenas metus sapien, dictum id vestibulum id, imperdiet nec dolor. Suspendisse at nisl in lacus molestie laoreet sit amet ac dui. Interdum et malesuada fames ac ante ipsum primis in faucibus. Maecenas faucibus urna nec felis facilisis, eu mollis tortor fringilla. Proin euismod est placerat, dictum tellus consequat, ullamcorper justo. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed congue placerat mauris vel efficitur.

* Sed faucibus velit vitae pretium mattis
* Ut et lorem congue, commodo odio nec, mollis est
* Suspendisse blandit justo quis elit sollicitudin cursus.

Quisque metus massa, sodales at mauris commodo, gravida blandit sapien. Maecenas ullamcorper, turpis in vestibulum interdum, tortor enim lobortis justo, nec pretium diam ante id felis. Aenean condimentum mi in arcu eleifend ultricies. Suspendisse mattis ex non elit mattis convallis. Vivamus eget diam euismod justo pellentesque sagittis quis nec massa. In efficitur posuere turpis, quis aliquam nisl vestibulum in. Quisque eget lacinia felis, nec tempus quam. Cras cursus mauris sit amet ex ornare molestie. Aliquam vestibulum risus sed elit lobortis, dignissim vehicula est mollis. Suspendisse potenti.


text: Programy na zaliczenie Podstaw Programowania


text:
Greetings, it keeps stats on selfies.

### Dependencies ###

* [Indico](https://indico.io/)
* [Flask](http://flask.pocoo.org/)


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Serialized Form (twitter4j-http2-support 4.0.5-SNAPSHOT API)</title>
<meta name="date" content="2016-04-24">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Serialized Form

Package twitter4j

Class twitter4j.AlternativeHttpClientImpl extends HttpClientBase implements Serializable

serialVersionUID:

1757413669925424213L

Serialized Fields

okHttpClient

okhttp3.OkHttpClient okHttpClient

lastRequestProtocol

okhttp3.Protocol lastRequestProtocol

Class twitter4j.ExtendedMediaEntityJSONImpl extends MediaEntityJSONImpl implements Serializable

serialVersionUID:

-3889082303259253211L

Serialized Fields

videoAspectRatioWidth

int videoAspectRatioWidth

videoAspectRatioHeight

int videoAspectRatioHeight

videoDurationMillis

long videoDurationMillis

videoVariants

twitter4j.ExtendedMediaEntityJSONImpl.Variant[] videoVariants

extAltText

String extAltText

Class twitter4j.GeoLocation extends Object implements Serializable

serialVersionUID:

6353721071298376949L

Serialized Fields

latitude

double latitude

longitude

double longitude

Class twitter4j.GeoQuery extends Object implements Serializable

serialVersionUID:

5434503339001056634L

Serialized Fields

location

GeoLocation location

query

String query

ip

String ip

accuracy

String accuracy

granularity

String granularity

maxResults

int maxResults

Class twitter4j.HttpClientBase extends Object implements Serializable

serialVersionUID:

-8016974810651763053L

Serialized Fields

CONF

HttpClientConfiguration CONF

requestHeaders

Map<K,V> requestHeaders

Class twitter4j.HttpParameter extends Object implements Serializable

serialVersionUID:

4046908449190454692L

Serialized Fields

name

String name

value

String value

file

File file

fileBody

InputStream fileBody

Class twitter4j.HttpRequest extends Object implements Serializable

serialVersionUID:

3365496352032493020L

Serialized Fields

method

RequestMethod method

url

String url

parameters

HttpParameter[] parameters

authorization

Authorization authorization

requestHeaders

Map<K,V> requestHeaders

Class twitter4j.JSONException extends Exception implements Serializable

serialVersionUID:

-4144585377907783745L

Serialized Fields

cause

Throwable cause

Class twitter4j.LanguageJSONImpl extends Object implements Serializable

serialVersionUID:

7494362811767097342L

Serialized Fields

name

String name

code

String code

status

String status

Class twitter4j.MediaEntityJSONImpl extends twitter4j.EntityIndex implements Serializable

serialVersionUID:

3609683338035442290L

Serialized Fields

id

long id

url

String url

mediaURL

String mediaURL

mediaURLHttps

String mediaURLHttps

expandedURL

String expandedURL

displayURL

String displayURL

sizes

Map<K,V> sizes

type

String type

Class twitter4j.OEmbedJSONImpl extends twitter4j.TwitterResponseImpl implements Serializable

serialVersionUID:

-2207801480251709819L

Serialized Fields

html

String html

authorName

String authorName

url

String url

version

String version

cacheAge

long cacheAge

authorURL

String authorURL

width

int width

Class twitter4j.OEmbedRequest extends Object implements Serializable

serialVersionUID:

7454130135274547901L

Serialized Fields

statusId

long statusId

url

String url

maxWidth

int maxWidth

hideMedia

boolean hideMedia

hideThread

boolean hideThread

omitScript

boolean omitScript

align

OEmbedRequest.Align align

related

String[] related

lang

String lang

Class twitter4j.Paging extends Object implements Serializable

serialVersionUID:

-7226113618341047983L

Serialized Fields

page

int page

count

int count

sinceId

long sinceId

maxId

long maxId

Class twitter4j.Query extends Object implements Serializable

serialVersionUID:

7196404519192910019L

Serialized Fields

query

String query

lang

String lang

locale

String locale

maxId

long maxId

count

int count

since

String since

sinceId

long sinceId

geocode

String geocode

until

String until

resultType

Query.ResultType resultType

nextPageQuery

String nextPageQuery

Class twitter4j.RateLimitStatusEvent extends EventObject implements Serializable

serialVersionUID:

3749366911109722414L

Serialized Fields

rateLimitStatus

RateLimitStatus rateLimitStatus

isAccountRateLimitStatus

boolean isAccountRateLimitStatus

Class twitter4j.ScopesImpl extends Object implements Serializable

serialVersionUID:

-6301829625595514787L

Serialized Fields

placeIds

String[] placeIds

Class twitter4j.StatusUpdate extends Object implements Serializable

serialVersionUID:

7422094739799350035L

Serialized Fields

status

String status

inReplyToStatusId

long inReplyToStatusId

location

GeoLocation location

placeId

String placeId

displayCoordinates

boolean displayCoordinates

possiblySensitive

boolean possiblySensitive

mediaName

String mediaName

mediaFile

File mediaFile

mediaIds

long[] mediaIds

Class twitter4j.TimeZoneJSONImpl extends Object implements Serializable

serialVersionUID:

81958969762484144L

Serialized Fields

NAME

String NAME

TZINFO_NAME

String TZINFO_NAME

UTC_OFFSET

int UTC_OFFSET

Class twitter4j.TwitterException extends Exception implements Serializable

serialVersionUID:

6006561839051121336L

Serialized Fields

statusCode

int statusCode

errorCode

int errorCode

exceptionDiagnosis

twitter4j.ExceptionDiagnosis exceptionDiagnosis

response

HttpResponse response

errorMessage

String errorMessage

nested

boolean nested

Class twitter4j.TwitterFactory extends Object implements Serializable

serialVersionUID:

-563983536986910054L

Serialized Fields

conf

Configuration conf

Class twitter4j.UploadedMedia extends Object implements Serializable

serialVersionUID:

5393092535610604718L

Serialized Fields

imageWidth

int imageWidth

imageHeight

int imageHeight

imageType

String imageType

mediaId

long mediaId

size

long size

Class twitter4j.XAuthAuthorization extends Object implements Serializable

serialVersionUID:

-7260372598870697494L

Serialized Fields

basic

BasicAuthorization basic

consumerKey

String consumerKey

consumerSecret

String consumerSecret

Skip navigation links

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2016. All rights reserved.


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <meta name="twitter:site" content="@metroui">
    <meta name="twitter:creator" content="@pimenov_sergey">
    <meta name="twitter:card" content="summary">
    <meta name="twitter:title" content="Metro 4 Components Library">
    <meta name="twitter:description" content="Metro 4 is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with responsive grid system, extensive prebuilt components, and powerful plugins built on jQuery.">
    <meta name="twitter:image" content="https://metroui.org.ua/images/m4-logo-social.png">

    <meta property="og:url" content="https://metroui.org.ua/v4/index.html">
    <meta property="og:title" content="Metro 4 Components Library">
    <meta property="og:description" content="Metro 4 is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with responsive grid system, extensive prebuilt components, and powerful plugins built on jQuery.">
    <meta property="og:type" content="website">
    <meta property="og:image" content="https://metroui.org.ua/images/m4-logo-social.png">
    <meta property="og:image:secure_url" content="https://metroui.org.ua/images/m4-logo-social.png">
    <meta property="og:image:type" content="image/png">
    <meta property="og:image:width" content="968">
    <meta property="og:image:height" content="504">

    <meta name="author" content="Sergey Pimenov">
    <meta name="description" content="Your Gravatar is an image that follows you from site to site appearing beside your name when you do things like comment or post on a blog. Avatars help identify your posts on blogs and web forums.">
    <meta name="keywords" content="HTML, CSS, JS, Metro, CSS3, Javascript, HTML5, UI, Library, Web, Development, Framework">

    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
    <link rel="icon" href="favicon.ico" type="image/x-icon">

    <link href="metro/css/metro-all.css" rel="stylesheet">
    <link href="highlight/styles/github.css" rel="stylesheet">
    <link href="docsearch/docsearch.min.css" rel="stylesheet">
    <link href="css/site.css" rel="stylesheet">

    <title>Gravatar - Metro 4 :: Popular HTML, CSS and JS library</title>

Table of contents

Gravatar

How to

Gravatar size

Defaults

Runtime

Gravatar

                    Your Gravatar is an image that follows you from site to site appearing beside your name when you do things like comment or post on a blog. Avatars help identify your posts on blogs and web forums.

                    Read more about Gravatar on the official website.

How to

                    Setting up Gravatars on your site with Metro 4 is simple and easy.

                    <div data-role="gravatar" data-email="sergey@pimenov.com.ua"></div>
                    <img data-role="gravatar" data-email="sergey@pimenov.com.ua">

Gravatar size

                    By default, images are presented at 80px by 80px.
                    You may request a specific image size, which will be dynamically delivered from Gravatar by using add attribute data-size=value where value is your size in pixels.

                    <img data-role="gravatar" data-email="sergey@pimenov.com.ua" data-size="40">
                    <img data-role="gravatar" data-email="sergey@pimenov.com.ua" data-size="80">
                    <img data-role="gravatar" data-email="sergey@pimenov.com.ua" data-size="120">
                    <img data-role="gravatar" data-email="sergey@pimenov.com.ua" data-size="160">
                    <img data-role="gravatar" data-email="sergey@pimenov.com.ua" data-size="200">

                    You may request images anywhere from 1px up to 2048px, however note that many users have lower resolution images, so requesting larger sizes may result in pixelation/low-quality images.

Gravatar defaults

                    What happens when an email address has no matching Gravatar image?
                    Gravatar has a number of built in options which you can also use as defaults.
                    Most of these work by taking the requested email hash and using it to generate a themed image that is unique to that email address.
                    To use these options, just pass one of the following keywords as the data-defaultattribute to an image request:

404: do not load any image if none is associated with the email hash, instead return an HTTP 404 (File Not Found) response

mm: (mystery-man) a simple, cartoon-style silhouetted outline of a person (does not vary by email hash)

identicon: a geometric pattern based on an email hash

monsterid: a generated 'monster' with different colors, faces, etc

wavatar: generated faces with differing features and backgrounds

retro: awesome generated, 8-bit arcade-style pixelated faces

blank: a transparent PNG image (border added to HTML below for demonstration purposes)

                    <img data-role="gravatar" data-email="a@b.com" data-default="404">
                    <img data-role="gravatar" data-email="a@b.com" data-default="mm">
                    <img data-role="gravatar" data-email="a@b.com" data-default="identicon">
                    <img data-role="gravatar" data-email="a@b.com" data-default="monsterid">
                    <img data-role="gravatar" data-email="a@b.com" data-default="wavatar">
                    <img data-role="gravatar" data-email="a@b.com" data-default="retro">
                    <img data-role="gravatar" data-email="a@b.com" data-default="blank">

Your own default image

                    If you'd prefer to use your own default image (perhaps your logo, a funny face, whatever),
                    then you can easily do so by supplying the URL to an image in the data-default attribute.
                    The URL should be URL-encoded to ensure that it carries across correctly.
                    Your own default image will returned in original size.

                    <img data-role="gravatar"
                        data-email="a@b.com"
                        data-default="https://metroui.org.ua/images/jeki_chan.jpg">

                    When you include a default image, Gravatar will automatically serve up that image if there is no image associated with the requested email hash. There are a few conditions which must be met for default image URL:

MUST be publicly available (e.g. cannot be on an intranet, on a local development machine, behind HTTP Auth or some other firewall etc). Default images are passed through a security scan to avoid malicious content.

MUST be accessible via HTTP or HTTPS on the standard ports, 80 and 443, respectively.

MUST have a recognizable image extension (jpg, jpeg, gif, png)

MUST NOT include a querystring (if it does, it will be ignored)

Runtime

                    You can change atributes at runtime and Gravatar plugin change same values.

                    <form action="javascript:void(0)" onsubmit="getGravatar(this)" class="d-flex mb-2">
                        <input type="number" placeholder="Enter gravatar size" name="gravatar_size">
                        <button class="button">Get image</button>
                    </form>

                    <form action="javascript:void(0)" onsubmit="getGravatar(this)">
                        <input type="number" placeholder="Enter gravatar size" name="gravatar_size">
                        <button class="button">Get image</button>
                    </form>

                    <img data-role="gravatar" data-email="sergey@pimenov.com.ua"
                         data-default="404" id="gravatar_runtime_demo_1">

                    <script>
                        function getGravatar(f){
                            var val = Number(f.elements['gravatar_size'].value);
                            var size = val !== "" && Metro.utils.isInt(val) ? val : 0;
                            console.log(size);
                            $('#gravatar_runtime_demo_1').attr('data-size', size);
                        }
                    </script>


text:
const SpotDispatcher = require('../dispatchers/SpotDispatcher');
const SpotConstants = require('../constants/SpotConstants');

const ObservableGraphQLStore = require('./ObservableGraphQLStore');

const START_DATE_VAR = 'startDate';
const END_DATE_VAR = 'endDate';

class IngestSummaryStore extends ObservableGraphQLStore {
    constructor() {
        super();

        this.pipeline = null;
        this.PIPELINES = {};
        this.PIPELINES[SpotConstants.PIPELINE_NETFLOW] = 'Netflow';
        this.PIPELINES[SpotConstants.PIPELINE_DNS] = 'Dns';
        this.PIPELINES[SpotConstants.PIPELINE_PROXY] = 'Proxy';
    }

    getQuery() {
        let pipeline = this.getPipeline() || '';

        return `
            query($startDate:SpotDateType!,$endDate:SpotDateType!) {
                ${pipeline} {
                    ingestSummary(startDate:$startDate, endDate:$endDate) {
                        date: datetime
                        total
                    }
                }
            }
        `;
    }

    unboxData(data) {
        let pipeline = this.getPipeline();
        let parser = parser = d3.time.format("%Y-%m-%d %H:%M:%S%Z").parse;

        let dataByMonth = {};
        data[pipeline].ingestSummary.forEach(record => {
            record = {total: record.total, date: parser(`${record.date}-0000`)};
            let month = record.date.toISOString().substr(0,7);

            if (!(month in dataByMonth)) dataByMonth[month] = [];
            dataByMonth[month].push(record);
        });

        return Object.keys(dataByMonth).map(month => dataByMonth[month].sort((a, b) => a.date - b.date));
    }

    setStartDate(date) {
        this.setVariable(START_DATE_VAR, date);
    }

    getStartDate() {
        return this.getVariable(START_DATE_VAR);
    }

    setEndDate(date) {
        this.setVariable(END_DATE_VAR, date);
    }

    getEndDate() {
        return this.getVariable(END_DATE_VAR);
    }

    setPipeline(pipeline) {
        this.pipeline = pipeline;
    }

    getPipeline() {
        return this.pipeline;
    }
}

const iss = new IngestSummaryStore();

SpotDispatcher.register(function (action) {
    switch (action.actionType) {
        case SpotConstants.UPDATE_DATE:
            switch (action.name) {
                case SpotConstants.START_DATE:
                    iss.setStartDate(action.date);
                    break;
                case SpotConstants.END_DATE:
                    iss.setEndDate(action.date);
                    break;
            }
            break;
        case SpotConstants.RELOAD_INGEST_SUMMARY:
            iss.sendQuery();
            break;
        case SpotConstants.UPDATE_PIPELINE:
            iss.setPipeline(action.pipeline)
        break;
    }
});

module.exports = iss;


text:
package skripteditor.addons.skript.evt;

import skripteditor.events.Event;

public class EvtOnHungerMeterChange extends Event {

	@Override
	public void registerUserFriendyPatterns() {
		registerUserFriendyPattern("(food|hunger) (level|met(er|re)|bar) chang(e|ing)");
	}

	@Override
	public void registerPatterns() {
		registerPattern("(food|hunger) (level|met(er|re)|bar) chang(e|ing)");
	}

	@Override
	public String[] getExamples() {
		return new String[] {
				"On Hunger Meter Change:\n" + "\tsend \"Mniammm!\""
		};

	}

	@Override
	public String getName() {
		return "On Hunger Meter Change";
	}

}


text:
namespace media {

AudioParameters::AudioParameters()
    : format_(AUDIO_PCM_LINEAR),
      channel_layout_(CHANNEL_LAYOUT_NONE),
      sample_rate_(0),
      bits_per_sample_(0),
      frames_per_buffer_(0),
      channels_(0) {
}

AudioParameters::AudioParameters(Format format, ChannelLayout channel_layout,
                                 int sample_rate, int bits_per_sample,
                                 int frames_per_buffer)
    : format_(format),
      channel_layout_(channel_layout),
      sample_rate_(sample_rate),
      bits_per_sample_(bits_per_sample),
      frames_per_buffer_(frames_per_buffer),
      channels_(ChannelLayoutToChannelCount(channel_layout)) {
}

void AudioParameters::Reset(Format format, ChannelLayout channel_layout,
                            int sample_rate, int bits_per_sample,
                            int frames_per_buffer) {
  format_ = format;
  channel_layout_ = channel_layout;
  sample_rate_ = sample_rate;
  bits_per_sample_ = bits_per_sample;
  frames_per_buffer_ = frames_per_buffer;
  channels_ = ChannelLayoutToChannelCount(channel_layout);
}

bool AudioParameters::IsValid() const {
  return (format_ >= AUDIO_PCM_LINEAR) &&
         (format_ < AUDIO_LAST_FORMAT) &&
         (channels_ > 0) &&
         (channels_ <= media::limits::kMaxChannels) &&
         (channel_layout_ > CHANNEL_LAYOUT_UNSUPPORTED) &&
         (channel_layout_ < CHANNEL_LAYOUT_MAX) &&
         (sample_rate_ >= media::limits::kMinSampleRate) &&
         (sample_rate_ <= media::limits::kMaxSampleRate) &&
         (bits_per_sample_ > 0) &&
         (bits_per_sample_ <= media::limits::kMaxBitsPerSample) &&
         (frames_per_buffer_ > 0) &&
         (frames_per_buffer_ <= media::limits::kMaxSamplesPerPacket);
}

int AudioParameters::GetBytesPerBuffer() const {
  return frames_per_buffer_ * GetBytesPerFrame();
}

int AudioParameters::GetBytesPerSecond() const {
  return sample_rate_ * GetBytesPerFrame();
}

int AudioParameters::GetBytesPerFrame() const {
  return channels_ * bits_per_sample_ / 8;
}

}  // namespace media


text:
import { PureComponent, createElement } from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import PropTypes from 'prop-types';
import qs from 'query-string';
import { handleAnalytics } from 'utils/analytics';
import { isCountryIncluded } from 'app/utils';
import { getLocationParamUpdated } from 'utils/navigation';
import { IGNORED_COUNTRIES_ISOS } from 'data/ignored-countries';
import { actions as fetchActions } from 'pages/lts-explore';
import { actions as modalActions } from 'components/modal-metadata';
import { actions as pngModalActions } from 'components/modal-png-download';
import exploreMapActions from 'components/ndcs/shared/explore-map/explore-map-actions';
import { getHoverIndex } from 'components/ndcs/shared/utils';
import { getIsShowEUCountriesChecked } from 'components/ndcs/shared/explore-map/explore-map-selectors';

import Component from './lts-explore-map-component';
import {
  getMapIndicator,
  getPathsWithStyles,
  getISOCountries,
  getLinkToDataExplorer,
  getEmissionsCardData,
  getLegend,
  getSummaryCardData,
  getCategories,
  getCategoryIndicators,
  getSelectedCategory,
  getTooltipCountryValues,
  getDonutActiveIndex,
  getPngSelectionSubtitle
} from './lts-explore-map-selectors';

const actions = {
  ...fetchActions,
  ...modalActions,
  ...exploreMapActions,
  ...pngModalActions
};

const mapStateToProps = (state, { location }) => {
  const { data, loading } = state.LTS;
  const { countries } = state;
  const search = qs.parse(location.search);

  const LTSWithSelection = {
    ...state,
    ...data,
    countries: countries.data,
    query: search.search,
    categorySelected: search.category,
    indicatorSelected: search.indicator,
    categories: data.categories,
    emissions: state.emissions,
    search
  };

  return {
    loading,
    query: LTSWithSelection.query,
    paths: getPathsWithStyles(LTSWithSelection),
    isoCountries: getISOCountries(LTSWithSelection),
    selectedIndicator: getMapIndicator(LTSWithSelection),
    emissionsCardData: getEmissionsCardData(LTSWithSelection),
    tooltipCountryValues: getTooltipCountryValues(LTSWithSelection),
    legendData: getLegend(LTSWithSelection),
    summaryCardData: getSummaryCardData(LTSWithSelection),
    downloadLink: getLinkToDataExplorer(LTSWithSelection),
    categories: getCategories(LTSWithSelection),
    indicators: getCategoryIndicators(LTSWithSelection),
    selectedCategory: getSelectedCategory(LTSWithSelection),
    checked: getIsShowEUCountriesChecked(LTSWithSelection),
    donutActiveIndex: getDonutActiveIndex(LTSWithSelection),
    pngSelectionSubtitle: getPngSelectionSubtitle(LTSWithSelection)
  };
};

const pngDownloadId = 'lts-explore-map';

class LTSExploreMapContainer extends PureComponent {
  constructor(props) {
    super(props);
    this.state = {
      country: null,
      tooltipValues: {}
    };
  }

  componentWillMount() {
    // Note: This fetch is not filtered by category like the NDC as the data is not so big
    // If it starts getting big copy the logic in ndcs-explore-map.js with the lts emissions indicator
    this.props.fetchLTS();
  }

  handleOnChangeChecked = query => {
    this.updateUrlParam({ name: 'showEUCountries', value: query });
  };

  handleSearchChange = query => {
    this.updateUrlParam({ name: 'search', value: query });
  };

  handleCountryClick = (geography, countryData) => {
    const { isoCountries } = this.props;
    const { id: iso, name } = countryData || {};
    const countryIso =
      iso || (geography && geography.properties && geography.properties.id);
    if (countryIso && isCountryIncluded(isoCountries, countryIso)) {
      this.props.history.push(`/lts/country/${countryIso}`);
      handleAnalytics(
        'LTS Explore Map',
        'Use map to find country',
        name || geography.properties.name
      );
    }
  };

  handleCountryEnter = geography => {
    const {
      tooltipCountryValues,
      legendData,
      selectActiveDonutIndex,
      emissionsCardData
    } = this.props;
    const iso = geography.properties && geography.properties.id;

    if (IGNORED_COUNTRIES_ISOS.includes(iso)) {
      // We won't show Taiwan and Western Sahara as an independent country
      this.setState({ tooltipValues: null, country: null });
    } else {
      const tooltipValue = tooltipCountryValues && tooltipCountryValues[iso];
      if (tooltipValue && tooltipValue.labelId) {
        const hoveredlegendData = legendData.find(
          l => parseInt(l.id, 10) === tooltipValue.labelId
        );
        if (hoveredlegendData) {
          selectActiveDonutIndex(
            getHoverIndex(emissionsCardData, hoveredlegendData)
          );
        }
      } else if (legendData) {
        // This is the last legend item aggregating all the no data geographies
        selectActiveDonutIndex(
          getHoverIndex(emissionsCardData, legendData[legendData.length - 1])
        );
      }

      const tooltipValues = {
        value: (tooltipValue && tooltipValue.value) || 'No Document Submitted',
        countryName: geography.properties && geography.properties.name
      };

      this.setState({ tooltipValues, country: geography.properties });
    }
  };

  handleSearchChange = query => {
    this.updateUrlParam({ name: 'search', value: query });
  };

  handleCategoryChange = category => {
    this.updateUrlParam(
      {
        name: 'category',
        value: category.value
      },
      true
    );
    handleAnalytics('LTS Explore Map', 'Change category', category.label);
  };

  handleIndicatorChange = indicator => {
    this.updateUrlParam({ name: 'indicator', value: indicator.value });
    handleAnalytics('LTS Explore Map', 'Change indicator', indicator.label);
  };

  handleInfoClick = () => {
    this.props.setModalMetadata({
      customTitle: 'LTS Explore',
      category: 'LTS Explore Map',
      slugs: ['ndc_lts'],
      open: true
    });
  };

  updateUrlParam(param, clear) {
    const { history, location } = this.props;
    history.replace(getLocationParamUpdated(location, param, clear));
  }

  handlePngDownloadModal = () => {
    const { setModalPngDownload } = this.props;
    setModalPngDownload({ open: pngDownloadId });
  };

  render() {
    const { query } = this.props;
    const noContentMsg = query
      ? 'No results found'
      : 'There is no data for this indicator';
    return createElement(Component, {
      ...this.props,
      pngDownloadId,
      handleCountryClick: this.handleCountryClick,
      handleCountryEnter: this.handleCountryEnter,
      handleInfoClick: this.handleInfoClick,
      noContentMsg,
      handleSearchChange: this.handleSearchChange,
      handleCategoryChange: this.handleCategoryChange,
      handleIndicatorChange: this.handleIndicatorChange,
      handleOnChangeChecked: this.handleOnChangeChecked,
      handlePngDownloadModal: this.handlePngDownloadModal,
      checked: this.props.checked,
      indicator: this.props.indicator,
      countryData: this.state.country,
      summaryData: this.props.summaryData,
      tooltipValues: this.state.tooltipValues
    });
  }
}

LTSExploreMapContainer.propTypes = {
  history: PropTypes.object.isRequired,
  location: PropTypes.object.isRequired,
  isoCountries: PropTypes.array.isRequired,
  emissionsCardData: PropTypes.object.isRequired,
  setModalMetadata: PropTypes.func.isRequired,
  fetchLTS: PropTypes.func.isRequired,
  query: PropTypes.string,
  summaryData: PropTypes.array,
  indicator: PropTypes.object,
  tooltipCountryValues: PropTypes.object,
  selectActiveDonutIndex: PropTypes.func.isRequired,
  setModalPngDownload: PropTypes.func.isRequired,
  legendData: PropTypes.array,
  checked: PropTypes.bool
};

export default withRouter(
  connect(mapStateToProps, actions)(LTSExploreMapContainer)
);