text:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="./testcase.xsl"?>
<test_definition>
  <suite category="W3C/HTML5 APIs" name="tct-webstorage-w3c-tests">
    <set name="WebStorage" type="js">
      <testcase purpose="StorageEvent basic Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_basic" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_basic.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="StorageEvent" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="set onstorage as body attribute Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_body_attribute" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_body_attribute.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="onstorage" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="StorageEvent case sensitive Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_case_sensitive" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_case_sensitive.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="StorageEvent" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="StorageEvent constructor Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_constructor" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_constructor.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="StorageEvent" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Construct StorageEvent with StorageEventInit Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_constructor_eventinit" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_constructor_eventinit.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="StorageEventInit" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="key of local storage event Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_local_key" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_local_key.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="key" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="newvalue of local storage event Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_local_newvalue" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_local_newvalue.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="newValue" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="oldvalue of local storage event Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_local_oldvalue_entry1" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_local_oldvalue.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="oldValue" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="key property test of local event for removeItem" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_local_removeitem">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_local_removeitem.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="method" element_name="removeItem" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="storagearea of local storage event Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_local_storagearea" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_local_storagearea.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="storageArea" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="storageeventinit of local storage event Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_local_storageeventinit" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_local_storageeventinit.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="key" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="url of local storage event Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_local_url" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_local_url.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="url" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="key of session storage event Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_session_key" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_session_key.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="key" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="newvalue of session storage event Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_session_newvalue" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_session_newvalue.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="newValue" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="oldvalue of session storage event Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_session_oldvalue" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_session_oldvalue.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="oldValue" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="key property test of session event for session removeItem" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_session_removeitem">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_session_removeitem.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="method" element_name="removeItem" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="storagearea of session storage event Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_session_storagearea" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_session_storagearea.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="storageArea" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Storage event is fired due to set values for session StorageEventInit" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_session_storageeventinit" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_session_storageeventinit.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="key" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="url of session storage event Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_session_url" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_session_url.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="url" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="StorageEvent is attached to setAttribute Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="event_setattribute" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/event_setattribute.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="method" element_name="setAttribute" interface="StorageEvent" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#storageevent</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="methods with missing arguments Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="missing_arguments" subcase="11">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/missing_arguments.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="method" element_name="key" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Storage  builtins Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="storage_builtins" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_builtins.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="prototype" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Storage clear Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="storage_clear" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_clear.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="method" element_name="clear" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Storage enumerate and built-in properties Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="storage_enumerate" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_enumerate.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="localStorage" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Storage set key with the same name as storage function Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="storage_functions_not_overwritten" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_functions_not_overwritten.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="localStorage" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Storage getItem(key) and named getter Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="storage_getitem" subcase="8">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_getitem.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="method" element_name="getItem" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Storage in operator Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="storage_in" subcase="4">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_in.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="localStorage" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Storage Indexed getter Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="storage_indexing" subcase="8">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_indexing.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="localStorage" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Storage key(index) Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="storage_key" subcase="22">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_key.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="method" element_name="key" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Storage key() with empty string Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="storage_key_empty_string_entry1" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_key_empty_string.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="method" element_name="key" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Storage length Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="torage_length" subcase="4">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_length.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="length" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Throws QuotaExceededError when the quota has been exceeded for localStorage" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="storage_local_setitem_quotaexceedederr">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_local_setitem_quotaexceedederr.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="method" element_name="setItem" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Storage removeItem(key) Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="storage_removeitem" subcase="8">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_removeitem.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="method" element_name="removeItem" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Throws QuotaExceededError when the quota has been exceeded for sessionStorage" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="storage_session_setitem_quotaexceedederr">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_session_setitem_quotaexceedederr.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="sessionStorage" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Storage setItem(key, value) Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="storage_setitem" subcase="26">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_setitem.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="method" element_name="setItem" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Storage set value with enumerate Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="storage_set_value_enumerate" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_set_value_enumerate.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="localStorage" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="Storage only store strings Test" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="auto" priority="P2" id="storage_string_conversion" subcase="2">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/storage_string_conversion.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="localStorage" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
    </set>
    <set name="WebStorage-bdd" type="js" ui-auto="bdd">
      <testcase purpose="store data using Local Storage which means that close the page, and re-open it, the data saved before should be loaded again" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="manual" priority="P2" id="storage_local">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/bdd/storage_local-manual.html</test_script_entry>
          <bdd_test_script_entry test_script_expected_result="0">/opt/tct-webstorage-w3c-tests/w3c-webstorage-app/testscripts/storage_local.feature</bdd_test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="loaclStorage" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
      <testcase purpose="store the data using Session Storage which means that even if you close the page, and re-open it, the data saved before should be lost" type="compliance" status="approved" component="W3C_HTML5 APIs/Storage/Web Storage" execution_type="manual" priority="P2" id="storage_session">
        <description>
          <test_script_entry>/opt/tct-webstorage-w3c-tests/webstorage/w3c/bdd/storage_session-manual.html</test_script_entry>
          <bdd_test_script_entry test_script_expected_result="0">/opt/tct-webstorage-w3c-tests/w3c-webstorage-app/testscripts/storage_session.feature</bdd_test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion element_type="attribute" element_name="loaclStorage" interface="Storage" specification="Web Storage" section="Storage" category="Tizen W3C API Specifications"/>
            <spec_url>https://w3c.github.io/webstorage/#the-storage-interface</spec_url>
            <spec_statement/>
          </spec>
        </specs>
      </testcase>
    </set>
  </suite>
</test_definition>


text:
package Lev05.task0530;

import java.io.*;

/*
Шеф, что-то не пашет
*/

public class Solution {
    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        int a = Integer.parseInt(reader.readLine());
        int b = Integer.parseInt(reader.readLine());

        int sum = a + b;
        System.out.println("Sum = " + sum);
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Hubzero\Component;

use Hubzero\View\View as AbstractView;
use Hubzero\Document\Assets;

/**
 * Class for a component View
 */
class View extends AbstractView
{
	/**
	 * Layout name
	 *
	 * @var  string
	 */
	protected $_layout = 'display';

	/**
	 * Constructor
	 *
	 * @param   array  $config  A named configuration array for object construction.<br/>
	 * @return  void
	 */
	public function __construct($config = array())
	{
		parent::__construct($config);

		// Set a base path for use by the view
		if (!array_key_exists('base_path', $config))
		{
			$config['base_path'] = '';

			if (defined('PATH_COMPONENT'))
			{
				$config['base_path'] = PATH_COMPONENT;
			}
		}
		$this->_basePath = $config['base_path'];
	}

	/**
	 * Create a component view and return it
	 *
	 * @param   string  $layout  View layout
	 * @param   string  $name    View name
	 * @return  object
	 */
	public function view($layout, $name=null)
	{
		// If we were passed only a view model, just render it.
		if ($layout instanceof AbstractView)
		{
			return $layout;
		}

		$view = new self(array(
			'base_path' => $this->_basePath,
			'name'      => ($name ? $name : $this->_name),
			'layout'    => $layout
		));
		$view->set('option', $this->option)
		     ->set('controller', $this->controller)
		     ->set('task', $this->task);

		return $view;
	}

	/**
	 * Dynamically handle calls to the class.
	 *
	 * @param   string  $method
	 * @param   array   $parameters
	 * @return  mixed
	 * @throws  \BadMethodCallException
	 * @since   1.3.1
	 */
	public function __call($method, $parameters)
	{
		if (!static::hasHelper($method))
		{
			foreach ($this->_path['helper'] as $path)
			{
				$file = $path . DIRECTORY_SEPARATOR . $method . '.php';
				if (file_exists($file))
				{
					include_once $file;
					break;
				}
			}

			$option = ($this->option ? $this->option : \Request::getCmd('option'));
			$option = ucfirst(substr($option, 4));

			// Namespaced
			$invokable1 = '\\Components\\' . $option . '\\Helpers\\' . ucfirst($method);

			// Old naming scheme "OptionHelperMethod"
			$invokable2 = $option . 'Helper' . ucfirst($method);

			$callback = null;
			if (class_exists($invokable1))
			{
				$callback = new $invokable1();
			}
			else if (class_exists($invokable2))
			{
				$callback = new $invokable2();
			}

			if (is_callable($callback))
			{
				$callback->setView($this);

				$this->helper($method, $callback);
			}
		}

		return parent::__call($method, $parameters);
	}
}


text:
package com.pro100svitlo.lockpattern;

import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

/**
 * Created by pro100svitlo on 1/24/16.
 */
public class SharedPreferencesLPV {

    private static final String LPV_MAIN_PASS_KEY = "LPV_MAIN_PASS_KEY";
    private static final String LPV_SECOND_PASS_ANSWER = "LPV_SECOND_PASS_ANSWER";
    private static final String LPV_SECOND_PASS_QUESTION = "LPV_SECOND_PASS_QUESTION";

