<commit_before>/*
* Copyright 2010-2011 Research In Motion Limited.
*
* 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.
*/

/**
 * @namespace The event Object contains functions for dealing with specific events.
 * @toc {Event} Event
 * @featureID blackberry.event
 */
blackberry.event = {

   /**#@+
    * @noSignature
    * @event
    * @BB10X
    * @description This event is fired by the system. If you want to listen to the event you can do so using the {@link blackberry.event.addEventListener} function and remove the listener using the {@link blackberry.event.removeEventListener} function. <br/>
    */
  
   /**
    * @description The <b>batterycritical</b> event is triggered whenever the battery level changes to the value lower than 5%.
    * @callback {function} yourCallbackFunction The callback function that will be invoked on the batterycritical event
    * @callback {JSON} yourCallbackFunction.info An object  the pertinent information
    * @callback {Number} yourCallbackFunction.info.level The percentage of the battery charge (0-100).
    * @callback {Boolean} yourCallbackFunction.info.isPlugged A boolean that represents whether or not the device is receiving a charge.
    * @example
    * &lt;script type="text/javascript"&gt;
    *
    * function onBatteryCritical(info) {
    *   alert("The playbook " + info.isPlugged?"is ":"is not " + "plugged in with " + info.level + "% battery remaining");
    * }
    *
    * blackberry.event.addEventListener("batterycritical", onBatteryCritical);
    *
    * &lt;/script&gt;
    */
   batterycritical : function(){},

   /**
    * @description The <b>batterylow</b> event is triggered whenever the battery level changes to the value lower than 15%.
    * @callback {function} yourCallbackFunction The callback function that will be invoked on the batterylow event
    * @callback {JSON} yourCallbackFunction.info An object  the pertinent information
    * @callback {Number} yourCallbackFunction.info.level The percentage of the battery charge (0-100).
    * @callback {Boolean} yourCallbackFunction.info.isPlugged A boolean that represents whether or not the device is receiving a charge.
    * @example
    * &lt;script type="text/javascript"&gt;
    *
    * function onBatteryLow(info) {
    *   alert("The playbook " + info.isPlugged?"is ":"is not " + "plugged in with " + info.level + "% battery remaining");
    * }<commit_msg>Adjusted examples for battery low and critical events<commit_after>/*
* Copyright 2010-2011 Research In Motion Limited.
*
* 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.
*/

/**
 * @namespace The event Object contains functions for dealing with specific events.
 * @toc {Event} Event
 * @featureID blackberry.event
 */
blackberry.event = {

   /**#@+
    * @noSignature
    * @event
    * @BB10X
    * @description This event is fired by the system. If you want to listen to the event you can do so using the {@link blackberry.event.addEventListener} function and remove the listener using the {@link blackberry.event.removeEventListener} function. <br/>
    */
  
   /**
    * @description The <b>batterycritical</b> event is triggered whenever the battery level changes to the value lower than 5%.
    * @callback {function} yourCallbackFunction The callback function that will be invoked on the batterycritical event
    * @callback {JSON} yourCallbackFunction.info An object  the pertinent information
    * @callback {Number} yourCallbackFunction.info.level The percentage of the battery charge (0-100).
    * @callback {Boolean} yourCallbackFunction.info.isPlugged A boolean that represents whether or not the device is receiving a charge.
    * @example
    * &lt;script type="text/javascript"&gt;
    *
    * function onBatteryCritical(info) {
    *   alert("The battery level is critical: " + info.level + (info.isPlugged?".":" and will shutdown soon. Save your work or connect device to a charging source."));
    * }
    *
    * blackberry.event.addEventListener("batterycritical", onBatteryCritical);
    *
    * &lt;/script&gt;
    */
   batterycritical : function(){},

   /**
    * @description The <b>batterylow</b> event is triggered whenever the battery level changes to the value lower than 15%.
    * @callback {function} yourCallbackFunction The callback function that will be invoked on the batterylow event
    * @callback {JSON} yourCallbackFunction.info An object  the pertinent information
    * @callback {Number} yourCallbackFunction.info.level The percentage of the battery charge (0-100).
    * @callback {Boolean} yourCallbackFunction.info.isPlugged A boolean that represents whether or not the device is receiving a charge.
    * @example
    * &lt;script type="text/javascript"&gt;
    *
    * function onBatteryLow(info) {
    *   alert("The battery level is low: " + info.level + (info.isPlugged?".":". Consider connecting your device to a charging source."));
    * }
{'fraction_non_alphanumeric': 0.09407369672270334, 'fraction_numerical': 0.008490405841399219, 'mean_word_length': 3.8278688524590163, 'pattern_counts': {'":': 4, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '885183', 'n_tokens_mistral': 1588, 'n_tokens_neox': 1516, 'n_words': 635}