- second(long) - Method in class net.cassite.style.util.DateFuncSup.DateSeperator
-
- set(int, E) - Method in class net.cassite.style.aggregation.JoinedList
-
- Set(T) - Static method in class net.cassite.style.Core
-
Set the value to ListIterator
Only works for loops on ListIterators
- set(ObjectType, Object) - Method in class net.cassite.style.reflect.FieldSupport
-
set accessible to 'true' then set field value
- Set(T) - Static method in class net.cassite.style.Style
-
Set the value to ListIterator
Only works for loops on ListIterators
- Set(T) - Method in interface net.cassite.style.var
-
Set the value to ListIterator
Only works for loops on ListIterators
- setters() - Method in class net.cassite.style.reflect.ClassSup
-
retrieve all setters
- setValues(int, int, R) - Method in class net.cassite.style.LoopInfo
-
set all fields of the loop info
- simpleName() - Method in class net.cassite.style.reflect.ClassSup
-
Returns the simple name of the underlying class as given in the
source code.
- size() - Method in interface net.cassite.style.aggregation.A1FuncSup
-
- size() - Method in class net.cassite.style.aggregation.ArrayFuncSup
-
- size() - Method in class net.cassite.style.aggregation.CollectionFuncSup
-
- size() - Method in class net.cassite.style.aggregation.IterableFuncSup
-
- size() - Method in class net.cassite.style.aggregation.JoinedList
-
- size() - Method in class net.cassite.style.aggregation.MapFuncSup
-
simply invoke Map.size()
- sleep(long) - Static method in class net.cassite.style.Core
-
Make current thread sleep for designated milliseconds
- sleep(long) - Static method in class net.cassite.style.Style
-
Make current thread sleep for designated milliseconds
- sleep(long) - Method in interface net.cassite.style.var
-
Make current thread sleep for designated milliseconds
- step(N) - Method in class net.cassite.style.ForSupport.ToSupport
-
set step
- StringFuncSup - Class in net.cassite.style.util
-
Supporter for strings
- Style - Class in net.cassite.style
-
All functions in Style tool box are provided here.
Let your class extends Style
to avoid retyping
Style.
which makes your coding prettier
- StyleRuntimeException - Exception in net.cassite.style
-
A RuntimeException to simplify exception handling.
it is recommended to create this exception using
Style.$(Throwable)
- StyleRuntimeException(Throwable) - Constructor for exception net.cassite.style.StyleRuntimeException
-
- subList(int, int) - Method in class net.cassite.style.aggregation.JoinedList
-
- subtract(DateFuncSup.DateSeperator) - Method in class net.cassite.style.util.DateFuncSup
-
subtract date to supported date
- subtract(def<DateFuncSup.DateSeperator>) - Method in class net.cassite.style.util.DateFuncSup
-
subtract date to supported date
- subtract(RFunc1<DateFuncSup.DateSeperator, DateFuncSup.DateSeperator>) - Method in class net.cassite.style.util.DateFuncSup
-
subtract date to supported date
- Switch(T) - Static method in class net.cassite.style.Core
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance see the type to switch as return type.
Check SwitchBlock for more info
- Switch(T, RFunc2<Boolean, T, T>) - Static method in class net.cassite.style.Core
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance see the type to switch as return type.
Check SwitchBlock for more info
- Switch(T, def<Boolean>) - Static method in class net.cassite.style.Core
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance see the type to switch as return type.
Check SwitchBlock for more info
- Switch(T, Class<R>) - Static method in class net.cassite.style.Core
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance specifies Switch's return type
Check SwitchBlock for more info
- Switch(T, Class<R>, RFunc2<Boolean, T, T>) - Static method in class net.cassite.style.Core
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance specifies Switch's return type
Check SwitchBlock for more info
- Switch(T, Class<R>, def<Boolean>) - Static method in class net.cassite.style.Core
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance specifies Switch's return type
Check SwitchBlock for more info
- Switch(T) - Static method in class net.cassite.style.Style
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance see the type to switch as return type.
Check SwitchBlock for more info
- Switch(T, RFunc2<Boolean, T, T>) - Static method in class net.cassite.style.Style
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance see the type to switch as return type.
Check SwitchBlock for more info
- Switch(T, def<Boolean>) - Static method in class net.cassite.style.Style
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance see the type to switch as return type.
Check SwitchBlock for more info
- Switch(T, Class<R>) - Static method in class net.cassite.style.Style
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance specifies Switch's return type
Check SwitchBlock for more info
- Switch(T, Class<R>, RFunc2<Boolean, T, T>) - Static method in class net.cassite.style.Style
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance specifies Switch's return type
Check SwitchBlock for more info
- Switch(T, Class<R>, def<Boolean>) - Static method in class net.cassite.style.Style
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance specifies Switch's return type
Check SwitchBlock for more info
- Switch(T) - Method in interface net.cassite.style.var
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance see the type to switch as return type.
Check SwitchBlock for more info
- Switch(T, RFunc2<Boolean, T, T>) - Method in interface net.cassite.style.var
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance see the type to switch as return type.
Check SwitchBlock for more info
- Switch(T, def<Boolean>) - Method in interface net.cassite.style.var
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance see the type to switch as return type.
Check SwitchBlock for more info
- Switch(T, Class<R>) - Method in interface net.cassite.style.var
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance specifies Switch's return type
Check SwitchBlock for more info
- Switch(T, Class<R>, RFunc2<Boolean, T, T>) - Method in interface net.cassite.style.var
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance specifies Switch's return type
Check SwitchBlock for more info
- Switch(T, Class<R>, def<Boolean>) - Method in interface net.cassite.style.var
-
Entrance of enhanced Switch with return value
java switch only support few number types and String,
with enhanced Switch, you can switch any type.
This entrance specifies Switch's return type
Check SwitchBlock for more info
- SwitchBlock<T,R> - Class in net.cassite.style
-
Supporter for switch expression
Note that it doesn't support break, because it doesn't go through other cases
except the matched one.