    private final SharedPreferences mShp;
    private final SharedPreferences.Editor mShpEditor;

    public SharedPreferencesLPV(Context c){
        mShp = PreferenceManager.getDefaultSharedPreferences(c);
        mShpEditor = mShp.edit();
    }

    public void saveMainPass(String pass){
        mShpEditor.putString(LPV_MAIN_PASS_KEY, pass);
        mShpEditor.apply();
    }

    public String getMainSavedPass(){
        return mShp.getString(LPV_MAIN_PASS_KEY, "");
    }

    public void saveSecondPass(String pass){
        mShpEditor.putString(LPV_SECOND_PASS_ANSWER, pass);
        mShpEditor.apply();
    }

    public String getSecondSavedPass(){
        return mShp.getString(LPV_SECOND_PASS_ANSWER, "");
    }

    public void saveSecondQuestion(String q){
        mShpEditor.putString(LPV_SECOND_PASS_QUESTION, q);
        mShpEditor.apply();
    }

    public String getSecondPassQuestion(){
        return mShp.getString(LPV_SECOND_PASS_QUESTION, "ololol ???");
    }

    public void clearSharedPreferences(){
        mShpEditor.putString(LPV_MAIN_PASS_KEY, "");
        mShpEditor.putString(LPV_SECOND_PASS_ANSWER, "");
        mShpEditor.putString(LPV_SECOND_PASS_QUESTION, "");
        mShpEditor.apply();
    }

}


text:
#ifndef __itktubeVectorImageToListGenerator_h
#define __itktubeVectorImageToListGenerator_h

#include <itkDataObject.h>
#include <itkDataObjectDecorator.h>
#include <itkFixedArray.h>
#include <itkListSample.h>
#include <itkPixelTraits.h>
#include <itkProcessObject.h>

namespace itk
{

namespace tube
{

namespace Statistics
{

/** \class VectorImageToListGenerator
 *  \brief The class takes an image as input and generates a list sample as
 *  output.
 *
 *  There are differences between this class and VectorImageToListAdaptor.
 *  This class is not an adaptor. It creates a new list sample and does not
 *  provide a pseudo interface to the actual image to make it look like a
 *  list sample.
 *
 *  The class optionally allows you to specify a mask image as an input. The
 *  list sample ( if a mask is specified ) is constructed from pixels that are
 *  within the mask
 *
 * \todo
 * In future allow the filter to take a Spatial object as input so a
 * generic spatial object like an ellipse etc can be used as a mask.
 * Sure the ImageMaskSpatialObject
 * can represent image masks too, so why not make SpatialObjects the
 * default. I think the ImageMaskSpatialObject is slow in terms of
 * inefficient iteration through the image.
 *
 * \sa VectorImageToListAdaptor
 */
template< class TImage, class TMaskImage >
class VectorImageToListGenerator : public ProcessObject
{
public:
  /** Standard class typedefs */
  typedef VectorImageToListGenerator        Self;
  typedef ProcessObject                     Superclass;
  typedef SmartPointer< Self >              Pointer;
  typedef SmartPointer< const Self >        ConstPointer;

  /** Run-time type information ( and related methods ). */
  itkTypeMacro( VectorImageToListGenerator, ProcessObject );

  /** Method for creation through the object factory. */
  itkNewMacro( Self );

  /** Image typedefs */
  typedef TImage                           ImageType;
  typedef typename ImageType::Pointer      ImagePointer;
  typedef typename ImageType::ConstPointer ImageConstPointer;
  typedef typename ImageType::PixelType    PixelType;
  typedef PixelType                        MeasurementVectorType;

  /** Mask Image typedefs */
  typedef TMaskImage                           MaskImageType;
  typedef typename MaskImageType::Pointer      MaskImagePointer;
  typedef typename MaskImageType::ConstPointer MaskImageConstPointer;
  typedef typename MaskImageType::PixelType    MaskPixelType;

   /** Type of the output list sample */
  typedef itk::Statistics::ListSample< MeasurementVectorType >  ListSampleType;

  /** Superclass typedefs for Measurement vector, measurement,
   * Instance Identifier, frequency, size, size element value */
  typedef PixelTraits< typename ImageType::PixelType > PixelTraitsType;
  typedef typename ListSampleType::MeasurementVectorSizeType
                                     MeasurementVectorSizeType;

  typedef DataObject::Pointer DataObjectPointer;

  /** ListSample is not a DataObject, we need to decorate it to push it down
   * a ProcessObject's pipeline */
  typedef DataObjectDecorator< ListSampleType >  ListSampleOutputType;

  /** the number of components in a measurement vector */
  itkStaticConstMacro( MeasurementVectorSize, unsigned int,
                      PixelTraitsType::Dimension );

  /** Standard itk::ProcessObject subclass method. */
  using Superclass::MakeOutput;
  virtual DataObjectPointer MakeOutput( DataObjectPointerArraySizeType idx )
    override;

  virtual void SetMeasurementVectorSize( const MeasurementVectorSizeType s )
    {
    // Measurement vector size for this class is fixed as the pixel's
    // dimension. This method should throw an exception if the user tries to
    // set the dimension to a different value.
    if( s != MeasurementVectorSize )
      {
      itkExceptionMacro(
        << "Measurement vector size for the image adaptor obtained"
        << " from the pixel dimension is: "
        << MeasurementVectorSize << " but you "
        << "are setting it to " << s );
      }
    }

  unsigned int GetMeasurementVectorSize( void ) const
    {
    return MeasurementVectorSize;
    }

  /** Method to set/get the image */
  void SetInput( const ImageType* image );
  const ImageType* GetInput( void ) const;

  /** Method to set/get the mask */
  void SetMaskImage( const MaskImageType* image );
  const MaskImageType* GetMaskImage( void ) const;

  /** Method to get the list sample, the generated output. Note that this does
   * not invoke Update(). You should have called update on this class to get
   * any meaningful output. */
  const ListSampleType * GetListSample( void ) const;

  /** Set the pixel value treated as on in the mask. If a mask has been
   * specified, only pixels with this value will be added to the list sample, if
   * no mask has been specified all pixels will be added as measurement vectors
   * to the list sample. */
  void SetMaskValue( const MaskPixelType maskValue );
  itkGetMacro( MaskValue, MaskPixelType );

  itkSetMacro( UseSingleMaskValue, bool );
  itkGetMacro( UseSingleMaskValue, bool );

  /** This method causes the filter to generate its output. */
  virtual void GenerateData( void ) override;

  /** This method ensures that a mask image if specified has requested regions
   * that at least contain the input image's buffered region. */
  virtual void GenerateInputRequestedRegion( void ) override;

  virtual void GenerateOutputInformation( void ) override;

protected:
  VectorImageToListGenerator( void );
  virtual ~VectorImageToListGenerator( void ) {}

  void PrintSelf( std::ostream& os, Indent indent ) const override;

private:
  VectorImageToListGenerator( const Self& ); //purposely not implemented
  void operator=( const Self& ); //purposely not implemented

  // To remove warning "was hidden [-Woverloaded-virtual]"
  void SetInput( const DataObjectIdentifierType &, itk::DataObject * )
    override {};

  MaskPixelType       m_MaskValue;
  bool                m_UseSingleMaskValue;

}; // End class VectorImageToListGenerator

} // End namespace Statistics

} // End namespace tube

} // End namespace itk

#ifndef ITK_MANUAL_INSTANTIATION
#include "itktubeVectorImageToListGenerator.hxx"
#endif

#endif // End !defined( VectorImageToListGenerator )


text:
import re

import numpy as np
import pytest

import pandas as pd
import pandas._testing as tm

class TestSeriesReplace:
    def test_replace(self, datetime_series):
        N = 100
        ser = pd.Series(np.random.randn(N))
        ser[0:4] = np.nan
        ser[6:10] = 0

        # replace list with a single value
        return_value = ser.replace([np.nan], -1, inplace=True)
        assert return_value is None

        exp = ser.fillna(-1)
        tm.assert_series_equal(ser, exp)

        rs = ser.replace(0.0, np.nan)
        ser[ser == 0.0] = np.nan
        tm.assert_series_equal(rs, ser)

        ser = pd.Series(np.fabs(np.random.randn(N)), tm.makeDateIndex(N), dtype=object)
        ser[:5] = np.nan
        ser[6:10] = "foo"
        ser[20:30] = "bar"

        # replace list with a single value
        rs = ser.replace([np.nan, "foo", "bar"], -1)

        assert (rs[:5] == -1).all()
        assert (rs[6:10] == -1).all()
        assert (rs[20:30] == -1).all()
        assert (pd.isna(ser[:5])).all()

