List available devices:
cordova emulate ios --list
Examples of how to select target:
cordova emulate ios --target="iPhone-4s, 9.3"
cordova emulate ios --target="iPad-Air-2, 9.3"
cordova emulate ios --target="iPhone-6s, 9.3"
| { | |
| "data": [ | |
| { | |
| "_data": { | |
| "id": "616323202", | |
| "user_id": "108268890", | |
| "user_name": "Gorgc", | |
| "game_id": "29595", | |
| "type": "live", | |
| "title": "high octane gaming", | 
| module.exports = flattenArray | |
| /** | |
| * Flatten a multi-dimensional array. | |
| * | |
| * @param {Number[]} array | |
| */ | |
| function flattenArray(array) { | |
| return array.reduce((result, el) => { | |
| // If the element is an array, continue to flatten it. | 
List available devices:
cordova emulate ios --list
Examples of how to select target:
cordova emulate ios --target="iPhone-4s, 9.3"
cordova emulate ios --target="iPad-Air-2, 9.3"
cordova emulate ios --target="iPhone-6s, 9.3"
git show -s --format=%ci COMMIT
String.prototype.hashCode = function() {
  var hash = 0, i, chr, len;
  if (this.length == 0) return hash;
  for (i = 0, len = this.length; i < len; i++) {
    chr   = this.charCodeAt(i);
    hash  = ((hash << 5) - hash) + chr;
    hash |= 0; // Convert to 32bit integer
  }
 return hash;| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console | 
The self keyword allows for access to the current object.
When you call a method on an object, such as object.method, the object receives a method message. The object will respond to the method if there is a method defined for it. Inside that method, you have access to the object via the keyword self.
When you call a method without an explicit receiving object, it just calls it on self.
If you are inside an instance method but need access to a class method, you would use self.class.method_you_want
| def maximum(numbers) | |
| largest = numbers.first | |
| index = 0 | |
| # keep looping over every element in the array | |
| while index < numbers.size | |
| # check to see if current number is larger than the largest one so far |