Plato on Github
Report Home
compiled\ember-runtime\lib\mixins\enumerable.js
Maintainability
71.16
Lines of code
1081
Difficulty
83.05
Estimated Errors
4.24
Function weight
By Complexity
By SLOC
/** @module ember @submodule ember-runtime */ // .......................................................... // HELPERS // 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _emberMetalCore = require('ember-metal/core'); var _emberMetalCore2 = _interopRequireDefault(_emberMetalCore); var _emberMetalProperty_get = require('ember-metal/property_get'); var _emberMetalProperty_set = require('ember-metal/property_set'); var _emberMetalMixin = require('ember-metal/mixin'); var _emberMetalComputed = require('ember-metal/computed'); var _emberMetalProperty_events = require('ember-metal/property_events'); var _emberMetalEvents = require('ember-metal/events'); var _emberRuntimeCompare = require('ember-runtime/compare'); var _emberRuntimeCompare2 = _interopRequireDefault(_emberRuntimeCompare); var contexts = []; function popCtx() { return contexts.length === 0 ? {} : contexts.pop(); } function pushCtx(ctx) { contexts.push(ctx); return null; } function iter(key, value) { var valueProvided = arguments.length === 2; function i(item) { var cur = (0, _emberMetalProperty_get.get)(item, key); return valueProvided ? value === cur : !!cur; } return i; } /** This mixin defines the common interface implemented by enumerable objects in Ember. Most of these methods follow the standard Array iteration API defined up to JavaScript 1.8 (excluding language-specific features that cannot be emulated in older versions of JavaScript). This mixin is applied automatically to the Array class on page load, so you can use any of these methods on simple arrays. If Array already implements one of these methods, the mixin will not override them. ## Writing Your Own Enumerable To make your own custom class enumerable, you need two items: 1. You must have a length property. This property should change whenever the number of items in your enumerable object changes. If you use this with an `Ember.Object` subclass, you should be sure to change the length property using `set().` 2. You must implement `nextObject().` See documentation. Once you have these two methods implemented, apply the `Ember.Enumerable` mixin to your class and you will be able to enumerate the contents of your object like any other collection. ## Using Ember Enumeration with Other Libraries Many other libraries provide some kind of iterator or enumeration like facility. This is often where the most common API conflicts occur. Ember's API is designed to be as friendly as possible with other libraries by implementing only methods that mostly correspond to the JavaScript 1.8 API. @class Enumerable @namespace Ember @since Ember 0.9 @private */ exports['default'] = _emberMetalMixin.Mixin.create({ /** __Required.__ You must implement this method to apply this mixin. Implement this method to make your class enumerable. This method will be called repeatedly during enumeration. The index value will always begin with 0 and increment monotonically. You don't have to rely on the index value to determine what object to return, but you should always check the value and start from the beginning when you see the requested index is 0. The `previousObject` is the object that was returned from the last call to `nextObject` for the current iteration. This is a useful way to manage iteration if you are tracing a linked list, for example. Finally the context parameter will always contain a hash you can use as a "scratchpad" to maintain any other state you need in order to iterate properly. The context object is reused and is not reset between iterations so make sure you setup the context with a fresh state whenever the index parameter is 0. Generally iterators will continue to call `nextObject` until the index reaches the current length-1. If you run out of data before this time for some reason, you should simply return undefined. The default implementation of this method simply looks up the index. This works great on any Array-like objects. @method nextObject @param {Number} index the current index of the iteration @param {Object} previousObject the value returned by the last call to `nextObject`. @param {Object} context a context object you can use to maintain state. @return {Object} the next object in the iteration or undefined @private */ nextObject: null, /** Helper method returns the first object from a collection. This is usually used by bindings and other parts of the framework to extract a single object if the enumerable contains only one item. If you override this method, you should implement it so that it will always return the same value each time it is called. If your enumerable contains only one object, this method should always return that object. If your enumerable is empty, this method should return `undefined`. ```javascript var arr = ['a', 'b', 'c']; arr.get('firstObject'); // 'a' var arr = []; arr.get('firstObject'); // undefined ``` @property firstObject @return {Object} the object or undefined @private */ firstObject: (0, _emberMetalComputed.computed)('[]', function () { if ((0, _emberMetalProperty_get.get)(this, 'length') === 0) { return undefined; } // handle generic enumerables var context = popCtx(); var ret = this.nextObject(0, null, context); pushCtx(context); return ret; }), /** Helper method returns the last object from a collection. If your enumerable contains only one object, this method should always return that object. If your enumerable is empty, this method should return `undefined`. ```javascript var arr = ['a', 'b', 'c']; arr.get('lastObject'); // 'c' var arr = []; arr.get('lastObject'); // undefined ``` @property lastObject @return {Object} the last object or undefined @private */ lastObject: (0, _emberMetalComputed.computed)('[]', function () { var len = (0, _emberMetalProperty_get.get)(this, 'length'); if (len === 0) { return undefined; } var context = popCtx(); var idx = 0; var last = null; var cur; do { last = cur; cur = this.nextObject(idx++, last, context); } while (cur !== undefined); pushCtx(context); return last; }), /** Returns `true` if the passed object can be found in the receiver. The default version will iterate through the enumerable until the object is found. You may want to override this with a more efficient version. ```javascript var arr = ['a', 'b', 'c']; arr.contains('a'); // true arr.contains('z'); // false ``` @method contains @param {Object} obj The object to search for. @return {Boolean} `true` if object is found in enumerable. @private */ contains: function contains(obj) { var found = this.find(function (item) { return item === obj; }); return found !== undefined; }, /** Iterates through the enumerable, calling the passed function on each item. This method corresponds to the `forEach()` method defined in JavaScript 1.6. The callback method you provide should have the following signature (all parameters are optional): ```javascript function(item, index, enumerable); ``` - `item` is the current item in the iteration. - `index` is the current index in the iteration. - `enumerable` is the enumerable object itself. Note that in addition to a callback, you can also pass an optional target object that will be set as `this` on the context. This is a good way to give your iterator function access to the current object. @method forEach @param {Function} callback The callback to execute @param {Object} [target] The target object to use @return {Object} receiver @private */ forEach: function forEach(callback, target) { if (typeof callback !== 'function') { throw new TypeError(); } var context = popCtx(); var len = (0, _emberMetalProperty_get.get)(this, 'length'); var last = null; if (target === undefined) { target = null; } for (var idx = 0; idx < len; idx++) { var next = this.nextObject(idx, last, context); callback.call(target, next, idx, this); last = next; } last = null; context = pushCtx(context); return this; }, /** Alias for `mapBy` @method getEach @param {String} key name of the property @return {Array} The mapped array. @private */ getEach: (0, _emberMetalMixin.aliasMethod)('mapBy'), /** Sets the value on the named property for each member. This is more efficient than using other methods defined on this helper. If the object implements Ember.Observable, the value will be changed to `set(),` otherwise it will be set directly. `null` objects are skipped. @method setEach @param {String} key The key to set @param {Object} value The object to set @return {Object} receiver @private */ setEach: function setEach(key, value) { return this.forEach(function (item) { (0, _emberMetalProperty_set.set)(item, key, value); }); }, /** Maps all of the items in the enumeration to another value, returning a new array. This method corresponds to `map()` defined in JavaScript 1.6. The callback method you provide should have the following signature (all parameters are optional): ```javascript function(item, index, enumerable); ``` - `item` is the current item in the iteration. - `index` is the current index in the iteration. - `enumerable` is the enumerable object itself. It should return the mapped value. Note that in addition to a callback, you can also pass an optional target object that will be set as `this` on the context. This is a good way to give your iterator function access to the current object. @method map @param {Function} callback The callback to execute @param {Object} [target] The target object to use @return {Array} The mapped array. @private */ map: function map(callback, target) { var ret = _emberMetalCore2['default'].A(); this.forEach(function (x, idx, i) { ret[idx] = callback.call(target, x, idx, i); }); return ret; }, /** Similar to map, this specialized function returns the value of the named property on all items in the enumeration. @method mapBy @param {String} key name of the property @return {Array} The mapped array. @private */ mapBy: function mapBy(key) { return this.map(function (next) { return (0, _emberMetalProperty_get.get)(next, key); }); }, /** Returns an array with all of the items in the enumeration that the passed function returns true for. This method corresponds to `filter()` defined in JavaScript 1.6. The callback method you provide should have the following signature (all parameters are optional): ```javascript function(item, index, enumerable); ``` - `item` is the current item in the iteration. - `index` is the current index in the iteration. - `enumerable` is the enumerable object itself. It should return `true` to include the item in the results, `false` otherwise. Note that in addition to a callback, you can also pass an optional target object that will be set as `this` on the context. This is a good way to give your iterator function access to the current object. @method filter @param {Function} callback The callback to execute @param {Object} [target] The target object to use @return {Array} A filtered array. @private */ filter: function filter(callback, target) { var ret = _emberMetalCore2['default'].A(); this.forEach(function (x, idx, i) { if (callback.call(target, x, idx, i)) { ret.push(x); } }); return ret; }, /** Returns an array with all of the items in the enumeration where the passed function returns false. This method is the inverse of filter(). The callback method you provide should have the following signature (all parameters are optional): ```javascript function(item, index, enumerable); ``` - *item* is the current item in the iteration. - *index* is the current index in the iteration - *enumerable* is the enumerable object itself. It should return a falsey value to include the item in the results. Note that in addition to a callback, you can also pass an optional target object that will be set as "this" on the context. This is a good way to give your iterator function access to the current object. @method reject @param {Function} callback The callback to execute @param {Object} [target] The target object to use @return {Array} A rejected array. @private */ reject: function reject(callback, target) { return this.filter(function () { return !callback.apply(target, arguments); }); }, /** Returns an array with just the items with the matched property. You can pass an optional second argument with the target value. Otherwise this will match any property that evaluates to `true`. @method filterBy @param {String} key the property to test @param {*} [value] optional value to test against. @return {Array} filtered array @private */ filterBy: function filterBy(key, value) { return this.filter(iter.apply(this, arguments)); }, /** Returns an array with the items that do not have truthy values for key. You can pass an optional second argument with the target value. Otherwise this will match any property that evaluates to false. @method rejectBy @param {String} key the property to test @param {String} [value] optional value to test against. @return {Array} rejected array @private */ rejectBy: function rejectBy(key, value) { var exactValue = function exactValue(item) { return (0, _emberMetalProperty_get.get)(item, key) === value; }; var hasValue = function hasValue(item) { return !!(0, _emberMetalProperty_get.get)(item, key); }; var use = arguments.length === 2 ? exactValue : hasValue; return this.reject(use); }, /** Returns an array with the items that do not have truthy values for key. You can pass an optional second argument with the target value. Otherwise this will match any property that evaluates to false. @method rejectProperty @param {String} key the property to test @param {String} [value] optional value to test against. @return {Array} rejected array @deprecated Use `rejectBy` instead @private */ rejectProperty: (0, _emberMetalMixin.aliasMethod)('rejectBy'), /** Returns the first item in the array for which the callback returns true. This method works similar to the `filter()` method defined in JavaScript 1.6 except that it will stop working on the array once a match is found. The callback method you provide should have the following signature (all parameters are optional): ```javascript function(item, index, enumerable); ``` - `item` is the current item in the iteration. - `index` is the current index in the iteration. - `enumerable` is the enumerable object itself. It should return the `true` to include the item in the results, `false` otherwise. Note that in addition to a callback, you can also pass an optional target object that will be set as `this` on the context. This is a good way to give your iterator function access to the current object. @method find @param {Function} callback The callback to execute @param {Object} [target] The target object to use @return {Object} Found item or `undefined`. @private */ find: function find(callback, target) { var len = (0, _emberMetalProperty_get.get)(this, 'length'); if (target === undefined) { target = null; } var context = popCtx(); var found = false; var last = null; var next, ret; for (var idx = 0; idx < len && !found; idx++) { next = this.nextObject(idx, last, context); if (found = callback.call(target, next, idx, this)) { ret = next; } last = next; } next = last = null; context = pushCtx(context); return ret; }, /** Returns the first item with a property matching the passed value. You can pass an optional second argument with the target value. Otherwise this will match any property that evaluates to `true`. This method works much like the more generic `find()` method. @method findBy @param {String} key the property to test @param {String} [value] optional value to test against. @return {Object} found item or `undefined` @private */ findBy: function findBy(key, value) { return this.find(iter.apply(this, arguments)); }, /** Returns the first item with a property matching the passed value. You can pass an optional second argument with the target value. Otherwise this will match any property that evaluates to `true`. This method works much like the more generic `find()` method. @method findProperty @param {String} key the property to test @param {String} [value] optional value to test against. @return {Object} found item or `undefined` @deprecated Use `findBy` instead @private */ findProperty: (0, _emberMetalMixin.aliasMethod)('findBy'), /** Returns `true` if the passed function returns true for every item in the enumeration. This corresponds with the `every()` method in JavaScript 1.6. The callback method you provide should have the following signature (all parameters are optional): ```javascript function(item, index, enumerable); ``` - `item` is the current item in the iteration. - `index` is the current index in the iteration. - `enumerable` is the enumerable object itself. It should return the `true` or `false`. Note that in addition to a callback, you can also pass an optional target object that will be set as `this` on the context. This is a good way to give your iterator function access to the current object. Example Usage: ```javascript if (people.every(isEngineer)) { Paychecks.addBigBonus(); } ``` @method every @param {Function} callback The callback to execute @param {Object} [target] The target object to use @return {Boolean} @private */ every: function every(callback, target) { return !this.find(function (x, idx, i) { return !callback.call(target, x, idx, i); }); }, /** @method everyBy @param {String} key the property to test @param {String} [value] optional value to test against. @deprecated Use `isEvery` instead @return {Boolean} @private */ everyBy: (0, _emberMetalMixin.aliasMethod)('isEvery'), /** @method everyProperty @param {String} key the property to test @param {String} [value] optional value to test against. @deprecated Use `isEvery` instead @return {Boolean} @private */ everyProperty: (0, _emberMetalMixin.aliasMethod)('isEvery'), /** Returns `true` if the passed property resolves to `true` for all items in the enumerable. This method is often simpler/faster than using a callback. @method isEvery @param {String} key the property to test @param {String} [value] optional value to test against. @return {Boolean} @since 1.3.0 @public */ isEvery: function isEvery(key, value) { return this.every(iter.apply(this, arguments)); }, /** Returns `true` if the passed function returns true for any item in the enumeration. This corresponds with the `some()` method in JavaScript 1.6. The callback method you provide should have the following signature (all parameters are optional): ```javascript function(item, index, enumerable); ``` - `item` is the current item in the iteration. - `index` is the current index in the iteration. - `enumerable` is the enumerable object itself. It should return the `true` to include the item in the results, `false` otherwise. Note that in addition to a callback, you can also pass an optional target object that will be set as `this` on the context. This is a good way to give your iterator function access to the current object. Usage Example: ```javascript if (people.any(isManager)) { Paychecks.addBiggerBonus(); } ``` @method any @param {Function} callback The callback to execute @param {Object} [target] The target object to use @return {Boolean} `true` if the passed function returns `true` for any item @private */ any: function any(callback, target) { var len = (0, _emberMetalProperty_get.get)(this, 'length'); var context = popCtx(); var found = false; var last = null; var next, idx; if (target === undefined) { target = null; } for (idx = 0; idx < len && !found; idx++) { next = this.nextObject(idx, last, context); found = callback.call(target, next, idx, this); last = next; } next = last = null; context = pushCtx(context); return found; }, /** Returns `true` if the passed function returns true for any item in the enumeration. This corresponds with the `some()` method in JavaScript 1.6. The callback method you provide should have the following signature (all parameters are optional): ```javascript function(item, index, enumerable); ``` - `item` is the current item in the iteration. - `index` is the current index in the iteration. - `enumerable` is the enumerable object itself. It should return the `true` to include the item in the results, `false` otherwise. Note that in addition to a callback, you can also pass an optional target object that will be set as `this` on the context. This is a good way to give your iterator function access to the current object. Usage Example: ```javascript if (people.some(isManager)) { Paychecks.addBiggerBonus(); } ``` @method some @param {Function} callback The callback to execute @param {Object} [target] The target object to use @return {Boolean} `true` if the passed function returns `true` for any item @deprecated Use `any` instead @private */ some: (0, _emberMetalMixin.aliasMethod)('any'), /** Returns `true` if the passed property resolves to `true` for any item in the enumerable. This method is often simpler/faster than using a callback. @method isAny @param {String} key the property to test @param {String} [value] optional value to test against. @return {Boolean} @since 1.3.0 @private */ isAny: function isAny(key, value) { return this.any(iter.apply(this, arguments)); }, /** @method anyBy @param {String} key the property to test @param {String} [value] optional value to test against. @return {Boolean} @deprecated Use `isAny` instead @private */ anyBy: (0, _emberMetalMixin.aliasMethod)('isAny'), /** @method someProperty @param {String} key the property to test @param {String} [value] optional value to test against. @return {Boolean} @deprecated Use `isAny` instead @private */ someProperty: (0, _emberMetalMixin.aliasMethod)('isAny'), /** This will combine the values of the enumerator into a single value. It is a useful way to collect a summary value from an enumeration. This corresponds to the `reduce()` method defined in JavaScript 1.8. The callback method you provide should have the following signature (all parameters are optional): ```javascript function(previousValue, item, index, enumerable); ``` - `previousValue` is the value returned by the last call to the iterator. - `item` is the current item in the iteration. - `index` is the current index in the iteration. - `enumerable` is the enumerable object itself. Return the new cumulative value. In addition to the callback you can also pass an `initialValue`. An error will be raised if you do not pass an initial value and the enumerator is empty. Note that unlike the other methods, this method does not allow you to pass a target object to set as this for the callback. It's part of the spec. Sorry. @method reduce @param {Function} callback The callback to execute @param {Object} initialValue Initial value for the reduce @param {String} reducerProperty internal use only. @return {Object} The reduced value. @private */ reduce: function reduce(callback, initialValue, reducerProperty) { if (typeof callback !== 'function') { throw new TypeError(); } var ret = initialValue; this.forEach(function (item, i) { ret = callback(ret, item, i, this, reducerProperty); }, this); return ret; }, /** Invokes the named method on every object in the receiver that implements it. This method corresponds to the implementation in Prototype 1.6. @method invoke @param {String} methodName the name of the method @param {Object...} args optional arguments to pass as well. @return {Array} return values from calling invoke. @private */ invoke: function invoke(methodName) { for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var ret = _emberMetalCore2['default'].A(); this.forEach(function (x, idx) { var method = x && x[methodName]; if ('function' === typeof method) { ret[idx] = args ? method.apply(x, args) : x[methodName](); } }, this); return ret; }, /** Simply converts the enumerable into a genuine array. The order is not guaranteed. Corresponds to the method implemented by Prototype. @method toArray @return {Array} the enumerable as an array. @private */ toArray: function toArray() { var ret = _emberMetalCore2['default'].A(); this.forEach(function (o, idx) { ret[idx] = o; }); return ret; }, /** Returns a copy of the array with all `null` and `undefined` elements removed. ```javascript var arr = ['a', null, 'c', undefined]; arr.compact(); // ['a', 'c'] ``` @method compact @return {Array} the array without null and undefined elements. @private */ compact: function compact() { return this.filter(function (value) { return value != null; }); }, /** Returns a new enumerable that excludes the passed value. The default implementation returns an array regardless of the receiver type unless the receiver does not contain the value. ```javascript var arr = ['a', 'b', 'a', 'c']; arr.without('a'); // ['b', 'c'] ``` @method without @param {Object} value @return {Ember.Enumerable} @private */ without: function without(value) { if (!this.contains(value)) { return this; // nothing to do } var ret = _emberMetalCore2['default'].A(); this.forEach(function (k) { if (k !== value) { ret[ret.length] = k; } }); return ret; }, /** Returns a new enumerable that contains only unique values. The default implementation returns an array regardless of the receiver type. ```javascript var arr = ['a', 'a', 'b', 'b']; arr.uniq(); // ['a', 'b'] ``` This only works on primitive data types, e.g. Strings, Numbers, etc. @method uniq @return {Ember.Enumerable} @private */ uniq: function uniq() { var ret = _emberMetalCore2['default'].A(); this.forEach(function (k) { if (ret.indexOf(k) < 0) { ret.push(k); } }); return ret; }, /** This property will trigger anytime the enumerable's content changes. You can observe this property to be notified of changes to the enumerable's content. For plain enumerables, this property is read only. `Array` overrides this method. @property [] @type Array @return this @private */ '[]': (0, _emberMetalComputed.computed)({ get: function get(key) { return this; } }), // .......................................................... // ENUMERABLE OBSERVERS // /** Registers an enumerable observer. Must implement `Ember.EnumerableObserver` mixin. @method addEnumerableObserver @param {Object} target @param {Object} [opts] @return this @private */ addEnumerableObserver: function addEnumerableObserver(target, opts) { var willChange = opts && opts.willChange || 'enumerableWillChange'; var didChange = opts && opts.didChange || 'enumerableDidChange'; var hasObservers = (0, _emberMetalProperty_get.get)(this, 'hasEnumerableObservers'); if (!hasObservers) { (0, _emberMetalProperty_events.propertyWillChange)(this, 'hasEnumerableObservers'); } (0, _emberMetalEvents.addListener)(this, '@enumerable:before', target, willChange); (0, _emberMetalEvents.addListener)(this, '@enumerable:change', target, didChange); if (!hasObservers) { (0, _emberMetalProperty_events.propertyDidChange)(this, 'hasEnumerableObservers'); } return this; }, /** Removes a registered enumerable observer. @method removeEnumerableObserver @param {Object} target @param {Object} [opts] @return this @private */ removeEnumerableObserver: function removeEnumerableObserver(target, opts) { var willChange = opts && opts.willChange || 'enumerableWillChange'; var didChange = opts && opts.didChange || 'enumerableDidChange'; var hasObservers = (0, _emberMetalProperty_get.get)(this, 'hasEnumerableObservers'); if (hasObservers) { (0, _emberMetalProperty_events.propertyWillChange)(this, 'hasEnumerableObservers'); } (0, _emberMetalEvents.removeListener)(this, '@enumerable:before', target, willChange); (0, _emberMetalEvents.removeListener)(this, '@enumerable:change', target, didChange); if (hasObservers) { (0, _emberMetalProperty_events.propertyDidChange)(this, 'hasEnumerableObservers'); } return this; }, /** Becomes true whenever the array currently has observers watching changes on the array. @property hasEnumerableObservers @type Boolean @private */ hasEnumerableObservers: (0, _emberMetalComputed.computed)(function () { return (0, _emberMetalEvents.hasListeners)(this, '@enumerable:change') || (0, _emberMetalEvents.hasListeners)(this, '@enumerable:before'); }), /** Invoke this method just before the contents of your enumerable will change. You can either omit the parameters completely or pass the objects to be removed or added if available or just a count. @method enumerableContentWillChange @param {Ember.Enumerable|Number} removing An enumerable of the objects to be removed or the number of items to be removed. @param {Ember.Enumerable|Number} adding An enumerable of the objects to be added or the number of items to be added. @chainable @private */ enumerableContentWillChange: function enumerableContentWillChange(removing, adding) { var removeCnt, addCnt, hasDelta; if ('number' === typeof removing) { removeCnt = removing; } else if (removing) { removeCnt = (0, _emberMetalProperty_get.get)(removing, 'length'); } else { removeCnt = removing = -1; } if ('number' === typeof adding) { addCnt = adding; } else if (adding) { addCnt = (0, _emberMetalProperty_get.get)(adding, 'length'); } else { addCnt = adding = -1; } hasDelta = addCnt < 0 || removeCnt < 0 || addCnt - removeCnt !== 0; if (removing === -1) { removing = null; } if (adding === -1) { adding = null; } (0, _emberMetalProperty_events.propertyWillChange)(this, '[]'); if (hasDelta) { (0, _emberMetalProperty_events.propertyWillChange)(this, 'length'); } (0, _emberMetalEvents.sendEvent)(this, '@enumerable:before', [this, removing, adding]); return this; }, /** Invoke this method when the contents of your enumerable has changed. This will notify any observers watching for content changes. If you are implementing an ordered enumerable (such as an array), also pass the start and end values where the content changed so that it can be used to notify range observers. @method enumerableContentDidChange @param {Ember.Enumerable|Number} removing An enumerable of the objects to be removed or the number of items to be removed. @param {Ember.Enumerable|Number} adding An enumerable of the objects to be added or the number of items to be added. @chainable @private */ enumerableContentDidChange: function enumerableContentDidChange(removing, adding) { var removeCnt, addCnt, hasDelta; if ('number' === typeof removing) { removeCnt = removing; } else if (removing) { removeCnt = (0, _emberMetalProperty_get.get)(removing, 'length'); } else { removeCnt = removing = -1; } if ('number' === typeof adding) { addCnt = adding; } else if (adding) { addCnt = (0, _emberMetalProperty_get.get)(adding, 'length'); } else { addCnt = adding = -1; } hasDelta = addCnt < 0 || removeCnt < 0 || addCnt - removeCnt !== 0; if (removing === -1) { removing = null; } if (adding === -1) { adding = null; } (0, _emberMetalEvents.sendEvent)(this, '@enumerable:change', [this, removing, adding]); if (hasDelta) { (0, _emberMetalProperty_events.propertyDidChange)(this, 'length'); } (0, _emberMetalProperty_events.propertyDidChange)(this, '[]'); return this; }, /** Converts the enumerable into an array and sorts by the keys specified in the argument. You may provide multiple arguments to sort by multiple properties. @method sortBy @param {String} property name(s) to sort on @return {Array} The sorted array. @since 1.2.0 @private */ sortBy: function sortBy() { var sortKeys = arguments; return this.toArray().sort(function (a, b) { for (var i = 0; i < sortKeys.length; i++) { var key = sortKeys[i]; var propA = (0, _emberMetalProperty_get.get)(a, key); var propB = (0, _emberMetalProperty_get.get)(b, key); // return 1 or -1 else continue to the next sortKey var compareValue = (0, _emberRuntimeCompare2['default'])(propA, propB); if (compareValue) { return compareValue; } } return 0; }); } }); module.exports = exports['default'];