        # replace with different values
        rs = ser.replace({np.nan: -1, "foo": -2, "bar": -3})

        assert (rs[:5] == -1).all()
        assert (rs[6:10] == -2).all()
        assert (rs[20:30] == -3).all()
        assert (pd.isna(ser[:5])).all()

        # replace with different values with 2 lists
        rs2 = ser.replace([np.nan, "foo", "bar"], [-1, -2, -3])
        tm.assert_series_equal(rs, rs2)

        # replace inplace
        return_value = ser.replace([np.nan, "foo", "bar"], -1, inplace=True)
        assert return_value is None

        assert (ser[:5] == -1).all()
        assert (ser[6:10] == -1).all()
        assert (ser[20:30] == -1).all()

        ser = pd.Series([np.nan, 0, np.inf])
        tm.assert_series_equal(ser.replace(np.nan, 0), ser.fillna(0))

        ser = pd.Series([np.nan, 0, "foo", "bar", np.inf, None, pd.NaT])
        tm.assert_series_equal(ser.replace(np.nan, 0), ser.fillna(0))
        filled = ser.copy()
        filled[4] = 0
        tm.assert_series_equal(ser.replace(np.inf, 0), filled)

        ser = pd.Series(datetime_series.index)
        tm.assert_series_equal(ser.replace(np.nan, 0), ser.fillna(0))

        # malformed
        msg = r"Replacement lists must match in length\. Expecting 3 got 2"
        with pytest.raises(ValueError, match=msg):
            ser.replace([1, 2, 3], [np.nan, 0])

        # ser is dt64 so can't hold 1 or 2, so this replace is a no-op
        result = ser.replace([1, 2], [np.nan, 0])
        tm.assert_series_equal(result, ser)

        ser = pd.Series([0, 1, 2, 3, 4])
        result = ser.replace([0, 1, 2, 3, 4], [4, 3, 2, 1, 0])
        tm.assert_series_equal(result, pd.Series([4, 3, 2, 1, 0]))

    def test_replace_gh5319(self):
        # API change from 0.12?
        # GH 5319
        ser = pd.Series([0, np.nan, 2, 3, 4])
        expected = ser.ffill()
        result = ser.replace([np.nan])
        tm.assert_series_equal(result, expected)

        ser = pd.Series([0, np.nan, 2, 3, 4])
        expected = ser.ffill()
        result = ser.replace(np.nan)
        tm.assert_series_equal(result, expected)

    def test_replace_datetime64(self):
        # GH 5797
        ser = pd.Series(pd.date_range("20130101", periods=5))
        expected = ser.copy()
        expected.loc[2] = pd.Timestamp("20120101")
        result = ser.replace({pd.Timestamp("20130103"): pd.Timestamp("20120101")})
        tm.assert_series_equal(result, expected)
        result = ser.replace(pd.Timestamp("20130103"), pd.Timestamp("20120101"))
        tm.assert_series_equal(result, expected)

    def test_replace_nat_with_tz(self):
        # GH 11792: Test with replacing NaT in a list with tz data
        ts = pd.Timestamp("2015/01/01", tz="UTC")
        s = pd.Series([pd.NaT, pd.Timestamp("2015/01/01", tz="UTC")])
        result = s.replace([np.nan, pd.NaT], pd.Timestamp.min)
        expected = pd.Series([pd.Timestamp.min, ts], dtype=object)
        tm.assert_series_equal(expected, result)

    def test_replace_timedelta_td64(self):
        tdi = pd.timedelta_range(0, periods=5)
        ser = pd.Series(tdi)

        # Using a single dict argument means we go through replace_list
        result = ser.replace({ser[1]: ser[3]})

        expected = pd.Series([ser[0], ser[3], ser[2], ser[3], ser[4]])
        tm.assert_series_equal(result, expected)

    def test_replace_with_single_list(self):
        ser = pd.Series([0, 1, 2, 3, 4])
        result = ser.replace([1, 2, 3])
        tm.assert_series_equal(result, pd.Series([0, 0, 0, 0, 4]))

        s = ser.copy()
        return_value = s.replace([1, 2, 3], inplace=True)
        assert return_value is None
        tm.assert_series_equal(s, pd.Series([0, 0, 0, 0, 4]))

        # make sure things don't get corrupted when fillna call fails
        s = ser.copy()
        msg = (
            r"Invalid fill method\. Expecting pad \(ffill\) or backfill "
            r"\(bfill\)\. Got crash_cymbal"
        )
        with pytest.raises(ValueError, match=msg):
            return_value = s.replace([1, 2, 3], inplace=True, method="crash_cymbal")
            assert return_value is None
        tm.assert_series_equal(s, ser)

    def test_replace_mixed_types(self):
        s = pd.Series(np.arange(5), dtype="int64")

        def check_replace(to_rep, val, expected):
            sc = s.copy()
            r = s.replace(to_rep, val)
            return_value = sc.replace(to_rep, val, inplace=True)
            assert return_value is None
            tm.assert_series_equal(expected, r)
            tm.assert_series_equal(expected, sc)

        # MUST upcast to float
        e = pd.Series([0.0, 1.0, 2.0, 3.0, 4.0])
        tr, v = [3], [3.0]
        check_replace(tr, v, e)

        # MUST upcast to float
        e = pd.Series([0, 1, 2, 3.5, 4])
        tr, v = [3], [3.5]
        check_replace(tr, v, e)

        # casts to object
        e = pd.Series([0, 1, 2, 3.5, "a"])
        tr, v = [3, 4], [3.5, "a"]
        check_replace(tr, v, e)

        # again casts to object
        e = pd.Series([0, 1, 2, 3.5, pd.Timestamp("20130101")])
        tr, v = [3, 4], [3.5, pd.Timestamp("20130101")]
        check_replace(tr, v, e)

        # casts to object
        e = pd.Series([0, 1, 2, 3.5, True], dtype="object")
        tr, v = [3, 4], [3.5, True]
        check_replace(tr, v, e)

        # test an object with dates + floats + integers + strings
        dr = pd.Series(pd.date_range("1/1/2001", "1/10/2001", freq="D"))
        result = dr.astype(object).replace([dr[0], dr[1], dr[2]], [1.0, 2, "a"])
        expected = pd.Series([1.0, 2, "a"] + dr[3:].tolist(), dtype=object)
        tm.assert_series_equal(result, expected)

    def test_replace_bool_with_string_no_op(self):
        s = pd.Series([True, False, True])
        result = s.replace("fun", "in-the-sun")
        tm.assert_series_equal(s, result)

    def test_replace_bool_with_string(self):
        # nonexistent elements
        s = pd.Series([True, False, True])
        result = s.replace(True, "2u")
        expected = pd.Series(["2u", False, "2u"])
        tm.assert_series_equal(expected, result)

    def test_replace_bool_with_bool(self):
        s = pd.Series([True, False, True])
        result = s.replace(True, False)
        expected = pd.Series([False] * len(s))
        tm.assert_series_equal(expected, result)

    def test_replace_with_dict_with_bool_keys(self):
        s = pd.Series([True, False, True])
        result = s.replace({"asdf": "asdb", True: "yes"})
        expected = pd.Series(["yes", False, "yes"])
        tm.assert_series_equal(result, expected)

    def test_replace_Int_with_na(self, any_nullable_int_dtype):
        # GH 38267
        result = pd.Series([0, None], dtype=any_nullable_int_dtype).replace(0, pd.NA)
        expected = pd.Series([pd.NA, pd.NA], dtype=any_nullable_int_dtype)
        tm.assert_series_equal(result, expected)
        result = pd.Series([0, 1], dtype=any_nullable_int_dtype).replace(0, pd.NA)
        result.replace(1, pd.NA, inplace=True)
        tm.assert_series_equal(result, expected)

    def test_replace2(self):
        N = 100
        ser = pd.Series(np.fabs(np.random.randn(N)), tm.makeDateIndex(N), dtype=object)
        ser[:5] = np.nan
        ser[6:10] = "foo"
        ser[20:30] = "bar"

        # replace list with a single value
        rs = ser.replace([np.nan, "foo", "bar"], -1)

        assert (rs[:5] == -1).all()
        assert (rs[6:10] == -1).all()
        assert (rs[20:30] == -1).all()
        assert (pd.isna(ser[:5])).all()

        # replace with different values
        rs = ser.replace({np.nan: -1, "foo": -2, "bar": -3})

        assert (rs[:5] == -1).all()
        assert (rs[6:10] == -2).all()
        assert (rs[20:30] == -3).all()
        assert (pd.isna(ser[:5])).all()

        # replace with different values with 2 lists
        rs2 = ser.replace([np.nan, "foo", "bar"], [-1, -2, -3])
        tm.assert_series_equal(rs, rs2)

        # replace inplace
        return_value = ser.replace([np.nan, "foo", "bar"], -1, inplace=True)
        assert return_value is None
        assert (ser[:5] == -1).all()
        assert (ser[6:10] == -1).all()
        assert (ser[20:30] == -1).all()

    def test_replace_with_dictlike_and_string_dtype(self, nullable_string_dtype):
        # GH 32621
        s = pd.Series(["one", "two", np.nan], dtype=nullable_string_dtype)
        expected = pd.Series(["1", "2", np.nan])
        result = s.replace({"one": "1", "two": "2"})
        tm.assert_series_equal(expected, result)

    def test_replace_with_empty_dictlike(self):
        # GH 15289
        s = pd.Series(list("abcd"))
        tm.assert_series_equal(s, s.replace({}))

        with tm.assert_produces_warning(DeprecationWarning):
            empty_series = pd.Series([])
        tm.assert_series_equal(s, s.replace(empty_series))

    def test_replace_string_with_number(self):
        # GH 15743
        s = pd.Series([1, 2, 3])
        result = s.replace("2", np.nan)
        expected = pd.Series([1, 2, 3])
        tm.assert_series_equal(expected, result)

    def test_replace_replacer_equals_replacement(self):
        # GH 20656
        # make sure all replacers are matching against original values
        s = pd.Series(["a", "b"])
        expected = pd.Series(["b", "a"])
        result = s.replace({"a": "b", "b": "a"})
        tm.assert_series_equal(expected, result)

    def test_replace_unicode_with_number(self):
        # GH 15743
        s = pd.Series([1, 2, 3])
        result = s.replace("2", np.nan)
        expected = pd.Series([1, 2, 3])
        tm.assert_series_equal(expected, result)

    def test_replace_mixed_types_with_string(self):
        # Testing mixed
        s = pd.Series([1, 2, 3, "4", 4, 5])
        result = s.replace([2, "4"], np.nan)
        expected = pd.Series([1, np.nan, 3, np.nan, 4, 5])
        tm.assert_series_equal(expected, result)

    @pytest.mark.parametrize(
        "categorical, numeric",
        [
            (pd.Categorical(["A"], categories=["A", "B"]), [1]),
            (pd.Categorical(("A",), categories=["A", "B"]), [1]),
            (pd.Categorical(("A", "B"), categories=["A", "B"]), [1, 2]),
        ],
    )
    def test_replace_categorical(self, categorical, numeric):
        # GH 24971
        # Do not check if dtypes are equal due to a known issue that
        # Categorical.replace sometimes coerces to object (GH 23305)
        s = pd.Series(categorical)
        result = s.replace({"A": 1, "B": 2})
        expected = pd.Series(numeric)
        tm.assert_series_equal(expected, result)

    def test_replace_categorical_single(self):
        # GH 26988
        dti = pd.date_range("2016-01-01", periods=3, tz="US/Pacific")
        s = pd.Series(dti)
        c = s.astype("category")

        expected = c.copy()
        expected = expected.cat.add_categories("foo")
        expected[2] = "foo"
        expected = expected.cat.remove_unused_categories()
        assert c[2] != "foo"

        result = c.replace(c[2], "foo")
        tm.assert_series_equal(expected, result)
        assert c[2] != "foo"  # ensure non-inplace call does not alter original

        return_value = c.replace(c[2], "foo", inplace=True)
        assert return_value is None
        tm.assert_series_equal(expected, c)

        first_value = c[0]
        return_value = c.replace(c[1], c[0], inplace=True)
        assert return_value is None
        assert c[0] == c[1] == first_value  # test replacing with existing value

    def test_replace_with_no_overflowerror(self):
        # GH 25616
        # casts to object without Exception from OverflowError
        s = pd.Series([0, 1, 2, 3, 4])
        result = s.replace([3], ["100000000000000000000"])
        expected = pd.Series([0, 1, 2, "100000000000000000000", 4])
        tm.assert_series_equal(result, expected)

        s = pd.Series([0, "100000000000000000000", "100000000000000000001"])
        result = s.replace(["100000000000000000000"], [1])
        expected = pd.Series([0, 1, "100000000000000000001"])
        tm.assert_series_equal(result, expected)

    @pytest.mark.parametrize(
        "ser, to_replace, exp",
        [
            ([1, 2, 3], {1: 2, 2: 3, 3: 4}, [2, 3, 4]),
            (["1", "2", "3"], {"1": "2", "2": "3", "3": "4"}, ["2", "3", "4"]),
        ],
    )
    def test_replace_commutative(self, ser, to_replace, exp):
        # GH 16051
        # DataFrame.replace() overwrites when values are non-numeric

        series = pd.Series(ser)

        expected = pd.Series(exp)
        result = series.replace(to_replace)

        tm.assert_series_equal(result, expected)

    @pytest.mark.parametrize(
        "ser, exp", [([1, 2, 3], [1, True, 3]), (["x", 2, 3], ["x", True, 3])]
    )
    def test_replace_no_cast(self, ser, exp):
        # GH 9113
        # BUG: replace int64 dtype with bool coerces to int64

        series = pd.Series(ser)
        result = series.replace(2, True)
        expected = pd.Series(exp)

        tm.assert_series_equal(result, expected)

    def test_replace_invalid_to_replace(self):
        # GH 18634
        # API: replace() should raise an exception if invalid argument is given
        series = pd.Series(["a", "b", "c "])
        msg = (
            r"Expecting 'to_replace' to be either a scalar, array-like, "
            r"dict or None, got invalid type.*"
        )
        with pytest.raises(TypeError, match=msg):
            series.replace(lambda x: x.strip())

    @pytest.mark.parametrize("frame", [False, True])
    def test_replace_nonbool_regex(self, frame):
        obj = pd.Series(["a", "b", "c "])
        if frame:
            obj = obj.to_frame()

        msg = "'to_replace' must be 'None' if 'regex' is not a bool"
        with pytest.raises(ValueError, match=msg):
            obj.replace(to_replace=["a"], regex="foo")

    @pytest.mark.parametrize("frame", [False, True])
    def test_replace_empty_copy(self, frame):
        obj = pd.Series([], dtype=np.float64)
        if frame:
            obj = obj.to_frame()

        res = obj.replace(4, 5, inplace=True)
        assert res is None

        res = obj.replace(4, 5, inplace=False)
        tm.assert_equal(res, obj)
        assert res is not obj

    def test_replace_only_one_dictlike_arg(self):
        # GH#33340

        ser = pd.Series([1, 2, "A", pd.Timestamp.now(), True])
        to_replace = {0: 1, 2: "A"}
        value = "foo"
        msg = "Series.replace cannot use dict-like to_replace and non-None value"
        with pytest.raises(ValueError, match=msg):
            ser.replace(to_replace, value)

        to_replace = 1
        value = {0: "foo", 2: "bar"}
        msg = "Series.replace cannot use dict-value and non-None to_replace"
        with pytest.raises(ValueError, match=msg):
            ser.replace(to_replace, value)

    def test_replace_extension_other(self, frame_or_series):
        # https://github.com/pandas-dev/pandas/issues/34530
        obj = frame_or_series(pd.array([1, 2, 3], dtype="Int64"))
        result = obj.replace("", "")  # no exception
        # should not have changed dtype
        tm.assert_equal(obj, result)

    def test_replace_with_compiled_regex(self):
        # https://github.com/pandas-dev/pandas/issues/35680
        s = pd.Series(["a", "b", "c"])
        regex = re.compile("^a$")
        result = s.replace({regex: "z"}, regex=True)
        expected = pd.Series(["z", "b", "c"])
        tm.assert_series_equal(result, expected)


text:
package uk.dangrew.nuts.graphics.tutorial.database.components;

import java.util.ArrayList;
import java.util.List;
import uk.dangrew.nuts.graphics.tutorial.architecture.tutor.TutorActionBuilder;
import uk.dangrew.nuts.graphics.tutorial.architecture.tutor.TutorMessageBuilder;
import uk.dangrew.nuts.graphics.tutorial.architecture.tutorial.TutorialGlass;
import uk.dangrew.nuts.graphics.tutorial.architecture.tutorial.TutorialSelector;

public abstract class DatabaseTableTutorial {

   private final TutorialGlass glass;
   private final TutorialSelector selector;
   private final DatabaseComponents components;
   private final List< Runnable > instructions;

   public DatabaseTableTutorial(
            DatabaseComponents components,
            TutorialGlass glass,
            TutorialSelector selector
   ) {
      this.components = components;
      this.glass = glass;
      this.selector = selector;
      this.instructions = defineTutorial();
   }//End Constructor

   private List< Runnable > defineTutorial() {
      List< Runnable > instructions = new ArrayList<>( defineInstructions() );
      instructions.add( selector::resetSelector );
      return instructions;
   }//End Method