flutter_form_builder library
Classes
- FormBuilder
- FormBuilderCheckbox
- FormBuilderCheckboxList
-
FormBuilderChipsInput<
T> - FormBuilderChoiceChip
- FormBuilderColorPicker
-
FormBuilderCustomField<
T> -
FormBuilderCustomFieldState<
T> - FormBuilderDateRangePicker
- FormBuilderDateRangePickerState
- FormBuilderDateTimePicker
- FormBuilderDropdown
- FormBuilderFieldOption
- FormBuilderFilterChip
- FormBuilderRadio
- FormBuilderRangeSlider
- FormBuilderRate
- FormBuilderSegmentedControl
- FormBuilderSignaturePad
- FormBuilderSlider
- FormBuilderState
- FormBuilderStepper
- FormBuilderSwitch
- FormBuilderTextField
- FormBuilderTextFieldState
- FormBuilderTouchSpin
-
FormBuilderTypeAhead<
T> - FormBuilderValidators
- SuggestionsBoxController
-
Supply an instance of this class to the
TypeAhead.suggestionsBoxController
property to manually control the suggestions box - SuggestionsBoxDecoration
-
Supply an instance of this class to the
TypeAhead.suggestionsBoxDecoration
property to configure the suggestions box decoration -
TextFieldConfiguration<
T> -
Supply an instance of this class to the
TypeAhead.textFieldConfiguration
property to configure the displayed text field -
TypeAheadField<
T> - A TextField that displays a list of suggestions as the user types [...]
-
TypeAheadFormField<
T> - A FormField implementation of TypeAheadField, that allows the value to be saved, validated, etc. [...]
Enums
Typedefs
-
AnimationTransitionBuilder(
BuildContext context, Widget child, AnimationController controller) → dynamic -
ErrorBuilder(
BuildContext context, Object error) → Widget -
ItemBuilder<
T> (BuildContext context, T itemData) → Widget -
SelectionToTextTransformer<
T> (T suggestion) → String -
SuggestionsCallback<
T> (String pattern) → FutureOr< Iterable< T> > -
SuggestionSelectionCallback<
T> (T suggestion) → void -
ValueTransformer<
T> (T value) → dynamic