   public abstract List< Runnable > defineInstructions();

   public void run() {
      nextInstruction().run();
   }//End Method

   protected DatabaseComponents components(){
      return components;
   }//End Method

   protected TutorialGlass glass(){
      return glass;
   }//End Method

   private Runnable nextInstruction(){
      if ( instructions.isEmpty() ) {
         return null;
      }

      return instructions.remove( 0 );
   }//End Method

   protected void tutorUser( TutorMessageBuilder builder ) {
      glass().tutorUser( builder
               .callingBackTo( nextInstruction() )
               .withConfirmation()
      );
   }//End Method

   protected void tutorAction( TutorActionBuilder builder ) {
      glass().tutorAction( builder.callingBackTo( nextInstruction() ) );
   }//End Method

}//End Class


text:
package com.google.closure.plugin.soy;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

import org.apache.commons.io.FilenameUtils;
import org.apache.maven.plugin.MojoExecutionException;

import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
import com.google.closure.plugin.plan.BundlingPlanGraphNode.OptionsAndBundles;
import com.google.closure.plugin.plan.CompilePlanGraphNode;
import com.google.closure.plugin.plan.JoinNodes;
import com.google.closure.plugin.plan.PlanContext;
import com.google.closure.plugin.plan.PlanGraphNode;
import com.google.closure.plugin.plan.Update;
import com.google.common.io.ByteSink;
import com.google.common.io.ByteStreams;
import com.google.common.io.FileWriteMode;
import com.google.common.io.Files;
import com.google.template.soy.SoyFileSet;
import com.google.template.soy.SoyToJbcSrcCompiler;

final class SoyToJava extends CompilePlanGraphNode<SoyOptions, SoyBundle> {

  SoyToJava(PlanContext context) {
    super(context);
  }

  private static File getSrcJarPath(SoyBundle b) {
    return new File(
        b.outputJar.getParentFile(),
        FilenameUtils.removeExtension(
            b.outputJar.getName()) + "-src.jar");
  }

  @Override
  protected void process() throws IOException, MojoExecutionException {
    processDefunctBundles(optionsAndBundles);

    Update<OptionsAndBundles<SoyOptions, SoyBundle>> u =
        optionsAndBundles.get();

    this.changedFiles.clear();
    for (OptionsAndBundles<SoyOptions, SoyBundle> c : u.changed) {
      for (SoyBundle b : c.bundles) {
        processOne(b);
      }
    }
  }

  protected void processOne(SoyBundle bundle)
  throws MojoExecutionException {
    final File classJarOutFile = bundle.outputJar;
    final File srcJarOutFile = getSrcJarPath(bundle);

    SoyFileSet sfs = bundle.sfsSupplier.getSoyFileSet(context);

    // Compile To Jar
    final FileWriteMode[] writeModes = new FileWriteMode[0];
    ByteSink classJarOut = Files.asByteSink(classJarOutFile, writeModes);
    Optional<ByteSink> srcJarOut = Optional.of(
        Files.asByteSink(srcJarOutFile, writeModes));
    try {
      // TODO: relay errors and warnings via build context.
      SoyToJbcSrcCompiler.compile(sfs, classJarOut, srcJarOut);
    } catch (IOException ex) {
      throw new MojoExecutionException(
          "Failed to write compiled Soy output to a JAR", ex);
    }

    ImmutableList.Builder<File> outputsThisBundleBuilder =
        ImmutableList.builder();
    outputsThisBundleBuilder.add(classJarOutFile).add(srcJarOutFile);

    // Unpack JAR into classes directory.
    File projectBuildOutputDirectory = context.projectBuildOutputDirectory;
    try {
      try (InputStream in = new FileInputStream(classJarOutFile)) {
        try (ZipInputStream zipIn = new ZipInputStream(in)) {
          for (ZipEntry entry; (entry = zipIn.getNextEntry()) != null;
              zipIn.closeEntry()) {
            if (entry.isDirectory()) {
              continue;
            }
            String name = Files.simplifyPath(
                entry.getName().replace('/', File.separatorChar));
            if (name.startsWith("META-INF")) { continue; }
            context.log.debug("Unpacking " + name + " from soy generated jar");
            File outputFile = new File(FilenameUtils.concat(
                projectBuildOutputDirectory.getPath(), name));
            Files.createParentDirs(outputFile);
            outputsThisBundleBuilder.add(outputFile);
            try (FileOutputStream dest = new FileOutputStream(outputFile)) {
              ByteStreams.copy(zipIn, dest);
            }
          }
        }
      }
    } catch (IOException ex) {
      throw new MojoExecutionException(
          "Failed to unpack " + classJarOutFile
          + " to " + projectBuildOutputDirectory,
          ex);
    }

    ImmutableList<File> outputsThisBundle = outputsThisBundleBuilder.build();
    this.bundleToOutputs.put(bundle, outputsThisBundle);
    // TODO: We could hash before compiling to filter this down.
    this.changedFiles.addAll(outputsThisBundle);
  }

  @Override
  protected SV getStateVector() {
    return new SV(this);
  }

  static final class SV
  extends CompilePlanGraphNode.CompileStateVector<SoyOptions, SoyBundle> {

    private static final long serialVersionUID = 1L;

    protected SV(SoyToJava node) {
      super(node);
    }

    @Override
    public PlanGraphNode<?> reconstitute(PlanContext context, JoinNodes jn) {
      SoyToJava node = apply(new SoyToJava(context));
      BuildSoyFileSet.initSfss(node.optionsAndBundles, context);
      return node;
    }
  }
}


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

//Wait until the file is already reading
var greet =  fs.readFileSync(__dirname + '/text.txt' , 'utf8');

console.log(greet);

var greet2 = fs.readFile(__dirname + '/text.txt', 'utf8', onceRead);

//Error-first callback
function onceRead(err, data){
	console.log("This is a callback for read file " + data);
	console.log(err);
}

console.log('Done')


text:
package com.linkedin.thirdeye.tools;

import com.linkedin.thirdeye.datalayer.util.DaoProviderUtil;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.Period;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.ISODateTimeFormat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class FetchAnomaliesInRangeAndOutputCSV {
  private static final Logger LOG = LoggerFactory.getLogger(FetchAnomaliesInRangeAndOutputCSV.class);
  private static DateTime dataRangeStart;
  private static DateTime dataRangeEnd;
  private static DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm");

  public static void init(File persistenceFile) {
    DaoProviderUtil.init(persistenceFile);
  }

  public static void outputResultNodesToFile(File outputFile,
      List<FetchMetricDataAndExistingAnomaliesTool.ResultNode> resultNodes){
    try{
      BufferedWriter bw = new BufferedWriter(new FileWriter(outputFile));

      int rowCount = 0;
      if(resultNodes.size() > 0) {
        bw.write(StringUtils.join(resultNodes.get(0).getSchema(), ","));
        bw.newLine();
        for (FetchMetricDataAndExistingAnomaliesTool.ResultNode n : resultNodes) {
          bw.write(n.toString());
          bw.newLine();
          rowCount++;
        }
        LOG.info("{} anomaly results has been written...", rowCount);
      }
      bw.close();
    }
    catch (IOException e){
      LOG.error("Unable to write date-dimension anomaly results to given file {}", e);
    }
  }

  /**
   * Ouput merged anomaly results for given metric and time range
   * @param args List of arguments
   *             0: path to persistence file
   *             1: collection name
   *             2: metric name
   *             3: monitoring start time in ISO format
   *             4: timezone code
   *             5: monitoring length in days
   *             6: Output path
   */
  public static void main(String args[]){
    if(args.length < 7){
      LOG.error("Insufficient number of arguments");
      return;
    }

    String persistencePath = args[0];
    String collection = args[1];
    String metric = args[2];
    String monitoringDateTime = args[3];
    DateTimeZone dateTimeZone = DateTimeZone.forID(args[4]);
    int monitoringLength = Integer.valueOf(args[5]);
    File output_folder = new File(args[6]);

    FetchMetricDataAndExistingAnomaliesTool thirdEyeDAO = null;
    try {
      thirdEyeDAO = new FetchMetricDataAndExistingAnomaliesTool(new File(persistencePath));
    }
    catch (Exception e){
      LOG.error("Error in loading the persistence file: {}", e);
      return;
    }

    DateTime monitoringWindowStartTime = ISODateTimeFormat.dateTimeParser().parseDateTime(monitoringDateTime).withZone(dateTimeZone);
    Period period = new Period(0, 0, 0, monitoringLength, 0, 0, 0, 0);
    dataRangeStart = monitoringWindowStartTime.minus(period); // inclusive start
    dataRangeEnd = monitoringWindowStartTime; // exclusive end

    if(!output_folder.exists() || !output_folder.canWrite()){
      LOG.error("{} is not accessible", output_folder.getAbsoluteFile());
      return;
    }

    // Print Merged Results
    List<FetchMetricDataAndExistingAnomaliesTool.ResultNode> resultNodes = thirdEyeDAO.fetchMergedAnomaliesInRange(
        collection, metric, dataRangeStart, dataRangeEnd);

    LOG.info("Printing merged anomaly results from db...");
    String outputname = output_folder.getAbsolutePath() + "/" +
        "merged_" + metric + "_" + dateTimeFormatter.print(dataRangeStart) +
        "_" + dateTimeFormatter.print(dataRangeEnd) + ".csv";
    outputResultNodesToFile(new File(outputname), resultNodes);
    LOG.info("Finish job and print merged anomaly results from db in {}...", outputname);
  }

}


text:
Note=- clothing the frame with English language text

Head.PartyList={Vendor.Name.Full}
{Customer.Name.Full}

Among.Sec={Among.Ti}

{Vendor.US.Contract.Among.Block}

{Customer.US.Contract.Among.Block}

{Among.Def.sec}

Friend.Div=

By.secs=

{Vendor.US.Contract.By.Sec}
{Customer.US.Contract.By.Sec}

Vendor.Handle={_Vendor}

Customer.Handle={_Customer}

=[G/AgtForm/US/0.md]


text:
package org.blackdread.filtersortjooqapi.filter;

import org.blackdread.filtersortjooqapi.filter.keyparser.KeyParser5;

/**
 * Created by Yoann CAPLAIN on 2017/9/11.
 */
public interface FilterValue5<T1, T2, T3, T4, T5> extends FilterValue {