Fox News impeachment hearings coverage tops all broadcast, cable networks for second day
by Brian FloodFox News Channel’s coverage of impeachment hearings continued to outperform all other broadcast and cable news networks among total viewers during the second day on Friday, according to early Nielsen Media Research data.
Fox News averaged 2.8 million viewers from 9 a.m. – 3 p.m. ET on Friday during the open hearing, compared to 2.7 million for MSNBC and CNN’s 1.8 million. FNC also topped cable news among the key demographic of adults age 25-54, averaging 412,000 compared to MSNBC’s 393,000 and CNN’s 381,000.
CNN’S BRIAN STELTER IGNORES ABC NEWS’ JEFFREY EPSTEIN SCANDAL ON ‘RELIABLE SOURCES’ MEDIA SHOW
Fox News’ coverage, led by Bret Baier, Martha MacCallum, Chris Wallace, Juan Williams, Bill Hemmer, Sandra Smith and Dana Perino, peaked from 1-2 p.m. ET with 3.1 million viewers.
FNC topped broadcast networks, too, averaging 2.7 million viewers when the hearing was aired on ABC, NBC and CBS affiliates from 9-11 a.m. ET and 1-2 p.m. ET.
CBS averaged 2 million, ABC averaged 1.9 million and NBC picked up 1.8 million total viewers.
FNC’s audience carried over to primetime, as it topped MSNBC and CNN across the board on Friday night. Fox News averaged 3.2 million viewers from 8-11 p.m. ET, compared to 2.9 million for MSNBC and 1.3 million for CNN.
CLICK HERE TO GET THE FOX NEWS APP
FNC also topped all competitors during first day of open impeachment hearings on Wednesday, 2.9 million viewers between 10 a.m. and 4 p.m. ET during the hearing before the House Intelligence Committee.
The House Intelligence Committee’s second week of hearings are scheduled for Tuesday morning.


ZFTool is a utility module for maintaining modular Zend Framework 2 applications. It runs from the command line and can be installed as ZF2 module or as PHAR (see below). This tool gives you the ability to:
- create a ZF2 project, installing a skeleton application;
- create a new module inside an existing ZF2 application;
- get the list of all the modules installed inside an application;
- get the configuration file of a ZF2 application;
- install the ZF2 library choosing a specific version.
To install the ZFTool you can use one of the following methods or you can just download the PHAR package and use it.
- Open console (command prompt)
- Go to your application’s directory
- Run composer require zendframework/zftool:dev-master
- Clone using git or download zipball
- Extract to vendor/ZFTool in your ZF2 application
- Enter the vendor/ZFTool folder and execute zf.php as reported below.
- You don’t need to install ZFTool if you want just use it as a shell command. You can download zftool.phar and use it.
The zf.php should be installed into the vendor/ZFTool directory (relative to your project root) - however, the command needs to be run from your project root in order for it to work correctly. You can symlink vendor/ZFTool/zf.php to your project root, or alternatively substitute zf.php for vendor/ZFTool/zf.php in the examples below.
Simply substitute zftool.phar for zf.php in the below examples.
> zf.php modules [list] show loaded modules
The modules option gives you the list of all the modules installed in a ZF2 application.
> zf.php version | --version display current Zend Framework version
The version option gives you the version number of ZFTool and, if executed from the root folder of a ZF2 application, the version number of the Zend Framework library used by the application.
> zf.php create project <path>
<path> The path of the project to be created
This command installs the ZendSkeletonApplication in the specified path.
> zf.php create module <name> [<path>]
<name> The name of the module to be created
<path> The path to the root folder of the ZF2 application (optional)
This command can be used to create a new module inside an existing ZF2 application. If the path is not provided the ZFTool try to create a new module in the local directory (only if the local folder contains a ZF2 application).
> zf.php classmap generate <directory> <classmap file> [--append|-a] [--overwrite|-w]
<directory> The directory to scan for PHP classes (use "." to use current directory)
<classmap file> File name for generated class map file or - for standard output. If not supplied, defaults to
autoload_classmap.php inside <directory>.
--append | -a Append to classmap file if it exists
--overwrite | -w Whether or not to overwrite existing classmap file
> zf.php install zf <path> [<version>]
<path> The directory where to install the ZF2 library
<version> The version to install, if not specified uses the last available
This command install the specified version of the ZF2 library in a path. If the version is omitted it will be used the last stable available. Using this command you can install all the tag version specified in the ZF2 github repository (the name used for the version is obtained removing the ‘release-‘ string from the tag name; for instance, the tag ‘release-2.0.0’ is equivalent to the version number 2.0.0).
You can create a .phar file containing the ZFTool project. In order to compile ZFTool in a .phar file you need to execute the following command:
> bin/create-phar
This command will create a zftool.phar file in the bin folder. You can use and ship only this file to execute all the ZFTool functionalities. After the zftool.phar creation, we suggest to add the folder bin of ZFTool in your PATH environment.
The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.


##The product backlog (PBL)
##Estimating the Product backlog (PBL)
#Planning poker
- Helps the team to get a common understanding
- Choose a baseline
- Use fibonacci (further out, the steps get bigger)
- Complexity, risk and effort
##Backlog refinement (PO)
##Sprint planning
- What can be done this sprint?
- What is our commitment as a team?
##Demo and review
##Retrospective


THE BIG LEBOWSKI
A Film Review by James Berardinelli
RATING: *** OUT OF ****
United States, 1998 U.S. Release Date: 3/6/98 (limited) Running Length: 1:55 MPAA Classification: R (Profanity, violence, nudity, drugs) Theatrical Aspect Ratio: 1.85:1
Cast: Jeff Bridges, John Goodman, Steve Buscemi, Julianne Moore, David Huddleston, Peter Stormare, Tara Reid, Philip Seymour Hoffman, Flea, John Turturro, Sam Elliot Director: Joel Coen Producers: Ethan Coen Screenplay: Joel & Ethan Coen Cinematography: Roger Deakins Music: Carter Burwell U.S. Distributor: Gramercy Pictures
In a word, THE BIG LEBOWSKI is a mess. But what a glorious, wonderfully-entertaining mess it is. This film, the Coen Brothers' follow-up to the critically-lauded FARGO, isn't likely to generate the same degree of universal praise. In fact, those expecting something along similar lines to the 1997 Oscar nominee may be disappointed. THE BIG LEBOWSKI is an off-the-wall comedy that has more in common with RAISING ARIZONA than with FARGO. Its single weakness, and what amounts to little more than a minor distraction, is that it doesn't have much of a plot, and what there is contains the kind of gaping holes that even the most obtuse viewer can identify.
Of course, the Coens have never done the same thing twice in a row, so it shouldn't come as much of a surprise that THE BIG LEBOWSKI is so far afield from FARGO. Nevertheless, the brothers' inimitable style is very much in evidence; if anything, it may be more pronounced here. This is one weird motion picture, but I use that term in the kindest fashion, because all of the quirkiness adds up to a level of delightful humor that few films this side of a MONTY PYTHON enterprise can match. This is a comic amusement park ride – a wildly uneven movie that offers tremendous pleasure for the moment, even if it doesn't stand up well to post-screening analysis and scrutiny.
The Coens begin by introducing us to their latest protagonist, The Dude (Jeff Bridges), a down-and-out, unemployed drifter who is still mentally mired in the '60s. He spends his days moping around his apartment, doing nothing and puffing on joints. On rare occasions, he makes his way over to the bowling alley for a league game with his two best friends: Walter (John Goodman), a Polish Catholic Jew who still suffers from post-traumatic stress from his days in Vietnam, and Donny (Steve Buscemi), a meek moron. Most of the time, however, The Dude is content to stay at home, which is why he's known as "the laziest man in Los Angeles County." That is, until a group of inept crooks confuse him with The Big Lebowski (David Huddleston), one of the city's richest businessmen.
It seems that Bunny Lebowski (Tara Reid), The Big Lebowski's ornamental wife, owes a great deal of money to porn producer Jackie Treehorn (Ben Gazzara). Treehorn's men mistake The Dude (whose real name is also Lebowski) for their quarry – and it takes them a while to realize their error (they're not Rhodes scholars). Irritated that his carpet has been ruined by the intruders, The Dude arranges a meeting with The Big Lebowski to extract compensation. But things don't go exactly as planned. Soon, The Dude finds himself on Lebowski's payroll as the bag man handling the ransom for his employer's kidnapped wife. But the ever-pragmatic Walter thinks The Dude should keep the money. Maude Lebowski (Julianne Moore), The Big Lebowski's daughter, wants the money returned to her family. Meanwhile, some innocent thief steals The Dude's car, where the money is being stored. And, to top matters off, there's some question about whether Bunny is really in any danger.
Much of the humor comes as a result of the sheer ineptitude of The Dude. This guy isn't a bad choice for handling the ransom drop in a kidnapping, he's the worst choice. He's a complete loser, and his friends aren't any better.  Ultimately, The Dude, Walter, and Donny are the kinds of guys who seem at home in a Coen Brothers film, but would be wildly out-of- place anywhere else (including in the real world). In addition to these three, there are a number of colorful supporting characters, including a hilariously over-the-top John Turturro as a bowler named Jesus.
When it comes to the bowling alley, the Coens order up more laughs in a few scenes than can be found in the whole of KINGPIN (a "bowling comedy"). Stepping even deeper into their own surrealistic world of the bizarre, the brothers use this arena to stage a parody of Busby Berkley musicals. It's called GUTTERBALLS and it features, among other things, a dance number with Julianne Moore in a strange, Viking-like costume, Saddam Hussein renting bowling shoes, and Jeff Bridges stuck inside a ball, looking out.
One of the things I appreciated the most about THE BIG LEBOWSKI is its mockery of the voiceover narrative. Readers of my reviews know that this is one of my pet peeves, so it was great fun to watch a film in which this approach is openly satirized. THE BIG LEBOWSKI is narrated by Sam Elliot, but, during his self-consciously long-winded opening monologue (in which he introduces The Dude), he suddenly loses his train of thought, and says as much to the audience. It's rare that any movie uses the narrator to comic effect rather than for unnecessary exposition.
Once again, the Coens have chosen their cast well. With long hair, a beard, sunglasses, and a vapid expression, Jeff Bridges is perfect as the perpetually-stoned Dude. Clean-cut and militant, John Goodman's profanity-spewing Walter is delightfully off his rocker. Steve Buscemi for once has a relatively low-key role. As Maude, Julianne Moore is given an opportunity to take a walk on the wild side. And David Huddleston plays Lebowski like Mr. Potter from IT'S A WONDERFUL LIFE, wheelchair and all.
Problems with the plot notwithstanding, THE BIG LEBOWSKI ranks as one of the most audacious comedies of recent years. The Coens keep the jokes coming, although some of them are so subtle they can easily be missed (for example, when The Dude writes a check for 69 cents). Profane, outrageous, and without inhibitions, THE BIG LEBOWSKI further cements the Coens' reputation as independent film makers.
Copyright 1998 James Berardinelli
- James Berardinelli e-mail<EMAIL_ADDRESS>Now with more than 1300 reviews... The ReelViews web site: http://movie-reviews.colossus.net/
"No art passes our conscience in the way film does, and goes directly to our feelings, deep down into the dark rooms of our souls"
- Ingmar Bergman
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


{% extends 'base.html' %} {% load static %} {% block content %} {{block.super}}
Welcome to Kenya Today where you can view all the lates photo's that depict what is currently happening in kenya


BANK TERM DEPOSIT
- Tech Stack: Python, Jupyter Notebook
- Github URL: Project Link
Doing the things the old way is too risky nowadays. The companies must evolve and grasp the new technologies if they want to succeed.Adopting the Big Data analytics and imbuing it into the existing banking sector workflows is one of the key elements of surviving and prevailing in the rapidly evolving business environment of the digital millennium. Nowadays customer is becoming more sophisticated about their choice and quality of service being served to them.
Working in Banking domain offers the best platform where one can hone their skills and allows one to take up any challenges stimulating work. According to IBM’s 2010 Global Chief Executive Officer Study, 89 percent of banking and financial markets CEOs say their top priority is to better understand, predict and give customers what they want.
Investments in Big Data analytics in banking sector totaled $20.8 billion in 2016, according to the IDC Semiannual Big Data and Analytics Spending Guide of 2016. This makes the domain one of the dominant consumers of Big Data services and an ever-hungry market for Big Data architects, solutions and bespoke tools. In the next 5 years, they will have to learn to empower their operations with Big Data analytics, AI/ML algorithms, and other high-tech tools.


Basic demo of
FlashWavRecorder
Your browser must have JavaScript enabled and the Adobe Flash Player installed.


Sana Mir announces indefinite break from international cricket
by https://www.dawn.com/authors/4231/abu-bakar-bilal, Abu Bakar BilalRight-arm bowler Sana Mir announced that she has decided to take a break from international cricket to "plan and reset my future objectives and targets", a press release by the Pakistan Cricket Board (PCB) said on Wednesday.
The announcement comes weeks before the commencement of the International Cricket Council (ICC) Women’s Championship's one-day international (ODI) and Twenty20 series against England. Mir will not be available for the squad's selection for next month's matches.
"I have decided to take a break from international cricket and, as such, will not be available for selection for next month’s series against England," she was quoted as saying by the PCB. "I will utilise this time to plan and reset my future objectives and targets."
Mir made her ODI debut in 2005 and played her first T20 match in 2009. Last year, she became the first Pakistani female bowler to top ICC's ODI Bowling Rankings. Last month, Mir was honoured with the 2019 Asia Society Game Changers award at a glittering ceremony in New York along with six other women from Asian countries.
In her statement released today, Mir said that her "best wishes" were with the Pakistani women's team, which will leave for Malaysia on November 30 to play the series. Pakistan will play three ODIs and three T20s against England at the Kinrara Oval stadium in Kuala Lampur.
"[...] I am sure they’ll produce their best cricket."
She did not specify the duration of her break.
The training camp for 20 probables will begin on November 21 at the Hanif Mohammad High Performance Centre in Karachi and the final squads for the series against England will be announced on November 27.
The three-match ODI series will begin on December 9 while the T20 series will begin on December 17.
Match schedule:
ODIs:
- December 9: First ODI
- December 12: Second ODI
- December 14: Third ODI
T20s:
- December 17: First T20
- December 19: Second T20
- December 20: Third T20


Running Locally
It may be useful to run the development docs locally when working on a forked version of semantic, as the docs themselves help in testing out changes to ui components.
1) Install Node
Semantic docs are written in DocPad which requires NodeJS.
2) Install Dependencies
3) Fork Semantic
4) Start Your Server
It's important to note that all server code exists inside of /node
in the project. So all commands should be run relative to that directory.
Docpad should now run an instance of semantic-ui.com locally you can access at http://localhost:9778
Fixing Bugs
Watch Script
If you are working on fixing a UI component that is part of Semantic, your best bet is to work actively on the file in /src/{type}/{elementname}/
while running a watch script from grunt. This will rebuild the docs after you make changes, so you can see if you have corrected the issue you are fixing.
To see exactly what this is doing you can check out our commented gruntfile
The watch task is the default grunt task for Semantic, so you can start it quite simply.
Packaging Elements
For convenience there is also a separate grunt command for building minified, packaged, and compressed versions of the library.
The Future
UI Dev Kits
We are working to create development kits for writing and distributing third party UI definitions. These, are planned to land after our 1.0 release and allow other developers to contribute ui components or reskins of existing components.
For more information on the development of the UI specification for third party components, please visit our community discussion boards on Trello