    KeyParser5<T1, T2, T3, T4, T5> getKeyParser5();
}


text:
@CHARSET "UTF-8";
.dm-field input.dm-field-error{
	border-color:red;
}
.dm-field input.dm-field-error:focus{
	outline: 0;
  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(255, 0, 0, .6);
          box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(255, 0, 0, .6);
}

ul.dm-field-popover-ul{
	list-style-type:none;
	padding:0;
	margin:0;
}
ul.dm-field-popover-ul li.dm-field-error{
	color:red;
}
ul.dm-field-popover-ul li.dm-field-message{
	color:green;
}
ul.dm-field-popover-ul li .glyphicon{
	font-size: 12px;
	margin-top:2px;
	margin-right:2px;
}

.dm-field-text, .dm-field-mInput,
.dm-field-date, .dm-field-mselect,
.dm-field-select, .dm-field-textarea,
.dm-field-time, .dm-field-tree,.dm-field-mselecttree{
  display: inline-block;
  height:auto;
  padding: 4px 6px;
  font-size: 12px;
  line-height: 1.1;
  color: #555;
  /* background-image: none;  IE11会由于这个导致获取不到input的焦点*/
  border: 1px solid #ccc;
  border-radius: 5px;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
          box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
          transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.dm-field-text:focus, .dm-field-search.focus,
.dm-field-date:focus, .dm-field-mselect:focus,
.dm-field-select:focus, .dm-field-textarea:focus,
.dm-field-time:focus, .dm-field-tree:focus,
.dm-field-mInput:focus,.dm-field-mselecttree:focus{
  border-color: #66afe9;
  outline: 0;
  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
          box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
}
.dm-field-text:-moz-placeholder, .dm-field-search input.search:-moz-placeholder,
.dm-field-date:-moz-placeholder, .dm-field-mselect:-moz-placeholder,
.dm-field-select:-moz-placeholder, .dm-field-textarea:-moz-placeholder,
.dm-field-time:-moz-placeholder, .dm-field-tree:-moz-placeholder,
.dm-field-mInput:-moz-placeholder,.dm-field-mselecttree:-moz-placeholder{
  color: #999;
}
.dm-field-text::-moz-placeholder, .dm-field-search input.search::-moz-placeholder,
.dm-field-date::-moz-placeholder, .dm-field-mselect::-moz-placeholder,
.dm-field-select::-moz-placeholder, .dm-field-textarea::-moz-placeholder,
.dm-field-time::-moz-placeholder, .dm-field-tree::-moz-placeholder,
.dm-field-mInput::-moz-placeholder, .dm-field-mselecttree::-moz-placeholder{
  color: #999;
  opacity: 1;
}
.dm-field-text:-ms-input-placeholder, .dm-field-search input.search:-ms-input-placeholder,
.dm-field-date:-ms-input-placeholder, .dm-field-mselect:-ms-input-placeholder,
.dm-field-select:-ms-input-placeholder, .dm-field-textarea:-ms-input-placeholder,
.dm-field-time:-ms-input-placeholder, .dm-field-tree:-ms-input-placeholder,
.dm-field-mInput:-ms-input-placeholder, .dm-field-mselecttree:-ms-input-placeholder{
  color: #999;
}
.dm-field-text::-webkit-input-placeholder, .dm-field-search input.search::-webkit-input-placeholder,
.dm-field-date::-webkit-input-placeholder, .dm-field-mselect::-webkit-input-placeholder,
.dm-field-select::-webkit-input-placeholder, .dm-field-textarea::-webkit-input-placeholder,
.dm-field-time::-webkit-input-placeholder, .dm-field-tree::-webkit-input-placeholder,
.dm-field-mInput::-webkit-input-placeholder, .dm-field-mselecttree::-webkit-input-placeholder{
  color: #999;
}
.dm-field-text[disabled], .dm-field-search.disabled,
.dm-field-date[disabled], .dm-field-mselect[disabled],
.dm-field-select[disabled], .dm-field-textarea[disabled],
.dm-field-time[disabled], .dm-field-tree[disabled],
.dm-field-mselecttree[disabled],
.dm-field-text[readonly], .dm-field-search.readonly,
.dm-field-date[readonly], .dm-field-mselect[readonly],
.dm-field-select[readonly], .dm-field-textarea[readonly],
.dm-field-time[readonly], .dm-field-tree[readonly],
.dm-field-mInput[readonly],.dm-field-mselecttree[readonly]{
  cursor: not-allowed;
  background-color: #eee;
  opacity: 1;
}
.dm-field-textarea {
  height: auto;
}

.dm-field-not-allowblank{
	padding-left:14px;
	background-image:url(images/not-allowblank.png);
	background-position:left 4px;
	background-repeat: no-repeat;
}


text:
<style>
.demo-block .n-button{
  margin-bottom:10px;
}
</style>
<script>
  module.exports = {
    data() {
      return {
        checked: true,
        checked1: false,
        checked2: true,
        checked3: false,
        checked4: true,
        checked5: true,
        checked6: true,
        checked7: true,
        checked8: true,
      };
    },
  };
</script>

## Checkboxes

### Basic

::: demo Easy to use checkbox components with v-model. Bind the checkbox state together with `v-model` which should be a Boolean variable

```html
<n-checkbox v-model="checked">Checkbox</n-checkbox>
<script>
  export default {
    data() {
      return {
        checked: true
      };
    }
  };
</script>
```
:::

### Disabled

Checkboxes can be disabled

:::demo Use `disabled` prop to make a checkbox disabled
```html
<n-checkbox v-model="checked2" :disabled="true">Checkbox 1</n-checkbox>
<n-checkbox v-model="checked3" :disabled="true">Checkbox 2</n-checkbox>
<script>
  export default {
    data() {
      return {
        checked2: true,
        checked3: false
      };
    }
  };
</script>
```
:::

### Colors

Same as buttons, checkboxes can have different colors depending on their `type` prop

:::demo Use `round` and `simple` props to configure the shape of your buttons or `icon` and `icon-mini` to specify whether your button is an icon button.All the props used here are Boolean props
```html
<n-checkbox v-model="checked4" type="primary">Primary</n-checkbox>
<n-checkbox v-model="checked5" type="info">Info</n-checkbox>
<n-checkbox v-model="checked6" type="warning">Warning</n-checkbox>
<n-checkbox v-model="checked7" type="success">Success</n-checkbox>
<n-checkbox v-model="checked8" type="danger">Danger</n-checkbox>
<script>
  export default {
    data() {
      return {
        checked4: true,
        checked5: false,
        checked6: false,
        checked7: false,
        checked8: false
      };
    }
  };
</script>
```
:::

### Attributes
| Attribute      | Description    | Type      | Accepted values       | Default   |
|---------- |-------- |---------- |--------------------  |----- |
| type     | checkbox type (colors)   | string  |   neutral/primary/info/success/ warning/danger           |    neutral     |
| disabled  | disable the checkbox    | boolean   | —   | false   |
| checked |  | determines the state of the checkbox (part of v-model) | boolean | false |

### Checkbox Events
| Event Name | Description | Parameters |
|---------- |-------- |---------- |
| change  | triggers when the binding value changes | checked value of checkbox |


text:
clear all; clc;
%%
%Demo: Run MI-SMF and MI-ACE on Gulfport Data
% This Demo:
% 1) Runs MI-ACE and MI-SMF on Training MUUFL Gulfport Data
% 2) Scores MI-ACE and MI-SMF on Test Data using Bullwinkle code
%
%
%%
% Set Paths
addpath('MUUFLGulfport/MUUFLGulfportDataCollection/util/');
addpath('MUUFLGulfport/MUUFLGulfportDataCollection/Bullwinkle/');
addpath('MUUFLGulfport/MUUFLGulfportDataCollection/signature_detectors');
data_path_test = 'MUUFLGulfport/MUUFLGulfportDataCollection/muufl_gulfport_campus_w_lidar_1.mat';
data_path_train = 'MUUFLGulfport/MUUFLGulfportDataCollection/muufl_gulfport_campus_3.mat';

%%
% Set Parameters and Target Type
gulfport_allexp_para.remove_band_index=[1:4 69:72];
gulfport_allexp_para.type = 'brown';

parameters.methodFlag = 0;  %Set to 0 for MI-SMF, Set to 1 for MI-ACE
parameters.initType =1 ; %Options: 1, 2, or 3.  InitType 1 is to use best positive instance based on objective function value, type 2 is to select positive instance with smallest cosine similarity with negative instance mean, type 3 is random selection of instance from positive bag
parameters.globalBackgroundFlag = 0;  %Set to 1 to use global mean and covariance, set to 0 to use negative bag mean and covariance
parameters.softmaxFlag = 0; %Set to 0 to use max, set to 1 to use softmax in computation of objective function values of positive bags
parameters.posLabel = 1; %Value used to indicate positive bags, usually 1
parameters.negLabel = 0; %Value used to indicate negative bags, usually 0 or -1
parameters.maxIter = 100; %Maximum number of iterations (rarely used)

positiveBagSize = 5;
scoring_para= { {gulfport_allexp_para.type,[],[],[]} };

%%
%Create Training Data
load(data_path_train)
hsi.Data=double(hsi.Data);
hsi.Data(:,:,gulfport_allexp_para.remove_band_index) = [];
[n_row,n_col,n_dim]=size(hsi.Data);
index = strcmp(hsi.groundTruth.Targets_Type, gulfport_allexp_para.type);
pBags = {};
nBags = {};
target_col=hsi.groundTruth.Targets_colIndices(index);
target_row=hsi.groundTruth.Targets_rowIndices(index);
labels=zeros(n_row,n_col);
shiftAmt = (positiveBagSize - 1)/2;

hsi_data=reshape(shiftdim(hsi.Data,2),n_dim,n_row*n_col);

for j=1:length(target_col)
    labels(target_row(j)-shiftAmt:target_row(j)+shiftAmt,target_col(j)-shiftAmt:target_col(j)+shiftAmt)=1; %generate binary labels
    temp = hsi.Data(target_row(j)-shiftAmt:target_row(j)+shiftAmt, target_col(j)-shiftAmt:target_col(j)+shiftAmt, :);
    pBags{j} = reshape(temp, [positiveBagSize^2, n_dim]);
end
reshape_labels=reshape(labels,1,n_row*n_col);
valid_mask=reshape(hsi.valid_mask,1,n_row*n_col);
valid_labels=reshape_labels(valid_mask);
valid_hsi_data=hsi_data(:,valid_mask);
lVec = valid_labels(:);
nBags{1} = valid_hsi_data(:,lVec == 0)';

dataBags = horzcat(nBags, pBags);
labelsB = horzcat(zeros(1,length(nBags)), ones(1, length(pBags)));

%%
%Run algorithms
load(data_path_test)
hsi.Data(:,:,gulfport_allexp_para.remove_band_index) = [];
hsi_img = double(hsi.Data);

%%%%%MI-SMF
confid_score={};
parameters.samplePor = 1;
[tar_sig,~, B_mu, sig_inv_half] = miTarget(dataBags, labelsB, parameters);
B_mu = zeros(size(B_mu));
inv_B_cov=sig_inv_half'*sig_inv_half;
confid_out= ace_det_local(hsi_img,tar_sig',hsi.valid_mask,B_mu',inv_B_cov);
confid_score{1}=score_hylid_perpixel(hsi,confid_out,scoring_para,'MISMF','det_fig',[],'roc_fig',150);
figure(150);axis([0 0.001 0 1])

%%%%%MI-ACE
parameters.methodFlag = 1;  %Set to 0 for MI-SMF, Set to 1 for MI-ACE
parameters.samplePor = 1;
[tar_sig] = miTarget(dataBags, labelsB, parameters);
confid_out = ace_det_local(hsi_img,tar_sig',hsi.valid_mask,B_mu',inv_B_cov);
confid_score{2} =score_hylid_perpixel(hsi,confid_out,scoring_para,'MIACE','det_fig',[],'roc_fig',250);
figure(250);axis([0 0.001 0 1])


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

define(function(require) {
  // Dependencies
  var Locale = require('utils/locale');
  var OpenNebulaDatastore = require('opennebula/datastore');
  var OpenNebulaError = require('opennebula/error');
  var DomDataTable = require('utils/dom-datatable');
  var Notifier = require('utils/notifier');
  var UniqueId = require('utils/unique-id');
  var VCenterCommon = require('./vcenter-common');

  var TemplateHTML = require('hbs!./common/html');
  var RowTemplate = require('hbs!./datastores/row');
  var EmptyFieldsetHTML = require('hbs!./common/empty-fieldset');
  var FieldsetTableHTML = require('hbs!./common/fieldset-table');

  function VCenterDatastores() {
    return this;
  }

  VCenterDatastores.prototype = {
    'html': VCenterCommon.html,
    'insert': _fillVCenterDatastores,
    'import': _import
  };
  VCenterDatastores.prototype.constructor = VCenterDatastores;

  return VCenterDatastores;

  /*
    Retrieve the list of Datastores from vCenter and fill the container with them

    opts = {
      datacenter: "Datacenter Name",
      cluster: "Cluster Name",
      container: Jquery div to inject the html,
      vcenter_user: vCenter Username,
      vcenter_password: vCenter Password,
      vcenter_host: vCenter Host
    }
   */
  function _fillVCenterDatastores(opts) {
    var path = '/vcenter/datastores';

    var context = $(".vcenter_import", opts.container);

    context.html( TemplateHTML({}) );
    context.show();

    $.ajax({
      url: path,
      type: "GET",
      data: {timeout: false},
      dataType: "json",
      headers: {
        "X-VCENTER-USER": opts.vcenter_user,
        "X-VCENTER-PASSWORD": opts.vcenter_password,
        "X-VCENTER-HOST": opts.vcenter_host
      },
      success: function(response){
        $(".vcenter_datacenter_list", context).html("");

        $.each(response, function(datacenter_name, elements){
          var content;
          if (elements.length == 0) {
            content = EmptyFieldsetHTML({
              title : datacenter_name + ' ' + Locale.tr("DataCenter"),
              message : Locale.tr("No new datastores found in this DataCenter")
            });

            $(".vcenter_datacenter_list", context).append(content);
          } else {
            var tableId = "vcenter_import_table" + UniqueId.id();
            content = FieldsetTableHTML({
              tableId : tableId,
              title : datacenter_name + ' ' + Locale.tr("DataCenter"),
              clearImported : Locale.tr("Clear Imported Datastores"),
              toggleAdvanced : false,
              columns : [
                '<input type="checkbox" class="check_all"/>',
                Locale.tr("Name"),
                Locale.tr("Cluster"),
                ""
              ]
            });

            var newdiv = $(content).appendTo($(".vcenter_datacenter_list", context));
            var tbody = $('#' + tableId + ' tbody', context);

            $.each(elements, function(id, element){
              var opts = { name: element.name, cluster: element.cluster };
              var trow = $(RowTemplate(opts)).appendTo(tbody);

              $(".check_item", trow).data("one_template", element.ds)
            });

            var elementsTable = new DomDataTable(
              tableId,
              {
                actions: false,
                info: false,
                dataTableOptions: {
                  "bAutoWidth": false,
                  "bSortClasses" : false,
                  "bDeferRender": false,
                  //"ordering": true,
                  "order": [],
                  "aoColumnDefs": [
                    {"bSortable": false, "aTargets": [0,3]},
                    {"bSortable": true, "aTargets": [1,2]},
                    {"sWidth": "35px", "aTargets": [0]},
                  ]
                }
              });

            elementsTable.initialize();

            $("a.vcenter-table-select-all").text(Locale.tr("Select all %1$s Datastores", elements.length));

            VCenterCommon.setupTable({
              context : newdiv,
              allSelected : Locale.tr("All %1$s Datastores selected."),
              selected: Locale.tr("%1$s Datastores selected.")
            });

            context.off('click', '.clear_imported');
            context.on('click', '.clear_imported', function() {
              _fillVCenterDatastores(opts);
              return false;
            });
          }
        });
      },
      error: function(response){
        context.hide();
        Notifier.onError({}, OpenNebulaError(response));
      }
    });
  }

  function _import(context) {
    $.each($("table.vcenter_import_table", context), function() {
      $.each($(this).DataTable().$(".check_item:checked"), function() {
        var row_context = $(this).closest("tr");

        VCenterCommon.importLoading({context : row_context});
        var one_template = $(this).data("one_template");
        $.each(one_template, function(id, element){
          var datastore_json = {
            "datastore": {
              "datastore_raw": this.one
            },
            "cluster_id" : -1
          };
          OpenNebulaDatastore.create({
            timeout: true,
            data: datastore_json,
            success: function(request, response) {
              VCenterCommon.importSuccess({
                context : row_context,
                message : Locale.tr("Datastore created successfully. ID: %1$s", response.DATASTORE.ID)
              });
            },
            error: function (request, error_json) {
              VCenterCommon.importFailure({
                context : row_context,
                message : (error_json.error.message || Locale.tr("Cannot contact server: is it running and reachable?"))
              });
            }
          });
        });
      });
    });
  }
});