MBRA events are in Bold. Host club is listed after location.
* Montana
Women
Cat 4 Challenge Series
events.
Results
**
Hammer Nutrition Montana
Road Race Sub-series
events.
Results
Results
for MBRA races will be
posted here after they are
successfully submitted to
USAC.
MBRA Road Series
Individual Standings
MBRA Road Series Team
Standings
MBRA Cyclo-Cross Standings
|
MARCH
|
|
22 |
Training Race #1 |
Missoula - MJCF |
|
29 |
Training Race #2 |
Missoula - MJCF |
APRIL
|
|
5 - 6 |
Frozen Flatlands |
Spokane, WA |
|
13
|
Rocky Mountain Roubaix
**
results |
Missoula -
Northern Rockies Orthopedics |
|
18 - 20 |
Tour of Walla Walla Stage Race |
Walla Walla, WA |
|
19 |
Tax Day Circuit Race |
Pocatello, ID |
MAY
|
|
3 - 4
|
Road Cycling Clinic for
Women
register |
Helena - MBRA |
|
10
|
Belt
Creek Omnium
**
*
Both TT and RR are Women's
Challenge Series events
results |
Great Falls (Belt) - Echelon
Cycling Club |
|
10 - 11 |
STOKR (non-competitive) |
Libby |
|
13 - 18 |
Mt. Hood Classic Stage Race |
Hood River, OR |
|
17 - 18
|
Tour of the Swan River
Valley (non-competitive) |
Missoula |
|
24 - 25
|
Tour of the Bitterroot
Omnium
*
Only RR is a Women's
Challenge Series event
results
web site |
Hamilton - Five Valley
Velo |
|
31 - June 1
|
Mutual of Enumclaw Omnium |
Enumclaw, WA |
JUNE
|
|
1
|
Cow Country Classic Road Race
**
*
results |
Helena (Wolf Creek) - Great Divide
Cycling Team |
|
7
|
Fish Trails Criterium -
State Championship
*
results
omnium results |
Whitefish - Great
Northern Cycling Club and
Great Northern Cycles |
|
8
|
Star Meadows Road Race
*
results
omnium results |
Whitefish - Flathead
Cycling Team |
|
14 - 15 |
Methow Valley Stage Race |
Winthrop, WA |
|
20 - 22 |
Elkhorn Classic Stage Race |
Baker City, OR |
|
22
|
Eden Road Race
- State
Championship
results |
Great Falls - Great Falls
Bicycle Club/Echelon |
|
28
|
RATPOD (non-competitive) |
Dillon |
|
28 - 29 |
Gate City Grind Stage
Race |
Pocatello, ID |
|
30 - July 6 |
USA Cycling Masters Road National Championships |
Louisville, KY |
JULY
|
|
9 - 13 |
Cascade Classic Stage Race |
Bend, OR |
|
20
|
Bearmouth Road Race
results |
Bearmouth - Five Valley
Velo |
|
24 - 27 |
Co-Motion Classic Tandem Stage Race |
Eugene, OR |
|
26 |
Allan Butler Memorial
Crit |
Idaho Falls |
AUGUST
|
|
2 |
Felt Tour de Park City
Road Race |
Park City, Utah |
|
9 |
State Championship Time Trial
*
results |
Bozeman -
Bozeman Masters Velo |
|
10 |
Valley West Crit
**
results |
Bozeman -
G.A.S./Intrinsik
Cycling Team |
|
9 - 11 |
USA Cycling Elite, U23 &
Junior Road National
Championships |
Orange County, CA |
SEPTEMBER
|
|
6
|
Logan to Jackson Road Race |
Logan, UT |
|
28 |
Copper Mountain 'Cross Race
results |
Butte - Rimrock United Racing |
OCTOBER
|
|
4 - 5 |
Montana Velo 'Cross Omnium
results |
Helena - Montana Velo |
|
5 |
Western Montana Hill Climb
Championships |
Missoula |
|
11 |
Big Sky - Bozeman 'Cross Weekend
results |
Big Sky - GAS/Intrinsik
Architecture |
|
18 |
Rolling Thunder
results |
Missoula -
Montanacyclocross.com |
|
19 |
Hellgate Duathlon |
Missoula |
|
25 |
Woodland 'Cross
results |
Kalispell - Sportsman Ski
Haus |
|
26 |
Herron Park
Cyclocross Race
results |
Kalispell - Flathead Cycling |
NOVEMBER
|
|
2 |
MBRA Cyclocross Race No. 7
results |
Helena - Great Divide Cycling |
|
9 |
Five Valley 'Cross Race
results |
Missoula - Five Valley Velo |
|
15 |
Bobcat Classic CX
results |
Bozeman - MSU Cycling |
|
16 |
Montana Velo 'Cross Helena
High
results |
Helena - Montana Velo |
|
23 |
'Cross State Championship
results |
Missoula - Northern Rockies |
DECEMBER
|
|
12 - 14 |
National Cyclocross
Championships |
Kansas City, Kansas |


-
Type-safe templated doubly linked list.
[
Utility | Solid | VRML97 ]
[
Summary |
Description |
Notes |
Example Code |
Members |
Ancestors | Descendants ]
Summary
class vrIntrusiveList
{
};
Description
This class requires that items added to it already posses a
next and previous pointer (thus the name Intrusive). It is modelled
heavily after the MFC class CList and behaves in much the same way.
Notes
- This is a templated class. Data added to a list of this
type must contain two data items of type TYPE called next and prev
or be derived from the vrIntrusiveListNode object.
- This class does not own the memory representing the items added to
the list. The caller must allocate and de-allocate this memory.
Example Code
// A simple linked list. Items added to the vrIntrusiveList must
// possess next and prev pointers.
class A
{
public:
A *next;
A *prev;
int data;
A(int d) { data = d; }
};
vrIntrusiveList Alist;
Alist.AddTail(new A(1));
Alist.AddTail(new A(2));
Alist.AddTail(new A(3));
LISTPOS pos = Alist.GetHeadPosition();
while (pos)
{
A *a = Alist.GetNext(pos);
printf("%d ", a->data);
}
printf("\n");
// OUTPUT
// 1 2 3
Members
Number of items in the list.
- default: NULL
The head of the list.
- default: NULL
The tail of the list.
- default: NULL
Default constructor.
- ~vrIntrusiveList (void) ;
Destructor.
Add an item to the tail of the list.
Add an item to the head of the list.
- SFInt32 GetCount (void) const ;
Return the number of items in the list.
- TYPE GetHead (void) const ;
Return the head of the list.
- TYPE GetTail (void) const ;
Return the tail of the list.
- TYPE GetNext (LISTPOS& rPosition) const;
Return the next item (as represented with the rPosition iterator).
- TYPE GetPrev (LISTPOS& rPosition) const;
Return the previous item (as represented with the rPosition iterator).
- LISTPOS GetHeadPosition (void) const ;
Return an iteration handle representing the head of the list.
- LISTPOS GetTailPosition (void) const ;
Return an iteration handle representing the tail of the list.
Remove the given item from the list.
Remove all items from the list.
- SFInt32 NextIndex (void) ;
Generate the next index for the item being added to the list.
- void SetNextIndex (SFInt32 i);
Reset the next index generator.
Ancestors
Descendants
Generated from source by the Cocoon utilities on Mon Feb 01 22:21:00 1999
.


Basic statistics
Predicting interactions between genes
We used correlational analyses to predict genetic interactions. Jupyter Notebook
Transcriptome-wide epistasis analysis
Development of the formalism for, and measurement of, transcriptome-wide epistasis. Jupyter Notebook
Decorrelation within a pathway
Transcriptome weighted correlations between mutants decrease in magnitude the farther apart two genes are from each other. Jupyter Notebook
Non-canonical epistasis
Transcriptomes provide an unbiased view of genetic relationships, which can be used to identify epistasis relationships that are different from what is usually reported. Jupyter Notebook
Enrichment analysis of the hypoxia pathway
We use the WormBase Enrichment Suite to understand the biological functions that the hypoxia pathway is activating in C. elegans. Jupyter Notebook
Finding hif-1-independent responses
Our experimental design allows us to identify genes whose expression is hif-1-independent yet dependent on other genes. In other words, we identify branches in the pathway. Jupyter Notebook
Quality Check
There are known genes that have hif-1-dependent expression. Here, we check that these genes behave as expected from the literature. Jupyter Notebook
Transcription Factors in the Hypoxia Pathway
A short overview of what transcription factors are activated when HIF-1 accumulates in C. elegans. Jupyter Notebook
Contact us
If there are broken links, or you have questions, you can contact us at<EMAIL_ADDRESS>or at


Before Change
elif dim == 3:
transform_method = vf.warp_3d_affine_nn
elif interp == "linear":
image = image.astype(np.float64)
if dim == 2:
transform_method = vf.warp_2d_affine
elif dim == 3:
transform_method = vf.warp_3d_affine
After Change
the transformed image, sampled at the requested grid
// Verify valid interpolation requested
if interp not in _interp_options:
raise ValueError("Unknown interpolation method: %s" % (interp,))
// Obtain sampling grid
if sampling_grid_shape is None:
if apply_inverse:
sampling_grid_shape = self.codomain_shape
else:


11 of the best Christmas tree toppers
by Precious AdesinaYour Christmas tree will never be complete without a lovely ornament to finish it off, regardless of how many baubles you decide to hang on it.
While many people usually think of Christmas tree stars and Christmas tree angels when purchasing tree toppers (which we love), there mare many other options worth considering too such as a fairy mouse, a Santa or a llama.
We have compiled a list of the best toppers on the market in 2019, which include traditional stars, angels and bows, while also including some unique Christmas tree toppers too.
Traditional stars
1. Star Beaded Tree Topper
This is the ultimate in tree topper decadence. This star (which comes in a variety of shapes depending on if you'd like a classical star or small or large Bethlehem one) is embellished with shiny sequins, pearl-like beads, intricate lace and gold dust on both sides.
2. Talini Tree Topper
This wonderfully crafted brass geometric design makes a very stylish star-shaped tree topper. This simple and elegant ornament will be perfect for someone who doesn't want to make their tree too outlandish.
3. Capiz Snowflake Lighted Tree Topper
Stars not your thing? Then how about a snowflake at the top of your tree? This one is made using natural capiz shells and classic handcrafting techniques. According to Balsam Hill, "this Christmas tree topper looks beautiful during the day and even more enchanting at night."
4. Cox & Cox Multi Pom Pom Tree Topper
Why not do something different this year by replacing your traditional star with pom pom one instead. This fun, carnival-themed tree topper is a great place to start and it can even be paired with Cox & Cox's pom pom string lights.
Animals
5. Reindeer Christmas Tree Topper
A spangly reindeer will bring a touch of kitsch for those who prefer to keep things quirky. Gold ornaments are an essential part of Christmas.
6. Postbox Party Colourful Llama Tree Topper
£16.50, Not On The High street
Llamas are the new pineapples are the new flamingos are the new unicorns. So get in on the act and put this little character at the top of your tree before the world moves on to otters.
7. Felt Golden Labrador Tree Topper
Paging all dog-lovers. You didn't know it until now but what you've always wanted is a felt Labrador to sit at the top of your Christmas tree. He's got a scarf, wings and a halo so you know he's a very good boy.
Christmas Characters
8. Fairy Mouse Christmas Tree Topper
We all love fairies at the top of the Christmas tree and this adorable mouse fairy takes cute to a whole new level. Your little ones will love it.
9. John Lewis & Partners Garden Retreat Esme Fairy Tree Topper
Fairies are a Christmas staple. This one by John Lewis is part of their 'garden retreat' theme and will ensure your tree stands out from the rest. Perfect if you're after a natural theme.
10. Angel Of The North Tree Topper
You wanted an angel on the top of your tree right? Well what could be better than Antony Gormley's Angel of the North in neon orange watching over your piles of presents?
11. The Seasonal Aisle Father Christmas Tree Topper
This jolly Father Christmas is resplendent in faux fur trimmed gold robes. Let him show them off from the lofty heights of your tree this Christmas.
For more Christmas features and gift guides, see www.telegraph.co.uk/christmas
All the products mentioned in this article are selected independently by our journalists. The Telegraph makes money by adding affiliate links to some of the products.


Urban Legend (Reviewed on Sept. 30/98)
Starring Jared Leto, Alicia Witt, Rebecca Gayheart, Joshua Jackson, Robert Englund
"Urban Legend" is the latest film in the newly created genre, the "teen horror/suspense movie", following "Scream", "Disturbing Behaviour", and "I Know What You Did Last Summer". I don't think the word "horror" should even be used to describe these films, though. To call them horror movies would imply that they are scary. They most decidedly are not. The contain elements that make the viewer "jump", yes, but they do not contain any images that linger with the viewer for days afterwards, as a truly scary movie will do.
The setup for "Urban Legend" is a rather intriguing one. Some lunatic is offing students at an American university in the style of famous urban legends. These are stories we've all heard, but have likely never actually happened to a real person. A premise like that would appear to be foolproof, but the director, Jamie Blanks, has disproven that theory. He creates absolutely no sense of atmosphere, and nothing in this movie gave me chills. Sure it's competently directed, but imagine what a director like David Fincher could have done with a script like this.
As for the performances, there's nothing too special here. Jared Leto has the presence of a dead chicken. Joshua Jackson steals all the scenes he is in, but he vacates the picture after the first 20 minutes. Alicia Witt never convinced me she was actually scared, even when she was being chased by a psycho with an axe. And finally, Robert Englund, "Freddy" himself, has a small part as a professor that teaches a class on (what a surprise!) urban legends. He's good, but is not given much to do.
I will say this for the movie, though. When the killer was finally revealed, it was someone I had not even considered as a suspect. That's not entirely true, however. During the 100 minute running time of the film, anyone who is more than an extra is made to be a suspect. I guess I did like that aspect of the movie; the fact that I was constantly guessing.
"Urban Legend" isn't all bad, really. It's just not scary, and that offends me since it's being marketed as a horror film. But it is entertaining all the way through, and it kept me guessing, so I'll recommend it if a better movie is sold out.
**1/2 out of ****
-- David Nusair<EMAIL_ADDRESS>Come visit my "Reel Film Reviews" site! "http://chat.carleton.ca/~dnusair"
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


fernando mastrangelo sculpts hand-dyed mirrors to reflect beauty of dubai
by tim spearsreflecting the geographical narrative of the city, fernando mastrangelo debuts the capital collection’s trio of mirrors at downtown design as part of dubai design week 2019. the series continues the brookyln-based designer’s use of commonplace materials to act as cultural metaphors. although each piece is unique, they are united in their use of hand-dyed sand to add sculpturally-shaped elements on the objects. each one mirrors a different story of how dubai became an architectural oasis having merged from a sand-covered landscape.
‘an intrinsic part of my artistic process is interpreting the landscape, history, and essence of a unique region through my sculptural language,‘ explains fernando mastrangelo. ‘I’m incredibly humbled to have the opportunity with dubai and the capital collection. if the pieces capture or translate even a fraction of dubai’s intensity and beauty, I’d consider that a success.’
each mirror of fernando mastrangelo’s capital collection reflects a specific character that defines dubai. warm and rich in color, ‘sahara’ references the city’s famed, intense sun and sand. it appears as if a jewel, with its pure yellow sand drifting across its golden, highly polished mirror surface.
‘marina’ defines a distinct contrast between its two elements. as a homage to the city’s important waterways, the piece reflects the relationship between this water and dubai’s man-made cityscape. dark, hand-shaped terrain progressively encroaches across the deep, mesmerizing blue of the mirror.
lastly, ‘aurora’ celebrates the unique, vibrancy of the sunsets seen in dubai. a clear mirror is intersected by a spectrum of white, pink and purple tones. the colorscape commands attention, evoking a sense of warmth and an ever-present fondness to the city’s beautiful nature.
product info:
designer: fernando mastrangelo
collection: the capital collection
pieces: sahara, marina and aurora
event: downtown design, dubai design week 2019
section: downtown editions
dates: november 12-15, 2019


3 years on, Bong Go still wrongly thinks CHR 'protects' only criminals
Commission on Human Rights Chairperson Chito Gascon says they are mandated to remind the government to punish criminals 'in accordance with the rule of law'
by Jodesz GavilanInside Track is Rappler's intelligencer on people, events, places and everything of public interest. It's a take-off from Newsbreak's Inside Track section. Contributions are most welcome. Just send bits of information to<EMAIL_ADDRESS>Subscribe
Email Address
Newsletters
- Glenda Gloria's Take this Tuesday
- Huddle by Miriam Grace Go
- The Newsbreak Agenda by Chay Hofileña
- Sometimes, all you need is video by Lilibeth Frondoso


| Name | Description |
| any |
VCPUs may freely share cores at any time with any other
VCPUs (default for all virtual machines on a hyperthreaded
system).
|
| internal |
Similar to "none", in that VCPUs from this virtual machine
will not be allowed to share cores with VCPUs from other
virtual machines. However, other VCPUs from the same virtual
machine will be allowed to share cores together. This
configuration option is only permitted for SMP virtual
machines. If applied to a uniprocessor virtual machine, it
will be converted to the "none" sharing option.
|
| none |
VCPUs should not share cores with each other or with VCPUs
from other virtual machines. That is, each VCPU from this
virtual machine should always get a whole core to itself,
with the other logical CPU on that core being placed into
the "halted" state.
|


What is Lorem Ipsum?
Lorem Ipsum is simply dummy text of the printing and typesetting industry. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.


The Best Early Black Friday CPU deals
Looking for a bargain on a processor? You've come to the right place. We've found the best deals on CPUs ahead of Black Friday and offer our expert buying advice to make sure you pick the right one.
by Sean BradleyWith so many processors to choose between, and the task of deciding whether to save some cash and put it towards a faster graphics card, it can be tough to figure out which is the right CPU for you.
Hopefully you already know whether you want to go down the AMD or Intel route, but even if you're still deciding that, the deals you'll find below may help you narrow down that choice.
It’s possible there will be bigger discounts available on Black Friday and / or Cyber Monday, but these are the best deals we could find at the moment.
If you're upgrading an existing CPU and keeping your motherboard, you'll need to know which processors will work in your current motherboard. In some cases you might have to upgrade your motherboard and other components because they just aren't compatible with modern CPUs. If that sounds like a daunting task it might make more sense to buy a whole PC.
AMD Ryzen 7 2700X
From: Amazon
Was: £329.99
Now: £163.99 (£166 off)
View Deal
Intel Core i7-9700K
From: Amazon
Was: £349.99
Now: £318.78 (£21.21 off)
View Deal
AMD Ryzen 5 3600X
From: Amazon
Was: £249.99
Now: £218.99 (£31 off)
View Deal
AMD Ryzen 5 2600
From: Amazon
Was: £174.99
Now: £109 (£65.99 off)
View Deal
AMD Ryzen 5 2600X
From: Amazon
Was: £174.99
Now: £118.97 (£56.02 off)
View Deal
<
>
How to choose the best CPU
As mentioned already, the motherboard must support the CPU you wish to use, so be careful to purchase a compatible motherboard or buy a CPU that fits your current board.
The general rule of thumb is that Intel processors are superior for single core performance, whereas AMD processors tend to be better value while also having more cores than the equivalent price Intel chip. This is a generalisation and there are exceptions to this rule, as ever. For more details, see Intel vs AMD.
Activities such as gaming tend to use up to 4 cores, so there's little point in buying a 16-core chip: you may as well go for a 4-, 6- or 8-core chip and put the money you saved into a graphics card. That's why a Ryzen 5 3600X is a very good choice at the moment.
However, if you’re content creating, video editing or doing rendering tasks, you're better off with a greater number of slower cores, over fewer, faster ones.
1. AMD Ryzen 7 2700X
From: Amazon
Was: £329.99
Now: £163.99 (£166 off)
View Deal
The Ryzen 7 2700X is AMD's answer to the Intel 8700k. And it's substantially cheaper than Intel's offering, and also comes with a competent air cooler in the box and performs well.
This CPU features more cores and threads at a slower clock speed than the 8700k but you'll be hard pressed to noticed a difference when gaming.
If you're putting together a PC, or just focusing on gaming, the 2700X is a great choice and is much closer in performance to the 8700k than the price suggests.
2. Intel Core i7-9700K
From: Amazon
Was: £349.99
Now: £318.78 (£21.21 off)
View Deal
The i7-9700k is the second most powerful processor for Intel's 9th generation consumer range just under the i9-9900k but much more affordable.
At this price, this chip is a good deal and you're going to struggle to find it elsewhere for less.
3. AMD Ryzen 5 3600X
From: Amazon
Was: £249.99
Now: £218.99 (£31 off)
View Deal
This is a great processor if you're building a gaming PC, and it comes with the Wraith Spire cooler in the box.
4. AMD Ryzen 5 2600
From: Amazon
Was: £174.99
Now: £109 (£65.99 off)
View Deal
This second-gen Ryzen chip has six cores and 12 threads. It comes with a Wraith Stealth CPU cooler and is great value at this price.
5. AMD Ryzen 5 2600X
From: Amazon
Was: £174.99
Now: £118.97 (£56.02 off)
View Deal
AMD's answer to Intel's top of the range i5, the 2600x offers incredible value, especially at this price.
This processor has 6 cores and 12 threads (the same as Intel's 8700k) with slightly slower clock-speeds at a much lower price. When you take into account the excellent air-cooler that AMD includes in the box with all its performance CPUs, this is a fantastic option.


Recipe 5 Reading and Querying CSV Data With Drill and R
5.1 Problem
You have a CSV file and want to use Drill and R to query it vs read it in to R directly with one of the many “read CSV” functions.
5.2 Solution
Store the CSV file in a directory Drill can access and query it with R.
5.3 Discussion
The Drill manual chapter on “Text Files: CSV, TSV, PSV”12 discusses–at length–how Drill works with this delimited storage format. Future recipes will show how to convert CSV files to a better format (parquet) and, for now, if your CSV file contains a header (as most “normal” CSV files do) there will be one additional step involved before querying it.
For this example, we’ll use World Health Organization (WHO) data on cholera13. A verison of that file is in https://raw.githubusercontent.com/hrbrmstr/drill-sergeant-rstats/master/book-data/who-colera.csv.
You’ll need to store this file https://raw.githubusercontent.com/hrbrmstr/drill-sergeant-rstats/master/book-data/who-cholera.csv in an accessible place by Drill. The default dfs.root
storage location is the “top” of your local filesystem hierarchy. It is suggested (for this example) that you put the who-colera.csv
into a Data
directory underneath your home directory (shorthand filesystem reference for that directory being ~/Data
). The full dfs.root
for the system used in this example is:
dfs.root.`/Users/bob/Data/who-cholera.csv`
Replace bob
with your home directory name. (TBD
: Windows example path)
However, because this data file has a header, you should (for this example) rename it to use the .csvh
extension vs the .csv
extension. So, the dfs
path should actually be:
dfs.root.`/Users/bob/Data/who-cholera.csvh`
The h
at the end let’s Drill’s CSV parser know that there are column headers. A future recipe will show you how to make that the default. Note that there are many contexts where CSV files are generated at a regular frequency as part of a well-established process and do not have or require a header line. No header CSVs were used well-before the “big data” term popped up but were heavily used in the early days of “modern” big data processing since header lines in well-established workflows can slow down processing.
You’ve likely noticed this is a small CSV file. Drill can handle large CSV files well, too, as you’ll see in the next recipe.
Now we can work with this data via sergeant
. We’ll first take a look at it:
library(sergeant)
library(tidyverse)
db <- src_drill("localhost")
who_cholera <- tbl(db, "dfs.root.`/Users/bob/Data/who-cholera.csvh`")
who_cholera
## # Source: table<dfs.root.`/Users/bob/Data/who-cholera.csvh`> [?? x 3]
## # Database: DrillConnection
## country year reported_cases
## <chr> <chr> <int>
## 1 Afghanistan 2016 677
## 2 Afghanistan 2015 58064
## 3 Afghanistan 2014 45481
## 4 Afghanistan 2013 3957
## 5 Afghanistan 2012 12
## 6 Afghanistan 2011 3733
## 7 Afghanistan 2010 2369
## 8 Afghanistan 2009 662
## 9 Afghanistan 2008 4384
## 10 Afghanistan 2005 33
## # ... with more rows
One difference between “normal” dplyr
and “database” dplyr
is that data operations stay at the database until you retrieve them. This is done with collect()
. All of the cholera data is still in Drill and the printed display shows 10 observations because the actual query sent to Drill to give you that view is:
SELECT * FROM dfs.root.`/Users/bob/Data/who-cholera.csvh` LIMIT 10
This particular CSV file is small enough to collect()
and work with locally so you could do:
## # A tibble: 2,470 x 3
## country year reported_cases
## * <chr> <chr> <int>
## 1 Afghanistan 2016 677
## 2 Afghanistan 2015 58064
## 3 Afghanistan 2014 45481
## 4 Afghanistan 2013 3957
## 5 Afghanistan 2012 12
## 6 Afghanistan 2011 3733
## 7 Afghanistan 2010 2369
## 8 Afghanistan 2009 662
## 9 Afghanistan 2008 4384
## 10 Afghanistan 2005 33
## # ... with 2,460 more rows
and have it all in R. Drill also perform aggregation and other operations for you.
You may have noticed that all three columns are <chr>
that is due to Drill being schema-less and not really knowing how the CSV file is structured, so it returns the data to R with no hints as to the column data types.
Since we’re working with a datbase, we can “fix” this by being more verbose in how we ask for this CSV data. The second parameter to tbl()
does not just have to be a “table” reference. It can be a full SQL query that returns “rectangular” results that can be turned into an R data frame. Drill’s syntax requires such a query to be wrapped in parentheses. We can make the above data a bit more useful with:
tbl(db, "(
SELECT
country,
CAST(LTRIM(`year`, ' ') AS int) AS `year`,
CAST(reported_cases AS int) AS reported_cases
FROM dfs.root.`/Users/bob/Data/who-cholera.csvh`
)") -> who_cholera
who_cholera
## # Source: table<( SELECT country, CAST(LTRIM(`year`, ' ') AS int) AS
## # `year`, CAST(reported_cases AS int) AS reported_cases FROM
## # dfs.root.`/Users/bob/Data/who-cholera.csvh` )> [?? x 3]
## # Database: DrillConnection
## country year reported_cases
## <chr> <int> <int>
## 1 Afghanistan 2016 677
## 2 Afghanistan 2015 58064
## 3 Afghanistan 2014 45481
## 4 Afghanistan 2013 3957
## 5 Afghanistan 2012 12
## 6 Afghanistan 2011 3733
## 7 Afghanistan 2010 2369
## 8 Afghanistan 2009 662
## 9 Afghanistan 2008 4384
## 10 Afghanistan 2005 33
## # ... with more rows
The CAST()
function performs data type conversion and LTRIM()
is used to “left trim” characters from strings. The CAST
gives a hint about the data type and R now knows it’s an integer
. But, why did we need to use LTRIM
? You likely didn’t notice the extra ' '
at the beginning of the entriesin the year column:
"country","year","reported_cases"
"Afghanistan"," 2016","677"
"Afghanistan"," 2015","58064"
"Afghanistan"," 2014","45481"
"Afghanistan"," 2013","3957"
"Afghanistan"," 2012","12"
Removing that is necessary before the conversion to integer.
As noted earlier, we can perform wrangling operations in-database vs in-R:
## # Source: lazy query [?? x 2]
## # Database: DrillConnection
## # Ordered by: desc(n)
## country n
## <chr> <int>
## 1 India 1363250
## 2 Haiti 795794
## 3 Peru 736195
## 4 Democratic Republic of the Congo 521607
## 5 Indonesia 394945
## 6 Mozambique 327913
## 7 Somalia 311203
## 8 Nigeria 310217
## 9 Bangladesh 294647
## 10 Afghanistan 263843
## # ... with more rows
## # Source: lazy query [?? x 2]
## # Database: DrillConnection
## country avg_annual_cases
## <chr> <dbl>
## 1 Afghanistan 11993
## 2 Albania 626
## 3 Algeria 636
## 4 Angola 7348
## 5 Argentina 758
## 6 Armenia 25.0
## 7 Australia 3.74
## 8 Austria 1.00
## 9 Azerbaijan 18.0
## 10 Bahamas 1.00
## # ... with more rows
library(hrbrthemes)
filter(who_cholera, country == "Yemen") %>%
collect() %>%
mutate(year = as.Date(sprintf("%s-01-01", year))) %>%
ggplot(aes(year, reported_cases)) +
geom_segment(aes(xend=year, yend=0)) +
scale_x_date(date_breaks="3 years", date_labels="'%y") +
scale_y_comma() +
labs(
x = NULL, y = "# reported cases",
title = "Annual Cholera Cases in Yemen (1971-2016)"
) +
theme_ipsum(grid="Y") +
theme(axis.text.y=element_text(vjust=c(0, rep(0.5, 2), 1)))
Future recipes will help you debug issues when CAST
ing data from “malformed” CSV files.