text:
package com.intellij.spring.model.xml.webflow;

import com.intellij.codeInspection.jsp.ELValidationInspection;
import com.intellij.idea.Bombed;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VirtualFileManager;
import com.intellij.spring.model.xml.SpringHighlightingTestCase;
import com.intellij.testFramework.builders.JavaModuleFixtureBuilder;
import com.intellij.testFramework.builders.WebModuleFixtureBuilder;
import org.jetbrains.annotations.NonNls;

import java.io.File;
import java.util.Calendar;

/**
 * User: Sergey.Vasiliev
 */
public class WebflowElTest extends SpringHighlightingTestCase<WebModuleFixtureBuilder> {

  @Override
  protected void setUp() throws Exception {
    super.setUp();
  }

  protected Class<WebModuleFixtureBuilder> getModuleFixtureBuilderClass() {
    return WebModuleFixtureBuilder.class;
  }

  protected boolean isWithTestSources() {
    return false;
  }

  protected void configureModule(WebModuleFixtureBuilder moduleBuilder) throws Exception {
    super.configureModule(moduleBuilder);

    myFixture.enableInspections(new ELValidationInspection());

    moduleBuilder.setMockJdkLevel(JavaModuleFixtureBuilder.MockJdkLevel.jdk15);
    addSpring_2_5_Library(moduleBuilder);

    //moduleBuilder.addWebRoot(myFixture.getTempDirPath() + "/", "/");

    moduleBuilder
        .addLibraryJars("webflow-jar", PathManager.getHomePath().replace(File.separatorChar, '/') + super.getBasePath(), "webflow_2_0.jar");
  }

  private void createFileSet() throws Throwable {
    final String path = myFixture.getTempDirPath() + File.separatorChar + "spring-beans.xml";
    final String url = VirtualFileManager.constructUrl(LocalFileSystem.PROTOCOL, path);
    configureFileSet().addFile(url);
  }

  @Bombed(user = "sergey.vasiliev", month = Calendar.SEPTEMBER, day = 28)
  public void testAppContextHighlighting() throws Throwable {
    createFileSet();
    myFixture.copyDirectoryToProject("beans", "beans");

    myFixture.testHighlighting(true, false, true, "booking_app_context.xml", "spring-beans.xml");
  }

  public void testFlowScopeCompletion() throws Throwable {
    createFileSet();
    myFixture.copyDirectoryToProject("beans", "beans");

    myFixture.testCompletion("booking_flow_scope_before.xml", "booking_flow_scope_after.xml", "spring-beans.xml");
  }

   @Bombed(user = "sergey.vasiliev", month = Calendar.SEPTEMBER, day = 28)
  public void testFlowScopeRename() throws Throwable {
    createFileSet();
    myFixture.copyDirectoryToProject("beans", "beans");

    myFixture.testRename("booking_flow_scope_rename_before.xml", "booking_flow_scope_rename_after.xml", "booking_new", "spring-beans.xml");
  }

  @Bombed(user = "sergey.vasiliev", month = Calendar.SEPTEMBER, day = 28)
  public void testFlowScopeRename2() throws Throwable {
    createFileSet();
    myFixture.copyDirectoryToProject("beans", "beans");

    myFixture
        .testRename("booking_flow_scope_rename_before2.xml", "booking_flow_scope_rename_after2.xml", "booking_new", "spring-beans.xml");
  }

  public void testFlowScopeCompletion2() throws Throwable {
    createFileSet();
    myFixture.copyDirectoryToProject("beans", "beans");

    myFixture.testCompletion("booking_flow_scope_before2.xml", "booking_flow_scope_after2.xml", "spring-beans.xml");
  }

  public void testFlowScopeCompletion3() throws Throwable {
    createFileSet();
    myFixture.copyDirectoryToProject("beans", "beans");

    myFixture.testCompletion("booking_flow_scope_before3.xml", "booking_flow_scope_after3.xml", "spring-beans.xml");
  }

  public void testFlowScopeCompletionVariants() throws Throwable {
    createFileSet();

    myFixture.copyDirectoryToProject("beans", "beans");
    myFixture.copyFileToProject("spring-beans.xml");

    myFixture.testCompletionVariants("booking_flow_scope_completion_variants.xml", "class", "id");
  }

  public void testFlowScopeCompletionVariants2() throws Throwable {
    createFileSet();

    myFixture.copyDirectoryToProject("beans", "beans");
    myFixture.copyFileToProject("spring-beans.xml");

    myFixture.testCompletion("booking_flow_scope_completion_variants_before.xml", "booking_flow_scope_completion_variants_after.xml");
  }

  public void testCurrentUserVarHighlighting() throws Throwable {
    createFileSet();
    myFixture.copyDirectoryToProject("beans", "beans");
    myFixture.addClass("package java.security; public interface Principal { public String getName(); }");
    myFixture.testHighlighting(true, false, true, "booking_current_user.xml", "spring-beans.xml");
  }

  public void testPersistenceContextHighlighting() throws Throwable {
    createFileSet();
    myFixture.copyDirectoryToProject("beans", "beans");
    myFixture.addClass("package javax.persistence; public interface EntityManager  { void persist(java.lang.Object o); }");

    myFixture.testHighlighting(true, false, true, "booking_persistence_context.xml");
  }

  public void testInputVariablesHighlighting() throws Throwable {
    createFileSet();
    myFixture.copyDirectoryToProject("beans", "beans");

    myFixture.configureByFiles("booking_input_variables.xml", "spring-beans.xml");
    myFixture.testHighlighting(true, false, true, "booking_input_variables.xml", "spring-beans.xml");
  }

  public void testInputVariablesRename() throws Throwable {
    createFileSet();
    myFixture.copyDirectoryToProject("beans", "beans");

    myFixture.testRename("booking_input_variables_before.xml", "booking_input_variables_after.xml", "holderId_new", "spring-beans.xml");
  }

  public void testVarsHighlighting() throws Throwable {
    createFileSet();
    myFixture.copyDirectoryToProject("beans", "beans");

    myFixture.testHighlighting(true, false, true, "booking_vars.xml");
  }

  public void testLocalVarsHighlighting() throws Throwable {
    createFileSet();
    myFixture.copyDirectoryToProject("beans", "beans");

    myFixture.testHighlighting(true, false, true, "booking_local_vars.xml");
  }

  public void testVarsRename() throws Throwable {

    createFileSet();
    myFixture.copyDirectoryToProject("beans", "beans");

    myFixture.testRename("booking_vars_before.xml", "booking_vars_after.xml", "booking_new", "spring-beans.xml");
  }

  @NonNls
  protected String getBasePath() {
    return "/svnPlugins/spring/spring-tests/testData/webflow/";
  }
}


text:
/*
 * Title:   Custom Style File
 * Author:  http://themeforest.net/user/soaptheme
 */
#hotel-features article img.custom_amenity {
  margin-top: 5px;
  margin-right: 5px;
  opacity: 0.7; }

#hotel-features article img.custom_amenity:hover {
  opacity: 1; }


text:
<?php
/**
 * Admin View: Importer - CSV import progress
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>

<?php esc_html_e( 'Importing', 'woocommerce' ); ?>

<?php esc_html_e( 'Your products are now being imported...', 'woocommerce' ); ?>

		<progress class="woocommerce-importer-progress" max="100" value="0"></progress>