code stringlengths 2 1.05M |
|---|
// Copyright 2006 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* @fileoverview Shared test function to reset the constants in
* goog.userAgent.*
*/
goog.provide('goog.userAgentTestUtil');
goog.provide('goog.userAgentTestUtil.UserAgents');
goog.require('goog.labs.userAgent.browser');
goog.require('goog.labs.userAgent.engine');
goog.require('goog.userAgent');
goog.setTestOnly('goog.userAgentTestUtil');
/**
* Rerun the initialization code to set all of the goog.userAgent constants.
* @suppress {accessControls}
*/
goog.userAgentTestUtil.reinitializeUserAgent = function() {
// Unfortunately we can't isolate the useragent setting in a function
// we can call, because things rely on it compiling to nothing when
// one of the ASSUME flags is set, and the compiler isn't smart enough
// to do that when the setting is done inside a function that's inlined.
goog.userAgent.OPERA = goog.labs.userAgent.browser.isOpera();
goog.userAgent.IE = goog.labs.userAgent.browser.isIE();
goog.userAgent.GECKO = goog.labs.userAgent.engine.isGecko();
goog.userAgent.WEBKIT = goog.labs.userAgent.engine.isWebKit();
goog.userAgent.MOBILE = goog.userAgent.isMobile_();
goog.userAgent.SAFARI = goog.userAgent.WEBKIT;
goog.userAgent.initPlatform_();
goog.userAgent.PLATFORM = goog.userAgent.determinePlatform_();
goog.userAgent.VERSION = goog.userAgent.determineVersion_();
};
/**
* Browser definitions.
* @enum {string}
*/
goog.userAgentTestUtil.UserAgents = {
GECKO: 'GECKO',
IE: 'IE',
OPERA: 'OPERA',
WEBKIT: 'WEBKIT'
};
/**
* Return whether a given user agent has been detected.
* @param {string} agent Value in UserAgents.
* @return {boolean} Whether the user agent has been detected.
*/
goog.userAgentTestUtil.getUserAgentDetected = function(agent) {
switch (agent) {
case goog.userAgentTestUtil.UserAgents.GECKO:
return goog.userAgent.GECKO;
case goog.userAgentTestUtil.UserAgents.IE:
return goog.userAgent.IE;
case goog.userAgentTestUtil.UserAgents.OPERA:
return goog.userAgent.OPERA;
case goog.userAgentTestUtil.UserAgents.WEBKIT:
return goog.userAgent.WEBKIT;
}
throw Error('Unrecognized user agent');
};
|
import {fireEvent as dtlFireEvent} from '@testing-library/dom'
// react-testing-library's version of fireEvent will call
// dom-testing-library's version of fireEvent. The reason
// we make this distinction however is because we have
// a few extra events that work a bit differently
const fireEvent = (...args) => dtlFireEvent(...args)
Object.keys(dtlFireEvent).forEach(key => {
fireEvent[key] = (...args) => dtlFireEvent[key](...args)
})
// React event system tracks native mouseOver/mouseOut events for
// running onMouseEnter/onMouseLeave handlers
// @link https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/events/EnterLeaveEventPlugin.js#L24-L31
const mouseEnter = fireEvent.mouseEnter
const mouseLeave = fireEvent.mouseLeave
fireEvent.mouseEnter = (...args) => {
mouseEnter(...args)
return fireEvent.mouseOver(...args)
}
fireEvent.mouseLeave = (...args) => {
mouseLeave(...args)
return fireEvent.mouseOut(...args)
}
const pointerEnter = fireEvent.pointerEnter
const pointerLeave = fireEvent.pointerLeave
fireEvent.pointerEnter = (...args) => {
pointerEnter(...args)
return fireEvent.pointerOver(...args)
}
fireEvent.pointerLeave = (...args) => {
pointerLeave(...args)
return fireEvent.pointerOut(...args)
}
const select = fireEvent.select
fireEvent.select = (node, init) => {
select(node, init)
// React tracks this event only on focused inputs
node.focus()
// React creates this event when one of the following native events happens
// - contextMenu
// - mouseUp
// - dragEnd
// - keyUp
// - keyDown
// so we can use any here
// @link https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/events/SelectEventPlugin.js#L203-L224
fireEvent.keyUp(node, init)
}
// React event system tracks native focusout/focusin events for
// running blur/focus handlers
// @link https://github.com/facebook/react/pull/19186
const blur = fireEvent.blur
const focus = fireEvent.focus
fireEvent.blur = (...args) => {
fireEvent.focusOut(...args)
return blur(...args)
}
fireEvent.focus = (...args) => {
fireEvent.focusIn(...args)
return focus(...args)
}
export {fireEvent}
|
'use strict'
/**
* PEM
* @ignore
*/
const privatePKCS1 = `-----BEGIN EC PRIVATE KEY-----
MIHcAgEBBEIBp7eAMe6QHQ4Av4tEfeVYFQUn3nWHFFEAfyqOcjSUHzPFmNQpH2kM
wFpZu6XPxauBTVTnFW8QAtD1ov1L6V7aHpagBwYFK4EEACOhgYkDgYYABAFHzefo
k5MWo1mRqDXvo8zQqUsnb6JeTKyn/kD0tJP92cYFutmHTq3rKQF2Kyvvhv339iKB
q11jsNpLjNCVooqDpwEHOpuFthlQH1isX96oQrSo+pxgkMQjUxxeeAF/mIeINu9S
2H/FYFvG7IU/O+0iTiY5GGmyiXPDThv5adXMH3zn6g==
-----END EC PRIVATE KEY-----`
const privatePKCS8 = `-----BEGIN PRIVATE KEY-----
MIHuAgEAMBAGByqGSM49AgEGBSuBBAAjBIHWMIHTAgEBBEIBp7eAMe6QHQ4Av4tE
feVYFQUn3nWHFFEAfyqOcjSUHzPFmNQpH2kMwFpZu6XPxauBTVTnFW8QAtD1ov1L
6V7aHpahgYkDgYYABAFHzefok5MWo1mRqDXvo8zQqUsnb6JeTKyn/kD0tJP92cYF
utmHTq3rKQF2Kyvvhv339iKBq11jsNpLjNCVooqDpwEHOpuFthlQH1isX96oQrSo
+pxgkMQjUxxeeAF/mIeINu9S2H/FYFvG7IU/O+0iTiY5GGmyiXPDThv5adXMH3zn
6g==
-----END PRIVATE KEY-----`
const publicPKCS8 = `-----BEGIN PUBLIC KEY-----
MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBR83n6JOTFqNZkag176PM0KlLJ2+i
Xkysp/5A9LST/dnGBbrZh06t6ykBdisr74b99/YigatdY7DaS4zQlaKKg6cBBzqb
hbYZUB9YrF/eqEK0qPqcYJDEI1McXngBf5iHiDbvUth/xWBbxuyFPzvtIk4mORhp
solzw04b+WnVzB985+o=
-----END PUBLIC KEY-----`
/**
* JWK
* @ignore
*/
const privateJwk = `{
"kty": "EC",
"crv": "P-521",
"d": "Aae3gDHukB0OAL-LRH3lWBUFJ951hxRRAH8qjnI0lB8zxZjUKR9pDMBaWbulz8WrgU1U5xVvEALQ9aL9S-le2h6W",
"x": "AUfN5-iTkxajWZGoNe-jzNCpSydvol5MrKf-QPS0k_3ZxgW62YdOrespAXYrK--G_ff2IoGrXWOw2kuM0JWiioOn",
"y": "AQc6m4W2GVAfWKxf3qhCtKj6nGCQxCNTHF54AX-Yh4g271LYf8VgW8bshT877SJOJjkYabKJc8NOG_lp1cwffOfq"
}`
const publicJwk = `{
"kty": "EC",
"crv": "P-521",
"x": "AUfN5-iTkxajWZGoNe-jzNCpSydvol5MrKf-QPS0k_3ZxgW62YdOrespAXYrK--G_ff2IoGrXWOw2kuM0JWiioOn",
"y": "AQc6m4W2GVAfWKxf3qhCtKj6nGCQxCNTHF54AX-Yh4g271LYf8VgW8bshT877SJOJjkYabKJc8NOG_lp1cwffOfq"
}`
/**
* Export
* @ignore
*/
module.exports = {
privatePKCS1,
privatePKCS8,
publicPKCS8,
privateJwk,
publicJwk,
}
|
require('./datetime-picker.directive.css');
directive.$inject = ['$datetimeModalService'];
function directive($datetimeModalService){
return {
retrict: 'AE',
require: 'ngModel',
scope: {
mode: '@'
},
template: require('./datetime-range.directive.html'),
link: function($scope, $ele, $attr, ngModel){
// ngModel.$formatters.push(function(modelValue){
// });
// ngModel.$parsers.push(function(viewValue){
// });
$scope.$watch('minDate+maxDate', function(){
var min = $scope.minDate;
var max = $scope.maxDate;
if(min && min instanceof String) {
$scope.minDate = new Date(min);
}
if(max && max instanceof String) {
$scope.maxDate = new Date(max);
}
ngModel.$setViewValue({
min: $scope.minDate,
max: $scope.maxDate
});
// ngModel.$render();
});
// viewValue -> 视图
ngModel.$render = function() {
var value = ngModel.$isEmpty(ngModel.$viewValue) ?
{} : ngModel.$viewValue;
$scope.minDate = value.min;
$scope.maxDate = value.max;
};
// 属性required与required的监听
var required = false;
$attr.$observe('required', function(value){
if(value === true || value === 'true') {
required = true;
} else {
required = false;
}
ngModel.$validate();
});
// required validator
ngModel.$validators.required = function(value) {
return !required || !!(value && value.min && value.max);
};
}
};
}
module.exports = directive;
|
version https://git-lfs.github.com/spec/v1
oid sha256:eb1e55fdc42184952815f51599037c9970f16f890e51417ad254fc172c080172
size 404409
|
module.exports = {
normalizeEntityName: function() {},
afterInstall: function() {
return this.addBowerPackageToProject('jquery.inputmask');
},
};
|
(function(ns){
var Shade = require("../../../interfaces.js");
var Syntax = require('estraverse').Syntax;
var Tools = require("../../tools.js");
var ANNO = require("../../../type-system/annotation.js").ANNO;
var TYPES = Shade.TYPES,
KINDS = Shade.OBJECT_KINDS;
var Mat4Instance = {
col: {
callExp: Tools.Mat.generateColCall.bind(null, "Mat4")
}
}
Tools.Mat.attachOperators(Mat4Instance, "Mat4", {
add: '+',
sub: '-',
mul: '*',
div: '/'
});
Tools.Vec.attachOperators(Mat4Instance, 4, {
mulVec: '*'
});
Tools.extend(ns, {
id: "Mat4",
kind: KINDS.MATRIX4,
object: {
constructor: Tools.Vec.generateConstructor,
static: {}
},
instance: Mat4Instance
});
}(exports));
|
var robbery_2005_07 = [{
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "properties": { "Unnamed: 0": 0, "Incident Number": 51820136, "Date": "07\/01\/2005", "Time": "02:22 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.071129, -87.933230 ], "Address": "2879 N 16TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.933230102573589, 43.07112883236195 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1, "Incident Number": 51820161, "Date": "07\/01\/2005", "Time": "03:02 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.184485, -88.003621 ], "Address": "7500 W NORTHRIDGE LAKES BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -88.003621110739232, 43.184485464365885 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 2, "Incident Number": 51820203, "Date": "07\/01\/2005", "Time": "05:15 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067079, -87.987424 ], "Address": "2638 N 60TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 2, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.987424444601729, 43.067078968636395 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 3, "Incident Number": 51820219, "Date": "07\/01\/2005", "Time": "06:55 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067638, -87.958642 ], "Address": "2673-A N 36TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.958641602573593, 43.067637586733213 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 4, "Incident Number": 52120191, "Date": "07\/31\/2005", "Time": "05:53 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.104410, -87.945603 ], "Address": "2601 W HAMPTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.945602930607691, 43.104409535634112 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 5, "Incident Number": 52110093, "Date": "07\/30\/2005", "Time": "07:08 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.093907, -87.930703 ], "Address": "1602 W OLIVE ST", "e_clusterK2": 1, "g_clusterK2": 0, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 0, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.930702846832105, 43.093907334186788 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 6, "Incident Number": 52100006, "Date": "07\/29\/2005", "Time": "12:32 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.111879, -87.957612 ], "Address": "3535 W VILLARD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.957611528449419, 43.111878539529265 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 7, "Incident Number": 52110026, "Date": "07\/29\/2005", "Time": "07:33 PM", "Police District": 7, "Offense 1": "KIDNAPING", "Offense 2": "ROBBERY", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.110516, -87.940257 ], "Address": "5128 N 23RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.940257439883339, 43.11051582499384 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 8, "Incident Number": 52110026, "Date": "07\/29\/2005", "Time": "07:33 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": "KIDNAPING", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.110516, -87.940257 ], "Address": "5128 N 23RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.940257439883339, 43.11051582499384 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 9, "Incident Number": 52110029, "Date": "07\/29\/2005", "Time": "11:17 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.107750, -87.966599 ], "Address": "4959 N SHERMAN BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.966599073720147, 43.107750199001686 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 10, "Incident Number": 52090261, "Date": "07\/28\/2005", "Time": "07:57 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.149287, -87.956730 ], "Address": "7242 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 4, "g_clusterK6": 5, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 5, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.956730066565029, 43.14928699001667 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 11, "Incident Number": 52080131, "Date": "07\/27\/2005", "Time": "11:57 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.111907, -87.955402 ], "Address": "3400 W VILLARD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.955402332361928, 43.111907453257402 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 12, "Incident Number": 52080180, "Date": "07\/27\/2005", "Time": "01:18 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.113788, -87.948755 ], "Address": "5286 N 29TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.948755404639769, 43.113788413266775 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 13, "Incident Number": 52070016, "Date": "07\/26\/2005", "Time": "12:38 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.119031, -87.956823 ], "Address": "3501 W SILVER SPRING DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 2, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.956822727595025, 43.119030681503666 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 14, "Incident Number": 52080002, "Date": "07\/26\/2005", "Time": "05:13 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": "KIDNAPING", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.144708, -87.965483 ], "Address": "6974 N 43RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 4, "g_clusterK6": 5, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 5, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.965483165832097, 43.144707648630778 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 15, "Incident Number": 52060023, "Date": "07\/25\/2005", "Time": "12:30 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.104553, -87.939445 ], "Address": "2208 W HAMPTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.939445370448368, 43.104553491841962 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 16, "Incident Number": 52060035, "Date": "07\/25\/2005", "Time": "02:22 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.097469, -87.927659 ], "Address": "4427 N GREEN BAY AV", "e_clusterK2": 1, "g_clusterK2": 0, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 0, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 4, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.927659259474126, 43.097469397809867 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 17, "Incident Number": 52090060, "Date": "07\/22\/2005", "Time": "09:56 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.142063, -87.956361 ], "Address": "6837 N DARIEN ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 4, "g_clusterK6": 5, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 5, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.956361375361794, 43.142062760745283 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 18, "Incident Number": 52020017, "Date": "07\/21\/2005", "Time": "12:22 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.114444, -87.942573 ], "Address": "2436 W LAWN AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.942573387731557, 43.114444478792613 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 19, "Incident Number": 52030015, "Date": "07\/21\/2005", "Time": "10:49 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.111827, -87.953653 ], "Address": "3217 W VILLARD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.953653036643729, 43.11182653173897 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 20, "Incident Number": 52020022, "Date": "07\/20\/2005", "Time": "11:14 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.108497, -87.970241 ], "Address": "5011 N 46TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.970240653644026, 43.108497419095158 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 21, "Incident Number": 51990009, "Date": "07\/17\/2005", "Time": "11:17 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.111941, -87.975131 ], "Address": "4949 W VILLARD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 2, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.975131185959924, 43.111940502885531 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 22, "Incident Number": 51970203, "Date": "07\/16\/2005", "Time": "10:42 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.106537, -87.961561 ], "Address": "4909 N 39TH ST #APT19", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.961561254179898, 43.106536652316585 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 23, "Incident Number": 51960036, "Date": "07\/15\/2005", "Time": "02:06 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.114753, -87.961231 ], "Address": "5341 N 39TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.961230573720144, 43.114753173466454 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 24, "Incident Number": 51960051, "Date": "07\/15\/2005", "Time": "05:11 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089687, -87.936130 ], "Address": "1959 W ATKINSON AV", "e_clusterK2": 1, "g_clusterK2": 0, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.936129625536978, 43.089686612754633 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 25, "Incident Number": 51960111, "Date": "07\/15\/2005", "Time": "10:28 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.096545, -87.950436 ], "Address": "4360 N 30TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.950435853569317, 43.09654505245544 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 26, "Incident Number": 51940036, "Date": "07\/13\/2005", "Time": "02:28 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.099857, -87.938251 ], "Address": "4547 N 21ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 4, "m_clusterK8": 1, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.938251106468726, 43.099857419095173 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 27, "Incident Number": 51910155, "Date": "07\/10\/2005", "Time": "04:31 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.111933, -87.954121 ], "Address": "3300 W VILLARD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.954120529159582, 43.111933484272235 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 28, "Incident Number": 51860313, "Date": "07\/05\/2005", "Time": "10:43 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.109895, -87.961383 ], "Address": "5100 N 39TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.96138341048983, 43.109894600035538 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 29, "Incident Number": 51860011, "Date": "07\/04\/2005", "Time": "09:34 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.111841, -87.954782 ], "Address": "3323 W VILLARD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.954781919095154, 43.111840506780673 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 30, "Incident Number": 51840029, "Date": "07\/03\/2005", "Time": "02:55 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.120719, -87.957479 ], "Address": "5667 N 36TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 2, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.957478632003955, 43.120719450458779 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 31, "Incident Number": 51850015, "Date": "07\/03\/2005", "Time": "11:13 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.109271, -87.939091 ], "Address": "5020 N 22ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.939091365623312, 43.10927116660352 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 32, "Incident Number": 51830200, "Date": "07\/02\/2005", "Time": "10:06 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": "KIDNAPING", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.099567, -87.945476 ], "Address": "4525 N 26TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.945475890126147, 43.099566632523548 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 33, "Incident Number": 51840005, "Date": "07\/02\/2005", "Time": "11:31 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.091269, -87.938390 ], "Address": "2065 W ATKINSON AV", "e_clusterK2": 1, "g_clusterK2": 0, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.938389805326167, 43.091269188989706 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 34, "Incident Number": 52120035, "Date": "07\/31\/2005", "Time": "02:48 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.123480, -88.022844 ], "Address": "8824 W CARMEN AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 0, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 8, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.022844419095151, 43.123479504327825 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 35, "Incident Number": 52120009, "Date": "07\/30\/2005", "Time": "10:26 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.096742, -87.996970 ], "Address": "4363 N 68TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.996969595360227, 43.096742444630394 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 36, "Incident Number": 52100025, "Date": "07\/29\/2005", "Time": "01:18 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.091100, -88.001775 ], "Address": "4048 N 72ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.001774860782689, 43.091100167638075 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 37, "Incident Number": 52100177, "Date": "07\/29\/2005", "Time": "03:28 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.128144, -88.007198 ], "Address": "6035 N 77TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 8, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.007197658116098, 43.128143779906509 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 38, "Incident Number": 52070233, "Date": "07\/26\/2005", "Time": "05:27 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.090113, -87.993737 ], "Address": "6510 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.993737077537745, 43.090112718515471 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 39, "Incident Number": 52070253, "Date": "07\/26\/2005", "Time": "07:31 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.120531, -88.004958 ], "Address": "7502 W THURSTON CR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.004958019562608, 43.120531402186941 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 40, "Incident Number": 52060042, "Date": "07\/25\/2005", "Time": "01:35 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.132898, -88.005969 ], "Address": "6325 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.005968599255354, 43.132897676380651 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 41, "Incident Number": 52060084, "Date": "07\/25\/2005", "Time": "08:46 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.107818, -88.015122 ], "Address": "8311 W HERBERT AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.015122, 43.107818481245452 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 42, "Incident Number": 52050230, "Date": "07\/24\/2005", "Time": "06:32 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.119505, -87.991443 ], "Address": "6410 W SILVER SPRING DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.991443303912519, 43.119505486005977 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 43, "Incident Number": 52060005, "Date": "07\/24\/2005", "Time": "09:40 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.108913, -88.015854 ], "Address": "5014 N 84TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.01585368875277, 43.108912838567313 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 44, "Incident Number": 52040162, "Date": "07\/23\/2005", "Time": "03:17 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089764, -87.977868 ], "Address": "5121 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.977867799640109, 43.089764313956707 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 45, "Incident Number": 52040027, "Date": "07\/22\/2005", "Time": "10:54 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.123733, -88.014476 ], "Address": "5826 N 83RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 0, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 8, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.014475831352328, 43.123733413266791 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 46, "Incident Number": 52020019, "Date": "07\/21\/2005", "Time": "12:30 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.132898, -88.005969 ], "Address": "6325 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.005968599255354, 43.132897676380651 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 47, "Incident Number": 52020027, "Date": "07\/21\/2005", "Time": "02:54 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.112281, -88.007634 ], "Address": "7702 W VILLARD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.007634083819028, 43.112281493219321 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 48, "Incident Number": 52020107, "Date": "07\/21\/2005", "Time": "01:20 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.115643, -87.976246 ], "Address": "N 51ST ST AND W CUSTER AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 0, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.976246499999988, 43.115643 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 49, "Incident Number": 51980068, "Date": "07\/17\/2005", "Time": "06:10 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.098241, -87.987050 ], "Address": "6003 W FOND DU LAC AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.987050096889433, 43.098241296958953 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 50, "Incident Number": 51920098, "Date": "07\/11\/2005", "Time": "10:32 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.118462, -88.028371 ], "Address": "9239 W SHERIDAN AV #1", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 0, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 8, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.028370806826715, 43.118462474032086 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 51, "Incident Number": 51910015, "Date": "07\/10\/2005", "Time": "12:37 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.131681, -88.023964 ], "Address": "8935 W MONROVIA AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.023963774251015, 43.131680865370321 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 52, "Incident Number": 51910019, "Date": "07\/10\/2005", "Time": "12:37 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.131681, -88.023964 ], "Address": "8935 W MONROVIA ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.023963774251015, 43.131680865370321 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 53, "Incident Number": 51910017, "Date": "07\/09\/2005", "Time": "11:30 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.105080, -88.014083 ], "Address": "8220 W HAMPTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.0140825, 43.105079501009605 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 54, "Incident Number": 51890188, "Date": "07\/08\/2005", "Time": "07:38 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.115361, -87.987376 ], "Address": "5370 N 61ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 1, "m_clusterK5": 2, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.987376375209408, 43.115361212880138 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 55, "Incident Number": 51880003, "Date": "07\/07\/2005", "Time": "12:10 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.096959, -87.990594 ], "Address": "4368 N 63RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.990594393531268, 43.096958664723871 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 56, "Incident Number": 51870015, "Date": "07\/06\/2005", "Time": "12:42 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.092108, -88.004193 ], "Address": "4110 N 74TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 0, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.004193393531267, 43.092107832361933 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 57, "Incident Number": 51830111, "Date": "07\/02\/2005", "Time": "11:35 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.097514, -87.986919 ], "Address": "4411 N 60TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.986919347501242, 43.097514173750625 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 58, "Incident Number": 51820103, "Date": "07\/01\/2005", "Time": "10:40 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.105024, -87.991437 ], "Address": "4805 N 64TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 0, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.991437335124758, 43.105024468223775 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 59, "Incident Number": 52120028, "Date": "07\/31\/2005", "Time": "01:08 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.061993, -87.885556 ], "Address": "2430 N MURRAY AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.885555955133299, 43.061992826533555 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 60, "Incident Number": 52120036, "Date": "07\/31\/2005", "Time": "01:56 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.048932, -87.899644 ], "Address": "1450 N ASTOR ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.899644152009458, 43.048932481156115 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 61, "Incident Number": 52120045, "Date": "07\/31\/2005", "Time": "01:56 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.048932, -87.899644 ], "Address": "1450 N ASTOR ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.899644152009458, 43.048932481156115 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 62, "Incident Number": 52080021, "Date": "07\/27\/2005", "Time": "12:42 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.072907, -87.899280 ], "Address": "932 E CHAMBERS ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.899279526920196, 43.072907467684118 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 63, "Incident Number": 52070141, "Date": "07\/26\/2005", "Time": "12:21 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060070, -87.889194 ], "Address": "1701 E NORTH AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.889193571211251, 43.06006954895588 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 64, "Incident Number": 52030213, "Date": "07\/22\/2005", "Time": "02:44 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.066967, -87.878026 ], "Address": "2638 N DOWNER AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.878026152190841, 43.066966999989475 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 65, "Incident Number": 52020021, "Date": "07\/21\/2005", "Time": "12:56 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.071088, -87.886757 ], "Address": "2901 N CRAMER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.886757484128808, 43.071088204457617 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 66, "Incident Number": 52020010, "Date": "07\/20\/2005", "Time": "10:13 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.052535, -87.896805 ], "Address": "1686 N FRANKLIN ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.896805436811434, 43.052535052455426 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 67, "Incident Number": 52000037, "Date": "07\/19\/2005", "Time": "04:52 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067495, -87.899620 ], "Address": "918 E CENTER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.899620332361934, 43.067495460470759 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 68, "Incident Number": 51930019, "Date": "07\/12\/2005", "Time": "12:43 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.055956, -87.898099 ], "Address": "1871 N HUMBOLDT AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 1, "m_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.898099120895452, 43.055955670552265 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 69, "Incident Number": 51940005, "Date": "07\/12\/2005", "Time": "11:14 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.075028, -87.887927 ], "Address": "3137 N OAKLAND AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.887927003038882, 43.075028448849245 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 70, "Incident Number": 51910018, "Date": "07\/10\/2005", "Time": "12:11 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.074341, -87.901506 ], "Address": "3066 N FRATNEY ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.901506400744637, 43.074341413266779 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 71, "Incident Number": 51900042, "Date": "07\/09\/2005", "Time": "04:53 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.054213, -87.891138 ], "Address": "1800 N FARWELL AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.891137645276828, 43.05421285677199 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 72, "Incident Number": 51890032, "Date": "07\/08\/2005", "Time": "02:30 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.073675, -87.887930 ], "Address": "3039 N OAKLAND AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.887930073720142, 43.073675444630396 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 73, "Incident Number": 51850028, "Date": "07\/04\/2005", "Time": "02:03 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.066142, -87.902812 ], "Address": "2618 N PIERCE ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.902812375209407, 43.066142245628726 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 74, "Incident Number": 52120101, "Date": "07\/31\/2005", "Time": "06:57 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.033681, -87.957104 ], "Address": "3417 W MT VERNON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 1, "m_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.957103919095161, 43.03368054674263 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 75, "Incident Number": 52090242, "Date": "07\/28\/2005", "Time": "07:25 PM", "Police District": 1, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.033114, -87.909198 ], "Address": "225 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 7, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.909197963817633, 43.033114172918189 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 76, "Incident Number": 52070265, "Date": "07\/26\/2005", "Time": "09:54 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.052406, -87.888148 ], "Address": "1600 N LINCOLN MEMORIAL DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.888147920723782, 43.052405671682358 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 77, "Incident Number": 52030149, "Date": "07\/24\/2005", "Time": "03:00 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.050627, -87.951290 ], "Address": "1523 N 30TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.951289639217308, 43.050627251457087 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 78, "Incident Number": 52040210, "Date": "07\/23\/2005", "Time": "10:20 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.039630, -87.932979 ], "Address": "749 N 16TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 2, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.932979095937142, 43.039629996104871 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 79, "Incident Number": 52040001, "Date": "07\/22\/2005", "Time": "10:22 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.041790, -87.934072 ], "Address": "910 N 17TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 2, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.934072347871421, 43.041789524848205 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 80, "Incident Number": 52020029, "Date": "07\/21\/2005", "Time": "03:23 AM", "Police District": 1, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.038832, -87.919572 ], "Address": "612 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.919572106440071, 43.038832471579255 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 81, "Incident Number": 52010013, "Date": "07\/20\/2005", "Time": "12:06 AM", "Police District": 1, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.033114, -87.909198 ], "Address": "225 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 7, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.909197963817633, 43.033114172918189 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 82, "Incident Number": 52010148, "Date": "07\/20\/2005", "Time": "01:13 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.042273, -87.934068 ], "Address": "960 N 17TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 2, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.934068251943998, 43.04227284428498 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 83, "Incident Number": 51980195, "Date": "07\/17\/2005", "Time": "06:56 PM", "Police District": 1, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.033114, -87.909198 ], "Address": "225 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 7, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.909197963817633, 43.033114172918189 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 84, "Incident Number": 51970144, "Date": "07\/16\/2005", "Time": "01:12 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.045818, -87.935701 ], "Address": "1831 W JUNEAU AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 2, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 0, "m_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.935701196087479, 43.045817543424391 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 85, "Incident Number": 51980019, "Date": "07\/16\/2005", "Time": "11:29 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.053385, -87.890220 ], "Address": "1756 N PROSPECT AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.890220239685704, 43.053384739396307 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 86, "Incident Number": 51960024, "Date": "07\/15\/2005", "Time": "12:56 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.038608, -87.942640 ], "Address": "2335 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.942640164723869, 43.038607506780686 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 87, "Incident Number": 51920248, "Date": "07\/11\/2005", "Time": "07:53 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.043325, -87.944430 ], "Address": "2470 W STATE ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 2, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.944429722595828, 43.043324901968433 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 88, "Incident Number": 51910023, "Date": "07\/10\/2005", "Time": "01:39 AM", "Police District": 1, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.040282, -87.909455 ], "Address": "767 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 7, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.909455282012644, 43.040281914507538 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 89, "Incident Number": 51900208, "Date": "07\/09\/2005", "Time": "09:36 PM", "Police District": 1, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.033114, -87.909198 ], "Address": "225 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 7, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.909197963817633, 43.033114172918189 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 90, "Incident Number": 51880017, "Date": "07\/07\/2005", "Time": "01:09 AM", "Police District": 1, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.044593, -87.910625 ], "Address": "117 E HIGHLAND AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 7, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.91062548854778, 43.044593238870569 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 91, "Incident Number": 51860199, "Date": "07\/05\/2005", "Time": "03:13 PM", "Police District": 1, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.035428, -87.906172 ], "Address": "421 N MILWAUKEE ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 3, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 7, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.90617201149999, 43.035428451073287 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 92, "Incident Number": 51850033, "Date": "07\/04\/2005", "Time": "02:26 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.050518, -87.942769 ], "Address": "1525 N 24TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 0, "m_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.942769103727414, 43.050517910352596 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 93, "Incident Number": 51850051, "Date": "07\/04\/2005", "Time": "06:02 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.041924, -87.947720 ], "Address": "901 N 27TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 2, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.947719624790579, 43.041923580904836 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 94, "Incident Number": 51840038, "Date": "07\/03\/2005", "Time": "02:28 AM", "Police District": 1, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.041278, -87.906712 ], "Address": "800 N MILWAUKEE ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 7, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 7, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.906712390125392, 43.041277560795727 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 95, "Incident Number": 51840040, "Date": "07\/03\/2005", "Time": "03:41 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.038780, -87.941160 ], "Address": "2220 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.941159748542901, 43.038779529863056 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 96, "Incident Number": 51840204, "Date": "07\/03\/2005", "Time": "07:09 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.038769, -87.945233 ], "Address": "2502 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.9452325, 43.038769471579243 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 97, "Incident Number": 52070175, "Date": "07\/26\/2005", "Time": "03:08 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.080850, -88.025043 ], "Address": "3406 N 90TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 2, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.025043386317918, 43.080849586733223 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 98, "Incident Number": 52080012, "Date": "07\/26\/2005", "Time": "10:50 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.112953, -88.055850 ], "Address": "5253 N LOVERS LANE RD", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 0, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 8, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.0558496253675, 43.112953309740902 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 99, "Incident Number": 52060019, "Date": "07\/25\/2005", "Time": "12:34 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.115409, -88.055830 ], "Address": "5401 N LOVERS LANE RD", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 0, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 8, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.055829614259011, 43.115409 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 100, "Incident Number": 52060249, "Date": "07\/25\/2005", "Time": "03:36 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.153887, -88.025016 ], "Address": "7491 N 91ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -88.025015761786406, 43.153886565591996 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 101, "Incident Number": 52060014, "Date": "07\/24\/2005", "Time": "10:55 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.118227, -88.055811 ], "Address": "5547 N LOVERS LANE RD", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 0, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 8, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.055810661434307, 43.118226922009342 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 102, "Incident Number": 51990184, "Date": "07\/19\/2005", "Time": "08:15 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.095464, -88.017382 ], "Address": "4300 N 84TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.017382375209408, 43.095463826533546 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 103, "Incident Number": 52000246, "Date": "07\/19\/2005", "Time": "07:37 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.111995, -88.025289 ], "Address": "9025 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 2, "m_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.025289200415301, 43.111994910612381 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 104, "Incident Number": 51960008, "Date": "07\/14\/2005", "Time": "10:53 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089778, -88.028661 ], "Address": "9230 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.028661221622698, 43.0897775115412 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 105, "Incident Number": 51940168, "Date": "07\/13\/2005", "Time": "11:15 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": "KIDNAPING", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.106707, -88.026664 ], "Address": "4878 N SWAN RD", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.026663501500536, 43.106707499019045 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 106, "Incident Number": 51910054, "Date": "07\/10\/2005", "Time": "03:53 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.096940, -88.026673 ], "Address": "9119 W CONGRESS ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.026672913266779, 43.096939535634128 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 107, "Incident Number": 51910136, "Date": "07\/10\/2005", "Time": "02:02 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.075372, -88.011793 ], "Address": "7924 W BURLEIGH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 6, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 0, "m_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.011793142102832, 43.075371518754544 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 108, "Incident Number": 51920013, "Date": "07\/10\/2005", "Time": "11:06 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.106352, -88.018010 ], "Address": "8513 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6, "m_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.01801005011815, 43.106352078250453 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 109, "Incident Number": 52120193, "Date": "07\/31\/2005", "Time": "05:33 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089355, -87.906861 ], "Address": "310 E CAPITOL DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.906861, 43.089355464365873 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 110, "Incident Number": 52100024, "Date": "07\/29\/2005", "Time": "02:19 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.073883, -87.936772 ], "Address": "3025 N 19TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.936771602573586, 43.073882612268449 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 111, "Incident Number": 52110019, "Date": "07\/29\/2005", "Time": "10:47 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.059206, -87.896862 ], "Address": "1100 E GARFIELD AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.896861664723872, 43.059205529286132 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 112, "Incident Number": 52040116, "Date": "07\/23\/2005", "Time": "12:27 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.072662, -87.927661 ], "Address": "1305 W COTTAGE PL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.927660586733225, 43.072661536211051 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 113, "Incident Number": 52040157, "Date": "07\/23\/2005", "Time": "04:39 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.075167, -87.937441 ], "Address": "2000 W BURLEIGH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.93744075, 43.075167227831116 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 114, "Incident Number": 52030136, "Date": "07\/22\/2005", "Time": "10:35 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.079744, -87.933384 ], "Address": "3334 N TEUTONIA AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.933383981101215, 43.079743581741575 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 115, "Incident Number": 52010028, "Date": "07\/20\/2005", "Time": "01:56 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067688, -87.919953 ], "Address": "700 W CENTER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 3, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.91995321831989, 43.067688218319901 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 116, "Incident Number": 52010206, "Date": "07\/20\/2005", "Time": "06:46 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.052682, -87.898149 ], "Address": "3835 N HUMBOLDT AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.898148687245452, 43.052682267308924 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 117, "Incident Number": 52000038, "Date": "07\/19\/2005", "Time": "05:13 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.073126, -87.934716 ], "Address": "1727 W CHAMBERS ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.93471595784456, 43.073126118558079 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 118, "Incident Number": 52000153, "Date": "07\/19\/2005", "Time": "12:11 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067461, -87.914113 ], "Address": "301 W CENTER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.914113166887418, 43.067460752309863 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 119, "Incident Number": 52000205, "Date": "07\/19\/2005", "Time": "04:37 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089096, -87.900464 ], "Address": "807 E CAPITOL DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.900464228259139, 43.08909555785111 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 120, "Incident Number": 52000229, "Date": "07\/19\/2005", "Time": "06:44 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.079238, -87.912466 ], "Address": "3338 N 2ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.912466370737349, 43.079237968636392 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 121, "Incident Number": 51980035, "Date": "07\/17\/2005", "Time": "02:49 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.074112, -87.930582 ], "Address": "1517 W COLUMBIA ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.930581977378964, 43.074111532315882 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 122, "Incident Number": 51970086, "Date": "07\/16\/2005", "Time": "09:50 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.073076, -87.931902 ], "Address": "1555 W CHAMBERS ST #APT31", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.93190213224581, 43.073076364968415 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 123, "Incident Number": 51980014, "Date": "07\/16\/2005", "Time": "10:30 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.073892, -87.909406 ], "Address": "3042 N PALMER ST #3", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.909406389636132, 43.073892 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 124, "Incident Number": 51950133, "Date": "07\/14\/2005", "Time": "11:08 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.077492, -87.906324 ], "Address": "3244 N BUFFUM ST #B", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.906323889636141, 43.077491549541236 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 125, "Incident Number": 51950158, "Date": "07\/14\/2005", "Time": "01:23 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.071750, -87.915406 ], "Address": "2920 N 4TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.915405842460814, 43.07175 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 126, "Incident Number": 51930230, "Date": "07\/12\/2005", "Time": "07:38 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.073793, -87.925289 ], "Address": "3029 N 11TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.925288617577223, 43.073793115182639 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 127, "Incident Number": 51910030, "Date": "07\/10\/2005", "Time": "12:39 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.074581, -87.935900 ], "Address": "1815 W HOPKINS ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.935900278954222, 43.074581355242785 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 128, "Incident Number": 51900192, "Date": "07\/09\/2005", "Time": "06:36 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.071260, -87.932329 ], "Address": "1535 W LOCUST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.932329156234118, 43.071260114328517 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 129, "Incident Number": 51890097, "Date": "07\/08\/2005", "Time": "09:54 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.071065, -87.928156 ], "Address": "1337 W LOCUST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.928156036910195, 43.07106535923824 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 130, "Incident Number": 51890109, "Date": "07\/08\/2005", "Time": "12:04 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089557, -87.937934 ], "Address": "2031 W CAPITOL DR", "e_clusterK2": 1, "g_clusterK2": 0, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.937934338190317, 43.089557481245457 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 131, "Incident Number": 51890174, "Date": "07\/08\/2005", "Time": "05:25 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.085297, -87.896462 ], "Address": "1230 E SINGER CR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.8964615, 43.085297460470748 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 132, "Incident Number": 51880023, "Date": "07\/07\/2005", "Time": "12:22 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.084493, -87.916013 ], "Address": "3724 N 5TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.916012886317915, 43.084492826533562 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 133, "Incident Number": 51880008, "Date": "07\/06\/2005", "Time": "10:56 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089322, -87.935224 ], "Address": "1934 W ATKINSON AV", "e_clusterK2": 1, "g_clusterK2": 0, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.935224309429728, 43.089321581048551 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 134, "Incident Number": 51860102, "Date": "07\/05\/2005", "Time": "08:30 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.074932, -87.920425 ], "Address": "730 W BURLEIGH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.920425133058046, 43.074931607104865 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 135, "Incident Number": 51860238, "Date": "07\/05\/2005", "Time": "04:14 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089123, -87.901290 ], "Address": "709 E CAPITOL DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.901290391972481, 43.089122501154783 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 136, "Incident Number": 51860284, "Date": "07\/05\/2005", "Time": "07:55 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.050041, -87.920322 ], "Address": "710 W CHERRY ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.920322475037182, 43.050040996444764 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 137, "Incident Number": 51870022, "Date": "07\/05\/2005", "Time": "11:47 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.073034, -87.906404 ], "Address": "400 E CHAMBERS ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.906404201573082, 43.07303364387122 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 138, "Incident Number": 51850229, "Date": "07\/04\/2005", "Time": "10:24 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.081958, -87.918526 ], "Address": "3511 N MARTIN L KING JR DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.918526470302339, 43.081958405939524 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 139, "Incident Number": 51830039, "Date": "07\/02\/2005", "Time": "04:39 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.075394, -87.936903 ], "Address": "1909 W HOPKINS ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.936903428270412, 43.075394424635078 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 140, "Incident Number": 51840019, "Date": "07\/02\/2005", "Time": "10:42 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089342, -87.906114 ], "Address": "320 E CAPITOL DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 3, "g_clusterK8": 3, "m_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "m_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7, "m_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.906113937821047, 43.089341524380465 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 141, "Incident Number": 51820136, "Date": "07\/01\/2005", "Time": "02:22 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.071129, -87.933230 ], "Address": "2879 N 16TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.933230102573589, 43.07112883236195 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 142, "Incident Number": 52110012, "Date": "07\/30\/2005", "Time": "12:08 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.073368, -87.942430 ], "Address": "2400 W CHAMBERS ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.94242956400123, 43.073368355867451 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 143, "Incident Number": 52110179, "Date": "07\/30\/2005", "Time": "05:38 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.074750, -87.964469 ], "Address": "3077 N 41ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.964468847736455, 43.074749949007078 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 144, "Incident Number": 52090080, "Date": "07\/28\/2005", "Time": "09:18 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.078198, -87.961389 ], "Address": "3823 W FOND DU LAC AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.96138930587442, 43.078197961682839 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 145, "Incident Number": 52070032, "Date": "07\/26\/2005", "Time": "02:12 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.080420, -87.957297 ], "Address": "3367 N 35TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.957297400862842, 43.080420389545559 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 146, "Incident Number": 52070033, "Date": "07\/26\/2005", "Time": "02:01 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.088904, -87.949415 ], "Address": "3964 N 29TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.949415411853124, 43.088903580904855 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 147, "Incident Number": 52070044, "Date": "07\/26\/2005", "Time": "06:26 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.082858, -87.967469 ], "Address": "4301 W FOND DU LAC AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 4, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.967468685007631, 43.08285809657233 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 148, "Incident Number": 52070161, "Date": "07\/26\/2005", "Time": "01:00 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089913, -87.967580 ], "Address": "4302 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 2, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.967580474464768, 43.089913486005969 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 149, "Incident Number": 52070243, "Date": "07\/26\/2005", "Time": "06:26 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.075196, -87.947654 ], "Address": "2707 W BURLEIGH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.9476535, 43.075196488458801 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 150, "Incident Number": 52060016, "Date": "07\/25\/2005", "Time": "12:25 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.084985, -87.971831 ], "Address": "4647 W MEDFORD AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 2, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.971831469213313, 43.084985271423747 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 151, "Incident Number": 52060024, "Date": "07\/25\/2005", "Time": "01:19 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.070932, -87.947257 ], "Address": "2866 N 27TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.947257188901958, 43.070932312643365 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 152, "Incident Number": 52060029, "Date": "07\/25\/2005", "Time": "01:51 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.077375, -87.964344 ], "Address": "3214 N 41ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.964343860782691, 43.077374832361926 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 153, "Incident Number": 52060306, "Date": "07\/25\/2005", "Time": "09:40 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.078059, -87.945988 ], "Address": "3249 N 26TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.945988099255359, 43.07805911518264 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 154, "Incident Number": 52030024, "Date": "07\/22\/2005", "Time": "01:26 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.080056, -87.968599 ], "Address": "3341 N 44TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.96859910646873, 43.080056025535242 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 155, "Incident Number": 52030033, "Date": "07\/22\/2005", "Time": "01:52 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.083830, -87.982201 ], "Address": "3613 N 55TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.982200946044017, 43.083829623925226 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 156, "Incident Number": 52030208, "Date": "07\/22\/2005", "Time": "04:29 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.093491, -87.967209 ], "Address": "4300 W HOPE AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 4, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 2, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 4, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.967208728713544, 43.093491199305653 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 157, "Incident Number": 52020046, "Date": "07\/21\/2005", "Time": "08:01 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.106093, -87.983772 ], "Address": "4862 N 57TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.983772393531268, 43.106093497085823 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 158, "Incident Number": 52010024, "Date": "07\/20\/2005", "Time": "02:16 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.088457, -87.960849 ], "Address": "3800 W ROOSEVELT DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 4, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.960849442814364, 43.088457025696968 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 159, "Incident Number": 52020001, "Date": "07\/20\/2005", "Time": "09:49 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.075134, -87.964707 ], "Address": "4123 W BURLEIGH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.964707109013261, 43.075134234196497 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 160, "Incident Number": 52000080, "Date": "07\/19\/2005", "Time": "10:03 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.073874, -87.943610 ], "Address": "3023 N 24TH PL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.943609632003955, 43.073873863725538 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 161, "Incident Number": 51990098, "Date": "07\/18\/2005", "Time": "09:26 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.097867, -87.967058 ], "Address": "4433 N SHERMAN BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.967057639217302, 43.097867140717874 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 162, "Incident Number": 51990171, "Date": "07\/18\/2005", "Time": "02:00 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.104546, -87.979792 ], "Address": "5331 W HAMPTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 4, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 4, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 2, "m_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.979792255961073, 43.1045461712594 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 163, "Incident Number": 52000001, "Date": "07\/18\/2005", "Time": "10:45 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.075945, -87.967201 ], "Address": "3140 N SHERMAN BLVD", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.967201254910819, 43.075944758353963 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 164, "Incident Number": 51970028, "Date": "07\/16\/2005", "Time": "01:43 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.075256, -87.967509 ], "Address": "3101 N SHERMAN BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.967509328187418, 43.075255845927295 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 165, "Incident Number": 51970007, "Date": "07\/15\/2005", "Time": "11:38 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089720, -87.946621 ], "Address": "2627 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.946621302527547, 43.089720477350298 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 166, "Incident Number": 51970009, "Date": "07\/15\/2005", "Time": "11:29 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.080898, -87.964920 ], "Address": "4137 W FOND DU LAC AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.96491995617157, 43.080897877863812 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 167, "Incident Number": 51950056, "Date": "07\/14\/2005", "Time": "06:54 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067849, -87.946900 ], "Address": "2623 W CENTER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.946899713331845, 43.067848783271785 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 168, "Incident Number": 51900025, "Date": "07\/09\/2005", "Time": "01:33 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089756, -87.965933 ], "Address": "4223 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 2, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.965932667638057, 43.089756477350321 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 169, "Incident Number": 51900096, "Date": "07\/09\/2005", "Time": "09:41 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.069670, -87.945182 ], "Address": "2507 W HADLEY ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.945182276992313, 43.069669513994029 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 170, "Incident Number": 51880207, "Date": "07\/07\/2005", "Time": "05:53 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.066053, -87.967618 ], "Address": "2525 N SHERMAN BL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.967618125367494, 43.06605286372556 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 171, "Incident Number": 51860301, "Date": "07\/05\/2005", "Time": "09:56 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.085942, -87.948263 ], "Address": "3754 N 28TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.948263411853134, 43.085942413266793 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 172, "Incident Number": 51850071, "Date": "07\/04\/2005", "Time": "05:42 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.072004, -87.953302 ], "Address": "3115 W FOND DU LAC AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 1, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 1, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.953302433550533, 43.072004012753276 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 173, "Incident Number": 51850086, "Date": "07\/04\/2005", "Time": "07:11 AM", "Police District": 7, "Offense 1": null, "Offense 2": "ROBBERY", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.082118, -87.977193 ], "Address": "3436 N 51ST BLVD", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.977193415171357, 43.082117779906525 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 174, "Incident Number": 51850169, "Date": "07\/04\/2005", "Time": "12:48 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089922, -87.969001 ], "Address": "4412 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 2, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.969001164723878, 43.089922486005975 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 175, "Incident Number": 51840024, "Date": "07\/03\/2005", "Time": "01:12 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.071093, -87.943555 ], "Address": "2868 N 24TH PL #1", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.943554856887545, 43.07109313627447 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 176, "Incident Number": 51840043, "Date": "07\/03\/2005", "Time": "03:47 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.075146, -87.947415 ], "Address": "2709 W BURLEIGH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.947414517308502, 43.07514577199715 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 177, "Incident Number": 51850019, "Date": "07\/03\/2005", "Time": "11:37 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.093017, -87.958244 ], "Address": "4166 N 36TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4, "m_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.958243893531275, 43.093016633360264 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 178, "Incident Number": 52110047, "Date": "07\/30\/2005", "Time": "08:00 AM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.003130, -87.942700 ], "Address": "2300 W LINCOLN AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.942699974464773, 43.00312951485941 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 179, "Incident Number": 52110152, "Date": "07\/30\/2005", "Time": "05:24 PM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.020298, -87.950291 ], "Address": "1033 S 29TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.950291073720138, 43.020298058283799 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 180, "Incident Number": 52090045, "Date": "07\/28\/2005", "Time": "05:58 AM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.996268, -87.948454 ], "Address": "2679 S 27TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.948453837492352, 42.996267528262671 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 181, "Incident Number": 52080036, "Date": "07\/27\/2005", "Time": "03:23 AM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.003192, -87.953016 ], "Address": "3100 W LINCOLN AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.953016294179633, 43.00319241068086 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 182, "Incident Number": 52060044, "Date": "07\/25\/2005", "Time": "03:33 AM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.013231, -87.939444 ], "Address": "1640 S 21ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939443951815079, 43.013231161809699 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 183, "Incident Number": 51970049, "Date": "07\/16\/2005", "Time": "06:37 AM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.007939, -87.941631 ], "Address": "2023 S MUSKEGO AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.941631141294778, 43.007939433810336 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 184, "Incident Number": 51920028, "Date": "07\/11\/2005", "Time": "01:44 AM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.019105, -87.947953 ], "Address": "2700 W SCOTT ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.947953306726035, 43.019104974175271 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 185, "Incident Number": 51850020, "Date": "07\/04\/2005", "Time": "02:05 AM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.006591, -87.939444 ], "Address": "2041 W BECHER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939444174851417, 43.006591499567307 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 186, "Incident Number": 51850207, "Date": "07\/04\/2005", "Time": "08:08 PM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.017038, -87.940053 ], "Address": "2114 W GREENFIELD AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.940053335276119, 43.017037500432693 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 187, "Incident Number": 51830202, "Date": "07\/02\/2005", "Time": "06:05 PM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.001205, -87.953030 ], "Address": "2401 S 31ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.953029848475836, 43.001204651524169 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 188, "Incident Number": 52110038, "Date": "07\/30\/2005", "Time": "03:11 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.141228, -87.978920 ], "Address": "5321 W GREEN TREE RD", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 2, "m_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 2, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.9789201762364, 43.141227539529261 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 189, "Incident Number": 52090253, "Date": "07\/28\/2005", "Time": "07:42 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.119431, -87.987044 ], "Address": "6000 W SILVER SPRING DR", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.987043529834381, 43.119430519331488 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 190, "Incident Number": 52080034, "Date": "07\/27\/2005", "Time": "01:30 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": "BURGLARY\/BREAKING AND ENTERING", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.156036, -88.007121 ], "Address": "7810 W CALUMET RD", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -88.007121, 43.156036486005974 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 191, "Incident Number": 52070260, "Date": "07\/26\/2005", "Time": "07:07 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.125138, -87.989535 ], "Address": "5917 N 63RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.989534893752804, 43.125137929542426 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 192, "Incident Number": 52050043, "Date": "07\/24\/2005", "Time": "04:00 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.139018, -88.004809 ], "Address": "6641 N 75TH ST #5", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.004808584449634, 43.139018317713017 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 193, "Incident Number": 52860037, "Date": "07\/22\/2005", "Time": "12:55 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.120559, -87.986188 ], "Address": "5651 N 60TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.986188051503134, 43.120558508742562 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 194, "Incident Number": 51990042, "Date": "07\/18\/2005", "Time": "05:02 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.177973, -88.009481 ], "Address": "8008 W BROWN DEER RD", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -88.009481430203664, 43.177973464942809 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 195, "Incident Number": 51980025, "Date": "07\/17\/2005", "Time": "01:17 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.144390, -88.005660 ], "Address": "6939 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 5, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -88.005659654220935, 43.144390173466434 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 196, "Incident Number": 51960018, "Date": "07\/15\/2005", "Time": "01:07 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.120621, -87.986191 ], "Address": "5649 N 60TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.986190580933496, 43.120620618096837 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 197, "Incident Number": 51960157, "Date": "07\/15\/2005", "Time": "10:44 AM", "Police District": 4, "Offense 1": null, "Offense 2": "ROBBERY", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.162231, -88.028935 ], "Address": "7951 N 94TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -88.028934629782242, 43.162230949218021 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 198, "Incident Number": 51940026, "Date": "07\/12\/2005", "Time": "11:58 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.177923, -88.021289 ], "Address": "8800 W BROWN DEER RD", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -88.02128925653669, 43.177923418960638 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 199, "Incident Number": 51920261, "Date": "07\/11\/2005", "Time": "09:27 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.134426, -88.005618 ], "Address": "6410 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -88.005618001346335, 43.134426493736889 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 200, "Incident Number": 51920263, "Date": "07\/11\/2005", "Time": "09:37 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.152102, -88.005358 ], "Address": "7377 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -88.005358132580866, 43.152101727451075 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 201, "Incident Number": 51880196, "Date": "07\/07\/2005", "Time": "03:35 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": "BURGLARY\/BREAKING AND ENTERING", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.117264, -87.982373 ], "Address": "5474 N 56TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 4, "g_clusterK6": 4, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 4, "m_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 2, "m_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.982372893531277, 43.117263723007682 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 202, "Incident Number": 51860311, "Date": "07\/05\/2005", "Time": "10:32 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.179596, -88.028695 ], "Address": "9010 N 95TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -88.028694875786329, 43.179596214265104 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 203, "Incident Number": 51850046, "Date": "07\/04\/2005", "Time": "03:02 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.142937, -88.017887 ], "Address": "6881 N BURBANK AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -88.017886767181892, 43.142936501240762 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 204, "Incident Number": 51830059, "Date": "07\/02\/2005", "Time": "07:03 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": "KIDNAPING", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.120566, -87.987349 ], "Address": "5651 N 61ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.987348617000308, 43.120566419095155 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 205, "Incident Number": 51830076, "Date": "07\/02\/2005", "Time": "10:08 AM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.118758, -87.986015 ], "Address": "5570 N 60TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 2, "e_clusterK7": 1, "g_clusterK7": 1, "m_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5, "m_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.98601454650661, 43.118758087541444 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 206, "Incident Number": 51820161, "Date": "07\/01\/2005", "Time": "03:02 PM", "Police District": 4, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.184485, -88.003621 ], "Address": "7500 W NORTHRIDGE LAKES BL", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "m_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "m_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "m_clusterK6": 5, "e_clusterK7": 2, "g_clusterK7": 2, "m_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "m_clusterK8": 0, "e_clusterK9": 8, "g_clusterK9": 8, "m_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1, "m_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -88.003621110739232, 43.184485464365885 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 207, "Incident Number": 52090033, "Date": "07\/28\/2005", "Time": "02:56 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.074834, -87.987390 ], "Address": "3071 N 60TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.987389538707632, 43.074833863023642 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 208, "Incident Number": 52080261, "Date": "07\/27\/2005", "Time": "05:42 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.079332, -87.995425 ], "Address": "6676 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 1, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 6, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 4, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.995425201916788, 43.079331997835631 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 209, "Incident Number": 52000107, "Date": "07\/19\/2005", "Time": "11:44 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.068057, -87.976568 ], "Address": "5010 W CENTER ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.976568356242183, 43.068057218789086 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 210, "Incident Number": 51970023, "Date": "07\/16\/2005", "Time": "12:44 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060634, -87.977853 ], "Address": "5101 W NORTH AV", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.97785316763806, 43.060634488458817 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 211, "Incident Number": 51960148, "Date": "07\/15\/2005", "Time": "01:30 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060652, -87.982124 ], "Address": "5501 W NORTH AV", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.982123919095159, 43.060651513994031 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 212, "Incident Number": 51930169, "Date": "07\/12\/2005", "Time": "02:39 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.089345, -88.003786 ], "Address": "7343 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.003785617432996, 43.08934549319067 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 213, "Incident Number": 51940011, "Date": "07\/12\/2005", "Time": "10:45 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.072067, -87.988543 ], "Address": "6055 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 2, "g_clusterK10": 0, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.988542719285434, 43.072066792659797 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 214, "Incident Number": 51920031, "Date": "07\/11\/2005", "Time": "03:39 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.074945, -88.000438 ], "Address": "7110 W LISBON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 1, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 6, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 4, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.00043842754927, 43.074944747446374 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 215, "Incident Number": 51860027, "Date": "07\/04\/2005", "Time": "11:30 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.084443, -87.999479 ], "Address": "7008 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.999479224754836, 43.084443080843286 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 216, "Incident Number": 51830041, "Date": "07\/03\/2005", "Time": "01:21 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.035255, -87.962819 ], "Address": "417 N 39TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.962818617577227, 43.035254748542911 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 217, "Incident Number": 51840028, "Date": "07\/03\/2005", "Time": "01:08 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.075330, -87.979113 ], "Address": "5226 W BURLEIGH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.979112664723871, 43.075329525967916 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 218, "Incident Number": 51830094, "Date": "07\/02\/2005", "Time": "09:29 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.088234, -88.002597 ], "Address": "7284 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "m_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "m_clusterK5": 1, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "m_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "m_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 4, "m_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2, "m_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.00259736522608, 43.088234164319857 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 219, "Incident Number": 51820203, "Date": "07\/01\/2005", "Time": "05:15 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067079, -87.987424 ], "Address": "2638 N 60TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 2, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.987424444601729, 43.067078968636395 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 220, "Incident Number": 52110081, "Date": "07\/30\/2005", "Time": "10:06 AM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.983253, -87.948156 ], "Address": "3378 S 27TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.948155973455172, 42.983253387731565 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 221, "Incident Number": 52020213, "Date": "07\/21\/2005", "Time": "10:28 PM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.976754, -87.997855 ], "Address": "3708 S 68TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.997855466241802, 42.976753826533553 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 222, "Incident Number": 52000249, "Date": "07\/19\/2005", "Time": "09:22 PM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.987218, -87.955652 ], "Address": "3245 W DRURY LA", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.955651638236361, 42.987217936147616 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 223, "Incident Number": 51910004, "Date": "07\/09\/2005", "Time": "11:11 PM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.002983, -87.955594 ], "Address": "3309 W LINCOLN AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.955594152709196, 43.002982672126848 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 224, "Incident Number": 52120087, "Date": "07\/31\/2005", "Time": "09:44 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.020816, -87.932994 ], "Address": "1030 S CESAR E CHAVEZ DR", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.932993651723621, 43.020815681280595 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 225, "Incident Number": 52110003, "Date": "07\/30\/2005", "Time": "12:11 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.013788, -87.916785 ], "Address": "1601 S 5TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.916785413565336, 43.013788345919565 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 226, "Incident Number": 52110107, "Date": "07\/30\/2005", "Time": "10:30 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.010085, -87.926040 ], "Address": "1131 W BURNHAM ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.926039719638993, 43.010084854615236 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 227, "Incident Number": 52110193, "Date": "07\/30\/2005", "Time": "09:29 PM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.019820, -87.922465 ], "Address": "1106 S 9TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.92246489021305, 43.01982 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 228, "Incident Number": 52100045, "Date": "07\/29\/2005", "Time": "06:41 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.018134, -87.929354 ], "Address": "1400 W MADISON ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.929354181895988, 43.018133622207152 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 229, "Incident Number": 52100197, "Date": "07\/29\/2005", "Time": "07:00 PM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.018689, -87.919697 ], "Address": "1234 S 7TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.919696991641487, 43.018688979602636 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 230, "Incident Number": 52090026, "Date": "07\/28\/2005", "Time": "02:07 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": "KIDNAPING", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.017095, -87.924542 ], "Address": "1040 W GREENFIELD AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.924542405867655, 43.017095383686538 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 231, "Incident Number": 52080178, "Date": "07\/27\/2005", "Time": "12:43 PM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.013642, -87.911174 ], "Address": "1635 S 1ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.911173956460033, 43.013641778233072 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 232, "Incident Number": 52060158, "Date": "07\/25\/2005", "Time": "12:16 PM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.024290, -87.922934 ], "Address": "930 W PIERCE ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.92293362450674, 43.02429016320162 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 233, "Incident Number": 52050164, "Date": "07\/24\/2005", "Time": "03:10 PM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.006386, -87.921486 ], "Address": "801 W BECHER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.921486, 43.006385859304132 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 234, "Incident Number": 52040136, "Date": "07\/23\/2005", "Time": "02:34 PM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.009235, -87.929562 ], "Address": "1940 S 14TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.92956249177702, 43.009234658895508 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 235, "Incident Number": 52010207, "Date": "07\/20\/2005", "Time": "07:19 PM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.020094, -87.932673 ], "Address": "1575 W WASHINGTON ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.932673167638058, 43.020094487881885 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 236, "Incident Number": 51960151, "Date": "07\/15\/2005", "Time": "01:50 PM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.010271, -87.930887 ], "Address": "1844 S 15TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.930886509521969, 43.010270747994653 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 237, "Incident Number": 51950045, "Date": "07\/14\/2005", "Time": "08:05 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.011008, -87.916941 ], "Address": "501 W MAPLE ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.916940748542899, 43.011008488458799 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 238, "Incident Number": 51940192, "Date": "07\/13\/2005", "Time": "05:16 PM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.019829, -87.936734 ], "Address": "1110 S 19TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.936734411853124, 43.019828664723889 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 239, "Incident Number": 51940232, "Date": "07\/13\/2005", "Time": "09:37 PM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.001874, -87.924757 ], "Address": "2360 S 10TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.924757078797796, 43.00187428230015 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 240, "Incident Number": 51930055, "Date": "07\/12\/2005", "Time": "07:00 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.009074, -87.916781 ], "Address": "1947 S 5TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.916780548184917, 43.009074450458769 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 241, "Incident Number": 51890023, "Date": "07\/08\/2005", "Time": "02:20 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.017054, -87.928060 ], "Address": "1300 W GREENFIELD AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.928060332361937, 43.017053529863055 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 242, "Incident Number": 51890027, "Date": "07\/08\/2005", "Time": "02:43 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.017664, -87.930553 ], "Address": "1336 S 15TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.930552543066668, 43.017663773668176 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 243, "Incident Number": 51920060, "Date": "07\/04\/2005", "Time": "11:13 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.012217, -87.924192 ], "Address": "1001 W HISTORIC MITCHELL ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.92419164579114, 43.012217355549176 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 244, "Incident Number": 51840084, "Date": "07\/03\/2005", "Time": "07:28 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": "ARSON", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.002889, -87.933231 ], "Address": "1575 W LINCOLN AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.933231251457087, 43.002888539529259 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 245, "Incident Number": 51840096, "Date": "07\/03\/2005", "Time": "09:28 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.022075, -87.929302 ], "Address": "907 S 14TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.929302343431132, 43.022074917221566 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 246, "Incident Number": 51840012, "Date": "07\/02\/2005", "Time": "11:20 PM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.004934, -87.929802 ], "Address": "2171 S 14TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.929801515436324, 43.004934450458762 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 247, "Incident Number": 51910043, "Date": "07\/10\/2005", "Time": "02:45 AM", "Police District": 6, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.937841, -87.957879 ], "Address": "5885 S MELINDA ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.957878880546858, 42.937840791563275 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 248, "Incident Number": 52100032, "Date": "07\/29\/2005", "Time": "02:08 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.993539, -87.894203 ], "Address": "2802 S CLEMENT AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.894203440706576, 42.993539413266774 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 249, "Incident Number": 51970054, "Date": "07\/16\/2005", "Time": "06:41 AM", "Police District": 2, "Offense 1": null, "Offense 2": "ROBBERY", "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.005511, -87.917818 ], "Address": "2141 S 5TH PL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.917817518754561, 43.005511173466459 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 250, "Incident Number": 51880054, "Date": "07\/07\/2005", "Time": "04:49 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.990042, -87.928139 ], "Address": "1251 W MANITOBA ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 6, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.92813935469411, 42.990041880011383 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 251, "Incident Number": 51850111, "Date": "07\/04\/2005", "Time": "06:41 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 42.995121, -87.905134 ], "Address": "367 E ROSEDALE AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "m_clusterK4": 1, "e_clusterK5": 3, "g_clusterK5": 3, "m_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 1, "m_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "m_clusterK7": 3, "e_clusterK8": 7, "g_clusterK8": 7, "m_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "m_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8, "m_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.905133817122007, 42.995120801359626 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 252, "Incident Number": 52100101, "Date": "07\/29\/2005", "Time": "09:49 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.049585, -87.928681 ], "Address": "1463 N 13TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.928680780777213, 43.049585195956986 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 253, "Incident Number": 52070152, "Date": "07\/26\/2005", "Time": "01:40 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.057954, -87.930377 ], "Address": "1418 W LLOYD ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.930377385668464, 43.057954158737836 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 254, "Incident Number": 52070269, "Date": "07\/26\/2005", "Time": "04:29 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.059403, -87.974644 ], "Address": "2202 N 49TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.974644444601722, 43.059403257285481 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 255, "Incident Number": 52050051, "Date": "07\/24\/2005", "Time": "06:00 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060663, -87.970541 ], "Address": "4500 W NORTH AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.970541018321853, 43.060663486005978 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 256, "Incident Number": 52050166, "Date": "07\/24\/2005", "Time": "01:59 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.059761, -87.964585 ], "Address": "2220 N 41ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.964584911853123, 43.059761497085816 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 257, "Incident Number": 52060127, "Date": "07\/24\/2005", "Time": "10:56 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.057096, -87.969672 ], "Address": "4430 W LLOYD ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.969672419095161, 43.05709552596791 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 258, "Incident Number": 52000029, "Date": "07\/19\/2005", "Time": "01:06 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.056774, -87.958788 ], "Address": "2013 N 36TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 2, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.958788132003946, 43.056774 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 259, "Incident Number": 52000242, "Date": "07\/19\/2005", "Time": "09:07 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.057495, -87.967272 ], "Address": "4251 W LISBON AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.967272423313744, 43.057494989029465 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 260, "Incident Number": 51980030, "Date": "07\/17\/2005", "Time": "02:05 AM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.069498, -87.925180 ], "Address": "1034 W HADLEY ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.925180332361933, 43.069497525967918 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 261, "Incident Number": 51980031, "Date": "07\/17\/2005", "Time": "02:48 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.058790, -87.959969 ], "Address": "2159 N 37TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 2, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.959969080933504, 43.058790419095175 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 262, "Incident Number": 51950143, "Date": "07\/14\/2005", "Time": "01:01 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.058997, -87.955169 ], "Address": "2157 N 33RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 2, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.955168577038364, 43.0589972514571 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 263, "Incident Number": 51950245, "Date": "07\/14\/2005", "Time": "07:11 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.069105, -87.931288 ], "Address": "2765 N 15TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.931287573720141, 43.069104838190327 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 264, "Incident Number": 51940102, "Date": "07\/13\/2005", "Time": "10:33 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060584, -87.967102 ], "Address": "4243 W NORTH AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.9671025, 43.060584491777036 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 265, "Incident Number": 51930086, "Date": "07\/12\/2005", "Time": "09:31 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.064748, -87.940029 ], "Address": "2525 N 22ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.940029040971552, 43.064748031363621 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 266, "Incident Number": 51910220, "Date": "07\/10\/2005", "Time": "09:21 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.062223, -87.967407 ], "Address": "2390 N SHERMAN BL", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.967407439337819, 43.062223481016616 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 267, "Incident Number": 51900085, "Date": "07\/09\/2005", "Time": "11:07 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.066028, -87.941173 ], "Address": "2600 N 23RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.941172892356349, 43.066027558454905 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 268, "Incident Number": 51890131, "Date": "07\/08\/2005", "Time": "09:41 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.066765, -87.970008 ], "Address": "2629 N 45TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "m_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.970007606468727, 43.066764586733228 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 269, "Incident Number": 51890187, "Date": "07\/08\/2005", "Time": "08:21 PM", "Police District": 5, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.050065, -87.927774 ], "Address": "1520 W GALENA ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.927773652020818, 43.050065471252985 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 270, "Incident Number": 51900002, "Date": "07\/08\/2005", "Time": "11:22 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.056372, -87.960608 ], "Address": "3755 W BROWN ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 2, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.960608091414869, 43.056371795865772 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 271, "Incident Number": 51870235, "Date": "07\/06\/2005", "Time": "09:15 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067855, -87.963432 ], "Address": "4001 W CENTER ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.963431617429734, 43.067855188455979 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 272, "Incident Number": 51860257, "Date": "07\/05\/2005", "Time": "03:15 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.066110, -87.947342 ], "Address": "2602 N 27TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.947341683920015, 43.066109690790455 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 273, "Incident Number": 51850050, "Date": "07\/04\/2005", "Time": "05:12 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060777, -87.948760 ], "Address": "2802 W NORTH AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.948759506528702, 43.060776972567368 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 274, "Incident Number": 51840175, "Date": "07\/03\/2005", "Time": "06:58 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.053706, -87.948817 ], "Address": "1803 N 28TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.948816708283971, 43.053706071645962 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 275, "Incident Number": 51830014, "Date": "07\/02\/2005", "Time": "12:58 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.069969, -87.964508 ], "Address": "2809-A N 41ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.964507632003944, 43.069969005828398 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 276, "Incident Number": 51830018, "Date": "07\/02\/2005", "Time": "12:47 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.060857, -87.933910 ], "Address": "2321 N 17TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "m_clusterK7": 4, "e_clusterK8": 5, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.933910298304113, 43.060857276234493 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 277, "Incident Number": 51830034, "Date": "07\/02\/2005", "Time": "05:41 AM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.044318, -87.918831 ], "Address": "3532 W HIGHLAND AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "m_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "m_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "m_clusterK6": 3, "e_clusterK7": 0, "g_clusterK7": 0, "m_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "m_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "m_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3, "m_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.918831095643213, 43.044318 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 278, "Incident Number": 51830183, "Date": "07\/02\/2005", "Time": "07:29 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.059179, -87.944112 ], "Address": "2454 W GARFIELD AV", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 2, "m_clusterK4": 2, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 1, "m_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 1, "m_clusterK9": 1, "e_clusterK10": 3, "g_clusterK10": 9, "m_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.944111580904845, 43.059179460470752 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 279, "Incident Number": 51820219, "Date": "07\/01\/2005", "Time": "06:55 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": null, "Offense 3": null, "Offense 4": null, "Offense 5": null, "Location": [ 43.067638, -87.958642 ], "Address": "2673-A N 36TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "m_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "m_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "m_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "m_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "m_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "m_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "m_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "m_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0, "m_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.958641602573593, 43.067637586733213 ] } }
]
}
,]; |
'use strict';
describe('prismo.users.resources module', function() {
var usersResource;
var httpBackend;
beforeEach(module('prismo.users'));
beforeEach(inject(function(_usersResource_, _$httpBackend_) {
usersResource = _usersResource_;
httpBackend = _$httpBackend_;
}));
describe('usersResource', function() {
// a GET request to endpoint users w/o an ID should not be allowed
// a GET request to a user w/ id should get user details
// but only if the user is authenticated for that user
// a POST request should create a new user
it('should be able to log a user in', function() {
httpBackend
.expectPOST('api/v0/authenticate')
.respond(function() {
var statusCode = 201;
var responseBody = JSON.stringify({
username: 'username',
success: true
});
var headers = {};
var responseText = '';
return [statusCode, responseBody, headers, responseText];
});
var loginResult = usersResource.login(
{username: 'someuser', password: 'somepassword'});
httpBackend.flush();
expect(loginResult['username']).toEqual('username');
expect(loginResult['success']).toEqual(true);
});
});
});
|
module.exports = function(path, keys, sensitive, strict) {
if (toString.call(path) == '[object RegExp]') return path;
if (Array.isArray(path)) path = '(' + path.join('|') + ')';
path = path
.concat(strict ? '' : '/?')
.replace(/\/\(/g, '(?:/')
.replace(/(\/)?(\.)?:(\w+)(?:(\(.*?\)))?(\?)?(\*)?/g, function(_, slash, format, key, capture, optional, star){
keys.push({ name: key, optional: !! optional });
slash = slash || '';
return ''
+ (optional ? '' : slash)
+ '(?:'
+ (optional ? slash : '')
+ (format || '') + (capture || (format && '([^/.]+?)' || '([^/]+?)')) + ')'
+ (optional || '')
+ (star ? '(/*)?' : '');
})
.replace(/([\/.])/g, '\\$1')
.replace(/\*/g, '(.*)');
return new RegExp('^' + path + '$', sensitive ? '' : 'i');
} |
/*!
* jQuery JavaScript Library v1.7.1
* http://jquery.com/
*
* Copyright 2011, John Resig
* Released under the the MIT License.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2011, The Dojo Foundation
* Released under the MIT and BSD Licenses.
*
* Date: Mon Nov 21 21:11:03 2011 -0500
*/
(function( window, undefined ) {
// Use the correct document accordingly with window argument (sandbox)
var document = window.document,
navigator = window.navigator,
location = window.location;
var jQuery = (function() {
// Define a local copy of jQuery
var jQuery = function( selector, context ) {
// The jQuery object is actually just the init constructor 'enhanced'
return new jQuery.fn.init( selector, context, rootjQuery );
},
// Map over jQuery in case of overwrite
_jQuery = window.jQuery,
// Map over the $ in case of overwrite
_$ = window.$,
// A central reference to the root jQuery(document)
rootjQuery,
// A simple way to check for HTML strings or ID strings
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
// Check if a string has a non-whitespace character in it
rnotwhite = /\S/,
// Used for trimming whitespace
trimLeft = /^\s+/,
trimRight = /\s+$/,
// Match a standalone tag
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
// JSON RegExp
rvalidchars = /^[\],:{}\s]*$/,
rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
// Useragent RegExp
rwebkit = /(webkit)[ \/]([\w.]+)/,
ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
rmsie = /(msie) ([\w.]+)/,
rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
// Matches dashed string for camelizing
rdashAlpha = /-([a-z]|[0-9])/ig,
rmsPrefix = /^-ms-/,
// Used by jQuery.camelCase as callback to replace()
fcamelCase = function( all, letter ) {
return ( letter + "" ).toUpperCase();
},
// Keep a UserAgent string for use with jQuery.browser
userAgent = navigator.userAgent,
// For matching the engine and version of the browser
browserMatch,
// The deferred used on DOM ready
readyList,
// The ready event handler
DOMContentLoaded,
// Save a reference to some core methods
toString = Object.prototype.toString,
hasOwn = Object.prototype.hasOwnProperty,
push = Array.prototype.push,
slice = Array.prototype.slice,
trim = String.prototype.trim,
indexOf = Array.prototype.indexOf,
// [[Class]] -> type pairs
class2type = {};
jQuery.fn = jQuery.prototype = {
constructor: jQuery,
init: function( selector, context, rootjQuery ) {
var match, elem, ret, doc;
// Handle $(""), $(null), or $(undefined)
if ( !selector ) {
return this;
}
// Handle $(DOMElement)
if ( selector.nodeType ) {
this.context = this[0] = selector;
this.length = 1;
return this;
}
// The body element only exists once, optimize finding it
if ( selector === "body" && !context && document.body ) {
this.context = document;
this[0] = document.body;
this.selector = selector;
this.length = 1;
return this;
}
// Handle HTML strings
if ( typeof selector === "string" ) {
// Are we dealing with HTML string or an ID?
if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
// Assume that strings that start and end with <> are HTML and skip the regex check
match = [ null, selector, null ];
} else {
match = quickExpr.exec( selector );
}
// Verify a match, and that no context was specified for #id
if ( match && (match[1] || !context) ) {
// HANDLE: $(html) -> $(array)
if ( match[1] ) {
context = context instanceof jQuery ? context[0] : context;
doc = ( context ? context.ownerDocument || context : document );
// If a single string is passed in and it's a single tag
// just do a createElement and skip the rest
ret = rsingleTag.exec( selector );
if ( ret ) {
if ( jQuery.isPlainObject( context ) ) {
selector = [ document.createElement( ret[1] ) ];
jQuery.fn.attr.call( selector, context, true );
} else {
selector = [ doc.createElement( ret[1] ) ];
}
} else {
ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
}
return jQuery.merge( this, selector );
// HANDLE: $("#id")
} else {
elem = document.getElementById( match[2] );
// Check parentNode to catch when Blackberry 4.6 returns
// nodes that are no longer in the document #6963
if ( elem && elem.parentNode ) {
// Handle the case where IE and Opera return items
// by name instead of ID
if ( elem.id !== match[2] ) {
return rootjQuery.find( selector );
}
// Otherwise, we inject the element directly into the jQuery object
this.length = 1;
this[0] = elem;
}
this.context = document;
this.selector = selector;
return this;
}
// HANDLE: $(expr, $(...))
} else if ( !context || context.jquery ) {
return ( context || rootjQuery ).find( selector );
// HANDLE: $(expr, context)
// (which is just equivalent to: $(context).find(expr)
} else {
return this.constructor( context ).find( selector );
}
// HANDLE: $(function)
// Shortcut for document ready
} else if ( jQuery.isFunction( selector ) ) {
return rootjQuery.ready( selector );
}
if ( selector.selector !== undefined ) {
this.selector = selector.selector;
this.context = selector.context;
}
return jQuery.makeArray( selector, this );
},
// Start with an empty selector
selector: "",
// The current version of jQuery being used
jquery: "1.7.1",
// The default length of a jQuery object is 0
length: 0,
// The number of elements contained in the matched element set
size: function() {
return this.length;
},
toArray: function() {
return slice.call( this, 0 );
},
// Get the Nth element in the matched element set OR
// Get the whole matched element set as a clean array
get: function( num ) {
return num == null ?
// Return a 'clean' array
this.toArray() :
// Return just the object
( num < 0 ? this[ this.length + num ] : this[ num ] );
},
// Take an array of elements and push it onto the stack
// (returning the new matched element set)
pushStack: function( elems, name, selector ) {
// Build a new jQuery matched element set
var ret = this.constructor();
if ( jQuery.isArray( elems ) ) {
push.apply( ret, elems );
} else {
jQuery.merge( ret, elems );
}
// Add the old object onto the stack (as a reference)
ret.prevObject = this;
ret.context = this.context;
if ( name === "find" ) {
ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
} else if ( name ) {
ret.selector = this.selector + "." + name + "(" + selector + ")";
}
// Return the newly-formed element set
return ret;
},
// Execute a callback for every element in the matched set.
// (You can seed the arguments with an array of args, but this is
// only used internally.)
each: function( callback, args ) {
return jQuery.each( this, callback, args );
},
ready: function( fn ) {
// Attach the listeners
jQuery.bindReady();
// Add the callback
readyList.add( fn );
return this;
},
eq: function( i ) {
i = +i;
return i === -1 ?
this.slice( i ) :
this.slice( i, i + 1 );
},
first: function() {
return this.eq( 0 );
},
last: function() {
return this.eq( -1 );
},
slice: function() {
return this.pushStack( slice.apply( this, arguments ),
"slice", slice.call(arguments).join(",") );
},
map: function( callback ) {
return this.pushStack( jQuery.map(this, function( elem, i ) {
return callback.call( elem, i, elem );
}));
},
end: function() {
return this.prevObject || this.constructor(null);
},
// For internal use only.
// Behaves like an Array's method, not like a jQuery method.
push: push,
sort: [].sort,
splice: [].splice
};
// Give the init function the jQuery prototype for later instantiation
jQuery.fn.init.prototype = jQuery.fn;
jQuery.extend = jQuery.fn.extend = function() {
var options, name, src, copy, copyIsArray, clone,
target = arguments[0] || {},
i = 1,
length = arguments.length,
deep = false;
// Handle a deep copy situation
if ( typeof target === "boolean" ) {
deep = target;
target = arguments[1] || {};
// skip the boolean and the target
i = 2;
}
// Handle case when target is a string or something (possible in deep copy)
if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
target = {};
}
// extend jQuery itself if only one argument is passed
if ( length === i ) {
target = this;
--i;
}
for ( ; i < length; i++ ) {
// Only deal with non-null/undefined values
if ( (options = arguments[ i ]) != null ) {
// Extend the base object
for ( name in options ) {
src = target[ name ];
copy = options[ name ];
// Prevent never-ending loop
if ( target === copy ) {
continue;
}
// Recurse if we're merging plain objects or arrays
if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
if ( copyIsArray ) {
copyIsArray = false;
clone = src && jQuery.isArray(src) ? src : [];
} else {
clone = src && jQuery.isPlainObject(src) ? src : {};
}
// Never move original objects, clone them
target[ name ] = jQuery.extend( deep, clone, copy );
// Don't bring in undefined values
} else if ( copy !== undefined ) {
target[ name ] = copy;
}
}
}
}
// Return the modified object
return target;
};
jQuery.extend({
noConflict: function( deep ) {
if ( window.$ === jQuery ) {
window.$ = _$;
}
if ( deep && window.jQuery === jQuery ) {
window.jQuery = _jQuery;
}
return jQuery;
},
// Is the DOM ready to be used? Set to true once it occurs.
isReady: false,
// A counter to track how many items to wait for before
// the ready event fires. See #6781
readyWait: 1,
// Hold (or release) the ready event
holdReady: function( hold ) {
if ( hold ) {
jQuery.readyWait++;
} else {
jQuery.ready( true );
}
},
// Handle when the DOM is ready
ready: function( wait ) {
// Either a released hold or an DOMready/load event and not yet ready
if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
if ( !document.body ) {
return setTimeout( jQuery.ready, 1 );
}
// Remember that the DOM is ready
jQuery.isReady = true;
// If a normal DOM Ready event fired, decrement, and wait if need be
if ( wait !== true && --jQuery.readyWait > 0 ) {
return;
}
// If there are functions bound, to execute
readyList.fireWith( document, [ jQuery ] );
// Trigger any bound ready events
if ( jQuery.fn.trigger ) {
jQuery( document ).trigger( "ready" ).off( "ready" );
}
}
},
bindReady: function() {
if ( readyList ) {
return;
}
readyList = jQuery.Callbacks( "once memory" );
// Catch cases where $(document).ready() is called after the
// browser event has already occurred.
if ( document.readyState === "complete" ) {
// Handle it asynchronously to allow scripts the opportunity to delay ready
return setTimeout( jQuery.ready, 1 );
}
// Mozilla, Opera and webkit nightlies currently support this event
if ( document.addEventListener ) {
// Use the handy event callback
document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
// A fallback to window.onload, that will always work
window.addEventListener( "load", jQuery.ready, false );
// If IE event model is used
} else if ( document.attachEvent ) {
// ensure firing before onload,
// maybe late but safe also for iframes
document.attachEvent( "onreadystatechange", DOMContentLoaded );
// A fallback to window.onload, that will always work
window.attachEvent( "onload", jQuery.ready );
// If IE and not a frame
// continually check to see if the document is ready
var toplevel = false;
try {
toplevel = window.frameElement == null;
} catch(e) {}
if ( document.documentElement.doScroll && toplevel ) {
doScrollCheck();
}
}
},
// See test/unit/core.js for details concerning isFunction.
// Since version 1.3, DOM methods and functions like alert
// aren't supported. They return false on IE (#2968).
isFunction: function( obj ) {
return jQuery.type(obj) === "function";
},
isArray: Array.isArray || function( obj ) {
return jQuery.type(obj) === "array";
},
// A crude way of determining if an object is a window
isWindow: function( obj ) {
return obj && typeof obj === "object" && "setInterval" in obj;
},
isNumeric: function( obj ) {
return !isNaN( parseFloat(obj) ) && isFinite( obj );
},
type: function( obj ) {
return obj == null ?
String( obj ) :
class2type[ toString.call(obj) ] || "object";
},
isPlainObject: function( obj ) {
// Must be an Object.
// Because of IE, we also have to check the presence of the constructor property.
// Make sure that DOM nodes and window objects don't pass through, as well
if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
return false;
}
try {
// Not own constructor property must be Object
if ( obj.constructor &&
!hasOwn.call(obj, "constructor") &&
!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
return false;
}
} catch ( e ) {
// IE8,9 Will throw exceptions on certain host objects #9897
return false;
}
// Own properties are enumerated firstly, so to speed up,
// if last one is own, then all properties are own.
var key;
for ( key in obj ) {}
return key === undefined || hasOwn.call( obj, key );
},
isEmptyObject: function( obj ) {
for ( var name in obj ) {
return false;
}
return true;
},
error: function( msg ) {
throw new Error( msg );
},
parseJSON: function( data ) {
if ( typeof data !== "string" || !data ) {
return null;
}
// Make sure leading/trailing whitespace is removed (IE can't handle it)
data = jQuery.trim( data );
// Attempt to parse using the native JSON parser first
if ( window.JSON && window.JSON.parse ) {
return window.JSON.parse( data );
}
// Make sure the incoming data is actual JSON
// Logic borrowed from http://json.org/json2.js
if ( rvalidchars.test( data.replace( rvalidescape, "@" )
.replace( rvalidtokens, "]" )
.replace( rvalidbraces, "")) ) {
return ( new Function( "return " + data ) )();
}
jQuery.error( "Invalid JSON: " + data );
},
// Cross-browser xml parsing
parseXML: function( data ) {
var xml, tmp;
try {
if ( window.DOMParser ) { // Standard
tmp = new DOMParser();
xml = tmp.parseFromString( data , "text/xml" );
} else { // IE
xml = new ActiveXObject( "Microsoft.XMLDOM" );
xml.async = "false";
xml.loadXML( data );
}
} catch( e ) {
xml = undefined;
}
if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
jQuery.error( "Invalid XML: " + data );
}
return xml;
},
noop: function() {},
// Evaluates a script in a global context
// Workarounds based on findings by Jim Driscoll
// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
globalEval: function( data ) {
if ( data && rnotwhite.test( data ) ) {
// We use execScript on Internet Explorer
// We use an anonymous function so that context is window
// rather than jQuery in Firefox
( window.execScript || function( data ) {
window[ "eval" ].call( window, data );
} )( data );
}
},
// Convert dashed to camelCase; used by the css and data modules
// Microsoft forgot to hump their vendor prefix (#9572)
camelCase: function( string ) {
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
},
nodeName: function( elem, name ) {
return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
},
// args is for internal usage only
each: function( object, callback, args ) {
var name, i = 0,
length = object.length,
isObj = length === undefined || jQuery.isFunction( object );
if ( args ) {
if ( isObj ) {
for ( name in object ) {
if ( callback.apply( object[ name ], args ) === false ) {
break;
}
}
} else {
for ( ; i < length; ) {
if ( callback.apply( object[ i++ ], args ) === false ) {
break;
}
}
}
// A special, fast, case for the most common use of each
} else {
if ( isObj ) {
for ( name in object ) {
if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
break;
}
}
} else {
for ( ; i < length; ) {
if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
break;
}
}
}
}
return object;
},
// Use native String.trim function wherever possible
trim: trim ?
function( text ) {
return text == null ?
"" :
trim.call( text );
} :
// Otherwise use our own trimming functionality
function( text ) {
return text == null ?
"" :
text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
},
// results is for internal usage only
makeArray: function( array, results ) {
var ret = results || [];
if ( array != null ) {
// The window, strings (and functions) also have 'length'
// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
var type = jQuery.type( array );
if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
push.call( ret, array );
} else {
jQuery.merge( ret, array );
}
}
return ret;
},
inArray: function( elem, array, i ) {
var len;
if ( array ) {
if ( indexOf ) {
return indexOf.call( array, elem, i );
}
len = array.length;
i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
for ( ; i < len; i++ ) {
// Skip accessing in sparse arrays
if ( i in array && array[ i ] === elem ) {
return i;
}
}
}
return -1;
},
merge: function( first, second ) {
var i = first.length,
j = 0;
if ( typeof second.length === "number" ) {
for ( var l = second.length; j < l; j++ ) {
first[ i++ ] = second[ j ];
}
} else {
while ( second[j] !== undefined ) {
first[ i++ ] = second[ j++ ];
}
}
first.length = i;
return first;
},
grep: function( elems, callback, inv ) {
var ret = [], retVal;
inv = !!inv;
// Go through the array, only saving the items
// that pass the validator function
for ( var i = 0, length = elems.length; i < length; i++ ) {
retVal = !!callback( elems[ i ], i );
if ( inv !== retVal ) {
ret.push( elems[ i ] );
}
}
return ret;
},
// arg is for internal usage only
map: function( elems, callback, arg ) {
var value, key, ret = [],
i = 0,
length = elems.length,
// jquery objects are treated as arrays
isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
// Go through the array, translating each of the items to their
if ( isArray ) {
for ( ; i < length; i++ ) {
value = callback( elems[ i ], i, arg );
if ( value != null ) {
ret[ ret.length ] = value;
}
}
// Go through every key on the object,
} else {
for ( key in elems ) {
value = callback( elems[ key ], key, arg );
if ( value != null ) {
ret[ ret.length ] = value;
}
}
}
// Flatten any nested arrays
return ret.concat.apply( [], ret );
},
// A global GUID counter for objects
guid: 1,
// Bind a function to a context, optionally partially applying any
// arguments.
proxy: function( fn, context ) {
if ( typeof context === "string" ) {
var tmp = fn[ context ];
context = fn;
fn = tmp;
}
// Quick check to determine if target is callable, in the spec
// this throws a TypeError, but we will just return undefined.
if ( !jQuery.isFunction( fn ) ) {
return undefined;
}
// Simulated bind
var args = slice.call( arguments, 2 ),
proxy = function() {
return fn.apply( context, args.concat( slice.call( arguments ) ) );
};
// Set the guid of unique handler to the same of original handler, so it can be removed
proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
return proxy;
},
// Mutifunctional method to get and set values to a collection
// The value/s can optionally be executed if it's a function
access: function( elems, key, value, exec, fn, pass ) {
var length = elems.length;
// Setting many attributes
if ( typeof key === "object" ) {
for ( var k in key ) {
jQuery.access( elems, k, key[k], exec, fn, value );
}
return elems;
}
// Setting one attribute
if ( value !== undefined ) {
// Optionally, function values get executed if exec is true
exec = !pass && exec && jQuery.isFunction(value);
for ( var i = 0; i < length; i++ ) {
fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
}
return elems;
}
// Getting an attribute
return length ? fn( elems[0], key ) : undefined;
},
now: function() {
return ( new Date() ).getTime();
},
// Use of jQuery.browser is frowned upon.
// More details: http://docs.jquery.com/Utilities/jQuery.browser
uaMatch: function( ua ) {
ua = ua.toLowerCase();
var match = rwebkit.exec( ua ) ||
ropera.exec( ua ) ||
rmsie.exec( ua ) ||
ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
[];
return { browser: match[1] || "", version: match[2] || "0" };
},
sub: function() {
function jQuerySub( selector, context ) {
return new jQuerySub.fn.init( selector, context );
}
jQuery.extend( true, jQuerySub, this );
jQuerySub.superclass = this;
jQuerySub.fn = jQuerySub.prototype = this();
jQuerySub.fn.constructor = jQuerySub;
jQuerySub.sub = this.sub;
jQuerySub.fn.init = function init( selector, context ) {
if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
context = jQuerySub( context );
}
return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
};
jQuerySub.fn.init.prototype = jQuerySub.fn;
var rootjQuerySub = jQuerySub(document);
return jQuerySub;
},
browser: {}
});
// Populate the class2type map
jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
class2type[ "[object " + name + "]" ] = name.toLowerCase();
});
browserMatch = jQuery.uaMatch( userAgent );
if ( browserMatch.browser ) {
jQuery.browser[ browserMatch.browser ] = true;
jQuery.browser.version = browserMatch.version;
}
// Deprecated, use jQuery.browser.webkit instead
if ( jQuery.browser.webkit ) {
jQuery.browser.safari = true;
}
// IE doesn't match non-breaking spaces with \s
if ( rnotwhite.test( "\xA0" ) ) {
trimLeft = /^[\s\xA0]+/;
trimRight = /[\s\xA0]+$/;
}
// All jQuery objects should point back to these
rootjQuery = jQuery(document);
// Cleanup functions for the document ready method
if ( document.addEventListener ) {
DOMContentLoaded = function() {
document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
jQuery.ready();
};
} else if ( document.attachEvent ) {
DOMContentLoaded = function() {
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
if ( document.readyState === "complete" ) {
document.detachEvent( "onreadystatechange", DOMContentLoaded );
jQuery.ready();
}
};
}
// The DOM ready check for Internet Explorer
function doScrollCheck() {
if ( jQuery.isReady ) {
return;
}
try {
// If IE is used, use the trick by Diego Perini
// http://javascript.nwbox.com/IEContentLoaded/
document.documentElement.doScroll("left");
} catch(e) {
setTimeout( doScrollCheck, 1 );
return;
}
// and execute any waiting functions
jQuery.ready();
}
return jQuery;
})();
// String to Object flags format cache
var flagsCache = {};
// Convert String-formatted flags into Object-formatted ones and store in cache
function createFlags( flags ) {
var object = flagsCache[ flags ] = {},
i, length;
flags = flags.split( /\s+/ );
for ( i = 0, length = flags.length; i < length; i++ ) {
object[ flags[i] ] = true;
}
return object;
}
/*
* Create a callback list using the following parameters:
*
* flags: an optional list of space-separated flags that will change how
* the callback list behaves
*
* By default a callback list will act like an event callback list and can be
* "fired" multiple times.
*
* Possible flags:
*
* once: will ensure the callback list can only be fired once (like a Deferred)
*
* memory: will keep track of previous values and will call any callback added
* after the list has been fired right away with the latest "memorized"
* values (like a Deferred)
*
* unique: will ensure a callback can only be added once (no duplicate in the list)
*
* stopOnFalse: interrupt callings when a callback returns false
*
*/
jQuery.Callbacks = function( flags ) {
// Convert flags from String-formatted to Object-formatted
// (we check in cache first)
flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
var // Actual callback list
list = [],
// Stack of fire calls for repeatable lists
stack = [],
// Last fire value (for non-forgettable lists)
memory,
// Flag to know if list is currently firing
firing,
// First callback to fire (used internally by add and fireWith)
firingStart,
// End of the loop when firing
firingLength,
// Index of currently firing callback (modified by remove if needed)
firingIndex,
// Add one or several callbacks to the list
add = function( args ) {
var i,
length,
elem,
type,
actual;
for ( i = 0, length = args.length; i < length; i++ ) {
elem = args[ i ];
type = jQuery.type( elem );
if ( type === "array" ) {
// Inspect recursively
add( elem );
} else if ( type === "function" ) {
// Add if not in unique mode and callback is not in
if ( !flags.unique || !self.has( elem ) ) {
list.push( elem );
}
}
}
},
// Fire callbacks
fire = function( context, args ) {
args = args || [];
memory = !flags.memory || [ context, args ];
firing = true;
firingIndex = firingStart || 0;
firingStart = 0;
firingLength = list.length;
for ( ; list && firingIndex < firingLength; firingIndex++ ) {
if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
memory = true; // Mark as halted
break;
}
}
firing = false;
if ( list ) {
if ( !flags.once ) {
if ( stack && stack.length ) {
memory = stack.shift();
self.fireWith( memory[ 0 ], memory[ 1 ] );
}
} else if ( memory === true ) {
self.disable();
} else {
list = [];
}
}
},
// Actual Callbacks object
self = {
// Add a callback or a collection of callbacks to the list
add: function() {
if ( list ) {
var length = list.length;
add( arguments );
// Do we need to add the callbacks to the
// current firing batch?
if ( firing ) {
firingLength = list.length;
// With memory, if we're not firing then
// we should call right away, unless previous
// firing was halted (stopOnFalse)
} else if ( memory && memory !== true ) {
firingStart = length;
fire( memory[ 0 ], memory[ 1 ] );
}
}
return this;
},
// Remove a callback from the list
remove: function() {
if ( list ) {
var args = arguments,
argIndex = 0,
argLength = args.length;
for ( ; argIndex < argLength ; argIndex++ ) {
for ( var i = 0; i < list.length; i++ ) {
if ( args[ argIndex ] === list[ i ] ) {
// Handle firingIndex and firingLength
if ( firing ) {
if ( i <= firingLength ) {
firingLength--;
if ( i <= firingIndex ) {
firingIndex--;
}
}
}
// Remove the element
list.splice( i--, 1 );
// If we have some unicity property then
// we only need to do this once
if ( flags.unique ) {
break;
}
}
}
}
}
return this;
},
// Control if a given callback is in the list
has: function( fn ) {
if ( list ) {
var i = 0,
length = list.length;
for ( ; i < length; i++ ) {
if ( fn === list[ i ] ) {
return true;
}
}
}
return false;
},
// Remove all callbacks from the list
empty: function() {
list = [];
return this;
},
// Have the list do nothing anymore
disable: function() {
list = stack = memory = undefined;
return this;
},
// Is it disabled?
disabled: function() {
return !list;
},
// Lock the list in its current state
lock: function() {
stack = undefined;
if ( !memory || memory === true ) {
self.disable();
}
return this;
},
// Is it locked?
locked: function() {
return !stack;
},
// Call all callbacks with the given context and arguments
fireWith: function( context, args ) {
if ( stack ) {
if ( firing ) {
if ( !flags.once ) {
stack.push( [ context, args ] );
}
} else if ( !( flags.once && memory ) ) {
fire( context, args );
}
}
return this;
},
// Call all the callbacks with the given arguments
fire: function() {
self.fireWith( this, arguments );
return this;
},
// To know if the callbacks have already been called at least once
fired: function() {
return !!memory;
}
};
return self;
};
var // Static reference to slice
sliceDeferred = [].slice;
jQuery.extend({
Deferred: function( func ) {
var doneList = jQuery.Callbacks( "once memory" ),
failList = jQuery.Callbacks( "once memory" ),
progressList = jQuery.Callbacks( "memory" ),
state = "pending",
lists = {
resolve: doneList,
reject: failList,
notify: progressList
},
promise = {
done: doneList.add,
fail: failList.add,
progress: progressList.add,
state: function() {
return state;
},
// Deprecated
isResolved: doneList.fired,
isRejected: failList.fired,
then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
return this;
},
always: function() {
deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
return this;
},
pipe: function( fnDone, fnFail, fnProgress ) {
return jQuery.Deferred(function( newDefer ) {
jQuery.each( {
done: [ fnDone, "resolve" ],
fail: [ fnFail, "reject" ],
progress: [ fnProgress, "notify" ]
}, function( handler, data ) {
var fn = data[ 0 ],
action = data[ 1 ],
returned;
if ( jQuery.isFunction( fn ) ) {
deferred[ handler ](function() {
returned = fn.apply( this, arguments );
if ( returned && jQuery.isFunction( returned.promise ) ) {
returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
} else {
newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
}
});
} else {
deferred[ handler ]( newDefer[ action ] );
}
});
}).promise();
},
// Get a promise for this deferred
// If obj is provided, the promise aspect is added to the object
promise: function( obj ) {
if ( obj == null ) {
obj = promise;
} else {
for ( var key in promise ) {
obj[ key ] = promise[ key ];
}
}
return obj;
}
},
deferred = promise.promise({}),
key;
for ( key in lists ) {
deferred[ key ] = lists[ key ].fire;
deferred[ key + "With" ] = lists[ key ].fireWith;
}
// Handle state
deferred.done( function() {
state = "resolved";
}, failList.disable, progressList.lock ).fail( function() {
state = "rejected";
}, doneList.disable, progressList.lock );
// Call given func if any
if ( func ) {
func.call( deferred, deferred );
}
// All done!
return deferred;
},
// Deferred helper
when: function( firstParam ) {
var args = sliceDeferred.call( arguments, 0 ),
i = 0,
length = args.length,
pValues = new Array( length ),
count = length,
pCount = length,
deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
firstParam :
jQuery.Deferred(),
promise = deferred.promise();
function resolveFunc( i ) {
return function( value ) {
args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
if ( !( --count ) ) {
deferred.resolveWith( deferred, args );
}
};
}
function progressFunc( i ) {
return function( value ) {
pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
deferred.notifyWith( promise, pValues );
};
}
if ( length > 1 ) {
for ( ; i < length; i++ ) {
if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
} else {
--count;
}
}
if ( !count ) {
deferred.resolveWith( deferred, args );
}
} else if ( deferred !== firstParam ) {
deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
}
return promise;
}
});
jQuery.support = (function() {
var support,
all,
a,
select,
opt,
input,
marginDiv,
fragment,
tds,
events,
eventName,
i,
isSupported,
div = document.createElement( "div" ),
documentElement = document.documentElement;
// Preliminary tests
div.setAttribute("className", "t");
div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
all = div.getElementsByTagName( "*" );
a = div.getElementsByTagName( "a" )[ 0 ];
// Can't get basic test support
if ( !all || !all.length || !a ) {
return {};
}
// First batch of supports tests
select = document.createElement( "select" );
opt = select.appendChild( document.createElement("option") );
input = div.getElementsByTagName( "input" )[ 0 ];
support = {
// IE strips leading whitespace when .innerHTML is used
leadingWhitespace: ( div.firstChild.nodeType === 3 ),
// Make sure that tbody elements aren't automatically inserted
// IE will insert them into empty tables
tbody: !div.getElementsByTagName("tbody").length,
// Make sure that link elements get serialized correctly by innerHTML
// This requires a wrapper element in IE
htmlSerialize: !!div.getElementsByTagName("link").length,
// Get the style information from getAttribute
// (IE uses .cssText instead)
style: /top/.test( a.getAttribute("style") ),
// Make sure that URLs aren't manipulated
// (IE normalizes it by default)
hrefNormalized: ( a.getAttribute("href") === "/a" ),
// Make sure that element opacity exists
// (IE uses filter instead)
// Use a regex to work around a WebKit issue. See #5145
opacity: /^0.55/.test( a.style.opacity ),
// Verify style float existence
// (IE uses styleFloat instead of cssFloat)
cssFloat: !!a.style.cssFloat,
// Make sure that if no value is specified for a checkbox
// that it defaults to "on".
// (WebKit defaults to "" instead)
checkOn: ( input.value === "on" ),
// Make sure that a selected-by-default option has a working selected property.
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
optSelected: opt.selected,
// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
getSetAttribute: div.className !== "t",
// Tests for enctype support on a form(#6743)
enctype: !!document.createElement("form").enctype,
// Makes sure cloning an html5 element does not cause problems
// Where outerHTML is undefined, this still works
html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
// Will be defined later
submitBubbles: true,
changeBubbles: true,
focusinBubbles: false,
deleteExpando: true,
noCloneEvent: true,
inlineBlockNeedsLayout: false,
shrinkWrapBlocks: false,
reliableMarginRight: true
};
// Make sure checked status is properly cloned
input.checked = true;
support.noCloneChecked = input.cloneNode( true ).checked;
// Make sure that the options inside disabled selects aren't marked as disabled
// (WebKit marks them as disabled)
select.disabled = true;
support.optDisabled = !opt.disabled;
// Test to see if it's possible to delete an expando from an element
// Fails in Internet Explorer
try {
delete div.test;
} catch( e ) {
support.deleteExpando = false;
}
if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
div.attachEvent( "onclick", function() {
// Cloning a node shouldn't copy over any
// bound event handlers (IE does this)
support.noCloneEvent = false;
});
div.cloneNode( true ).fireEvent( "onclick" );
}
// Check if a radio maintains its value
// after being appended to the DOM
input = document.createElement("input");
input.value = "t";
input.setAttribute("type", "radio");
support.radioValue = input.value === "t";
input.setAttribute("checked", "checked");
div.appendChild( input );
fragment = document.createDocumentFragment();
fragment.appendChild( div.lastChild );
// WebKit doesn't clone checked state correctly in fragments
support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
// Check if a disconnected checkbox will retain its checked
// value of true after appended to the DOM (IE6/7)
support.appendChecked = input.checked;
fragment.removeChild( input );
fragment.appendChild( div );
div.innerHTML = "";
// Check if div with explicit width and no margin-right incorrectly
// gets computed margin-right based on width of container. For more
// info see bug #3333
// Fails in WebKit before Feb 2011 nightlies
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
if ( window.getComputedStyle ) {
marginDiv = document.createElement( "div" );
marginDiv.style.width = "0";
marginDiv.style.marginRight = "0";
div.style.width = "2px";
div.appendChild( marginDiv );
support.reliableMarginRight =
( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
}
// Technique from Juriy Zaytsev
// http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
// We only care about the case where non-standard event systems
// are used, namely in IE. Short-circuiting here helps us to
// avoid an eval call (in setAttribute) which can cause CSP
// to go haywire. See: https://developer.mozilla.org/en/Security/CSP
if ( div.attachEvent ) {
for( i in {
submit: 1,
change: 1,
focusin: 1
}) {
eventName = "on" + i;
isSupported = ( eventName in div );
if ( !isSupported ) {
div.setAttribute( eventName, "return;" );
isSupported = ( typeof div[ eventName ] === "function" );
}
support[ i + "Bubbles" ] = isSupported;
}
}
fragment.removeChild( div );
// Null elements to avoid leaks in IE
fragment = select = opt = marginDiv = div = input = null;
// Run tests that need a body at doc ready
jQuery(function() {
var container, outer, inner, table, td, offsetSupport,
conMarginTop, ptlm, vb, style, html,
body = document.getElementsByTagName("body")[0];
if ( !body ) {
// Return for frameset docs that don't have a body
return;
}
conMarginTop = 1;
ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";
vb = "visibility:hidden;border:0;";
style = "style='" + ptlm + "border:5px solid #000;padding:0;'";
html = "<div " + style + "><div></div></div>" +
"<table " + style + " cellpadding='0' cellspacing='0'>" +
"<tr><td></td></tr></table>";
container = document.createElement("div");
container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
body.insertBefore( container, body.firstChild );
// Construct the test element
div = document.createElement("div");
container.appendChild( div );
// Check if table cells still have offsetWidth/Height when they are set
// to display:none and there are still other visible table cells in a
// table row; if so, offsetWidth/Height are not reliable for use when
// determining if an element has been hidden directly using
// display:none (it is still safe to use offsets if a parent element is
// hidden; don safety goggles and see bug #4512 for more information).
// (only IE 8 fails this test)
div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
tds = div.getElementsByTagName( "td" );
isSupported = ( tds[ 0 ].offsetHeight === 0 );
tds[ 0 ].style.display = "";
tds[ 1 ].style.display = "none";
// Check if empty table cells still have offsetWidth/Height
// (IE <= 8 fail this test)
support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
// Figure out if the W3C box model works as expected
div.innerHTML = "";
div.style.width = div.style.paddingLeft = "1px";
jQuery.boxModel = support.boxModel = div.offsetWidth === 2;
if ( typeof div.style.zoom !== "undefined" ) {
// Check if natively block-level elements act like inline-block
// elements when setting their display to 'inline' and giving
// them layout
// (IE < 8 does this)
div.style.display = "inline";
div.style.zoom = 1;
support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
// Check if elements with layout shrink-wrap their children
// (IE 6 does this)
div.style.display = "";
div.innerHTML = "<div style='width:4px;'></div>";
support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
}
div.style.cssText = ptlm + vb;
div.innerHTML = html;
outer = div.firstChild;
inner = outer.firstChild;
td = outer.nextSibling.firstChild.firstChild;
offsetSupport = {
doesNotAddBorder: ( inner.offsetTop !== 5 ),
doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
};
inner.style.position = "fixed";
inner.style.top = "20px";
// safari subtracts parent border width here which is 5px
offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
inner.style.position = inner.style.top = "";
outer.style.overflow = "hidden";
outer.style.position = "relative";
offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
body.removeChild( container );
div = container = null;
jQuery.extend( support, offsetSupport );
});
return support;
})();
var rbrace = /^(?:\{.*\}|\[.*\])$/,
rmultiDash = /([A-Z])/g;
jQuery.extend({
cache: {},
// Please use with caution
uuid: 0,
// Unique for each copy of jQuery on the page
// Non-digits removed to match rinlinejQuery
expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
// The following elements throw uncatchable exceptions if you
// attempt to add expando properties to them.
noData: {
"embed": true,
// Ban all objects except for Flash (which handle expandos)
"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
"applet": true
},
hasData: function( elem ) {
elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
return !!elem && !isEmptyDataObject( elem );
},
data: function( elem, name, data, pvt /* Internal Use Only */ ) {
if ( !jQuery.acceptData( elem ) ) {
return;
}
var privateCache, thisCache, ret,
internalKey = jQuery.expando,
getByName = typeof name === "string",
// We have to handle DOM nodes and JS objects differently because IE6-7
// can't GC object references properly across the DOM-JS boundary
isNode = elem.nodeType,
// Only DOM nodes need the global jQuery cache; JS object data is
// attached directly to the object so GC can occur automatically
cache = isNode ? jQuery.cache : elem,
// Only defining an ID for JS objects if its cache already exists allows
// the code to shortcut on the same path as a DOM node with no cache
id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,
isEvents = name === "events";
// Avoid doing any more work than we need to when trying to get data on an
// object that has no data at all
if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
return;
}
if ( !id ) {
// Only DOM nodes need a new unique ID for each element since their data
// ends up in the global cache
if ( isNode ) {
elem[ internalKey ] = id = ++jQuery.uuid;
} else {
id = internalKey;
}
}
if ( !cache[ id ] ) {
cache[ id ] = {};
// Avoids exposing jQuery metadata on plain JS objects when the object
// is serialized using JSON.stringify
if ( !isNode ) {
cache[ id ].toJSON = jQuery.noop;
}
}
// An object can be passed to jQuery.data instead of a key/value pair; this gets
// shallow copied over onto the existing cache
if ( typeof name === "object" || typeof name === "function" ) {
if ( pvt ) {
cache[ id ] = jQuery.extend( cache[ id ], name );
} else {
cache[ id ].data = jQuery.extend( cache[ id ].data, name );
}
}
privateCache = thisCache = cache[ id ];
// jQuery data() is stored in a separate object inside the object's internal data
// cache in order to avoid key collisions between internal data and user-defined
// data.
if ( !pvt ) {
if ( !thisCache.data ) {
thisCache.data = {};
}
thisCache = thisCache.data;
}
if ( data !== undefined ) {
thisCache[ jQuery.camelCase( name ) ] = data;
}
// Users should not attempt to inspect the internal events object using jQuery.data,
// it is undocumented and subject to change. But does anyone listen? No.
if ( isEvents && !thisCache[ name ] ) {
return privateCache.events;
}
// Check for both converted-to-camel and non-converted data property names
// If a data property was specified
if ( getByName ) {
// First Try to find as-is property data
ret = thisCache[ name ];
// Test for null|undefined property data
if ( ret == null ) {
// Try to find the camelCased property
ret = thisCache[ jQuery.camelCase( name ) ];
}
} else {
ret = thisCache;
}
return ret;
},
removeData: function( elem, name, pvt /* Internal Use Only */ ) {
if ( !jQuery.acceptData( elem ) ) {
return;
}
var thisCache, i, l,
// Reference to internal data cache key
internalKey = jQuery.expando,
isNode = elem.nodeType,
// See jQuery.data for more information
cache = isNode ? jQuery.cache : elem,
// See jQuery.data for more information
id = isNode ? elem[ internalKey ] : internalKey;
// If there is already no cache entry for this object, there is no
// purpose in continuing
if ( !cache[ id ] ) {
return;
}
if ( name ) {
thisCache = pvt ? cache[ id ] : cache[ id ].data;
if ( thisCache ) {
// Support array or space separated string names for data keys
if ( !jQuery.isArray( name ) ) {
// try the string as a key before any manipulation
if ( name in thisCache ) {
name = [ name ];
} else {
// split the camel cased version by spaces unless a key with the spaces exists
name = jQuery.camelCase( name );
if ( name in thisCache ) {
name = [ name ];
} else {
name = name.split( " " );
}
}
}
for ( i = 0, l = name.length; i < l; i++ ) {
delete thisCache[ name[i] ];
}
// If there is no data left in the cache, we want to continue
// and let the cache object itself get destroyed
if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
return;
}
}
}
// See jQuery.data for more information
if ( !pvt ) {
delete cache[ id ].data;
// Don't destroy the parent cache unless the internal data object
// had been the only thing left in it
if ( !isEmptyDataObject(cache[ id ]) ) {
return;
}
}
// Browsers that fail expando deletion also refuse to delete expandos on
// the window, but it will allow it on all other JS objects; other browsers
// don't care
// Ensure that `cache` is not a window object #10080
if ( jQuery.support.deleteExpando || !cache.setInterval ) {
delete cache[ id ];
} else {
cache[ id ] = null;
}
// We destroyed the cache and need to eliminate the expando on the node to avoid
// false lookups in the cache for entries that no longer exist
if ( isNode ) {
// IE does not allow us to delete expando properties from nodes,
// nor does it have a removeAttribute function on Document nodes;
// we must handle all of these cases
if ( jQuery.support.deleteExpando ) {
delete elem[ internalKey ];
} else if ( elem.removeAttribute ) {
elem.removeAttribute( internalKey );
} else {
elem[ internalKey ] = null;
}
}
},
// For internal use only.
_data: function( elem, name, data ) {
return jQuery.data( elem, name, data, true );
},
// A method for determining if a DOM node can handle the data expando
acceptData: function( elem ) {
if ( elem.nodeName ) {
var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
if ( match ) {
return !(match === true || elem.getAttribute("classid") !== match);
}
}
return true;
}
});
jQuery.fn.extend({
data: function( key, value ) {
var parts, attr, name,
data = null;
if ( typeof key === "undefined" ) {
if ( this.length ) {
data = jQuery.data( this[0] );
if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) {
attr = this[0].attributes;
for ( var i = 0, l = attr.length; i < l; i++ ) {
name = attr[i].name;
if ( name.indexOf( "data-" ) === 0 ) {
name = jQuery.camelCase( name.substring(5) );
dataAttr( this[0], name, data[ name ] );
}
}
jQuery._data( this[0], "parsedAttrs", true );
}
}
return data;
} else if ( typeof key === "object" ) {
return this.each(function() {
jQuery.data( this, key );
});
}
parts = key.split(".");
parts[1] = parts[1] ? "." + parts[1] : "";
if ( value === undefined ) {
data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
// Try to fetch any internally stored data first
if ( data === undefined && this.length ) {
data = jQuery.data( this[0], key );
data = dataAttr( this[0], key, data );
}
return data === undefined && parts[1] ?
this.data( parts[0] ) :
data;
} else {
return this.each(function() {
var self = jQuery( this ),
args = [ parts[0], value ];
self.triggerHandler( "setData" + parts[1] + "!", args );
jQuery.data( this, key, value );
self.triggerHandler( "changeData" + parts[1] + "!", args );
});
}
},
removeData: function( key ) {
return this.each(function() {
jQuery.removeData( this, key );
});
}
});
function dataAttr( elem, key, data ) {
// If nothing was found internally, try to fetch any
// data from the HTML5 data-* attribute
if ( data === undefined && elem.nodeType === 1 ) {
var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
data = elem.getAttribute( name );
if ( typeof data === "string" ) {
try {
data = data === "true" ? true :
data === "false" ? false :
data === "null" ? null :
jQuery.isNumeric( data ) ? parseFloat( data ) :
rbrace.test( data ) ? jQuery.parseJSON( data ) :
data;
} catch( e ) {}
// Make sure we set the data so it isn't changed later
jQuery.data( elem, key, data );
} else {
data = undefined;
}
}
return data;
}
// checks a cache object for emptiness
function isEmptyDataObject( obj ) {
for ( var name in obj ) {
// if the public data object is empty, the private is still empty
if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
continue;
}
if ( name !== "toJSON" ) {
return false;
}
}
return true;
}
function handleQueueMarkDefer( elem, type, src ) {
var deferDataKey = type + "defer",
queueDataKey = type + "queue",
markDataKey = type + "mark",
defer = jQuery._data( elem, deferDataKey );
if ( defer &&
( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
// Give room for hard-coded callbacks to fire first
// and eventually mark/queue something else on the element
setTimeout( function() {
if ( !jQuery._data( elem, queueDataKey ) &&
!jQuery._data( elem, markDataKey ) ) {
jQuery.removeData( elem, deferDataKey, true );
defer.fire();
}
}, 0 );
}
}
jQuery.extend({
_mark: function( elem, type ) {
if ( elem ) {
type = ( type || "fx" ) + "mark";
jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
}
},
_unmark: function( force, elem, type ) {
if ( force !== true ) {
type = elem;
elem = force;
force = false;
}
if ( elem ) {
type = type || "fx";
var key = type + "mark",
count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
if ( count ) {
jQuery._data( elem, key, count );
} else {
jQuery.removeData( elem, key, true );
handleQueueMarkDefer( elem, type, "mark" );
}
}
},
queue: function( elem, type, data ) {
var q;
if ( elem ) {
type = ( type || "fx" ) + "queue";
q = jQuery._data( elem, type );
// Speed up dequeue by getting out quickly if this is just a lookup
if ( data ) {
if ( !q || jQuery.isArray(data) ) {
q = jQuery._data( elem, type, jQuery.makeArray(data) );
} else {
q.push( data );
}
}
return q || [];
}
},
dequeue: function( elem, type ) {
type = type || "fx";
var queue = jQuery.queue( elem, type ),
fn = queue.shift(),
hooks = {};
// If the fx queue is dequeued, always remove the progress sentinel
if ( fn === "inprogress" ) {
fn = queue.shift();
}
if ( fn ) {
// Add a progress sentinel to prevent the fx queue from being
// automatically dequeued
if ( type === "fx" ) {
queue.unshift( "inprogress" );
}
jQuery._data( elem, type + ".run", hooks );
fn.call( elem, function() {
jQuery.dequeue( elem, type );
}, hooks );
}
if ( !queue.length ) {
jQuery.removeData( elem, type + "queue " + type + ".run", true );
handleQueueMarkDefer( elem, type, "queue" );
}
}
});
jQuery.fn.extend({
queue: function( type, data ) {
if ( typeof type !== "string" ) {
data = type;
type = "fx";
}
if ( data === undefined ) {
return jQuery.queue( this[0], type );
}
return this.each(function() {
var queue = jQuery.queue( this, type, data );
if ( type === "fx" && queue[0] !== "inprogress" ) {
jQuery.dequeue( this, type );
}
});
},
dequeue: function( type ) {
return this.each(function() {
jQuery.dequeue( this, type );
});
},
// Based off of the plugin by Clint Helfers, with permission.
// http://blindsignals.com/index.php/2009/07/jquery-delay/
delay: function( time, type ) {
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
type = type || "fx";
return this.queue( type, function( next, hooks ) {
var timeout = setTimeout( next, time );
hooks.stop = function() {
clearTimeout( timeout );
};
});
},
clearQueue: function( type ) {
return this.queue( type || "fx", [] );
},
// Get a promise resolved when queues of a certain type
// are emptied (fx is the type by default)
promise: function( type, object ) {
if ( typeof type !== "string" ) {
object = type;
type = undefined;
}
type = type || "fx";
var defer = jQuery.Deferred(),
elements = this,
i = elements.length,
count = 1,
deferDataKey = type + "defer",
queueDataKey = type + "queue",
markDataKey = type + "mark",
tmp;
function resolve() {
if ( !( --count ) ) {
defer.resolveWith( elements, [ elements ] );
}
}
while( i-- ) {
if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
count++;
tmp.add( resolve );
}
}
resolve();
return defer.promise();
}
});
var rclass = /[\n\t\r]/g,
rspace = /\s+/,
rreturn = /\r/g,
rtype = /^(?:button|input)$/i,
rfocusable = /^(?:button|input|object|select|textarea)$/i,
rclickable = /^a(?:rea)?$/i,
rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
getSetAttribute = jQuery.support.getSetAttribute,
nodeHook, boolHook, fixSpecified;
jQuery.fn.extend({
attr: function( name, value ) {
return jQuery.access( this, name, value, true, jQuery.attr );
},
removeAttr: function( name ) {
return this.each(function() {
jQuery.removeAttr( this, name );
});
},
prop: function( name, value ) {
return jQuery.access( this, name, value, true, jQuery.prop );
},
removeProp: function( name ) {
name = jQuery.propFix[ name ] || name;
return this.each(function() {
// try/catch handles cases where IE balks (such as removing a property on window)
try {
this[ name ] = undefined;
delete this[ name ];
} catch( e ) {}
});
},
addClass: function( value ) {
var classNames, i, l, elem,
setClass, c, cl;
if ( jQuery.isFunction( value ) ) {
return this.each(function( j ) {
jQuery( this ).addClass( value.call(this, j, this.className) );
});
}
if ( value && typeof value === "string" ) {
classNames = value.split( rspace );
for ( i = 0, l = this.length; i < l; i++ ) {
elem = this[ i ];
if ( elem.nodeType === 1 ) {
if ( !elem.className && classNames.length === 1 ) {
elem.className = value;
} else {
setClass = " " + elem.className + " ";
for ( c = 0, cl = classNames.length; c < cl; c++ ) {
if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
setClass += classNames[ c ] + " ";
}
}
elem.className = jQuery.trim( setClass );
}
}
}
}
return this;
},
removeClass: function( value ) {
var classNames, i, l, elem, className, c, cl;
if ( jQuery.isFunction( value ) ) {
return this.each(function( j ) {
jQuery( this ).removeClass( value.call(this, j, this.className) );
});
}
if ( (value && typeof value === "string") || value === undefined ) {
classNames = ( value || "" ).split( rspace );
for ( i = 0, l = this.length; i < l; i++ ) {
elem = this[ i ];
if ( elem.nodeType === 1 && elem.className ) {
if ( value ) {
className = (" " + elem.className + " ").replace( rclass, " " );
for ( c = 0, cl = classNames.length; c < cl; c++ ) {
className = className.replace(" " + classNames[ c ] + " ", " ");
}
elem.className = jQuery.trim( className );
} else {
elem.className = "";
}
}
}
}
return this;
},
toggleClass: function( value, stateVal ) {
var type = typeof value,
isBool = typeof stateVal === "boolean";
if ( jQuery.isFunction( value ) ) {
return this.each(function( i ) {
jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
});
}
return this.each(function() {
if ( type === "string" ) {
// toggle individual class names
var className,
i = 0,
self = jQuery( this ),
state = stateVal,
classNames = value.split( rspace );
while ( (className = classNames[ i++ ]) ) {
// check each className given, space seperated list
state = isBool ? state : !self.hasClass( className );
self[ state ? "addClass" : "removeClass" ]( className );
}
} else if ( type === "undefined" || type === "boolean" ) {
if ( this.className ) {
// store className if set
jQuery._data( this, "__className__", this.className );
}
// toggle whole className
this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
}
});
},
hasClass: function( selector ) {
var className = " " + selector + " ",
i = 0,
l = this.length;
for ( ; i < l; i++ ) {
if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
return true;
}
}
return false;
},
val: function( value ) {
var hooks, ret, isFunction,
elem = this[0];
if ( !arguments.length ) {
if ( elem ) {
hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
return ret;
}
ret = elem.value;
return typeof ret === "string" ?
// handle most common string cases
ret.replace(rreturn, "") :
// handle cases where value is null/undef or number
ret == null ? "" : ret;
}
return;
}
isFunction = jQuery.isFunction( value );
return this.each(function( i ) {
var self = jQuery(this), val;
if ( this.nodeType !== 1 ) {
return;
}
if ( isFunction ) {
val = value.call( this, i, self.val() );
} else {
val = value;
}
// Treat null/undefined as ""; convert numbers to string
if ( val == null ) {
val = "";
} else if ( typeof val === "number" ) {
val += "";
} else if ( jQuery.isArray( val ) ) {
val = jQuery.map(val, function ( value ) {
return value == null ? "" : value + "";
});
}
hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
// If set returns undefined, fall back to normal setting
if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
this.value = val;
}
});
}
});
jQuery.extend({
valHooks: {
option: {
get: function( elem ) {
// attributes.value is undefined in Blackberry 4.7 but
// uses .value. See #6932
var val = elem.attributes.value;
return !val || val.specified ? elem.value : elem.text;
}
},
select: {
get: function( elem ) {
var value, i, max, option,
index = elem.selectedIndex,
values = [],
options = elem.options,
one = elem.type === "select-one";
// Nothing was selected
if ( index < 0 ) {
return null;
}
// Loop through all the selected options
i = one ? index : 0;
max = one ? index + 1 : options.length;
for ( ; i < max; i++ ) {
option = options[ i ];
// Don't return options that are disabled or in a disabled optgroup
if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
// Get the specific value for the option
value = jQuery( option ).val();
// We don't need an array for one selects
if ( one ) {
return value;
}
// Multi-Selects return an array
values.push( value );
}
}
// Fixes Bug #2551 -- select.val() broken in IE after form.reset()
if ( one && !values.length && options.length ) {
return jQuery( options[ index ] ).val();
}
return values;
},
set: function( elem, value ) {
var values = jQuery.makeArray( value );
jQuery(elem).find("option").each(function() {
this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
});
if ( !values.length ) {
elem.selectedIndex = -1;
}
return values;
}
}
},
attrFn: {
val: true,
css: true,
html: true,
text: true,
data: true,
width: true,
height: true,
offset: true
},
attr: function( elem, name, value, pass ) {
var ret, hooks, notxml,
nType = elem.nodeType;
// don't get/set attributes on text, comment and attribute nodes
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
return;
}
if ( pass && name in jQuery.attrFn ) {
return jQuery( elem )[ name ]( value );
}
// Fallback to prop when attributes are not supported
if ( typeof elem.getAttribute === "undefined" ) {
return jQuery.prop( elem, name, value );
}
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
// All attributes are lowercase
// Grab necessary hook if one is defined
if ( notxml ) {
name = name.toLowerCase();
hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
}
if ( value !== undefined ) {
if ( value === null ) {
jQuery.removeAttr( elem, name );
return;
} else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
return ret;
} else {
elem.setAttribute( name, "" + value );
return value;
}
} else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
return ret;
} else {
ret = elem.getAttribute( name );
// Non-existent attributes return null, we normalize to undefined
return ret === null ?
undefined :
ret;
}
},
removeAttr: function( elem, value ) {
var propName, attrNames, name, l,
i = 0;
if ( value && elem.nodeType === 1 ) {
attrNames = value.toLowerCase().split( rspace );
l = attrNames.length;
for ( ; i < l; i++ ) {
name = attrNames[ i ];
if ( name ) {
propName = jQuery.propFix[ name ] || name;
// See #9699 for explanation of this approach (setting first, then removal)
jQuery.attr( elem, name, "" );
elem.removeAttribute( getSetAttribute ? name : propName );
// Set corresponding property to false for boolean attributes
if ( rboolean.test( name ) && propName in elem ) {
elem[ propName ] = false;
}
}
}
}
},
attrHooks: {
type: {
set: function( elem, value ) {
// We can't allow the type property to be changed (since it causes problems in IE)
if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
jQuery.error( "type property can't be changed" );
} else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
// Setting the type on a radio button after the value resets the value in IE6-9
// Reset value to it's default in case type is set after value
// This is for element creation
var val = elem.value;
elem.setAttribute( "type", value );
if ( val ) {
elem.value = val;
}
return value;
}
}
},
// Use the value property for back compat
// Use the nodeHook for button elements in IE6/7 (#1954)
value: {
get: function( elem, name ) {
if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
return nodeHook.get( elem, name );
}
return name in elem ?
elem.value :
null;
},
set: function( elem, value, name ) {
if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
return nodeHook.set( elem, value, name );
}
// Does not return so that setAttribute is also used
elem.value = value;
}
}
},
propFix: {
tabindex: "tabIndex",
readonly: "readOnly",
"for": "htmlFor",
"class": "className",
maxlength: "maxLength",
cellspacing: "cellSpacing",
cellpadding: "cellPadding",
rowspan: "rowSpan",
colspan: "colSpan",
usemap: "useMap",
frameborder: "frameBorder",
contenteditable: "contentEditable"
},
prop: function( elem, name, value ) {
var ret, hooks, notxml,
nType = elem.nodeType;
// don't get/set properties on text, comment and attribute nodes
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
return;
}
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
if ( notxml ) {
// Fix name and attach hooks
name = jQuery.propFix[ name ] || name;
hooks = jQuery.propHooks[ name ];
}
if ( value !== undefined ) {
if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
return ret;
} else {
return ( elem[ name ] = value );
}
} else {
if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
return ret;
} else {
return elem[ name ];
}
}
},
propHooks: {
tabIndex: {
get: function( elem ) {
// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
var attributeNode = elem.getAttributeNode("tabindex");
return attributeNode && attributeNode.specified ?
parseInt( attributeNode.value, 10 ) :
rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
0 :
undefined;
}
}
}
});
// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
// Hook for boolean attributes
boolHook = {
get: function( elem, name ) {
// Align boolean attributes with corresponding properties
// Fall back to attribute presence where some booleans are not supported
var attrNode,
property = jQuery.prop( elem, name );
return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
name.toLowerCase() :
undefined;
},
set: function( elem, value, name ) {
var propName;
if ( value === false ) {
// Remove boolean attributes when set to false
jQuery.removeAttr( elem, name );
} else {
// value is true since we know at this point it's type boolean and not false
// Set boolean attributes to the same name and set the DOM property
propName = jQuery.propFix[ name ] || name;
if ( propName in elem ) {
// Only set the IDL specifically if it already exists on the element
elem[ propName ] = true;
}
elem.setAttribute( name, name.toLowerCase() );
}
return name;
}
};
// IE6/7 do not support getting/setting some attributes with get/setAttribute
if ( !getSetAttribute ) {
fixSpecified = {
name: true,
id: true
};
// Use this for any attribute in IE6/7
// This fixes almost every IE6/7 issue
nodeHook = jQuery.valHooks.button = {
get: function( elem, name ) {
var ret;
ret = elem.getAttributeNode( name );
return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
ret.nodeValue :
undefined;
},
set: function( elem, value, name ) {
// Set the existing or create a new attribute node
var ret = elem.getAttributeNode( name );
if ( !ret ) {
ret = document.createAttribute( name );
elem.setAttributeNode( ret );
}
return ( ret.nodeValue = value + "" );
}
};
// Apply the nodeHook to tabindex
jQuery.attrHooks.tabindex.set = nodeHook.set;
// Set width and height to auto instead of 0 on empty string( Bug #8150 )
// This is for removals
jQuery.each([ "width", "height" ], function( i, name ) {
jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
set: function( elem, value ) {
if ( value === "" ) {
elem.setAttribute( name, "auto" );
return value;
}
}
});
});
// Set contenteditable to false on removals(#10429)
// Setting to empty string throws an error as an invalid value
jQuery.attrHooks.contenteditable = {
get: nodeHook.get,
set: function( elem, value, name ) {
if ( value === "" ) {
value = "false";
}
nodeHook.set( elem, value, name );
}
};
}
// Some attributes require a special call on IE
if ( !jQuery.support.hrefNormalized ) {
jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
get: function( elem ) {
var ret = elem.getAttribute( name, 2 );
return ret === null ? undefined : ret;
}
});
});
}
if ( !jQuery.support.style ) {
jQuery.attrHooks.style = {
get: function( elem ) {
// Return undefined in the case of empty string
// Normalize to lowercase since IE uppercases css property names
return elem.style.cssText.toLowerCase() || undefined;
},
set: function( elem, value ) {
return ( elem.style.cssText = "" + value );
}
};
}
// Safari mis-reports the default selected property of an option
// Accessing the parent's selectedIndex property fixes it
if ( !jQuery.support.optSelected ) {
jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
get: function( elem ) {
var parent = elem.parentNode;
if ( parent ) {
parent.selectedIndex;
// Make sure that it also works with optgroups, see #5701
if ( parent.parentNode ) {
parent.parentNode.selectedIndex;
}
}
return null;
}
});
}
// IE6/7 call enctype encoding
if ( !jQuery.support.enctype ) {
jQuery.propFix.enctype = "encoding";
}
// Radios and checkboxes getter/setter
if ( !jQuery.support.checkOn ) {
jQuery.each([ "radio", "checkbox" ], function() {
jQuery.valHooks[ this ] = {
get: function( elem ) {
// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
return elem.getAttribute("value") === null ? "on" : elem.value;
}
};
});
}
jQuery.each([ "radio", "checkbox" ], function() {
jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
set: function( elem, value ) {
if ( jQuery.isArray( value ) ) {
return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
}
}
});
});
var rformElems = /^(?:textarea|input|select)$/i,
rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
rhoverHack = /\bhover(\.\S+)?\b/,
rkeyEvent = /^key/,
rmouseEvent = /^(?:mouse|contextmenu)|click/,
rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
quickParse = function( selector ) {
var quick = rquickIs.exec( selector );
if ( quick ) {
// 0 1 2 3
// [ _, tag, id, class ]
quick[1] = ( quick[1] || "" ).toLowerCase();
quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
}
return quick;
},
quickIs = function( elem, m ) {
var attrs = elem.attributes || {};
return (
(!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
(!m[2] || (attrs.id || {}).value === m[2]) &&
(!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
);
},
hoverHack = function( events ) {
return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
};
/*
* Helper functions for managing events -- not part of the public interface.
* Props to Dean Edwards' addEvent library for many of the ideas.
*/
jQuery.event = {
add: function( elem, types, handler, data, selector ) {
var elemData, eventHandle, events,
t, tns, type, namespaces, handleObj,
handleObjIn, quick, handlers, special;
// Don't attach events to noData or text/comment nodes (allow plain objects tho)
if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
return;
}
// Caller can pass in an object of custom data in lieu of the handler
if ( handler.handler ) {
handleObjIn = handler;
handler = handleObjIn.handler;
}
// Make sure that the handler has a unique ID, used to find/remove it later
if ( !handler.guid ) {
handler.guid = jQuery.guid++;
}
// Init the element's event structure and main handler, if this is the first
events = elemData.events;
if ( !events ) {
elemData.events = events = {};
}
eventHandle = elemData.handle;
if ( !eventHandle ) {
elemData.handle = eventHandle = function( e ) {
// Discard the second event of a jQuery.event.trigger() and
// when an event is called after a page has unloaded
return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
undefined;
};
// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
eventHandle.elem = elem;
}
// Handle multiple events separated by a space
// jQuery(...).bind("mouseover mouseout", fn);
types = jQuery.trim( hoverHack(types) ).split( " " );
for ( t = 0; t < types.length; t++ ) {
tns = rtypenamespace.exec( types[t] ) || [];
type = tns[1];
namespaces = ( tns[2] || "" ).split( "." ).sort();
// If event changes its type, use the special event handlers for the changed type
special = jQuery.event.special[ type ] || {};
// If selector defined, determine special event api type, otherwise given type
type = ( selector ? special.delegateType : special.bindType ) || type;
// Update special based on newly reset type
special = jQuery.event.special[ type ] || {};
// handleObj is passed to all event handlers
handleObj = jQuery.extend({
type: type,
origType: tns[1],
data: data,
handler: handler,
guid: handler.guid,
selector: selector,
quick: quickParse( selector ),
namespace: namespaces.join(".")
}, handleObjIn );
// Init the event handler queue if we're the first
handlers = events[ type ];
if ( !handlers ) {
handlers = events[ type ] = [];
handlers.delegateCount = 0;
// Only use addEventListener/attachEvent if the special events handler returns false
if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
// Bind the global event handler to the element
if ( elem.addEventListener ) {
elem.addEventListener( type, eventHandle, false );
} else if ( elem.attachEvent ) {
elem.attachEvent( "on" + type, eventHandle );
}
}
}
if ( special.add ) {
special.add.call( elem, handleObj );
if ( !handleObj.handler.guid ) {
handleObj.handler.guid = handler.guid;
}
}
// Add to the element's handler list, delegates in front
if ( selector ) {
handlers.splice( handlers.delegateCount++, 0, handleObj );
} else {
handlers.push( handleObj );
}
// Keep track of which events have ever been used, for event optimization
jQuery.event.global[ type ] = true;
}
// Nullify elem to prevent memory leaks in IE
elem = null;
},
global: {},
// Detach an event or set of events from an element
remove: function( elem, types, handler, selector, mappedTypes ) {
var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
t, tns, type, origType, namespaces, origCount,
j, events, special, handle, eventType, handleObj;
if ( !elemData || !(events = elemData.events) ) {
return;
}
// Once for each type.namespace in types; type may be omitted
types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
for ( t = 0; t < types.length; t++ ) {
tns = rtypenamespace.exec( types[t] ) || [];
type = origType = tns[1];
namespaces = tns[2];
// Unbind all events (on this namespace, if provided) for the element
if ( !type ) {
for ( type in events ) {
jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
}
continue;
}
special = jQuery.event.special[ type ] || {};
type = ( selector? special.delegateType : special.bindType ) || type;
eventType = events[ type ] || [];
origCount = eventType.length;
namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
// Remove matching events
for ( j = 0; j < eventType.length; j++ ) {
handleObj = eventType[ j ];
if ( ( mappedTypes || origType === handleObj.origType ) &&
( !handler || handler.guid === handleObj.guid ) &&
( !namespaces || namespaces.test( handleObj.namespace ) ) &&
( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
eventType.splice( j--, 1 );
if ( handleObj.selector ) {
eventType.delegateCount--;
}
if ( special.remove ) {
special.remove.call( elem, handleObj );
}
}
}
// Remove generic event handler if we removed something and no more handlers exist
// (avoids potential for endless recursion during removal of special event handlers)
if ( eventType.length === 0 && origCount !== eventType.length ) {
if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
jQuery.removeEvent( elem, type, elemData.handle );
}
delete events[ type ];
}
}
// Remove the expando if it's no longer used
if ( jQuery.isEmptyObject( events ) ) {
handle = elemData.handle;
if ( handle ) {
handle.elem = null;
}
// removeData also checks for emptiness and clears the expando if empty
// so use it instead of delete
jQuery.removeData( elem, [ "events", "handle" ], true );
}
},
// Events that are safe to short-circuit if no handlers are attached.
// Native DOM events should not be added, they may have inline handlers.
customEvent: {
"getData": true,
"setData": true,
"changeData": true
},
trigger: function( event, data, elem, onlyHandlers ) {
// Don't do events on text and comment nodes
if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
return;
}
// Event object or event type
var type = event.type || event,
namespaces = [],
cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
// focus/blur morphs to focusin/out; ensure we're not firing them right now
if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
return;
}
if ( type.indexOf( "!" ) >= 0 ) {
// Exclusive events trigger only for the exact event (no namespaces)
type = type.slice(0, -1);
exclusive = true;
}
if ( type.indexOf( "." ) >= 0 ) {
// Namespaced trigger; create a regexp to match event type in handle()
namespaces = type.split(".");
type = namespaces.shift();
namespaces.sort();
}
if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
// No jQuery handlers for this event type, and it can't have inline handlers
return;
}
// Caller can pass in an Event, Object, or just an event type string
event = typeof event === "object" ?
// jQuery.Event object
event[ jQuery.expando ] ? event :
// Object literal
new jQuery.Event( type, event ) :
// Just the event type (string)
new jQuery.Event( type );
event.type = type;
event.isTrigger = true;
event.exclusive = exclusive;
event.namespace = namespaces.join( "." );
event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
// Handle a global trigger
if ( !elem ) {
// TODO: Stop taunting the data cache; remove global events and always attach to document
cache = jQuery.cache;
for ( i in cache ) {
if ( cache[ i ].events && cache[ i ].events[ type ] ) {
jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
}
}
return;
}
// Clean up the event in case it is being reused
event.result = undefined;
if ( !event.target ) {
event.target = elem;
}
// Clone any incoming data and prepend the event, creating the handler arg list
data = data != null ? jQuery.makeArray( data ) : [];
data.unshift( event );
// Allow special events to draw outside the lines
special = jQuery.event.special[ type ] || {};
if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
return;
}
// Determine event propagation path in advance, per W3C events spec (#9951)
// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
eventPath = [[ elem, special.bindType || type ]];
if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
bubbleType = special.delegateType || type;
cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
old = null;
for ( ; cur; cur = cur.parentNode ) {
eventPath.push([ cur, bubbleType ]);
old = cur;
}
// Only add window if we got to document (e.g., not plain obj or detached DOM)
if ( old && old === elem.ownerDocument ) {
eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
}
}
// Fire handlers on the event path
for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
cur = eventPath[i][0];
event.type = eventPath[i][1];
handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
if ( handle ) {
handle.apply( cur, data );
}
// Note that this is a bare JS function and not a jQuery handler
handle = ontype && cur[ ontype ];
if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
event.preventDefault();
}
}
event.type = type;
// If nobody prevented the default action, do it now
if ( !onlyHandlers && !event.isDefaultPrevented() ) {
if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
!(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
// Call a native DOM method on the target with the same name name as the event.
// Can't use an .isFunction() check here because IE6/7 fails that test.
// Don't do default actions on window, that's where global variables be (#6170)
// IE<9 dies on focus/blur to hidden element (#1486)
if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
// Don't re-trigger an onFOO event when we call its FOO() method
old = elem[ ontype ];
if ( old ) {
elem[ ontype ] = null;
}
// Prevent re-triggering of the same event, since we already bubbled it above
jQuery.event.triggered = type;
elem[ type ]();
jQuery.event.triggered = undefined;
if ( old ) {
elem[ ontype ] = old;
}
}
}
}
return event.result;
},
dispatch: function( event ) {
// Make a writable jQuery.Event from the native event object
event = jQuery.event.fix( event || window.event );
var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
delegateCount = handlers.delegateCount,
args = [].slice.call( arguments, 0 ),
run_all = !event.exclusive && !event.namespace,
handlerQueue = [],
i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;
// Use the fix-ed jQuery.Event rather than the (read-only) native event
args[0] = event;
event.delegateTarget = this;
// Determine handlers that should run if there are delegated events
// Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861)
if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) {
// Pregenerate a single jQuery object for reuse with .is()
jqcur = jQuery(this);
jqcur.context = this.ownerDocument || this;
for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
selMatch = {};
matches = [];
jqcur[0] = cur;
for ( i = 0; i < delegateCount; i++ ) {
handleObj = handlers[ i ];
sel = handleObj.selector;
if ( selMatch[ sel ] === undefined ) {
selMatch[ sel ] = (
handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )
);
}
if ( selMatch[ sel ] ) {
matches.push( handleObj );
}
}
if ( matches.length ) {
handlerQueue.push({ elem: cur, matches: matches });
}
}
}
// Add the remaining (directly-bound) handlers
if ( handlers.length > delegateCount ) {
handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
}
// Run delegates first; they may want to stop propagation beneath us
for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
matched = handlerQueue[ i ];
event.currentTarget = matched.elem;
for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
handleObj = matched.matches[ j ];
// Triggered event must either 1) be non-exclusive and have no namespace, or
// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
event.data = handleObj.data;
event.handleObj = handleObj;
ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
.apply( matched.elem, args );
if ( ret !== undefined ) {
event.result = ret;
if ( ret === false ) {
event.preventDefault();
event.stopPropagation();
}
}
}
}
}
return event.result;
},
// Includes some event props shared by KeyEvent and MouseEvent
// *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks: {},
keyHooks: {
props: "char charCode key keyCode".split(" "),
filter: function( event, original ) {
// Add which for key events
if ( event.which == null ) {
event.which = original.charCode != null ? original.charCode : original.keyCode;
}
return event;
}
},
mouseHooks: {
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter: function( event, original ) {
var eventDoc, doc, body,
button = original.button,
fromElement = original.fromElement;
// Calculate pageX/Y if missing and clientX/Y available
if ( event.pageX == null && original.clientX != null ) {
eventDoc = event.target.ownerDocument || document;
doc = eventDoc.documentElement;
body = eventDoc.body;
event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
}
// Add relatedTarget, if necessary
if ( !event.relatedTarget && fromElement ) {
event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
}
// Add which for click: 1 === left; 2 === middle; 3 === right
// Note: button is not normalized, so don't use it
if ( !event.which && button !== undefined ) {
event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
}
return event;
}
},
fix: function( event ) {
if ( event[ jQuery.expando ] ) {
return event;
}
// Create a writable copy of the event object and normalize some properties
var i, prop,
originalEvent = event,
fixHook = jQuery.event.fixHooks[ event.type ] || {},
copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
event = jQuery.Event( originalEvent );
for ( i = copy.length; i; ) {
prop = copy[ --i ];
event[ prop ] = originalEvent[ prop ];
}
// Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
if ( !event.target ) {
event.target = originalEvent.srcElement || document;
}
// Target should not be a text node (#504, Safari)
if ( event.target.nodeType === 3 ) {
event.target = event.target.parentNode;
}
// For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)
if ( event.metaKey === undefined ) {
event.metaKey = event.ctrlKey;
}
return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
},
special: {
ready: {
// Make sure the ready event is setup
setup: jQuery.bindReady
},
load: {
// Prevent triggered image.load events from bubbling to window.load
noBubble: true
},
focus: {
delegateType: "focusin"
},
blur: {
delegateType: "focusout"
},
beforeunload: {
setup: function( data, namespaces, eventHandle ) {
// We only want to do this special case on windows
if ( jQuery.isWindow( this ) ) {
this.onbeforeunload = eventHandle;
}
},
teardown: function( namespaces, eventHandle ) {
if ( this.onbeforeunload === eventHandle ) {
this.onbeforeunload = null;
}
}
}
},
simulate: function( type, elem, event, bubble ) {
// Piggyback on a donor event to simulate a different one.
// Fake originalEvent to avoid donor's stopPropagation, but if the
// simulated event prevents default then we do the same on the donor.
var e = jQuery.extend(
new jQuery.Event(),
event,
{ type: type,
isSimulated: true,
originalEvent: {}
}
);
if ( bubble ) {
jQuery.event.trigger( e, null, elem );
} else {
jQuery.event.dispatch.call( elem, e );
}
if ( e.isDefaultPrevented() ) {
event.preventDefault();
}
}
};
// Some plugins are using, but it's undocumented/deprecated and will be removed.
// The 1.7 special event interface should provide all the hooks needed now.
jQuery.event.handle = jQuery.event.dispatch;
jQuery.removeEvent = document.removeEventListener ?
function( elem, type, handle ) {
if ( elem.removeEventListener ) {
elem.removeEventListener( type, handle, false );
}
} :
function( elem, type, handle ) {
if ( elem.detachEvent ) {
elem.detachEvent( "on" + type, handle );
}
};
jQuery.Event = function( src, props ) {
// Allow instantiation without the 'new' keyword
if ( !(this instanceof jQuery.Event) ) {
return new jQuery.Event( src, props );
}
// Event object
if ( src && src.type ) {
this.originalEvent = src;
this.type = src.type;
// Events bubbling up the document may have been marked as prevented
// by a handler lower down the tree; reflect the correct value.
this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
// Event type
} else {
this.type = src;
}
// Put explicitly provided properties onto the event object
if ( props ) {
jQuery.extend( this, props );
}
// Create a timestamp if incoming event doesn't have one
this.timeStamp = src && src.timeStamp || jQuery.now();
// Mark it as fixed
this[ jQuery.expando ] = true;
};
function returnFalse() {
return false;
}
function returnTrue() {
return true;
}
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
jQuery.Event.prototype = {
preventDefault: function() {
this.isDefaultPrevented = returnTrue;
var e = this.originalEvent;
if ( !e ) {
return;
}
// if preventDefault exists run it on the original event
if ( e.preventDefault ) {
e.preventDefault();
// otherwise set the returnValue property of the original event to false (IE)
} else {
e.returnValue = false;
}
},
stopPropagation: function() {
this.isPropagationStopped = returnTrue;
var e = this.originalEvent;
if ( !e ) {
return;
}
// if stopPropagation exists run it on the original event
if ( e.stopPropagation ) {
e.stopPropagation();
}
// otherwise set the cancelBubble property of the original event to true (IE)
e.cancelBubble = true;
},
stopImmediatePropagation: function() {
this.isImmediatePropagationStopped = returnTrue;
this.stopPropagation();
},
isDefaultPrevented: returnFalse,
isPropagationStopped: returnFalse,
isImmediatePropagationStopped: returnFalse
};
// Create mouseenter/leave events using mouseover/out and event-time checks
jQuery.each({
mouseenter: "mouseover",
mouseleave: "mouseout"
}, function( orig, fix ) {
jQuery.event.special[ orig ] = {
delegateType: fix,
bindType: fix,
handle: function( event ) {
var target = this,
related = event.relatedTarget,
handleObj = event.handleObj,
selector = handleObj.selector,
ret;
// For mousenter/leave call the handler if related is outside the target.
// NB: No relatedTarget if the mouse left/entered the browser window
if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
event.type = handleObj.origType;
ret = handleObj.handler.apply( this, arguments );
event.type = fix;
}
return ret;
}
};
});
// IE submit delegation
if ( !jQuery.support.submitBubbles ) {
jQuery.event.special.submit = {
setup: function() {
// Only need this for delegated form submit events
if ( jQuery.nodeName( this, "form" ) ) {
return false;
}
// Lazy-add a submit handler when a descendant form may potentially be submitted
jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
// Node name check avoids a VML-related crash in IE (#9807)
var elem = e.target,
form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
if ( form && !form._submit_attached ) {
jQuery.event.add( form, "submit._submit", function( event ) {
// If form was submitted by the user, bubble the event up the tree
if ( this.parentNode && !event.isTrigger ) {
jQuery.event.simulate( "submit", this.parentNode, event, true );
}
});
form._submit_attached = true;
}
});
// return undefined since we don't need an event listener
},
teardown: function() {
// Only need this for delegated form submit events
if ( jQuery.nodeName( this, "form" ) ) {
return false;
}
// Remove delegated handlers; cleanData eventually reaps submit handlers attached above
jQuery.event.remove( this, "._submit" );
}
};
}
// IE change delegation and checkbox/radio fix
if ( !jQuery.support.changeBubbles ) {
jQuery.event.special.change = {
setup: function() {
if ( rformElems.test( this.nodeName ) ) {
// IE doesn't fire change on a check/radio until blur; trigger it on click
// after a propertychange. Eat the blur-change in special.change.handle.
// This still fires onchange a second time for check/radio after blur.
if ( this.type === "checkbox" || this.type === "radio" ) {
jQuery.event.add( this, "propertychange._change", function( event ) {
if ( event.originalEvent.propertyName === "checked" ) {
this._just_changed = true;
}
});
jQuery.event.add( this, "click._change", function( event ) {
if ( this._just_changed && !event.isTrigger ) {
this._just_changed = false;
jQuery.event.simulate( "change", this, event, true );
}
});
}
return false;
}
// Delegated event; lazy-add a change handler on descendant inputs
jQuery.event.add( this, "beforeactivate._change", function( e ) {
var elem = e.target;
if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {
jQuery.event.add( elem, "change._change", function( event ) {
if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
jQuery.event.simulate( "change", this.parentNode, event, true );
}
});
elem._change_attached = true;
}
});
},
handle: function( event ) {
var elem = event.target;
// Swallow native change events from checkbox/radio, we already triggered them above
if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
return event.handleObj.handler.apply( this, arguments );
}
},
teardown: function() {
jQuery.event.remove( this, "._change" );
return rformElems.test( this.nodeName );
}
};
}
// Create "bubbling" focus and blur events
if ( !jQuery.support.focusinBubbles ) {
jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
// Attach a single capturing handler while someone wants focusin/focusout
var attaches = 0,
handler = function( event ) {
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
};
jQuery.event.special[ fix ] = {
setup: function() {
if ( attaches++ === 0 ) {
document.addEventListener( orig, handler, true );
}
},
teardown: function() {
if ( --attaches === 0 ) {
document.removeEventListener( orig, handler, true );
}
}
};
});
}
jQuery.fn.extend({
on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
var origFn, type;
// Types can be a map of types/handlers
if ( typeof types === "object" ) {
// ( types-Object, selector, data )
if ( typeof selector !== "string" ) {
// ( types-Object, data )
data = selector;
selector = undefined;
}
for ( type in types ) {
this.on( type, selector, data, types[ type ], one );
}
return this;
}
if ( data == null && fn == null ) {
// ( types, fn )
fn = selector;
data = selector = undefined;
} else if ( fn == null ) {
if ( typeof selector === "string" ) {
// ( types, selector, fn )
fn = data;
data = undefined;
} else {
// ( types, data, fn )
fn = data;
data = selector;
selector = undefined;
}
}
if ( fn === false ) {
fn = returnFalse;
} else if ( !fn ) {
return this;
}
if ( one === 1 ) {
origFn = fn;
fn = function( event ) {
// Can use an empty set, since event contains the info
jQuery().off( event );
return origFn.apply( this, arguments );
};
// Use same guid so caller can remove using origFn
fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
}
return this.each( function() {
jQuery.event.add( this, types, fn, data, selector );
});
},
one: function( types, selector, data, fn ) {
return this.on.call( this, types, selector, data, fn, 1 );
},
off: function( types, selector, fn ) {
if ( types && types.preventDefault && types.handleObj ) {
// ( event ) dispatched jQuery.Event
var handleObj = types.handleObj;
jQuery( types.delegateTarget ).off(
handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type,
handleObj.selector,
handleObj.handler
);
return this;
}
if ( typeof types === "object" ) {
// ( types-object [, selector] )
for ( var type in types ) {
this.off( type, selector, types[ type ] );
}
return this;
}
if ( selector === false || typeof selector === "function" ) {
// ( types [, fn] )
fn = selector;
selector = undefined;
}
if ( fn === false ) {
fn = returnFalse;
}
return this.each(function() {
jQuery.event.remove( this, types, fn, selector );
});
},
bind: function( types, data, fn ) {
return this.on( types, null, data, fn );
},
unbind: function( types, fn ) {
return this.off( types, null, fn );
},
live: function( types, data, fn ) {
jQuery( this.context ).on( types, this.selector, data, fn );
return this;
},
die: function( types, fn ) {
jQuery( this.context ).off( types, this.selector || "**", fn );
return this;
},
delegate: function( selector, types, data, fn ) {
return this.on( types, selector, data, fn );
},
undelegate: function( selector, types, fn ) {
// ( namespace ) or ( selector, types [, fn] )
return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn );
},
trigger: function( type, data ) {
return this.each(function() {
jQuery.event.trigger( type, data, this );
});
},
triggerHandler: function( type, data ) {
if ( this[0] ) {
return jQuery.event.trigger( type, data, this[0], true );
}
},
toggle: function( fn ) {
// Save reference to arguments for access in closure
var args = arguments,
guid = fn.guid || jQuery.guid++,
i = 0,
toggler = function( event ) {
// Figure out which function to execute
var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
// Make sure that clicks stop
event.preventDefault();
// and execute the function
return args[ lastToggle ].apply( this, arguments ) || false;
};
// link all the functions, so any of them can unbind this click handler
toggler.guid = guid;
while ( i < args.length ) {
args[ i++ ].guid = guid;
}
return this.click( toggler );
},
hover: function( fnOver, fnOut ) {
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
}
});
jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
// Handle event binding
jQuery.fn[ name ] = function( data, fn ) {
if ( fn == null ) {
fn = data;
data = null;
}
return arguments.length > 0 ?
this.on( name, null, data, fn ) :
this.trigger( name );
};
if ( jQuery.attrFn ) {
jQuery.attrFn[ name ] = true;
}
if ( rkeyEvent.test( name ) ) {
jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
}
if ( rmouseEvent.test( name ) ) {
jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
}
});
/*!
* Sizzle CSS Selector Engine
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
* More information: http://sizzlejs.com/
*/
(function(){
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
expando = "sizcache" + (Math.random() + '').replace('.', ''),
done = 0,
toString = Object.prototype.toString,
hasDuplicate = false,
baseHasDuplicate = true,
rBackslash = /\\/g,
rReturn = /\r\n/g,
rNonWord = /\W/;
// Here we check if the JavaScript engine is using some sort of
// optimization where it does not always call our comparision
// function. If that is the case, discard the hasDuplicate value.
// Thus far that includes Google Chrome.
[0, 0].sort(function() {
baseHasDuplicate = false;
return 0;
});
var Sizzle = function( selector, context, results, seed ) {
results = results || [];
context = context || document;
var origContext = context;
if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
return [];
}
if ( !selector || typeof selector !== "string" ) {
return results;
}
var m, set, checkSet, extra, ret, cur, pop, i,
prune = true,
contextXML = Sizzle.isXML( context ),
parts = [],
soFar = selector;
// Reset the position of the chunker regexp (start from head)
do {
chunker.exec( "" );
m = chunker.exec( soFar );
if ( m ) {
soFar = m[3];
parts.push( m[1] );
if ( m[2] ) {
extra = m[3];
break;
}
}
} while ( m );
if ( parts.length > 1 && origPOS.exec( selector ) ) {
if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
set = posProcess( parts[0] + parts[1], context, seed );
} else {
set = Expr.relative[ parts[0] ] ?
[ context ] :
Sizzle( parts.shift(), context );
while ( parts.length ) {
selector = parts.shift();
if ( Expr.relative[ selector ] ) {
selector += parts.shift();
}
set = posProcess( selector, set, seed );
}
}
} else {
// Take a shortcut and set the context if the root selector is an ID
// (but not if it'll be faster if the inner selector is an ID)
if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
ret = Sizzle.find( parts.shift(), context, contextXML );
context = ret.expr ?
Sizzle.filter( ret.expr, ret.set )[0] :
ret.set[0];
}
if ( context ) {
ret = seed ?
{ expr: parts.pop(), set: makeArray(seed) } :
Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
set = ret.expr ?
Sizzle.filter( ret.expr, ret.set ) :
ret.set;
if ( parts.length > 0 ) {
checkSet = makeArray( set );
} else {
prune = false;
}
while ( parts.length ) {
cur = parts.pop();
pop = cur;
if ( !Expr.relative[ cur ] ) {
cur = "";
} else {
pop = parts.pop();
}
if ( pop == null ) {
pop = context;
}
Expr.relative[ cur ]( checkSet, pop, contextXML );
}
} else {
checkSet = parts = [];
}
}
if ( !checkSet ) {
checkSet = set;
}
if ( !checkSet ) {
Sizzle.error( cur || selector );
}
if ( toString.call(checkSet) === "[object Array]" ) {
if ( !prune ) {
results.push.apply( results, checkSet );
} else if ( context && context.nodeType === 1 ) {
for ( i = 0; checkSet[i] != null; i++ ) {
if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
results.push( set[i] );
}
}
} else {
for ( i = 0; checkSet[i] != null; i++ ) {
if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
results.push( set[i] );
}
}
}
} else {
makeArray( checkSet, results );
}
if ( extra ) {
Sizzle( extra, origContext, results, seed );
Sizzle.uniqueSort( results );
}
return results;
};
Sizzle.uniqueSort = function( results ) {
if ( sortOrder ) {
hasDuplicate = baseHasDuplicate;
results.sort( sortOrder );
if ( hasDuplicate ) {
for ( var i = 1; i < results.length; i++ ) {
if ( results[i] === results[ i - 1 ] ) {
results.splice( i--, 1 );
}
}
}
}
return results;
};
Sizzle.matches = function( expr, set ) {
return Sizzle( expr, null, null, set );
};
Sizzle.matchesSelector = function( node, expr ) {
return Sizzle( expr, null, null, [node] ).length > 0;
};
Sizzle.find = function( expr, context, isXML ) {
var set, i, len, match, type, left;
if ( !expr ) {
return [];
}
for ( i = 0, len = Expr.order.length; i < len; i++ ) {
type = Expr.order[i];
if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
left = match[1];
match.splice( 1, 1 );
if ( left.substr( left.length - 1 ) !== "\\" ) {
match[1] = (match[1] || "").replace( rBackslash, "" );
set = Expr.find[ type ]( match, context, isXML );
if ( set != null ) {
expr = expr.replace( Expr.match[ type ], "" );
break;
}
}
}
}
if ( !set ) {
set = typeof context.getElementsByTagName !== "undefined" ?
context.getElementsByTagName( "*" ) :
[];
}
return { set: set, expr: expr };
};
Sizzle.filter = function( expr, set, inplace, not ) {
var match, anyFound,
type, found, item, filter, left,
i, pass,
old = expr,
result = [],
curLoop = set,
isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
while ( expr && set.length ) {
for ( type in Expr.filter ) {
if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
filter = Expr.filter[ type ];
left = match[1];
anyFound = false;
match.splice(1,1);
if ( left.substr( left.length - 1 ) === "\\" ) {
continue;
}
if ( curLoop === result ) {
result = [];
}
if ( Expr.preFilter[ type ] ) {
match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
if ( !match ) {
anyFound = found = true;
} else if ( match === true ) {
continue;
}
}
if ( match ) {
for ( i = 0; (item = curLoop[i]) != null; i++ ) {
if ( item ) {
found = filter( item, match, i, curLoop );
pass = not ^ found;
if ( inplace && found != null ) {
if ( pass ) {
anyFound = true;
} else {
curLoop[i] = false;
}
} else if ( pass ) {
result.push( item );
anyFound = true;
}
}
}
}
if ( found !== undefined ) {
if ( !inplace ) {
curLoop = result;
}
expr = expr.replace( Expr.match[ type ], "" );
if ( !anyFound ) {
return [];
}
break;
}
}
}
// Improper expression
if ( expr === old ) {
if ( anyFound == null ) {
Sizzle.error( expr );
} else {
break;
}
}
old = expr;
}
return curLoop;
};
Sizzle.error = function( msg ) {
throw new Error( "Syntax error, unrecognized expression: " + msg );
};
/**
* Utility function for retreiving the text value of an array of DOM nodes
* @param {Array|Element} elem
*/
var getText = Sizzle.getText = function( elem ) {
var i, node,
nodeType = elem.nodeType,
ret = "";
if ( nodeType ) {
if ( nodeType === 1 || nodeType === 9 ) {
// Use textContent || innerText for elements
if ( typeof elem.textContent === 'string' ) {
return elem.textContent;
} else if ( typeof elem.innerText === 'string' ) {
// Replace IE's carriage returns
return elem.innerText.replace( rReturn, '' );
} else {
// Traverse it's children
for ( elem = elem.firstChild; elem; elem = elem.nextSibling) {
ret += getText( elem );
}
}
} else if ( nodeType === 3 || nodeType === 4 ) {
return elem.nodeValue;
}
} else {
// If no nodeType, this is expected to be an array
for ( i = 0; (node = elem[i]); i++ ) {
// Do not traverse comment nodes
if ( node.nodeType !== 8 ) {
ret += getText( node );
}
}
}
return ret;
};
var Expr = Sizzle.selectors = {
order: [ "ID", "NAME", "TAG" ],
match: {
ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
},
leftMatch: {},
attrMap: {
"class": "className",
"for": "htmlFor"
},
attrHandle: {
href: function( elem ) {
return elem.getAttribute( "href" );
},
type: function( elem ) {
return elem.getAttribute( "type" );
}
},
relative: {
"+": function(checkSet, part){
var isPartStr = typeof part === "string",
isTag = isPartStr && !rNonWord.test( part ),
isPartStrNotTag = isPartStr && !isTag;
if ( isTag ) {
part = part.toLowerCase();
}
for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
if ( (elem = checkSet[i]) ) {
while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
elem || false :
elem === part;
}
}
if ( isPartStrNotTag ) {
Sizzle.filter( part, checkSet, true );
}
},
">": function( checkSet, part ) {
var elem,
isPartStr = typeof part === "string",
i = 0,
l = checkSet.length;
if ( isPartStr && !rNonWord.test( part ) ) {
part = part.toLowerCase();
for ( ; i < l; i++ ) {
elem = checkSet[i];
if ( elem ) {
var parent = elem.parentNode;
checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
}
}
} else {
for ( ; i < l; i++ ) {
elem = checkSet[i];
if ( elem ) {
checkSet[i] = isPartStr ?
elem.parentNode :
elem.parentNode === part;
}
}
if ( isPartStr ) {
Sizzle.filter( part, checkSet, true );
}
}
},
"": function(checkSet, part, isXML){
var nodeCheck,
doneName = done++,
checkFn = dirCheck;
if ( typeof part === "string" && !rNonWord.test( part ) ) {
part = part.toLowerCase();
nodeCheck = part;
checkFn = dirNodeCheck;
}
checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
},
"~": function( checkSet, part, isXML ) {
var nodeCheck,
doneName = done++,
checkFn = dirCheck;
if ( typeof part === "string" && !rNonWord.test( part ) ) {
part = part.toLowerCase();
nodeCheck = part;
checkFn = dirNodeCheck;
}
checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
}
},
find: {
ID: function( match, context, isXML ) {
if ( typeof context.getElementById !== "undefined" && !isXML ) {
var m = context.getElementById(match[1]);
// Check parentNode to catch when Blackberry 4.6 returns
// nodes that are no longer in the document #6963
return m && m.parentNode ? [m] : [];
}
},
NAME: function( match, context ) {
if ( typeof context.getElementsByName !== "undefined" ) {
var ret = [],
results = context.getElementsByName( match[1] );
for ( var i = 0, l = results.length; i < l; i++ ) {
if ( results[i].getAttribute("name") === match[1] ) {
ret.push( results[i] );
}
}
return ret.length === 0 ? null : ret;
}
},
TAG: function( match, context ) {
if ( typeof context.getElementsByTagName !== "undefined" ) {
return context.getElementsByTagName( match[1] );
}
}
},
preFilter: {
CLASS: function( match, curLoop, inplace, result, not, isXML ) {
match = " " + match[1].replace( rBackslash, "" ) + " ";
if ( isXML ) {
return match;
}
for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
if ( elem ) {
if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
if ( !inplace ) {
result.push( elem );
}
} else if ( inplace ) {
curLoop[i] = false;
}
}
}
return false;
},
ID: function( match ) {
return match[1].replace( rBackslash, "" );
},
TAG: function( match, curLoop ) {
return match[1].replace( rBackslash, "" ).toLowerCase();
},
CHILD: function( match ) {
if ( match[1] === "nth" ) {
if ( !match[2] ) {
Sizzle.error( match[0] );
}
match[2] = match[2].replace(/^\+|\s*/g, '');
// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
!/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
// calculate the numbers (first)n+(last) including if they are negative
match[2] = (test[1] + (test[2] || 1)) - 0;
match[3] = test[3] - 0;
}
else if ( match[2] ) {
Sizzle.error( match[0] );
}
// TODO: Move to normal caching system
match[0] = done++;
return match;
},
ATTR: function( match, curLoop, inplace, result, not, isXML ) {
var name = match[1] = match[1].replace( rBackslash, "" );
if ( !isXML && Expr.attrMap[name] ) {
match[1] = Expr.attrMap[name];
}
// Handle if an un-quoted value was used
match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
if ( match[2] === "~=" ) {
match[4] = " " + match[4] + " ";
}
return match;
},
PSEUDO: function( match, curLoop, inplace, result, not ) {
if ( match[1] === "not" ) {
// If we're dealing with a complex expression, or a simple one
if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
match[3] = Sizzle(match[3], null, null, curLoop);
} else {
var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
if ( !inplace ) {
result.push.apply( result, ret );
}
return false;
}
} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
return true;
}
return match;
},
POS: function( match ) {
match.unshift( true );
return match;
}
},
filters: {
enabled: function( elem ) {
return elem.disabled === false && elem.type !== "hidden";
},
disabled: function( elem ) {
return elem.disabled === true;
},
checked: function( elem ) {
return elem.checked === true;
},
selected: function( elem ) {
// Accessing this property makes selected-by-default
// options in Safari work properly
if ( elem.parentNode ) {
elem.parentNode.selectedIndex;
}
return elem.selected === true;
},
parent: function( elem ) {
return !!elem.firstChild;
},
empty: function( elem ) {
return !elem.firstChild;
},
has: function( elem, i, match ) {
return !!Sizzle( match[3], elem ).length;
},
header: function( elem ) {
return (/h\d/i).test( elem.nodeName );
},
text: function( elem ) {
var attr = elem.getAttribute( "type" ), type = elem.type;
// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
// use getAttribute instead to test this case
return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
},
radio: function( elem ) {
return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
},
checkbox: function( elem ) {
return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
},
file: function( elem ) {
return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
},
password: function( elem ) {
return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
},
submit: function( elem ) {
var name = elem.nodeName.toLowerCase();
return (name === "input" || name === "button") && "submit" === elem.type;
},
image: function( elem ) {
return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
},
reset: function( elem ) {
var name = elem.nodeName.toLowerCase();
return (name === "input" || name === "button") && "reset" === elem.type;
},
button: function( elem ) {
var name = elem.nodeName.toLowerCase();
return name === "input" && "button" === elem.type || name === "button";
},
input: function( elem ) {
return (/input|select|textarea|button/i).test( elem.nodeName );
},
focus: function( elem ) {
return elem === elem.ownerDocument.activeElement;
}
},
setFilters: {
first: function( elem, i ) {
return i === 0;
},
last: function( elem, i, match, array ) {
return i === array.length - 1;
},
even: function( elem, i ) {
return i % 2 === 0;
},
odd: function( elem, i ) {
return i % 2 === 1;
},
lt: function( elem, i, match ) {
return i < match[3] - 0;
},
gt: function( elem, i, match ) {
return i > match[3] - 0;
},
nth: function( elem, i, match ) {
return match[3] - 0 === i;
},
eq: function( elem, i, match ) {
return match[3] - 0 === i;
}
},
filter: {
PSEUDO: function( elem, match, i, array ) {
var name = match[1],
filter = Expr.filters[ name ];
if ( filter ) {
return filter( elem, i, match, array );
} else if ( name === "contains" ) {
return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
} else if ( name === "not" ) {
var not = match[3];
for ( var j = 0, l = not.length; j < l; j++ ) {
if ( not[j] === elem ) {
return false;
}
}
return true;
} else {
Sizzle.error( name );
}
},
CHILD: function( elem, match ) {
var first, last,
doneName, parent, cache,
count, diff,
type = match[1],
node = elem;
switch ( type ) {
case "only":
case "first":
while ( (node = node.previousSibling) ) {
if ( node.nodeType === 1 ) {
return false;
}
}
if ( type === "first" ) {
return true;
}
node = elem;
case "last":
while ( (node = node.nextSibling) ) {
if ( node.nodeType === 1 ) {
return false;
}
}
return true;
case "nth":
first = match[2];
last = match[3];
if ( first === 1 && last === 0 ) {
return true;
}
doneName = match[0];
parent = elem.parentNode;
if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
count = 0;
for ( node = parent.firstChild; node; node = node.nextSibling ) {
if ( node.nodeType === 1 ) {
node.nodeIndex = ++count;
}
}
parent[ expando ] = doneName;
}
diff = elem.nodeIndex - last;
if ( first === 0 ) {
return diff === 0;
} else {
return ( diff % first === 0 && diff / first >= 0 );
}
}
},
ID: function( elem, match ) {
return elem.nodeType === 1 && elem.getAttribute("id") === match;
},
TAG: function( elem, match ) {
return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
},
CLASS: function( elem, match ) {
return (" " + (elem.className || elem.getAttribute("class")) + " ")
.indexOf( match ) > -1;
},
ATTR: function( elem, match ) {
var name = match[1],
result = Sizzle.attr ?
Sizzle.attr( elem, name ) :
Expr.attrHandle[ name ] ?
Expr.attrHandle[ name ]( elem ) :
elem[ name ] != null ?
elem[ name ] :
elem.getAttribute( name ),
value = result + "",
type = match[2],
check = match[4];
return result == null ?
type === "!=" :
!type && Sizzle.attr ?
result != null :
type === "=" ?
value === check :
type === "*=" ?
value.indexOf(check) >= 0 :
type === "~=" ?
(" " + value + " ").indexOf(check) >= 0 :
!check ?
value && result !== false :
type === "!=" ?
value !== check :
type === "^=" ?
value.indexOf(check) === 0 :
type === "$=" ?
value.substr(value.length - check.length) === check :
type === "|=" ?
value === check || value.substr(0, check.length + 1) === check + "-" :
false;
},
POS: function( elem, match, i, array ) {
var name = match[2],
filter = Expr.setFilters[ name ];
if ( filter ) {
return filter( elem, i, match, array );
}
}
}
};
var origPOS = Expr.match.POS,
fescape = function(all, num){
return "\\" + (num - 0 + 1);
};
for ( var type in Expr.match ) {
Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
}
var makeArray = function( array, results ) {
array = Array.prototype.slice.call( array, 0 );
if ( results ) {
results.push.apply( results, array );
return results;
}
return array;
};
// Perform a simple check to determine if the browser is capable of
// converting a NodeList to an array using builtin methods.
// Also verifies that the returned array holds DOM nodes
// (which is not the case in the Blackberry browser)
try {
Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
// Provide a fallback method if it does not work
} catch( e ) {
makeArray = function( array, results ) {
var i = 0,
ret = results || [];
if ( toString.call(array) === "[object Array]" ) {
Array.prototype.push.apply( ret, array );
} else {
if ( typeof array.length === "number" ) {
for ( var l = array.length; i < l; i++ ) {
ret.push( array[i] );
}
} else {
for ( ; array[i]; i++ ) {
ret.push( array[i] );
}
}
}
return ret;
};
}
var sortOrder, siblingCheck;
if ( document.documentElement.compareDocumentPosition ) {
sortOrder = function( a, b ) {
if ( a === b ) {
hasDuplicate = true;
return 0;
}
if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
return a.compareDocumentPosition ? -1 : 1;
}
return a.compareDocumentPosition(b) & 4 ? -1 : 1;
};
} else {
sortOrder = function( a, b ) {
// The nodes are identical, we can exit early
if ( a === b ) {
hasDuplicate = true;
return 0;
// Fallback to using sourceIndex (in IE) if it's available on both nodes
} else if ( a.sourceIndex && b.sourceIndex ) {
return a.sourceIndex - b.sourceIndex;
}
var al, bl,
ap = [],
bp = [],
aup = a.parentNode,
bup = b.parentNode,
cur = aup;
// If the nodes are siblings (or identical) we can do a quick check
if ( aup === bup ) {
return siblingCheck( a, b );
// If no parents were found then the nodes are disconnected
} else if ( !aup ) {
return -1;
} else if ( !bup ) {
return 1;
}
// Otherwise they're somewhere else in the tree so we need
// to build up a full list of the parentNodes for comparison
while ( cur ) {
ap.unshift( cur );
cur = cur.parentNode;
}
cur = bup;
while ( cur ) {
bp.unshift( cur );
cur = cur.parentNode;
}
al = ap.length;
bl = bp.length;
// Start walking down the tree looking for a discrepancy
for ( var i = 0; i < al && i < bl; i++ ) {
if ( ap[i] !== bp[i] ) {
return siblingCheck( ap[i], bp[i] );
}
}
// We ended someplace up the tree so do a sibling check
return i === al ?
siblingCheck( a, bp[i], -1 ) :
siblingCheck( ap[i], b, 1 );
};
siblingCheck = function( a, b, ret ) {
if ( a === b ) {
return ret;
}
var cur = a.nextSibling;
while ( cur ) {
if ( cur === b ) {
return -1;
}
cur = cur.nextSibling;
}
return 1;
};
}
// Check to see if the browser returns elements by name when
// querying by getElementById (and provide a workaround)
(function(){
// We're going to inject a fake input element with a specified name
var form = document.createElement("div"),
id = "script" + (new Date()).getTime(),
root = document.documentElement;
form.innerHTML = "<a name='" + id + "'/>";
// Inject it into the root element, check its status, and remove it quickly
root.insertBefore( form, root.firstChild );
// The workaround has to do additional checks after a getElementById
// Which slows things down for other browsers (hence the branching)
if ( document.getElementById( id ) ) {
Expr.find.ID = function( match, context, isXML ) {
if ( typeof context.getElementById !== "undefined" && !isXML ) {
var m = context.getElementById(match[1]);
return m ?
m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
[m] :
undefined :
[];
}
};
Expr.filter.ID = function( elem, match ) {
var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
return elem.nodeType === 1 && node && node.nodeValue === match;
};
}
root.removeChild( form );
// release memory in IE
root = form = null;
})();
(function(){
// Check to see if the browser returns only elements
// when doing getElementsByTagName("*")
// Create a fake element
var div = document.createElement("div");
div.appendChild( document.createComment("") );
// Make sure no comments are found
if ( div.getElementsByTagName("*").length > 0 ) {
Expr.find.TAG = function( match, context ) {
var results = context.getElementsByTagName( match[1] );
// Filter out possible comments
if ( match[1] === "*" ) {
var tmp = [];
for ( var i = 0; results[i]; i++ ) {
if ( results[i].nodeType === 1 ) {
tmp.push( results[i] );
}
}
results = tmp;
}
return results;
};
}
// Check to see if an attribute returns normalized href attributes
div.innerHTML = "<a href='#'></a>";
if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
div.firstChild.getAttribute("href") !== "#" ) {
Expr.attrHandle.href = function( elem ) {
return elem.getAttribute( "href", 2 );
};
}
// release memory in IE
div = null;
})();
if ( document.querySelectorAll ) {
(function(){
var oldSizzle = Sizzle,
div = document.createElement("div"),
id = "__sizzle__";
div.innerHTML = "<p class='TEST'></p>";
// Safari can't handle uppercase or unicode characters when
// in quirks mode.
if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
return;
}
Sizzle = function( query, context, extra, seed ) {
context = context || document;
// Only use querySelectorAll on non-XML documents
// (ID selectors don't work in non-HTML documents)
if ( !seed && !Sizzle.isXML(context) ) {
// See if we find a selector to speed up
var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
// Speed-up: Sizzle("TAG")
if ( match[1] ) {
return makeArray( context.getElementsByTagName( query ), extra );
// Speed-up: Sizzle(".CLASS")
} else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
return makeArray( context.getElementsByClassName( match[2] ), extra );
}
}
if ( context.nodeType === 9 ) {
// Speed-up: Sizzle("body")
// The body element only exists once, optimize finding it
if ( query === "body" && context.body ) {
return makeArray( [ context.body ], extra );
// Speed-up: Sizzle("#ID")
} else if ( match && match[3] ) {
var elem = context.getElementById( match[3] );
// Check parentNode to catch when Blackberry 4.6 returns
// nodes that are no longer in the document #6963
if ( elem && elem.parentNode ) {
// Handle the case where IE and Opera return items
// by name instead of ID
if ( elem.id === match[3] ) {
return makeArray( [ elem ], extra );
}
} else {
return makeArray( [], extra );
}
}
try {
return makeArray( context.querySelectorAll(query), extra );
} catch(qsaError) {}
// qSA works strangely on Element-rooted queries
// We can work around this by specifying an extra ID on the root
// and working up from there (Thanks to Andrew Dupont for the technique)
// IE 8 doesn't work on object elements
} else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
var oldContext = context,
old = context.getAttribute( "id" ),
nid = old || id,
hasParent = context.parentNode,
relativeHierarchySelector = /^\s*[+~]/.test( query );
if ( !old ) {
context.setAttribute( "id", nid );
} else {
nid = nid.replace( /'/g, "\\$&" );
}
if ( relativeHierarchySelector && hasParent ) {
context = context.parentNode;
}
try {
if ( !relativeHierarchySelector || hasParent ) {
return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
}
} catch(pseudoError) {
} finally {
if ( !old ) {
oldContext.removeAttribute( "id" );
}
}
}
}
return oldSizzle(query, context, extra, seed);
};
for ( var prop in oldSizzle ) {
Sizzle[ prop ] = oldSizzle[ prop ];
}
// release memory in IE
div = null;
})();
}
(function(){
var html = document.documentElement,
matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
if ( matches ) {
// Check to see if it's possible to do matchesSelector
// on a disconnected node (IE 9 fails this)
var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
pseudoWorks = false;
try {
// This should fail with an exception
// Gecko does not error, returns false instead
matches.call( document.documentElement, "[test!='']:sizzle" );
} catch( pseudoError ) {
pseudoWorks = true;
}
Sizzle.matchesSelector = function( node, expr ) {
// Make sure that attribute selectors are quoted
expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
if ( !Sizzle.isXML( node ) ) {
try {
if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
var ret = matches.call( node, expr );
// IE 9's matchesSelector returns false on disconnected nodes
if ( ret || !disconnectedMatch ||
// As well, disconnected nodes are said to be in a document
// fragment in IE 9, so check for that
node.document && node.document.nodeType !== 11 ) {
return ret;
}
}
} catch(e) {}
}
return Sizzle(expr, null, null, [node]).length > 0;
};
}
})();
(function(){
var div = document.createElement("div");
div.innerHTML = "<div class='test e'></div><div class='test'></div>";
// Opera can't find a second classname (in 9.6)
// Also, make sure that getElementsByClassName actually exists
if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
return;
}
// Safari caches class attributes, doesn't catch changes (in 3.2)
div.lastChild.className = "e";
if ( div.getElementsByClassName("e").length === 1 ) {
return;
}
Expr.order.splice(1, 0, "CLASS");
Expr.find.CLASS = function( match, context, isXML ) {
if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
return context.getElementsByClassName(match[1]);
}
};
// release memory in IE
div = null;
})();
function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
var elem = checkSet[i];
if ( elem ) {
var match = false;
elem = elem[dir];
while ( elem ) {
if ( elem[ expando ] === doneName ) {
match = checkSet[elem.sizset];
break;
}
if ( elem.nodeType === 1 && !isXML ){
elem[ expando ] = doneName;
elem.sizset = i;
}
if ( elem.nodeName.toLowerCase() === cur ) {
match = elem;
break;
}
elem = elem[dir];
}
checkSet[i] = match;
}
}
}
function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
var elem = checkSet[i];
if ( elem ) {
var match = false;
elem = elem[dir];
while ( elem ) {
if ( elem[ expando ] === doneName ) {
match = checkSet[elem.sizset];
break;
}
if ( elem.nodeType === 1 ) {
if ( !isXML ) {
elem[ expando ] = doneName;
elem.sizset = i;
}
if ( typeof cur !== "string" ) {
if ( elem === cur ) {
match = true;
break;
}
} else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
match = elem;
break;
}
}
elem = elem[dir];
}
checkSet[i] = match;
}
}
}
if ( document.documentElement.contains ) {
Sizzle.contains = function( a, b ) {
return a !== b && (a.contains ? a.contains(b) : true);
};
} else if ( document.documentElement.compareDocumentPosition ) {
Sizzle.contains = function( a, b ) {
return !!(a.compareDocumentPosition(b) & 16);
};
} else {
Sizzle.contains = function() {
return false;
};
}
Sizzle.isXML = function( elem ) {
// documentElement is verified for cases where it doesn't yet exist
// (such as loading iframes in IE - #4833)
var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
return documentElement ? documentElement.nodeName !== "HTML" : false;
};
var posProcess = function( selector, context, seed ) {
var match,
tmpSet = [],
later = "",
root = context.nodeType ? [context] : context;
// Position selectors must be done after the filter
// And so must :not(positional) so we move all PSEUDOs to the end
while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
later += match[0];
selector = selector.replace( Expr.match.PSEUDO, "" );
}
selector = Expr.relative[selector] ? selector + "*" : selector;
for ( var i = 0, l = root.length; i < l; i++ ) {
Sizzle( selector, root[i], tmpSet, seed );
}
return Sizzle.filter( later, tmpSet );
};
// EXPOSE
// Override sizzle attribute retrieval
Sizzle.attr = jQuery.attr;
Sizzle.selectors.attrMap = {};
jQuery.find = Sizzle;
jQuery.expr = Sizzle.selectors;
jQuery.expr[":"] = jQuery.expr.filters;
jQuery.unique = Sizzle.uniqueSort;
jQuery.text = Sizzle.getText;
jQuery.isXMLDoc = Sizzle.isXML;
jQuery.contains = Sizzle.contains;
})();
var runtil = /Until$/,
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
// Note: This RegExp should be improved, or likely pulled from Sizzle
rmultiselector = /,/,
isSimple = /^.[^:#\[\.,]*$/,
slice = Array.prototype.slice,
POS = jQuery.expr.match.POS,
// methods guaranteed to produce a unique set when starting from a unique set
guaranteedUnique = {
children: true,
contents: true,
next: true,
prev: true
};
jQuery.fn.extend({
find: function( selector ) {
var self = this,
i, l;
if ( typeof selector !== "string" ) {
return jQuery( selector ).filter(function() {
for ( i = 0, l = self.length; i < l; i++ ) {
if ( jQuery.contains( self[ i ], this ) ) {
return true;
}
}
});
}
var ret = this.pushStack( "", "find", selector ),
length, n, r;
for ( i = 0, l = this.length; i < l; i++ ) {
length = ret.length;
jQuery.find( selector, this[i], ret );
if ( i > 0 ) {
// Make sure that the results are unique
for ( n = length; n < ret.length; n++ ) {
for ( r = 0; r < length; r++ ) {
if ( ret[r] === ret[n] ) {
ret.splice(n--, 1);
break;
}
}
}
}
}
return ret;
},
has: function( target ) {
var targets = jQuery( target );
return this.filter(function() {
for ( var i = 0, l = targets.length; i < l; i++ ) {
if ( jQuery.contains( this, targets[i] ) ) {
return true;
}
}
});
},
not: function( selector ) {
return this.pushStack( winnow(this, selector, false), "not", selector);
},
filter: function( selector ) {
return this.pushStack( winnow(this, selector, true), "filter", selector );
},
is: function( selector ) {
return !!selector && (
typeof selector === "string" ?
// If this is a positional selector, check membership in the returned set
// so $("p:first").is("p:last") won't return true for a doc with two "p".
POS.test( selector ) ?
jQuery( selector, this.context ).index( this[0] ) >= 0 :
jQuery.filter( selector, this ).length > 0 :
this.filter( selector ).length > 0 );
},
closest: function( selectors, context ) {
var ret = [], i, l, cur = this[0];
// Array (deprecated as of jQuery 1.7)
if ( jQuery.isArray( selectors ) ) {
var level = 1;
while ( cur && cur.ownerDocument && cur !== context ) {
for ( i = 0; i < selectors.length; i++ ) {
if ( jQuery( cur ).is( selectors[ i ] ) ) {
ret.push({ selector: selectors[ i ], elem: cur, level: level });
}
}
cur = cur.parentNode;
level++;
}
return ret;
}
// String
var pos = POS.test( selectors ) || typeof selectors !== "string" ?
jQuery( selectors, context || this.context ) :
0;
for ( i = 0, l = this.length; i < l; i++ ) {
cur = this[i];
while ( cur ) {
if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
ret.push( cur );
break;
} else {
cur = cur.parentNode;
if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
break;
}
}
}
}
ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
return this.pushStack( ret, "closest", selectors );
},
// Determine the position of an element within
// the matched set of elements
index: function( elem ) {
// No argument, return index in parent
if ( !elem ) {
return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
}
// index in selector
if ( typeof elem === "string" ) {
return jQuery.inArray( this[0], jQuery( elem ) );
}
// Locate the position of the desired element
return jQuery.inArray(
// If it receives a jQuery object, the first element is used
elem.jquery ? elem[0] : elem, this );
},
add: function( selector, context ) {
var set = typeof selector === "string" ?
jQuery( selector, context ) :
jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
all = jQuery.merge( this.get(), set );
return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
all :
jQuery.unique( all ) );
},
andSelf: function() {
return this.add( this.prevObject );
}
});
// A painfully simple check to see if an element is disconnected
// from a document (should be improved, where feasible).
function isDisconnected( node ) {
return !node || !node.parentNode || node.parentNode.nodeType === 11;
}
jQuery.each({
parent: function( elem ) {
var parent = elem.parentNode;
return parent && parent.nodeType !== 11 ? parent : null;
},
parents: function( elem ) {
return jQuery.dir( elem, "parentNode" );
},
parentsUntil: function( elem, i, until ) {
return jQuery.dir( elem, "parentNode", until );
},
next: function( elem ) {
return jQuery.nth( elem, 2, "nextSibling" );
},
prev: function( elem ) {
return jQuery.nth( elem, 2, "previousSibling" );
},
nextAll: function( elem ) {
return jQuery.dir( elem, "nextSibling" );
},
prevAll: function( elem ) {
return jQuery.dir( elem, "previousSibling" );
},
nextUntil: function( elem, i, until ) {
return jQuery.dir( elem, "nextSibling", until );
},
prevUntil: function( elem, i, until ) {
return jQuery.dir( elem, "previousSibling", until );
},
siblings: function( elem ) {
return jQuery.sibling( elem.parentNode.firstChild, elem );
},
children: function( elem ) {
return jQuery.sibling( elem.firstChild );
},
contents: function( elem ) {
return jQuery.nodeName( elem, "iframe" ) ?
elem.contentDocument || elem.contentWindow.document :
jQuery.makeArray( elem.childNodes );
}
}, function( name, fn ) {
jQuery.fn[ name ] = function( until, selector ) {
var ret = jQuery.map( this, fn, until );
if ( !runtil.test( name ) ) {
selector = until;
}
if ( selector && typeof selector === "string" ) {
ret = jQuery.filter( selector, ret );
}
ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
ret = ret.reverse();
}
return this.pushStack( ret, name, slice.call( arguments ).join(",") );
};
});
jQuery.extend({
filter: function( expr, elems, not ) {
if ( not ) {
expr = ":not(" + expr + ")";
}
return elems.length === 1 ?
jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
jQuery.find.matches(expr, elems);
},
dir: function( elem, dir, until ) {
var matched = [],
cur = elem[ dir ];
while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
if ( cur.nodeType === 1 ) {
matched.push( cur );
}
cur = cur[dir];
}
return matched;
},
nth: function( cur, result, dir, elem ) {
result = result || 1;
var num = 0;
for ( ; cur; cur = cur[dir] ) {
if ( cur.nodeType === 1 && ++num === result ) {
break;
}
}
return cur;
},
sibling: function( n, elem ) {
var r = [];
for ( ; n; n = n.nextSibling ) {
if ( n.nodeType === 1 && n !== elem ) {
r.push( n );
}
}
return r;
}
});
// Implement the identical functionality for filter and not
function winnow( elements, qualifier, keep ) {
// Can't pass null or undefined to indexOf in Firefox 4
// Set to 0 to skip string check
qualifier = qualifier || 0;
if ( jQuery.isFunction( qualifier ) ) {
return jQuery.grep(elements, function( elem, i ) {
var retVal = !!qualifier.call( elem, i, elem );
return retVal === keep;
});
} else if ( qualifier.nodeType ) {
return jQuery.grep(elements, function( elem, i ) {
return ( elem === qualifier ) === keep;
});
} else if ( typeof qualifier === "string" ) {
var filtered = jQuery.grep(elements, function( elem ) {
return elem.nodeType === 1;
});
if ( isSimple.test( qualifier ) ) {
return jQuery.filter(qualifier, filtered, !keep);
} else {
qualifier = jQuery.filter( qualifier, filtered );
}
}
return jQuery.grep(elements, function( elem, i ) {
return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
});
}
function createSafeFragment( document ) {
var list = nodeNames.split( "|" ),
safeFrag = document.createDocumentFragment();
if ( safeFrag.createElement ) {
while ( list.length ) {
safeFrag.createElement(
list.pop()
);
}
}
return safeFrag;
}
var nodeNames = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|" +
"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
rleadingWhitespace = /^\s+/,
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
rtagName = /<([\w:]+)/,
rtbody = /<tbody/i,
rhtml = /<|&#?\w+;/,
rnoInnerhtml = /<(?:script|style)/i,
rnocache = /<(?:script|object|embed|option|style)/i,
rnoshimcache = new RegExp("<(?:" + nodeNames + ")", "i"),
// checked="checked" or checked
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
rscriptType = /\/(java|ecma)script/i,
rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
wrapMap = {
option: [ 1, "<select multiple='multiple'>", "</select>" ],
legend: [ 1, "<fieldset>", "</fieldset>" ],
thead: [ 1, "<table>", "</table>" ],
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
area: [ 1, "<map>", "</map>" ],
_default: [ 0, "", "" ]
},
safeFragment = createSafeFragment( document );
wrapMap.optgroup = wrapMap.option;
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;
// IE can't serialize <link> and <script> tags normally
if ( !jQuery.support.htmlSerialize ) {
wrapMap._default = [ 1, "div<div>", "</div>" ];
}
jQuery.fn.extend({
text: function( text ) {
if ( jQuery.isFunction(text) ) {
return this.each(function(i) {
var self = jQuery( this );
self.text( text.call(this, i, self.text()) );
});
}
if ( typeof text !== "object" && text !== undefined ) {
return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
}
return jQuery.text( this );
},
wrapAll: function( html ) {
if ( jQuery.isFunction( html ) ) {
return this.each(function(i) {
jQuery(this).wrapAll( html.call(this, i) );
});
}
if ( this[0] ) {
// The elements to wrap the target around
var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
if ( this[0].parentNode ) {
wrap.insertBefore( this[0] );
}
wrap.map(function() {
var elem = this;
while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
elem = elem.firstChild;
}
return elem;
}).append( this );
}
return this;
},
wrapInner: function( html ) {
if ( jQuery.isFunction( html ) ) {
return this.each(function(i) {
jQuery(this).wrapInner( html.call(this, i) );
});
}
return this.each(function() {
var self = jQuery( this ),
contents = self.contents();
if ( contents.length ) {
contents.wrapAll( html );
} else {
self.append( html );
}
});
},
wrap: function( html ) {
var isFunction = jQuery.isFunction( html );
return this.each(function(i) {
jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
});
},
unwrap: function() {
return this.parent().each(function() {
if ( !jQuery.nodeName( this, "body" ) ) {
jQuery( this ).replaceWith( this.childNodes );
}
}).end();
},
append: function() {
return this.domManip(arguments, true, function( elem ) {
if ( this.nodeType === 1 ) {
this.appendChild( elem );
}
});
},
prepend: function() {
return this.domManip(arguments, true, function( elem ) {
if ( this.nodeType === 1 ) {
this.insertBefore( elem, this.firstChild );
}
});
},
before: function() {
if ( this[0] && this[0].parentNode ) {
return this.domManip(arguments, false, function( elem ) {
this.parentNode.insertBefore( elem, this );
});
} else if ( arguments.length ) {
var set = jQuery.clean( arguments );
set.push.apply( set, this.toArray() );
return this.pushStack( set, "before", arguments );
}
},
after: function() {
if ( this[0] && this[0].parentNode ) {
return this.domManip(arguments, false, function( elem ) {
this.parentNode.insertBefore( elem, this.nextSibling );
});
} else if ( arguments.length ) {
var set = this.pushStack( this, "after", arguments );
set.push.apply( set, jQuery.clean(arguments) );
return set;
}
},
// keepData is for internal use only--do not document
remove: function( selector, keepData ) {
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
if ( !keepData && elem.nodeType === 1 ) {
jQuery.cleanData( elem.getElementsByTagName("*") );
jQuery.cleanData( [ elem ] );
}
if ( elem.parentNode ) {
elem.parentNode.removeChild( elem );
}
}
}
return this;
},
empty: function() {
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
// Remove element nodes and prevent memory leaks
if ( elem.nodeType === 1 ) {
jQuery.cleanData( elem.getElementsByTagName("*") );
}
// Remove any remaining nodes
while ( elem.firstChild ) {
elem.removeChild( elem.firstChild );
}
}
return this;
},
clone: function( dataAndEvents, deepDataAndEvents ) {
dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
return this.map( function () {
return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
});
},
html: function( value ) {
if ( value === undefined ) {
return this[0] && this[0].nodeType === 1 ?
this[0].innerHTML.replace(rinlinejQuery, "") :
null;
// See if we can take a shortcut and just use innerHTML
} else if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
value = value.replace(rxhtmlTag, "<$1></$2>");
try {
for ( var i = 0, l = this.length; i < l; i++ ) {
// Remove element nodes and prevent memory leaks
if ( this[i].nodeType === 1 ) {
jQuery.cleanData( this[i].getElementsByTagName("*") );
this[i].innerHTML = value;
}
}
// If using innerHTML throws an exception, use the fallback method
} catch(e) {
this.empty().append( value );
}
} else if ( jQuery.isFunction( value ) ) {
this.each(function(i){
var self = jQuery( this );
self.html( value.call(this, i, self.html()) );
});
} else {
this.empty().append( value );
}
return this;
},
replaceWith: function( value ) {
if ( this[0] && this[0].parentNode ) {
// Make sure that the elements are removed from the DOM before they are inserted
// this can help fix replacing a parent with child elements
if ( jQuery.isFunction( value ) ) {
return this.each(function(i) {
var self = jQuery(this), old = self.html();
self.replaceWith( value.call( this, i, old ) );
});
}
if ( typeof value !== "string" ) {
value = jQuery( value ).detach();
}
return this.each(function() {
var next = this.nextSibling,
parent = this.parentNode;
jQuery( this ).remove();
if ( next ) {
jQuery(next).before( value );
} else {
jQuery(parent).append( value );
}
});
} else {
return this.length ?
this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
this;
}
},
detach: function( selector ) {
return this.remove( selector, true );
},
domManip: function( args, table, callback ) {
var results, first, fragment, parent,
value = args[0],
scripts = [];
// We can't cloneNode fragments that contain checked, in WebKit
if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
return this.each(function() {
jQuery(this).domManip( args, table, callback, true );
});
}
if ( jQuery.isFunction(value) ) {
return this.each(function(i) {
var self = jQuery(this);
args[0] = value.call(this, i, table ? self.html() : undefined);
self.domManip( args, table, callback );
});
}
if ( this[0] ) {
parent = value && value.parentNode;
// If we're in a fragment, just use that instead of building a new one
if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
results = { fragment: parent };
} else {
results = jQuery.buildFragment( args, this, scripts );
}
fragment = results.fragment;
if ( fragment.childNodes.length === 1 ) {
first = fragment = fragment.firstChild;
} else {
first = fragment.firstChild;
}
if ( first ) {
table = table && jQuery.nodeName( first, "tr" );
for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
callback.call(
table ?
root(this[i], first) :
this[i],
// Make sure that we do not leak memory by inadvertently discarding
// the original fragment (which might have attached data) instead of
// using it; in addition, use the original fragment object for the last
// item instead of first because it can end up being emptied incorrectly
// in certain situations (Bug #8070).
// Fragments from the fragment cache must always be cloned and never used
// in place.
results.cacheable || ( l > 1 && i < lastIndex ) ?
jQuery.clone( fragment, true, true ) :
fragment
);
}
}
if ( scripts.length ) {
jQuery.each( scripts, evalScript );
}
}
return this;
}
});
function root( elem, cur ) {
return jQuery.nodeName(elem, "table") ?
(elem.getElementsByTagName("tbody")[0] ||
elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
elem;
}
function cloneCopyEvent( src, dest ) {
if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
return;
}
var type, i, l,
oldData = jQuery._data( src ),
curData = jQuery._data( dest, oldData ),
events = oldData.events;
if ( events ) {
delete curData.handle;
curData.events = {};
for ( type in events ) {
for ( i = 0, l = events[ type ].length; i < l; i++ ) {
jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
}
}
}
// make the cloned public data object a copy from the original
if ( curData.data ) {
curData.data = jQuery.extend( {}, curData.data );
}
}
function cloneFixAttributes( src, dest ) {
var nodeName;
// We do not need to do anything for non-Elements
if ( dest.nodeType !== 1 ) {
return;
}
// clearAttributes removes the attributes, which we don't want,
// but also removes the attachEvent events, which we *do* want
if ( dest.clearAttributes ) {
dest.clearAttributes();
}
// mergeAttributes, in contrast, only merges back on the
// original attributes, not the events
if ( dest.mergeAttributes ) {
dest.mergeAttributes( src );
}
nodeName = dest.nodeName.toLowerCase();
// IE6-8 fail to clone children inside object elements that use
// the proprietary classid attribute value (rather than the type
// attribute) to identify the type of content to display
if ( nodeName === "object" ) {
dest.outerHTML = src.outerHTML;
} else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
// IE6-8 fails to persist the checked state of a cloned checkbox
// or radio button. Worse, IE6-7 fail to give the cloned element
// a checked appearance if the defaultChecked value isn't also set
if ( src.checked ) {
dest.defaultChecked = dest.checked = src.checked;
}
// IE6-7 get confused and end up setting the value of a cloned
// checkbox/radio button to an empty string instead of "on"
if ( dest.value !== src.value ) {
dest.value = src.value;
}
// IE6-8 fails to return the selected option to the default selected
// state when cloning options
} else if ( nodeName === "option" ) {
dest.selected = src.defaultSelected;
// IE6-8 fails to set the defaultValue to the correct value when
// cloning other types of input fields
} else if ( nodeName === "input" || nodeName === "textarea" ) {
dest.defaultValue = src.defaultValue;
}
// Event data gets referenced instead of copied if the expando
// gets copied too
dest.removeAttribute( jQuery.expando );
}
jQuery.buildFragment = function( args, nodes, scripts ) {
var fragment, cacheable, cacheresults, doc,
first = args[ 0 ];
// nodes may contain either an explicit document object,
// a jQuery collection or context object.
// If nodes[0] contains a valid object to assign to doc
if ( nodes && nodes[0] ) {
doc = nodes[0].ownerDocument || nodes[0];
}
// Ensure that an attr object doesn't incorrectly stand in as a document object
// Chrome and Firefox seem to allow this to occur and will throw exception
// Fixes #8950
if ( !doc.createDocumentFragment ) {
doc = document;
}
// Only cache "small" (1/2 KB) HTML strings that are associated with the main document
// Cloning options loses the selected state, so don't cache them
// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
// Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
first.charAt(0) === "<" && !rnocache.test( first ) &&
(jQuery.support.checkClone || !rchecked.test( first )) &&
(jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
cacheable = true;
cacheresults = jQuery.fragments[ first ];
if ( cacheresults && cacheresults !== 1 ) {
fragment = cacheresults;
}
}
if ( !fragment ) {
fragment = doc.createDocumentFragment();
jQuery.clean( args, doc, fragment, scripts );
}
if ( cacheable ) {
jQuery.fragments[ first ] = cacheresults ? fragment : 1;
}
return { fragment: fragment, cacheable: cacheable };
};
jQuery.fragments = {};
jQuery.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function( name, original ) {
jQuery.fn[ name ] = function( selector ) {
var ret = [],
insert = jQuery( selector ),
parent = this.length === 1 && this[0].parentNode;
if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
insert[ original ]( this[0] );
return this;
} else {
for ( var i = 0, l = insert.length; i < l; i++ ) {
var elems = ( i > 0 ? this.clone(true) : this ).get();
jQuery( insert[i] )[ original ]( elems );
ret = ret.concat( elems );
}
return this.pushStack( ret, name, insert.selector );
}
};
});
function getAll( elem ) {
if ( typeof elem.getElementsByTagName !== "undefined" ) {
return elem.getElementsByTagName( "*" );
} else if ( typeof elem.querySelectorAll !== "undefined" ) {
return elem.querySelectorAll( "*" );
} else {
return [];
}
}
// Used in clean, fixes the defaultChecked property
function fixDefaultChecked( elem ) {
if ( elem.type === "checkbox" || elem.type === "radio" ) {
elem.defaultChecked = elem.checked;
}
}
// Finds all inputs and passes them to fixDefaultChecked
function findInputs( elem ) {
var nodeName = ( elem.nodeName || "" ).toLowerCase();
if ( nodeName === "input" ) {
fixDefaultChecked( elem );
// Skip scripts, get other children
} else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) {
jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
}
}
// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js
function shimCloneNode( elem ) {
var div = document.createElement( "div" );
safeFragment.appendChild( div );
div.innerHTML = elem.outerHTML;
return div.firstChild;
}
jQuery.extend({
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
var srcElements,
destElements,
i,
// IE<=8 does not properly clone detached, unknown element nodes
clone = jQuery.support.html5Clone || !rnoshimcache.test( "<" + elem.nodeName ) ?
elem.cloneNode( true ) :
shimCloneNode( elem );
if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
// IE copies events bound via attachEvent when using cloneNode.
// Calling detachEvent on the clone will also remove the events
// from the original. In order to get around this, we use some
// proprietary methods to clear the events. Thanks to MooTools
// guys for this hotness.
cloneFixAttributes( elem, clone );
// Using Sizzle here is crazy slow, so we use getElementsByTagName instead
srcElements = getAll( elem );
destElements = getAll( clone );
// Weird iteration because IE will replace the length property
// with an element if you are cloning the body and one of the
// elements on the page has a name or id of "length"
for ( i = 0; srcElements[i]; ++i ) {
// Ensure that the destination node is not null; Fixes #9587
if ( destElements[i] ) {
cloneFixAttributes( srcElements[i], destElements[i] );
}
}
}
// Copy the events from the original to the clone
if ( dataAndEvents ) {
cloneCopyEvent( elem, clone );
if ( deepDataAndEvents ) {
srcElements = getAll( elem );
destElements = getAll( clone );
for ( i = 0; srcElements[i]; ++i ) {
cloneCopyEvent( srcElements[i], destElements[i] );
}
}
}
srcElements = destElements = null;
// Return the cloned set
return clone;
},
clean: function( elems, context, fragment, scripts ) {
var checkScriptType;
context = context || document;
// !context.createElement fails in IE with an error but returns typeof 'object'
if ( typeof context.createElement === "undefined" ) {
context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
}
var ret = [], j;
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
if ( typeof elem === "number" ) {
elem += "";
}
if ( !elem ) {
continue;
}
// Convert html string into DOM nodes
if ( typeof elem === "string" ) {
if ( !rhtml.test( elem ) ) {
elem = context.createTextNode( elem );
} else {
// Fix "XHTML"-style tags in all browsers
elem = elem.replace(rxhtmlTag, "<$1></$2>");
// Trim whitespace, otherwise indexOf won't work as expected
var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
wrap = wrapMap[ tag ] || wrapMap._default,
depth = wrap[0],
div = context.createElement("div");
// Append wrapper element to unknown element safe doc fragment
if ( context === document ) {
// Use the fragment we've already created for this document
safeFragment.appendChild( div );
} else {
// Use a fragment created with the owner document
createSafeFragment( context ).appendChild( div );
}
// Go to html and back, then peel off extra wrappers
div.innerHTML = wrap[1] + elem + wrap[2];
// Move to the right depth
while ( depth-- ) {
div = div.lastChild;
}
// Remove IE's autoinserted <tbody> from table fragments
if ( !jQuery.support.tbody ) {
// String was a <table>, *may* have spurious <tbody>
var hasBody = rtbody.test(elem),
tbody = tag === "table" && !hasBody ?
div.firstChild && div.firstChild.childNodes :
// String was a bare <thead> or <tfoot>
wrap[1] === "<table>" && !hasBody ?
div.childNodes :
[];
for ( j = tbody.length - 1; j >= 0 ; --j ) {
if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
tbody[ j ].parentNode.removeChild( tbody[ j ] );
}
}
}
// IE completely kills leading whitespace when innerHTML is used
if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
}
elem = div.childNodes;
}
}
// Resets defaultChecked for any radios and checkboxes
// about to be appended to the DOM in IE 6/7 (#8060)
var len;
if ( !jQuery.support.appendChecked ) {
if ( elem[0] && typeof (len = elem.length) === "number" ) {
for ( j = 0; j < len; j++ ) {
findInputs( elem[j] );
}
} else {
findInputs( elem );
}
}
if ( elem.nodeType ) {
ret.push( elem );
} else {
ret = jQuery.merge( ret, elem );
}
}
if ( fragment ) {
checkScriptType = function( elem ) {
return !elem.type || rscriptType.test( elem.type );
};
for ( i = 0; ret[i]; i++ ) {
if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
} else {
if ( ret[i].nodeType === 1 ) {
var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
}
fragment.appendChild( ret[i] );
}
}
}
return ret;
},
cleanData: function( elems ) {
var data, id,
cache = jQuery.cache,
special = jQuery.event.special,
deleteExpando = jQuery.support.deleteExpando;
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
continue;
}
id = elem[ jQuery.expando ];
if ( id ) {
data = cache[ id ];
if ( data && data.events ) {
for ( var type in data.events ) {
if ( special[ type ] ) {
jQuery.event.remove( elem, type );
// This is a shortcut to avoid jQuery.event.remove's overhead
} else {
jQuery.removeEvent( elem, type, data.handle );
}
}
// Null the DOM reference to avoid IE6/7/8 leak (#7054)
if ( data.handle ) {
data.handle.elem = null;
}
}
if ( deleteExpando ) {
delete elem[ jQuery.expando ];
} else if ( elem.removeAttribute ) {
elem.removeAttribute( jQuery.expando );
}
delete cache[ id ];
}
}
}
});
function evalScript( i, elem ) {
if ( elem.src ) {
jQuery.ajax({
url: elem.src,
async: false,
dataType: "script"
});
} else {
jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
}
if ( elem.parentNode ) {
elem.parentNode.removeChild( elem );
}
}
var ralpha = /alpha\([^)]*\)/i,
ropacity = /opacity=([^)]*)/,
// fixed for IE9, see #8346
rupper = /([A-Z]|^ms)/g,
rnumpx = /^-?\d+(?:px)?$/i,
rnum = /^-?\d/,
rrelNum = /^([\-+])=([\-+.\de]+)/,
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
cssWidth = [ "Left", "Right" ],
cssHeight = [ "Top", "Bottom" ],
curCSS,
getComputedStyle,
currentStyle;
jQuery.fn.css = function( name, value ) {
// Setting 'undefined' is a no-op
if ( arguments.length === 2 && value === undefined ) {
return this;
}
return jQuery.access( this, name, value, true, function( elem, name, value ) {
return value !== undefined ?
jQuery.style( elem, name, value ) :
jQuery.css( elem, name );
});
};
jQuery.extend({
// Add in style property hooks for overriding the default
// behavior of getting and setting a style property
cssHooks: {
opacity: {
get: function( elem, computed ) {
if ( computed ) {
// We should always get a number back from opacity
var ret = curCSS( elem, "opacity", "opacity" );
return ret === "" ? "1" : ret;
} else {
return elem.style.opacity;
}
}
}
},
// Exclude the following css properties to add px
cssNumber: {
"fillOpacity": true,
"fontWeight": true,
"lineHeight": true,
"opacity": true,
"orphans": true,
"widows": true,
"zIndex": true,
"zoom": true
},
// Add in properties whose names you wish to fix before
// setting or getting the value
cssProps: {
// normalize float css property
"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
},
// Get and set the style property on a DOM Node
style: function( elem, name, value, extra ) {
// Don't set styles on text and comment nodes
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
return;
}
// Make sure that we're working with the right name
var ret, type, origName = jQuery.camelCase( name ),
style = elem.style, hooks = jQuery.cssHooks[ origName ];
name = jQuery.cssProps[ origName ] || origName;
// Check if we're setting a value
if ( value !== undefined ) {
type = typeof value;
// convert relative number strings (+= or -=) to relative numbers. #7345
if ( type === "string" && (ret = rrelNum.exec( value )) ) {
value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );
// Fixes bug #9237
type = "number";
}
// Make sure that NaN and null values aren't set. See: #7116
if ( value == null || type === "number" && isNaN( value ) ) {
return;
}
// If a number was passed in, add 'px' to the (except for certain CSS properties)
if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
value += "px";
}
// If a hook was provided, use that value, otherwise just set the specified value
if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
// Fixes bug #5509
try {
style[ name ] = value;
} catch(e) {}
}
} else {
// If a hook was provided get the non-computed value from there
if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
return ret;
}
// Otherwise just get the value from the style object
return style[ name ];
}
},
css: function( elem, name, extra ) {
var ret, hooks;
// Make sure that we're working with the right name
name = jQuery.camelCase( name );
hooks = jQuery.cssHooks[ name ];
name = jQuery.cssProps[ name ] || name;
// cssFloat needs a special treatment
if ( name === "cssFloat" ) {
name = "float";
}
// If a hook was provided get the computed value from there
if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
return ret;
// Otherwise, if a way to get the computed value exists, use that
} else if ( curCSS ) {
return curCSS( elem, name );
}
},
// A method for quickly swapping in/out CSS properties to get correct calculations
swap: function( elem, options, callback ) {
var old = {};
// Remember the old values, and insert the new ones
for ( var name in options ) {
old[ name ] = elem.style[ name ];
elem.style[ name ] = options[ name ];
}
callback.call( elem );
// Revert the old values
for ( name in options ) {
elem.style[ name ] = old[ name ];
}
}
});
// DEPRECATED, Use jQuery.css() instead
jQuery.curCSS = jQuery.css;
jQuery.each(["height", "width"], function( i, name ) {
jQuery.cssHooks[ name ] = {
get: function( elem, computed, extra ) {
var val;
if ( computed ) {
if ( elem.offsetWidth !== 0 ) {
return getWH( elem, name, extra );
} else {
jQuery.swap( elem, cssShow, function() {
val = getWH( elem, name, extra );
});
}
return val;
}
},
set: function( elem, value ) {
if ( rnumpx.test( value ) ) {
// ignore negative width and height values #1599
value = parseFloat( value );
if ( value >= 0 ) {
return value + "px";
}
} else {
return value;
}
}
};
});
if ( !jQuery.support.opacity ) {
jQuery.cssHooks.opacity = {
get: function( elem, computed ) {
// IE uses filters for opacity
return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
( parseFloat( RegExp.$1 ) / 100 ) + "" :
computed ? "1" : "";
},
set: function( elem, value ) {
var style = elem.style,
currentStyle = elem.currentStyle,
opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
filter = currentStyle && currentStyle.filter || style.filter || "";
// IE has trouble with opacity if it does not have layout
// Force it by setting the zoom level
style.zoom = 1;
// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
// if "filter:" is present at all, clearType is disabled, we want to avoid this
// style.removeAttribute is IE Only, but so apparently is this code path...
style.removeAttribute( "filter" );
// if there there is no filter style applied in a css rule, we are done
if ( currentStyle && !currentStyle.filter ) {
return;
}
}
// otherwise, set new filter values
style.filter = ralpha.test( filter ) ?
filter.replace( ralpha, opacity ) :
filter + " " + opacity;
}
};
}
jQuery(function() {
// This hook cannot be added until DOM ready because the support test
// for it is not run until after DOM ready
if ( !jQuery.support.reliableMarginRight ) {
jQuery.cssHooks.marginRight = {
get: function( elem, computed ) {
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
// Work around by temporarily setting element display to inline-block
var ret;
jQuery.swap( elem, { "display": "inline-block" }, function() {
if ( computed ) {
ret = curCSS( elem, "margin-right", "marginRight" );
} else {
ret = elem.style.marginRight;
}
});
return ret;
}
};
}
});
if ( document.defaultView && document.defaultView.getComputedStyle ) {
getComputedStyle = function( elem, name ) {
var ret, defaultView, computedStyle;
name = name.replace( rupper, "-$1" ).toLowerCase();
if ( (defaultView = elem.ownerDocument.defaultView) &&
(computedStyle = defaultView.getComputedStyle( elem, null )) ) {
ret = computedStyle.getPropertyValue( name );
if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
ret = jQuery.style( elem, name );
}
}
return ret;
};
}
if ( document.documentElement.currentStyle ) {
currentStyle = function( elem, name ) {
var left, rsLeft, uncomputed,
ret = elem.currentStyle && elem.currentStyle[ name ],
style = elem.style;
// Avoid setting ret to empty string here
// so we don't default to auto
if ( ret === null && style && (uncomputed = style[ name ]) ) {
ret = uncomputed;
}
// From the awesome hack by Dean Edwards
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
// If we're not dealing with a regular pixel number
// but a number that has a weird ending, we need to convert it to pixels
if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
// Remember the original values
left = style.left;
rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
// Put in the new values to get a computed value out
if ( rsLeft ) {
elem.runtimeStyle.left = elem.currentStyle.left;
}
style.left = name === "fontSize" ? "1em" : ( ret || 0 );
ret = style.pixelLeft + "px";
// Revert the changed values
style.left = left;
if ( rsLeft ) {
elem.runtimeStyle.left = rsLeft;
}
}
return ret === "" ? "auto" : ret;
};
}
curCSS = getComputedStyle || currentStyle;
function getWH( elem, name, extra ) {
// Start with offset property
var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
which = name === "width" ? cssWidth : cssHeight,
i = 0,
len = which.length;
if ( val > 0 ) {
if ( extra !== "border" ) {
for ( ; i < len; i++ ) {
if ( !extra ) {
val -= parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0;
}
if ( extra === "margin" ) {
val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;
} else {
val -= parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0;
}
}
}
return val + "px";
}
// Fall back to computed then uncomputed css if necessary
val = curCSS( elem, name, name );
if ( val < 0 || val == null ) {
val = elem.style[ name ] || 0;
}
// Normalize "", auto, and prepare for extra
val = parseFloat( val ) || 0;
// Add padding, border, margin
if ( extra ) {
for ( ; i < len; i++ ) {
val += parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0;
if ( extra !== "padding" ) {
val += parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0;
}
if ( extra === "margin" ) {
val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;
}
}
}
return val + "px";
}
if ( jQuery.expr && jQuery.expr.filters ) {
jQuery.expr.filters.hidden = function( elem ) {
var width = elem.offsetWidth,
height = elem.offsetHeight;
return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
};
jQuery.expr.filters.visible = function( elem ) {
return !jQuery.expr.filters.hidden( elem );
};
}
var r20 = /%20/g,
rbracket = /\[\]$/,
rCRLF = /\r?\n/g,
rhash = /#.*$/,
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
// #7653, #8125, #8152: local protocol detection
rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
rnoContent = /^(?:GET|HEAD)$/,
rprotocol = /^\/\//,
rquery = /\?/,
rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
rselectTextarea = /^(?:select|textarea)/i,
rspacesAjax = /\s+/,
rts = /([?&])_=[^&]*/,
rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
// Keep a copy of the old load method
_load = jQuery.fn.load,
/* Prefilters
* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
* 2) These are called:
* - BEFORE asking for a transport
* - AFTER param serialization (s.data is a string if s.processData is true)
* 3) key is the dataType
* 4) the catchall symbol "*" can be used
* 5) execution will start with transport dataType and THEN continue down to "*" if needed
*/
prefilters = {},
/* Transports bindings
* 1) key is the dataType
* 2) the catchall symbol "*" can be used
* 3) selection will start with transport dataType and THEN go to "*" if needed
*/
transports = {},
// Document location
ajaxLocation,
// Document location segments
ajaxLocParts,
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
allTypes = ["*/"] + ["*"];
// #8138, IE may throw an exception when accessing
// a field from window.location if document.domain has been set
try {
ajaxLocation = location.href;
} catch( e ) {
// Use the href attribute of an A element
// since IE will modify it given document.location
ajaxLocation = document.createElement( "a" );
ajaxLocation.href = "";
ajaxLocation = ajaxLocation.href;
}
// Segment location into parts
ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
function addToPrefiltersOrTransports( structure ) {
// dataTypeExpression is optional and defaults to "*"
return function( dataTypeExpression, func ) {
if ( typeof dataTypeExpression !== "string" ) {
func = dataTypeExpression;
dataTypeExpression = "*";
}
if ( jQuery.isFunction( func ) ) {
var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
i = 0,
length = dataTypes.length,
dataType,
list,
placeBefore;
// For each dataType in the dataTypeExpression
for ( ; i < length; i++ ) {
dataType = dataTypes[ i ];
// We control if we're asked to add before
// any existing element
placeBefore = /^\+/.test( dataType );
if ( placeBefore ) {
dataType = dataType.substr( 1 ) || "*";
}
list = structure[ dataType ] = structure[ dataType ] || [];
// then we add to the structure accordingly
list[ placeBefore ? "unshift" : "push" ]( func );
}
}
};
}
// Base inspection function for prefilters and transports
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
dataType /* internal */, inspected /* internal */ ) {
dataType = dataType || options.dataTypes[ 0 ];
inspected = inspected || {};
inspected[ dataType ] = true;
var list = structure[ dataType ],
i = 0,
length = list ? list.length : 0,
executeOnly = ( structure === prefilters ),
selection;
for ( ; i < length && ( executeOnly || !selection ); i++ ) {
selection = list[ i ]( options, originalOptions, jqXHR );
// If we got redirected to another dataType
// we try there if executing only and not done already
if ( typeof selection === "string" ) {
if ( !executeOnly || inspected[ selection ] ) {
selection = undefined;
} else {
options.dataTypes.unshift( selection );
selection = inspectPrefiltersOrTransports(
structure, options, originalOptions, jqXHR, selection, inspected );
}
}
}
// If we're only executing or nothing was selected
// we try the catchall dataType if not done already
if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
selection = inspectPrefiltersOrTransports(
structure, options, originalOptions, jqXHR, "*", inspected );
}
// unnecessary when only executing (prefilters)
// but it'll be ignored by the caller in that case
return selection;
}
// A special extend for ajax options
// that takes "flat" options (not to be deep extended)
// Fixes #9887
function ajaxExtend( target, src ) {
var key, deep,
flatOptions = jQuery.ajaxSettings.flatOptions || {};
for ( key in src ) {
if ( src[ key ] !== undefined ) {
( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
}
}
if ( deep ) {
jQuery.extend( true, target, deep );
}
}
jQuery.fn.extend({
load: function( url, params, callback ) {
if ( typeof url !== "string" && _load ) {
return _load.apply( this, arguments );
// Don't do a request if no elements are being requested
} else if ( !this.length ) {
return this;
}
var off = url.indexOf( " " );
if ( off >= 0 ) {
var selector = url.slice( off, url.length );
url = url.slice( 0, off );
}
// Default to a GET request
var type = "GET";
// If the second parameter was provided
if ( params ) {
// If it's a function
if ( jQuery.isFunction( params ) ) {
// We assume that it's the callback
callback = params;
params = undefined;
// Otherwise, build a param string
} else if ( typeof params === "object" ) {
params = jQuery.param( params, jQuery.ajaxSettings.traditional );
type = "POST";
}
}
var self = this;
// Request the remote document
jQuery.ajax({
url: url,
type: type,
dataType: "html",
data: params,
// Complete callback (responseText is used internally)
complete: function( jqXHR, status, responseText ) {
// Store the response as specified by the jqXHR object
responseText = jqXHR.responseText;
// If successful, inject the HTML into all the matched elements
if ( jqXHR.isResolved() ) {
// #4825: Get the actual response in case
// a dataFilter is present in ajaxSettings
jqXHR.done(function( r ) {
responseText = r;
});
// See if a selector was specified
self.html( selector ?
// Create a dummy div to hold the results
jQuery("<div>")
// inject the contents of the document in, removing the scripts
// to avoid any 'Permission Denied' errors in IE
.append(responseText.replace(rscript, ""))
// Locate the specified elements
.find(selector) :
// If not, just inject the full result
responseText );
}
if ( callback ) {
self.each( callback, [ responseText, status, jqXHR ] );
}
}
});
return this;
},
serialize: function() {
return jQuery.param( this.serializeArray() );
},
serializeArray: function() {
return this.map(function(){
return this.elements ? jQuery.makeArray( this.elements ) : this;
})
.filter(function(){
return this.name && !this.disabled &&
( this.checked || rselectTextarea.test( this.nodeName ) ||
rinput.test( this.type ) );
})
.map(function( i, elem ){
var val = jQuery( this ).val();
return val == null ?
null :
jQuery.isArray( val ) ?
jQuery.map( val, function( val, i ){
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
}) :
{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
}).get();
}
});
// Attach a bunch of functions for handling common AJAX events
jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
jQuery.fn[ o ] = function( f ){
return this.on( o, f );
};
});
jQuery.each( [ "get", "post" ], function( i, method ) {
jQuery[ method ] = function( url, data, callback, type ) {
// shift arguments if data argument was omitted
if ( jQuery.isFunction( data ) ) {
type = type || callback;
callback = data;
data = undefined;
}
return jQuery.ajax({
type: method,
url: url,
data: data,
success: callback,
dataType: type
});
};
});
jQuery.extend({
getScript: function( url, callback ) {
return jQuery.get( url, undefined, callback, "script" );
},
getJSON: function( url, data, callback ) {
return jQuery.get( url, data, callback, "json" );
},
// Creates a full fledged settings object into target
// with both ajaxSettings and settings fields.
// If target is omitted, writes into ajaxSettings.
ajaxSetup: function( target, settings ) {
if ( settings ) {
// Building a settings object
ajaxExtend( target, jQuery.ajaxSettings );
} else {
// Extending ajaxSettings
settings = target;
target = jQuery.ajaxSettings;
}
ajaxExtend( target, settings );
return target;
},
ajaxSettings: {
url: ajaxLocation,
isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
global: true,
type: "GET",
contentType: "application/x-www-form-urlencoded",
processData: true,
async: true,
/*
timeout: 0,
data: null,
dataType: null,
username: null,
password: null,
cache: null,
traditional: false,
headers: {},
*/
accepts: {
xml: "application/xml, text/xml",
html: "text/html",
text: "text/plain",
json: "application/json, text/javascript",
"*": allTypes
},
contents: {
xml: /xml/,
html: /html/,
json: /json/
},
responseFields: {
xml: "responseXML",
text: "responseText"
},
// List of data converters
// 1) key format is "source_type destination_type" (a single space in-between)
// 2) the catchall symbol "*" can be used for source_type
converters: {
// Convert anything to text
"* text": window.String,
// Text to html (true = no transformation)
"text html": true,
// Evaluate text as a json expression
"text json": jQuery.parseJSON,
// Parse text as xml
"text xml": jQuery.parseXML
},
// For options that shouldn't be deep extended:
// you can add your own custom options here if
// and when you create one that shouldn't be
// deep extended (see ajaxExtend)
flatOptions: {
context: true,
url: true
}
},
ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
ajaxTransport: addToPrefiltersOrTransports( transports ),
// Main method
ajax: function( url, options ) {
// If url is an object, simulate pre-1.5 signature
if ( typeof url === "object" ) {
options = url;
url = undefined;
}
// Force options to be an object
options = options || {};
var // Create the final options object
s = jQuery.ajaxSetup( {}, options ),
// Callbacks context
callbackContext = s.context || s,
// Context for global events
// It's the callbackContext if one was provided in the options
// and if it's a DOM node or a jQuery collection
globalEventContext = callbackContext !== s &&
( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
jQuery( callbackContext ) : jQuery.event,
// Deferreds
deferred = jQuery.Deferred(),
completeDeferred = jQuery.Callbacks( "once memory" ),
// Checked-dependent callbacks
statusCode = s.statusCode || {},
// ifModified key
ifModifiedKey,
// Headers (they are sent all at once)
requestHeaders = {},
requestHeadersNames = {},
// Response headers
responseHeadersString,
responseHeaders,
// transport
transport,
// timeout handle
timeoutTimer,
// Cross-domain detection vars
parts,
// The jqXHR state
state = 0,
// To know if global events are to be dispatched
fireGlobals,
// Loop variable
i,
// Fake xhr
jqXHR = {
readyState: 0,
// Caches the header
setRequestHeader: function( name, value ) {
if ( !state ) {
var lname = name.toLowerCase();
name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
requestHeaders[ name ] = value;
}
return this;
},
// Raw string
getAllResponseHeaders: function() {
return state === 2 ? responseHeadersString : null;
},
// Builds headers hashtable if needed
getResponseHeader: function( key ) {
var match;
if ( state === 2 ) {
if ( !responseHeaders ) {
responseHeaders = {};
while( ( match = rheaders.exec( responseHeadersString ) ) ) {
responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
}
}
match = responseHeaders[ key.toLowerCase() ];
}
return match === undefined ? null : match;
},
// Overrides response content-type header
overrideMimeType: function( type ) {
if ( !state ) {
s.mimeType = type;
}
return this;
},
// Cancel the request
abort: function( statusText ) {
statusText = statusText || "abort";
if ( transport ) {
transport.abort( statusText );
}
done( 0, statusText );
return this;
}
};
// Callback for when everything is done
// It is defined here because jslint complains if it is declared
// at the end of the function (which would be more logical and readable)
function done( status, nativeStatusText, responses, headers ) {
// Called once
if ( state === 2 ) {
return;
}
// State is "done" now
state = 2;
// Clear timeout if it exists
if ( timeoutTimer ) {
clearTimeout( timeoutTimer );
}
// Dereference transport for early garbage collection
// (no matter how long the jqXHR object will be used)
transport = undefined;
// Cache response headers
responseHeadersString = headers || "";
// Set readyState
jqXHR.readyState = status > 0 ? 4 : 0;
var isSuccess,
success,
error,
statusText = nativeStatusText,
response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
lastModified,
etag;
// If successful, handle type chaining
if ( status >= 200 && status < 300 || status === 304 ) {
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
if ( s.ifModified ) {
if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
jQuery.lastModified[ ifModifiedKey ] = lastModified;
}
if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
jQuery.etag[ ifModifiedKey ] = etag;
}
}
// If not modified
if ( status === 304 ) {
statusText = "notmodified";
isSuccess = true;
// If we have data
} else {
try {
success = ajaxConvert( s, response );
statusText = "success";
isSuccess = true;
} catch(e) {
// We have a parsererror
statusText = "parsererror";
error = e;
}
}
} else {
// We extract error from statusText
// then normalize statusText and status for non-aborts
error = statusText;
if ( !statusText || status ) {
statusText = "error";
if ( status < 0 ) {
status = 0;
}
}
}
// Set data for the fake xhr object
jqXHR.status = status;
jqXHR.statusText = "" + ( nativeStatusText || statusText );
// Success/Error
if ( isSuccess ) {
deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
} else {
deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
}
// Checked-dependent callbacks
jqXHR.statusCode( statusCode );
statusCode = undefined;
if ( fireGlobals ) {
globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
[ jqXHR, s, isSuccess ? success : error ] );
}
// Complete
completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
if ( fireGlobals ) {
globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
// Handle the global AJAX counter
if ( !( --jQuery.active ) ) {
jQuery.event.trigger( "ajaxStop" );
}
}
}
// Attach deferreds
deferred.promise( jqXHR );
jqXHR.success = jqXHR.done;
jqXHR.error = jqXHR.fail;
jqXHR.complete = completeDeferred.add;
// Checked-dependent callbacks
jqXHR.statusCode = function( map ) {
if ( map ) {
var tmp;
if ( state < 2 ) {
for ( tmp in map ) {
statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
}
} else {
tmp = map[ jqXHR.status ];
jqXHR.then( tmp, tmp );
}
}
return this;
};
// Remove hash character (#7531: and string promotion)
// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
// We also use the url parameter if available
s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
// Extract dataTypes list
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
// Determine if a cross-domain request is in order
if ( s.crossDomain == null ) {
parts = rurl.exec( s.url.toLowerCase() );
s.crossDomain = !!( parts &&
( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
);
}
// Convert data if not already a string
if ( s.data && s.processData && typeof s.data !== "string" ) {
s.data = jQuery.param( s.data, s.traditional );
}
// Apply prefilters
inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
// If request was aborted inside a prefiler, stop there
if ( state === 2 ) {
return false;
}
// We can fire global events as of now if asked to
fireGlobals = s.global;
// Uppercase the type
s.type = s.type.toUpperCase();
// Determine if request has content
s.hasContent = !rnoContent.test( s.type );
// Watch for a new set of requests
if ( fireGlobals && jQuery.active++ === 0 ) {
jQuery.event.trigger( "ajaxStart" );
}
// More options handling for requests with no content
if ( !s.hasContent ) {
// If data is available, append data to url
if ( s.data ) {
s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
// #9682: remove data so that it's not used in an eventual retry
delete s.data;
}
// Get ifModifiedKey before adding the anti-cache parameter
ifModifiedKey = s.url;
// Add anti-cache in url if needed
if ( s.cache === false ) {
var ts = jQuery.now(),
// try replacing _= if it is there
ret = s.url.replace( rts, "$1_=" + ts );
// if nothing was replaced, add timestamp to the end
s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
}
}
// Set the correct header, if data is being sent
if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
jqXHR.setRequestHeader( "Content-Type", s.contentType );
}
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
if ( s.ifModified ) {
ifModifiedKey = ifModifiedKey || s.url;
if ( jQuery.lastModified[ ifModifiedKey ] ) {
jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
}
if ( jQuery.etag[ ifModifiedKey ] ) {
jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
}
}
// Set the Accepts header for the server, depending on the dataType
jqXHR.setRequestHeader(
"Accept",
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
s.accepts[ "*" ]
);
// Check for headers option
for ( i in s.headers ) {
jqXHR.setRequestHeader( i, s.headers[ i ] );
}
// Allow custom headers/mimetypes and early abort
if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
// Abort if not done already
jqXHR.abort();
return false;
}
// Install callbacks on deferreds
for ( i in { success: 1, error: 1, complete: 1 } ) {
jqXHR[ i ]( s[ i ] );
}
// Get transport
transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
// If no transport, we auto-abort
if ( !transport ) {
done( -1, "No Transport" );
} else {
jqXHR.readyState = 1;
// Send global event
if ( fireGlobals ) {
globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
}
// Timeout
if ( s.async && s.timeout > 0 ) {
timeoutTimer = setTimeout( function(){
jqXHR.abort( "timeout" );
}, s.timeout );
}
try {
state = 1;
transport.send( requestHeaders, done );
} catch (e) {
// Propagate exception as error if not done
if ( state < 2 ) {
done( -1, e );
// Simply rethrow otherwise
} else {
throw e;
}
}
}
return jqXHR;
},
// Serialize an array of form elements or a set of
// key/values into a query string
param: function( a, traditional ) {
var s = [],
add = function( key, value ) {
// If value is a function, invoke it and return its value
value = jQuery.isFunction( value ) ? value() : value;
s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
};
// Set traditional to true for jQuery <= 1.3.2 behavior.
if ( traditional === undefined ) {
traditional = jQuery.ajaxSettings.traditional;
}
// If an array was passed in, assume that it is an array of form elements.
if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
// Serialize the form elements
jQuery.each( a, function() {
add( this.name, this.value );
});
} else {
// If traditional, encode the "old" way (the way 1.3.2 or older
// did it), otherwise encode params recursively.
for ( var prefix in a ) {
buildParams( prefix, a[ prefix ], traditional, add );
}
}
// Return the resulting serialization
return s.join( "&" ).replace( r20, "+" );
}
});
function buildParams( prefix, obj, traditional, add ) {
if ( jQuery.isArray( obj ) ) {
// Serialize array item.
jQuery.each( obj, function( i, v ) {
if ( traditional || rbracket.test( prefix ) ) {
// Treat each array item as a scalar.
add( prefix, v );
} else {
// If array item is non-scalar (array or object), encode its
// numeric index to resolve deserialization ambiguity issues.
// Note that rack (as of 1.0.0) can't currently deserialize
// nested arrays properly, and attempting to do so may cause
// a server error. Possible fixes are to modify rack's
// deserialization algorithm or to provide an option or flag
// to force array serialization to be shallow.
buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
}
});
} else if ( !traditional && obj != null && typeof obj === "object" ) {
// Serialize object item.
for ( var name in obj ) {
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
}
} else {
// Serialize scalar item.
add( prefix, obj );
}
}
// This is still on the jQuery object... for now
// Want to move this to jQuery.ajax some day
jQuery.extend({
// Counter for holding the number of active queries
active: 0,
// Last-Modified header cache for next request
lastModified: {},
etag: {}
});
/* Handles responses to an ajax request:
* - sets all responseXXX fields accordingly
* - finds the right dataType (mediates between content-type and expected dataType)
* - returns the corresponding response
*/
function ajaxHandleResponses( s, jqXHR, responses ) {
var contents = s.contents,
dataTypes = s.dataTypes,
responseFields = s.responseFields,
ct,
type,
finalDataType,
firstDataType;
// Fill responseXXX fields
for ( type in responseFields ) {
if ( type in responses ) {
jqXHR[ responseFields[type] ] = responses[ type ];
}
}
// Remove auto dataType and get content-type in the process
while( dataTypes[ 0 ] === "*" ) {
dataTypes.shift();
if ( ct === undefined ) {
ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
}
}
// Check if we're dealing with a known content-type
if ( ct ) {
for ( type in contents ) {
if ( contents[ type ] && contents[ type ].test( ct ) ) {
dataTypes.unshift( type );
break;
}
}
}
// Check to see if we have a response for the expected dataType
if ( dataTypes[ 0 ] in responses ) {
finalDataType = dataTypes[ 0 ];
} else {
// Try convertible dataTypes
for ( type in responses ) {
if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
finalDataType = type;
break;
}
if ( !firstDataType ) {
firstDataType = type;
}
}
// Or just use first one
finalDataType = finalDataType || firstDataType;
}
// If we found a dataType
// We add the dataType to the list if needed
// and return the corresponding response
if ( finalDataType ) {
if ( finalDataType !== dataTypes[ 0 ] ) {
dataTypes.unshift( finalDataType );
}
return responses[ finalDataType ];
}
}
// Chain conversions given the request and the original response
function ajaxConvert( s, response ) {
// Apply the dataFilter if provided
if ( s.dataFilter ) {
response = s.dataFilter( response, s.dataType );
}
var dataTypes = s.dataTypes,
converters = {},
i,
key,
length = dataTypes.length,
tmp,
// Current and previous dataTypes
current = dataTypes[ 0 ],
prev,
// Conversion expression
conversion,
// Conversion function
conv,
// Conversion functions (transitive conversion)
conv1,
conv2;
// For each dataType in the chain
for ( i = 1; i < length; i++ ) {
// Create converters map
// with lowercased keys
if ( i === 1 ) {
for ( key in s.converters ) {
if ( typeof key === "string" ) {
converters[ key.toLowerCase() ] = s.converters[ key ];
}
}
}
// Get the dataTypes
prev = current;
current = dataTypes[ i ];
// If current is auto dataType, update it to prev
if ( current === "*" ) {
current = prev;
// If no auto and dataTypes are actually different
} else if ( prev !== "*" && prev !== current ) {
// Get the converter
conversion = prev + " " + current;
conv = converters[ conversion ] || converters[ "* " + current ];
// If there is no direct converter, search transitively
if ( !conv ) {
conv2 = undefined;
for ( conv1 in converters ) {
tmp = conv1.split( " " );
if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
conv2 = converters[ tmp[1] + " " + current ];
if ( conv2 ) {
conv1 = converters[ conv1 ];
if ( conv1 === true ) {
conv = conv2;
} else if ( conv2 === true ) {
conv = conv1;
}
break;
}
}
}
}
// If we found no converter, dispatch an error
if ( !( conv || conv2 ) ) {
jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
}
// If found converter is not an equivalence
if ( conv !== true ) {
// Convert with 1 or 2 converters accordingly
response = conv ? conv( response ) : conv2( conv1(response) );
}
}
}
return response;
}
var jsc = jQuery.now(),
jsre = /(\=)\?(&|$)|\?\?/i;
// Default jsonp settings
jQuery.ajaxSetup({
jsonp: "callback",
jsonpCallback: function() {
return jQuery.expando + "_" + ( jsc++ );
}
});
// Detect, normalize options and install callbacks for jsonp requests
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
( typeof s.data === "string" );
if ( s.dataTypes[ 0 ] === "jsonp" ||
s.jsonp !== false && ( jsre.test( s.url ) ||
inspectData && jsre.test( s.data ) ) ) {
var responseContainer,
jsonpCallback = s.jsonpCallback =
jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
previous = window[ jsonpCallback ],
url = s.url,
data = s.data,
replace = "$1" + jsonpCallback + "$2";
if ( s.jsonp !== false ) {
url = url.replace( jsre, replace );
if ( s.url === url ) {
if ( inspectData ) {
data = data.replace( jsre, replace );
}
if ( s.data === data ) {
// Add callback manually
url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
}
}
}
s.url = url;
s.data = data;
// Install callback
window[ jsonpCallback ] = function( response ) {
responseContainer = [ response ];
};
// Clean-up function
jqXHR.always(function() {
// Set callback back to previous value
window[ jsonpCallback ] = previous;
// Call if it was a function and we have a response
if ( responseContainer && jQuery.isFunction( previous ) ) {
window[ jsonpCallback ]( responseContainer[ 0 ] );
}
});
// Use data converter to retrieve json after script execution
s.converters["script json"] = function() {
if ( !responseContainer ) {
jQuery.error( jsonpCallback + " was not called" );
}
return responseContainer[ 0 ];
};
// force json dataType
s.dataTypes[ 0 ] = "json";
// Delegate to script
return "script";
}
});
// Install script dataType
jQuery.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
script: /javascript|ecmascript/
},
converters: {
"text script": function( text ) {
jQuery.globalEval( text );
return text;
}
}
});
// Handle cache's special case and global
jQuery.ajaxPrefilter( "script", function( s ) {
if ( s.cache === undefined ) {
s.cache = false;
}
if ( s.crossDomain ) {
s.type = "GET";
s.global = false;
}
});
// Bind script tag hack transport
jQuery.ajaxTransport( "script", function(s) {
// This transport only deals with cross domain requests
if ( s.crossDomain ) {
var script,
head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
return {
send: function( _, callback ) {
script = document.createElement( "script" );
script.async = "async";
if ( s.scriptCharset ) {
script.charset = s.scriptCharset;
}
script.src = s.url;
// Attach handlers for all browsers
script.onload = script.onreadystatechange = function( _, isAbort ) {
if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
// Handle memory leak in IE
script.onload = script.onreadystatechange = null;
// Remove the script
if ( head && script.parentNode ) {
head.removeChild( script );
}
// Dereference the script
script = undefined;
// Callback if not abort
if ( !isAbort ) {
callback( 200, "success" );
}
}
};
// Use insertBefore instead of appendChild to circumvent an IE6 bug.
// This arises when a base node is used (#2709 and #4378).
head.insertBefore( script, head.firstChild );
},
abort: function() {
if ( script ) {
script.onload( 0, 1 );
}
}
};
}
});
var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
xhrOnUnloadAbort = window.ActiveXObject ? function() {
// Abort all pending requests
for ( var key in xhrCallbacks ) {
xhrCallbacks[ key ]( 0, 1 );
}
} : false,
xhrId = 0,
xhrCallbacks;
// Functions to create xhrs
function createStandardXHR() {
try {
return new window.XMLHttpRequest();
} catch( e ) {}
}
function createActiveXHR() {
try {
return new window.ActiveXObject( "Microsoft.XMLHTTP" );
} catch( e ) {}
}
// Create the request object
// (This is still attached to ajaxSettings for backward compatibility)
jQuery.ajaxSettings.xhr = window.ActiveXObject ?
/* Microsoft failed to properly
* implement the XMLHttpRequest in IE7 (can't request local files),
* so we use the ActiveXObject when it is available
* Additionally XMLHttpRequest can be disabled in IE7/IE8 so
* we need a fallback.
*/
function() {
return !this.isLocal && createStandardXHR() || createActiveXHR();
} :
// For all other browsers, use the standard XMLHttpRequest object
createStandardXHR;
// Determine support properties
(function( xhr ) {
jQuery.extend( jQuery.support, {
ajax: !!xhr,
cors: !!xhr && ( "withCredentials" in xhr )
});
})( jQuery.ajaxSettings.xhr() );
// Create transport if the browser can provide an xhr
if ( jQuery.support.ajax ) {
jQuery.ajaxTransport(function( s ) {
// Cross domain only allowed if supported through XMLHttpRequest
if ( !s.crossDomain || jQuery.support.cors ) {
var callback;
return {
send: function( headers, complete ) {
// Get a new xhr
var xhr = s.xhr(),
handle,
i;
// Open the socket
// Passing null username, generates a login popup on Opera (#2865)
if ( s.username ) {
xhr.open( s.type, s.url, s.async, s.username, s.password );
} else {
xhr.open( s.type, s.url, s.async );
}
// Apply custom fields if provided
if ( s.xhrFields ) {
for ( i in s.xhrFields ) {
xhr[ i ] = s.xhrFields[ i ];
}
}
// Override mime type if needed
if ( s.mimeType && xhr.overrideMimeType ) {
xhr.overrideMimeType( s.mimeType );
}
// X-Requested-With header
// For cross-domain requests, seeing as conditions for a preflight are
// akin to a jigsaw puzzle, we simply never set it to be sure.
// (it can always be set on a per-request basis or even using ajaxSetup)
// For same-domain requests, won't change header if already provided.
if ( !s.crossDomain && !headers["X-Requested-With"] ) {
headers[ "X-Requested-With" ] = "XMLHttpRequest";
}
// Need an extra try/catch for cross domain requests in Firefox 3
try {
for ( i in headers ) {
xhr.setRequestHeader( i, headers[ i ] );
}
} catch( _ ) {}
// Do send the request
// This may raise an exception which is actually
// handled in jQuery.ajax (so no try/catch here)
xhr.send( ( s.hasContent && s.data ) || null );
// Listener
callback = function( _, isAbort ) {
var status,
statusText,
responseHeaders,
responses,
xml;
// Firefox throws exceptions when accessing properties
// of an xhr when a network error occured
// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
try {
// Was never called and is aborted or complete
if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
// Only called once
callback = undefined;
// Do not keep as active anymore
if ( handle ) {
xhr.onreadystatechange = jQuery.noop;
if ( xhrOnUnloadAbort ) {
delete xhrCallbacks[ handle ];
}
}
// If it's an abort
if ( isAbort ) {
// Abort it manually if needed
if ( xhr.readyState !== 4 ) {
xhr.abort();
}
} else {
status = xhr.status;
responseHeaders = xhr.getAllResponseHeaders();
responses = {};
xml = xhr.responseXML;
// Construct response list
if ( xml && xml.documentElement /* #4958 */ ) {
responses.xml = xml;
}
responses.text = xhr.responseText;
// Firefox throws an exception when accessing
// statusText for faulty cross-domain requests
try {
statusText = xhr.statusText;
} catch( e ) {
// We normalize with Webkit giving an empty statusText
statusText = "";
}
// Filter status for non standard behaviors
// If the request is local and we have data: assume a success
// (success with no data won't get notified, that's the best we
// can do given current implementations)
if ( !status && s.isLocal && !s.crossDomain ) {
status = responses.text ? 200 : 404;
// IE - #1450: sometimes returns 1223 when it should be 204
} else if ( status === 1223 ) {
status = 204;
}
}
}
} catch( firefoxAccessException ) {
if ( !isAbort ) {
complete( -1, firefoxAccessException );
}
}
// Call complete if needed
if ( responses ) {
complete( status, statusText, responses, responseHeaders );
}
};
// if we're in sync mode or it's in cache
// and has been retrieved directly (IE6 & IE7)
// we need to manually fire the callback
if ( !s.async || xhr.readyState === 4 ) {
callback();
} else {
handle = ++xhrId;
if ( xhrOnUnloadAbort ) {
// Create the active xhrs callbacks list if needed
// and attach the unload handler
if ( !xhrCallbacks ) {
xhrCallbacks = {};
jQuery( window ).unload( xhrOnUnloadAbort );
}
// Add to list of active xhrs callbacks
xhrCallbacks[ handle ] = callback;
}
xhr.onreadystatechange = callback;
}
},
abort: function() {
if ( callback ) {
callback(0,1);
}
}
};
}
});
}
var elemdisplay = {},
iframe, iframeDoc,
rfxtypes = /^(?:toggle|show|hide)$/,
rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
timerId,
fxAttrs = [
// height animations
[ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
// width animations
[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
// opacity animations
[ "opacity" ]
],
fxNow;
jQuery.fn.extend({
show: function( speed, easing, callback ) {
var elem, display;
if ( speed || speed === 0 ) {
return this.animate( genFx("show", 3), speed, easing, callback );
} else {
for ( var i = 0, j = this.length; i < j; i++ ) {
elem = this[ i ];
if ( elem.style ) {
display = elem.style.display;
// Reset the inline display of this element to learn if it is
// being hidden by cascaded rules or not
if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
display = elem.style.display = "";
}
// Set elements which have been overridden with display: none
// in a stylesheet to whatever the default browser style is
// for such an element
if ( display === "" && jQuery.css(elem, "display") === "none" ) {
jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
}
}
}
// Set the display of most of the elements in a second loop
// to avoid the constant reflow
for ( i = 0; i < j; i++ ) {
elem = this[ i ];
if ( elem.style ) {
display = elem.style.display;
if ( display === "" || display === "none" ) {
elem.style.display = jQuery._data( elem, "olddisplay" ) || "";
}
}
}
return this;
}
},
hide: function( speed, easing, callback ) {
if ( speed || speed === 0 ) {
return this.animate( genFx("hide", 3), speed, easing, callback);
} else {
var elem, display,
i = 0,
j = this.length;
for ( ; i < j; i++ ) {
elem = this[i];
if ( elem.style ) {
display = jQuery.css( elem, "display" );
if ( display !== "none" && !jQuery._data( elem, "olddisplay" ) ) {
jQuery._data( elem, "olddisplay", display );
}
}
}
// Set the display of the elements in a second loop
// to avoid the constant reflow
for ( i = 0; i < j; i++ ) {
if ( this[i].style ) {
this[i].style.display = "none";
}
}
return this;
}
},
// Save the old toggle function
_toggle: jQuery.fn.toggle,
toggle: function( fn, fn2, callback ) {
var bool = typeof fn === "boolean";
if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
this._toggle.apply( this, arguments );
} else if ( fn == null || bool ) {
this.each(function() {
var state = bool ? fn : jQuery(this).is(":hidden");
jQuery(this)[ state ? "show" : "hide" ]();
});
} else {
this.animate(genFx("toggle", 3), fn, fn2, callback);
}
return this;
},
fadeTo: function( speed, to, easing, callback ) {
return this.filter(":hidden").css("opacity", 0).show().end()
.animate({opacity: to}, speed, easing, callback);
},
animate: function( prop, speed, easing, callback ) {
var optall = jQuery.speed( speed, easing, callback );
if ( jQuery.isEmptyObject( prop ) ) {
return this.each( optall.complete, [ false ] );
}
// Do not change referenced properties as per-property easing will be lost
prop = jQuery.extend( {}, prop );
function doAnimation() {
// XXX 'this' does not always have a nodeName when running the
// test suite
if ( optall.queue === false ) {
jQuery._mark( this );
}
var opt = jQuery.extend( {}, optall ),
isElement = this.nodeType === 1,
hidden = isElement && jQuery(this).is(":hidden"),
name, val, p, e,
parts, start, end, unit,
method;
// will store per property easing and be used to determine when an animation is complete
opt.animatedProperties = {};
for ( p in prop ) {
// property name normalization
name = jQuery.camelCase( p );
if ( p !== name ) {
prop[ name ] = prop[ p ];
delete prop[ p ];
}
val = prop[ name ];
// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
if ( jQuery.isArray( val ) ) {
opt.animatedProperties[ name ] = val[ 1 ];
val = prop[ name ] = val[ 0 ];
} else {
opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
}
if ( val === "hide" && hidden || val === "show" && !hidden ) {
return opt.complete.call( this );
}
if ( isElement && ( name === "height" || name === "width" ) ) {
// Make sure that nothing sneaks out
// Record all 3 overflow attributes because IE does not
// change the overflow attribute when overflowX and
// overflowY are set to the same value
opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
// Set display property to inline-block for height/width
// animations on inline elements that are having width/height animated
if ( jQuery.css( this, "display" ) === "inline" &&
jQuery.css( this, "float" ) === "none" ) {
// inline-level elements accept inline-block;
// block-level elements need to be inline with layout
if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) {
this.style.display = "inline-block";
} else {
this.style.zoom = 1;
}
}
}
}
if ( opt.overflow != null ) {
this.style.overflow = "hidden";
}
for ( p in prop ) {
e = new jQuery.fx( this, opt, p );
val = prop[ p ];
if ( rfxtypes.test( val ) ) {
// Tracks whether to show or hide based on private
// data attached to the element
method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 );
if ( method ) {
jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" );
e[ method ]();
} else {
e[ val ]();
}
} else {
parts = rfxnum.exec( val );
start = e.cur();
if ( parts ) {
end = parseFloat( parts[2] );
unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
// We need to compute starting value
if ( unit !== "px" ) {
jQuery.style( this, p, (end || 1) + unit);
start = ( (end || 1) / e.cur() ) * start;
jQuery.style( this, p, start + unit);
}
// If a +=/-= token was provided, we're doing a relative animation
if ( parts[1] ) {
end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
}
e.custom( start, end, unit );
} else {
e.custom( start, val, "" );
}
}
}
// For JS strict compliance
return true;
}
return optall.queue === false ?
this.each( doAnimation ) :
this.queue( optall.queue, doAnimation );
},
stop: function( type, clearQueue, gotoEnd ) {
if ( typeof type !== "string" ) {
gotoEnd = clearQueue;
clearQueue = type;
type = undefined;
}
if ( clearQueue && type !== false ) {
this.queue( type || "fx", [] );
}
return this.each(function() {
var index,
hadTimers = false,
timers = jQuery.timers,
data = jQuery._data( this );
// clear marker counters if we know they won't be
if ( !gotoEnd ) {
jQuery._unmark( true, this );
}
function stopQueue( elem, data, index ) {
var hooks = data[ index ];
jQuery.removeData( elem, index, true );
hooks.stop( gotoEnd );
}
if ( type == null ) {
for ( index in data ) {
if ( data[ index ] && data[ index ].stop && index.indexOf(".run") === index.length - 4 ) {
stopQueue( this, data, index );
}
}
} else if ( data[ index = type + ".run" ] && data[ index ].stop ){
stopQueue( this, data, index );
}
for ( index = timers.length; index--; ) {
if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
if ( gotoEnd ) {
// force the next step to be the last
timers[ index ]( true );
} else {
timers[ index ].saveState();
}
hadTimers = true;
timers.splice( index, 1 );
}
}
// start the next in the queue if the last step wasn't forced
// timers currently will call their complete callbacks, which will dequeue
// but only if they were gotoEnd
if ( !( gotoEnd && hadTimers ) ) {
jQuery.dequeue( this, type );
}
});
}
});
// Animations created synchronously will run synchronously
function createFxNow() {
setTimeout( clearFxNow, 0 );
return ( fxNow = jQuery.now() );
}
function clearFxNow() {
fxNow = undefined;
}
// Generate parameters to create a standard animation
function genFx( type, num ) {
var obj = {};
jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() {
obj[ this ] = type;
});
return obj;
}
// Generate shortcuts for custom animations
jQuery.each({
slideDown: genFx( "show", 1 ),
slideUp: genFx( "hide", 1 ),
slideToggle: genFx( "toggle", 1 ),
fadeIn: { opacity: "show" },
fadeOut: { opacity: "hide" },
fadeToggle: { opacity: "toggle" }
}, function( name, props ) {
jQuery.fn[ name ] = function( speed, easing, callback ) {
return this.animate( props, speed, easing, callback );
};
});
jQuery.extend({
speed: function( speed, easing, fn ) {
var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
complete: fn || !fn && easing ||
jQuery.isFunction( speed ) && speed,
duration: speed,
easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
};
opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
// normalize opt.queue - true/undefined/null -> "fx"
if ( opt.queue == null || opt.queue === true ) {
opt.queue = "fx";
}
// Queueing
opt.old = opt.complete;
opt.complete = function( noUnmark ) {
if ( jQuery.isFunction( opt.old ) ) {
opt.old.call( this );
}
if ( opt.queue ) {
jQuery.dequeue( this, opt.queue );
} else if ( noUnmark !== false ) {
jQuery._unmark( this );
}
};
return opt;
},
easing: {
linear: function( p, n, firstNum, diff ) {
return firstNum + diff * p;
},
swing: function( p, n, firstNum, diff ) {
return ( ( -Math.cos( p*Math.PI ) / 2 ) + 0.5 ) * diff + firstNum;
}
},
timers: [],
fx: function( elem, options, prop ) {
this.options = options;
this.elem = elem;
this.prop = prop;
options.orig = options.orig || {};
}
});
jQuery.fx.prototype = {
// Simple function for setting a style value
update: function() {
if ( this.options.step ) {
this.options.step.call( this.elem, this.now, this );
}
( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this );
},
// Get the current size
cur: function() {
if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) {
return this.elem[ this.prop ];
}
var parsed,
r = jQuery.css( this.elem, this.prop );
// Empty strings, null, undefined and "auto" are converted to 0,
// complex values such as "rotate(1rad)" are returned as is,
// simple values such as "10px" are parsed to Float.
return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
},
// Start an animation from one number to another
custom: function( from, to, unit ) {
var self = this,
fx = jQuery.fx;
this.startTime = fxNow || createFxNow();
this.end = to;
this.now = this.start = from;
this.pos = this.state = 0;
this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
function t( gotoEnd ) {
return self.step( gotoEnd );
}
t.queue = this.options.queue;
t.elem = this.elem;
t.saveState = function() {
if ( self.options.hide && jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) {
jQuery._data( self.elem, "fxshow" + self.prop, self.start );
}
};
if ( t() && jQuery.timers.push(t) && !timerId ) {
timerId = setInterval( fx.tick, fx.interval );
}
},
// Simple 'show' function
show: function() {
var dataShow = jQuery._data( this.elem, "fxshow" + this.prop );
// Remember where we started, so that we can go back to it later
this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop );
this.options.show = true;
// Begin the animation
// Make sure that we start at a small width/height to avoid any flash of content
if ( dataShow !== undefined ) {
// This show is picking up where a previous hide or show left off
this.custom( this.cur(), dataShow );
} else {
this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() );
}
// Start by showing the element
jQuery( this.elem ).show();
},
// Simple 'hide' function
hide: function() {
// Remember where we started, so that we can go back to it later
this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop );
this.options.hide = true;
// Begin the animation
this.custom( this.cur(), 0 );
},
// Each step of an animation
step: function( gotoEnd ) {
var p, n, complete,
t = fxNow || createFxNow(),
done = true,
elem = this.elem,
options = this.options;
if ( gotoEnd || t >= options.duration + this.startTime ) {
this.now = this.end;
this.pos = this.state = 1;
this.update();
options.animatedProperties[ this.prop ] = true;
for ( p in options.animatedProperties ) {
if ( options.animatedProperties[ p ] !== true ) {
done = false;
}
}
if ( done ) {
// Reset the overflow
if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
jQuery.each( [ "", "X", "Y" ], function( index, value ) {
elem.style[ "overflow" + value ] = options.overflow[ index ];
});
}
// Hide the element if the "hide" operation was done
if ( options.hide ) {
jQuery( elem ).hide();
}
// Reset the properties, if the item has been hidden or shown
if ( options.hide || options.show ) {
for ( p in options.animatedProperties ) {
jQuery.style( elem, p, options.orig[ p ] );
jQuery.removeData( elem, "fxshow" + p, true );
// Toggle data is no longer needed
jQuery.removeData( elem, "toggle" + p, true );
}
}
// Execute the complete function
// in the event that the complete function throws an exception
// we must ensure it won't be called twice. #5684
complete = options.complete;
if ( complete ) {
options.complete = false;
complete.call( elem );
}
}
return false;
} else {
// classical easing cannot be used with an Infinity duration
if ( options.duration == Infinity ) {
this.now = t;
} else {
n = t - this.startTime;
this.state = n / options.duration;
// Perform the easing function, defaults to swing
this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration );
this.now = this.start + ( (this.end - this.start) * this.pos );
}
// Perform the next step of the animation
this.update();
}
return true;
}
};
jQuery.extend( jQuery.fx, {
tick: function() {
var timer,
timers = jQuery.timers,
i = 0;
for ( ; i < timers.length; i++ ) {
timer = timers[ i ];
// Checks the timer has not already been removed
if ( !timer() && timers[ i ] === timer ) {
timers.splice( i--, 1 );
}
}
if ( !timers.length ) {
jQuery.fx.stop();
}
},
interval: 13,
stop: function() {
clearInterval( timerId );
timerId = null;
},
speeds: {
slow: 600,
fast: 200,
// Default speed
_default: 400
},
step: {
opacity: function( fx ) {
jQuery.style( fx.elem, "opacity", fx.now );
},
_default: function( fx ) {
if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
fx.elem.style[ fx.prop ] = fx.now + fx.unit;
} else {
fx.elem[ fx.prop ] = fx.now;
}
}
}
});
// Adds width/height step functions
// Do not set anything below 0
jQuery.each([ "width", "height" ], function( i, prop ) {
jQuery.fx.step[ prop ] = function( fx ) {
jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );
};
});
if ( jQuery.expr && jQuery.expr.filters ) {
jQuery.expr.filters.animated = function( elem ) {
return jQuery.grep(jQuery.timers, function( fn ) {
return elem === fn.elem;
}).length;
};
}
// Try to restore the default display value of an element
function defaultDisplay( nodeName ) {
if ( !elemdisplay[ nodeName ] ) {
var body = document.body,
elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
display = elem.css( "display" );
elem.remove();
// If the simple way fails,
// get element's real default display by attaching it to a temp iframe
if ( display === "none" || display === "" ) {
// No iframe to use yet, so create it
if ( !iframe ) {
iframe = document.createElement( "iframe" );
iframe.frameBorder = iframe.width = iframe.height = 0;
}
body.appendChild( iframe );
// Create a cacheable copy of the iframe document on first call.
// IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
// document to it; WebKit & Firefox won't allow reusing the iframe document.
if ( !iframeDoc || !iframe.createElement ) {
iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" );
iframeDoc.close();
}
elem = iframeDoc.createElement( nodeName );
iframeDoc.body.appendChild( elem );
display = jQuery.css( elem, "display" );
body.removeChild( iframe );
}
// Store the correct default display
elemdisplay[ nodeName ] = display;
}
return elemdisplay[ nodeName ];
}
var rtable = /^t(?:able|d|h)$/i,
rroot = /^(?:body|html)$/i;
if ( "getBoundingClientRect" in document.documentElement ) {
jQuery.fn.offset = function( options ) {
var elem = this[0], box;
if ( options ) {
return this.each(function( i ) {
jQuery.offset.setOffset( this, options, i );
});
}
if ( !elem || !elem.ownerDocument ) {
return null;
}
if ( elem === elem.ownerDocument.body ) {
return jQuery.offset.bodyOffset( elem );
}
try {
box = elem.getBoundingClientRect();
} catch(e) {}
var doc = elem.ownerDocument,
docElem = doc.documentElement;
// Make sure we're not dealing with a disconnected DOM node
if ( !box || !jQuery.contains( docElem, elem ) ) {
return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
}
var body = doc.body,
win = getWindow(doc),
clientTop = docElem.clientTop || body.clientTop || 0,
clientLeft = docElem.clientLeft || body.clientLeft || 0,
scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop,
scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
top = box.top + scrollTop - clientTop,
left = box.left + scrollLeft - clientLeft;
return { top: top, left: left };
};
} else {
jQuery.fn.offset = function( options ) {
var elem = this[0];
if ( options ) {
return this.each(function( i ) {
jQuery.offset.setOffset( this, options, i );
});
}
if ( !elem || !elem.ownerDocument ) {
return null;
}
if ( elem === elem.ownerDocument.body ) {
return jQuery.offset.bodyOffset( elem );
}
var computedStyle,
offsetParent = elem.offsetParent,
prevOffsetParent = elem,
doc = elem.ownerDocument,
docElem = doc.documentElement,
body = doc.body,
defaultView = doc.defaultView,
prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
top = elem.offsetTop,
left = elem.offsetLeft;
while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
break;
}
computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
top -= elem.scrollTop;
left -= elem.scrollLeft;
if ( elem === offsetParent ) {
top += elem.offsetTop;
left += elem.offsetLeft;
if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
top += parseFloat( computedStyle.borderTopWidth ) || 0;
left += parseFloat( computedStyle.borderLeftWidth ) || 0;
}
prevOffsetParent = offsetParent;
offsetParent = elem.offsetParent;
}
if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
top += parseFloat( computedStyle.borderTopWidth ) || 0;
left += parseFloat( computedStyle.borderLeftWidth ) || 0;
}
prevComputedStyle = computedStyle;
}
if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
top += body.offsetTop;
left += body.offsetLeft;
}
if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
top += Math.max( docElem.scrollTop, body.scrollTop );
left += Math.max( docElem.scrollLeft, body.scrollLeft );
}
return { top: top, left: left };
};
}
jQuery.offset = {
bodyOffset: function( body ) {
var top = body.offsetTop,
left = body.offsetLeft;
if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
top += parseFloat( jQuery.css(body, "marginTop") ) || 0;
left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
}
return { top: top, left: left };
},
setOffset: function( elem, options, i ) {
var position = jQuery.css( elem, "position" );
// set position first, in-case top/left are set even on static elem
if ( position === "static" ) {
elem.style.position = "relative";
}
var curElem = jQuery( elem ),
curOffset = curElem.offset(),
curCSSTop = jQuery.css( elem, "top" ),
curCSSLeft = jQuery.css( elem, "left" ),
calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
props = {}, curPosition = {}, curTop, curLeft;
// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
if ( calculatePosition ) {
curPosition = curElem.position();
curTop = curPosition.top;
curLeft = curPosition.left;
} else {
curTop = parseFloat( curCSSTop ) || 0;
curLeft = parseFloat( curCSSLeft ) || 0;
}
if ( jQuery.isFunction( options ) ) {
options = options.call( elem, i, curOffset );
}
if ( options.top != null ) {
props.top = ( options.top - curOffset.top ) + curTop;
}
if ( options.left != null ) {
props.left = ( options.left - curOffset.left ) + curLeft;
}
if ( "using" in options ) {
options.using.call( elem, props );
} else {
curElem.css( props );
}
}
};
jQuery.fn.extend({
position: function() {
if ( !this[0] ) {
return null;
}
var elem = this[0],
// Get *real* offsetParent
offsetParent = this.offsetParent(),
// Get correct offsets
offset = this.offset(),
parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
// Subtract element margins
// note: when an element has margin: auto the offsetLeft and marginLeft
// are the same in Safari causing offset.left to incorrectly be 0
offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
// Add offsetParent borders
parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
// Subtract the two offsets
return {
top: offset.top - parentOffset.top,
left: offset.left - parentOffset.left
};
},
offsetParent: function() {
return this.map(function() {
var offsetParent = this.offsetParent || document.body;
while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
offsetParent = offsetParent.offsetParent;
}
return offsetParent;
});
}
});
// Create scrollLeft and scrollTop methods
jQuery.each( ["Left", "Top"], function( i, name ) {
var method = "scroll" + name;
jQuery.fn[ method ] = function( val ) {
var elem, win;
if ( val === undefined ) {
elem = this[ 0 ];
if ( !elem ) {
return null;
}
win = getWindow( elem );
// Return the scroll offset
return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
jQuery.support.boxModel && win.document.documentElement[ method ] ||
win.document.body[ method ] :
elem[ method ];
}
// Set the scroll offset
return this.each(function() {
win = getWindow( this );
if ( win ) {
win.scrollTo(
!i ? val : jQuery( win ).scrollLeft(),
i ? val : jQuery( win ).scrollTop()
);
} else {
this[ method ] = val;
}
});
};
});
function getWindow( elem ) {
return jQuery.isWindow( elem ) ?
elem :
elem.nodeType === 9 ?
elem.defaultView || elem.parentWindow :
false;
}
// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
jQuery.each([ "Height", "Width" ], function( i, name ) {
var type = name.toLowerCase();
// innerHeight and innerWidth
jQuery.fn[ "inner" + name ] = function() {
var elem = this[0];
return elem ?
elem.style ?
parseFloat( jQuery.css( elem, type, "padding" ) ) :
this[ type ]() :
null;
};
// outerHeight and outerWidth
jQuery.fn[ "outer" + name ] = function( margin ) {
var elem = this[0];
return elem ?
elem.style ?
parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
this[ type ]() :
null;
};
jQuery.fn[ type ] = function( size ) {
// Get window width or height
var elem = this[0];
if ( !elem ) {
return size == null ? null : this;
}
if ( jQuery.isFunction( size ) ) {
return this.each(function( i ) {
var self = jQuery( this );
self[ type ]( size.call( this, i, self[ type ]() ) );
});
}
if ( jQuery.isWindow( elem ) ) {
// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
var docElemProp = elem.document.documentElement[ "client" + name ],
body = elem.document.body;
return elem.document.compatMode === "CSS1Compat" && docElemProp ||
body && body[ "client" + name ] || docElemProp;
// Get document width or height
} else if ( elem.nodeType === 9 ) {
// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
return Math.max(
elem.documentElement["client" + name],
elem.body["scroll" + name], elem.documentElement["scroll" + name],
elem.body["offset" + name], elem.documentElement["offset" + name]
);
// Get or set width or height on the element
} else if ( size === undefined ) {
var orig = jQuery.css( elem, type ),
ret = parseFloat( orig );
return jQuery.isNumeric( ret ) ? ret : orig;
// Set the width or height on the element (default to pixels if value is unitless)
} else {
return this.css( type, typeof size === "string" ? size : size + "px" );
}
};
});
// Expose jQuery to the global object
window.jQuery = window.$ = jQuery;
// Expose jQuery as an AMD module, but only for AMD loaders that
// understand the issues with loading multiple versions of jQuery
// in a page that all might call define(). The loader will indicate
// they have special allowances for multiple jQuery versions by
// specifying define.amd.jQuery = true. Register as a named module,
// since jQuery can be concatenated with other files that may use define,
// but not use a proper concatenation script that understands anonymous
// AMD modules. A named AMD is safest and most robust way to register.
// Lowercase jquery is used because AMD module names are derived from
// file names, and jQuery is normally delivered in a lowercase file name.
// Do this after creating the global so that if an AMD module wants to call
// noConflict to hide this version of jQuery, it will work.
if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
define( "jquery", [], function () { return jQuery; } );
}
})( window );
|
"use strict";
/**
* XML attribute names.
*/
var XmlAttributeNames;
(function (XmlAttributeNames) {
XmlAttributeNames.XmlNs = "xmlns";
XmlAttributeNames.Id = "Id";
XmlAttributeNames.ChangeKey = "ChangeKey";
XmlAttributeNames.RecurringMasterId = "RecurringMasterId";
XmlAttributeNames.InstanceIndex = "InstanceIndex";
XmlAttributeNames.OccurrenceId = "OccurrenceId";
XmlAttributeNames.Traversal = "Traversal";
XmlAttributeNames.ViewFilter = "ViewFilter";
XmlAttributeNames.Offset = "Offset";
XmlAttributeNames.MaxEntriesReturned = "MaxEntriesReturned";
XmlAttributeNames.BasePoint = "BasePoint";
XmlAttributeNames.ResponseClass = "ResponseClass";
XmlAttributeNames.IndexedPagingOffset = "IndexedPagingOffset";
XmlAttributeNames.TotalItemsInView = "TotalItemsInView";
XmlAttributeNames.IncludesLastItemInRange = "IncludesLastItemInRange";
XmlAttributeNames.BodyType = "BodyType";
XmlAttributeNames.MessageDisposition = "MessageDisposition";
XmlAttributeNames.SaveItemToFolder = "SaveItemToFolder";
XmlAttributeNames.RootItemChangeKey = "RootItemChangeKey";
XmlAttributeNames.DeleteType = "DeleteType";
XmlAttributeNames.DeleteSubFolders = "DeleteSubFolders";
XmlAttributeNames.AffectedTaskOccurrences = "AffectedTaskOccurrences";
XmlAttributeNames.SendMeetingCancellations = "SendMeetingCancellations";
XmlAttributeNames.SuppressReadReceipts = "SuppressReadReceipts"; //XmlElementNames.SuppressReadReceipts;
XmlAttributeNames.FieldURI = "FieldURI";
XmlAttributeNames.FieldIndex = "FieldIndex";
XmlAttributeNames.ConflictResolution = "ConflictResolution";
XmlAttributeNames.SendMeetingInvitationsOrCancellations = "SendMeetingInvitationsOrCancellations";
XmlAttributeNames.CharacterSet = "CharacterSet";
XmlAttributeNames.HeaderName = "HeaderName";
XmlAttributeNames.SendMeetingInvitations = "SendMeetingInvitations";
XmlAttributeNames.Key = "Key";
XmlAttributeNames.RoutingType = "RoutingType";
XmlAttributeNames.MailboxType = "MailboxType";
XmlAttributeNames.DistinguishedPropertySetId = "DistinguishedPropertySetId";
XmlAttributeNames.PropertySetId = "PropertySetId";
XmlAttributeNames.PropertyTag = "PropertyTag";
XmlAttributeNames.PropertyName = "PropertyName";
XmlAttributeNames.PropertyId = "PropertyId";
XmlAttributeNames.PropertyType = "PropertyType";
XmlAttributeNames.TimeZoneName = "TimeZoneName";
XmlAttributeNames.ReturnFullContactData = "ReturnFullContactData";
XmlAttributeNames.ContactDataShape = "ContactDataShape";
XmlAttributeNames.Numerator = "Numerator";
XmlAttributeNames.Denominator = "Numerator";
XmlAttributeNames.Value = "Value";
XmlAttributeNames.ContainmentMode = "ContainmentMode";
XmlAttributeNames.ContainmentComparison = "ContainmentComparison";
XmlAttributeNames.Order = "Order";
XmlAttributeNames.StartDate = "StartDate";
XmlAttributeNames.EndDate = "EndDate";
XmlAttributeNames.Version = "Version";
XmlAttributeNames.Aggregate = "Aggregate";
XmlAttributeNames.SearchScope = "SearchScope";
XmlAttributeNames.Format = "Format";
XmlAttributeNames.Mailbox = "Mailbox";
XmlAttributeNames.DestinationFormat = "DestinationFormat";
XmlAttributeNames.FolderId = "FolderId";
XmlAttributeNames.ItemId = "ItemId";
XmlAttributeNames.IncludePermissions = "IncludePermissions";
XmlAttributeNames.InitialName = "InitialName";
XmlAttributeNames.FinalName = "FinalName";
XmlAttributeNames.AuthenticationMethod = "AuthenticationMethod";
XmlAttributeNames.Time = "Time";
XmlAttributeNames.Name = "Name";
XmlAttributeNames.Bias = "Bias";
XmlAttributeNames.Kind = "Kind";
XmlAttributeNames.SubscribeToAllFolders = "SubscribeToAllFolders";
XmlAttributeNames.PublicFolderServer = "PublicFolderServer";
XmlAttributeNames.IsArchive = "IsArchive";
XmlAttributeNames.ReturnHighlightTerms = "ReturnHighlightTerms";
XmlAttributeNames.IsExplicit = "IsExplicit";
XmlAttributeNames.ClientExtensionUserIdentity = "UserId";
XmlAttributeNames.ClientExtensionEnabledOnly = "EnabledOnly";
XmlAttributeNames.SetClientExtensionActionId = "ActionId";
XmlAttributeNames.ClientExtensionId = "ExtensionId";
XmlAttributeNames.ClientExtensionIsAvailable = "IsAvailable";
XmlAttributeNames.ClientExtensionIsMandatory = "IsMandatory";
XmlAttributeNames.ClientExtensionIsEnabledByDefault = "IsEnabledByDefault";
XmlAttributeNames.ClientExtensionProvidedTo = "ProvidedTo";
XmlAttributeNames.ClientExtensionType = "Type";
XmlAttributeNames.ClientExtensionScope = "Scope";
XmlAttributeNames.ClientExtensionMarketplaceAssetID = "MarketplaceAssetId";
XmlAttributeNames.ClientExtensionMarketplaceContentMarket = "MarketplaceContentMarket";
XmlAttributeNames.ClientExtensionAppStatus = "AppStatus";
XmlAttributeNames.ClientExtensionEtoken = "Etoken";
XmlAttributeNames.ClientExtensionInstalledDateTime = "InstalledDateTime";
XmlAttributeNames.IsTruncated = "IsTruncated";
XmlAttributeNames.IsJunk = "IsJunk";
XmlAttributeNames.MoveItem = "MoveItem";
// xsi attributes
XmlAttributeNames.Nil = "nil";
XmlAttributeNames.Type = "type";
})(XmlAttributeNames = exports.XmlAttributeNames || (exports.XmlAttributeNames = {}));
|
Template.card.onRendered(function() {
var el = this.find('textarea');
var $textarea = $(el);
if($textarea) {
// call autogrow only when text area is visible
var interval = setInterval(function() {
if(!$textarea.is(':visible')) return;
$textarea.autogrow();
if (Session.get('hasFocus')) {
var selector = '#' + Session.get('hasFocus');
$(selector).focus();
}
clearInterval(interval);
}, 30);
}
}); |
import React from 'react';
import store from 'app/store';
import RaisedButton from 'material-ui/RaisedButton';
import TextField from 'material-ui/TextField';
import Divider from 'material-ui/Divider';
import CluckList from 'app/components/cluck-list';
export default class CluckApp extends React.Component {
constructor (props) {
super(props);
this.handelChange = this.handelChange.bind(this);
this.state = { message: '' };
}
handelChange (e) {
this.setState({message: e.target.value});
}
render () {
const message = this.state.message;
return (
<div>
<form style={({ paddingBottom: 15 })}>
<TextField
value={message} onChange={this.handelChange}
hintText='What are you clucking about?'
floatingLabelText='Cluck text'
/>
<RaisedButton label='Cluck' primary onClick={() => {
store.dispatch({
type: 'ADD_CLUCK',
id: this.props.newId(),
message: message
});
this.state.message = '';
}} />
</form>
<Divider />
<CluckList clucks={this.props.clucks} />
</div>
);
}
}
|
/**
* Copyright 2012-2020, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var scatterHover = require('../scatter/hover');
var fillText = require('../../lib').fillText;
module.exports = function hoverPoints(pointData, xval, yval, hovermode) {
var scatterPointData = scatterHover(pointData, xval, yval, hovermode);
if(!scatterPointData || scatterPointData[0].index === false) return;
var newPointData = scatterPointData[0];
// if hovering on a fill, we don't show any point data so the label is
// unchanged from what scatter gives us - except that it needs to
// be constrained to the trianglular plot area, not just the rectangular
// area defined by the synthetic x and y axes
// TODO: in some cases the vertical middle of the shape is not within
// the triangular viewport at all, so the label can become disconnected
// from the shape entirely. But calculating what portion of the shape
// is actually visible, as constrained by the diagonal axis lines, is not
// so easy and anyway we lost the information we would have needed to do
// this inside scatterHover.
if(newPointData.index === undefined) {
var yFracUp = 1 - (newPointData.y0 / pointData.ya._length);
var xLen = pointData.xa._length;
var xMin = xLen * yFracUp / 2;
var xMax = xLen - xMin;
newPointData.x0 = Math.max(Math.min(newPointData.x0, xMax), xMin);
newPointData.x1 = Math.max(Math.min(newPointData.x1, xMax), xMin);
return scatterPointData;
}
var cdi = newPointData.cd[newPointData.index];
newPointData.a = cdi.a;
newPointData.b = cdi.b;
newPointData.xLabelVal = undefined;
newPointData.yLabelVal = undefined;
// TODO: nice formatting, and label by axis title, for a, b, and c?
var trace = newPointData.trace;
var carpet = trace._carpet;
var labels = trace._module.formatLabels(cdi, trace);
newPointData.yLabel = labels.yLabel;
delete newPointData.text;
var text = [];
function textPart(ax, val) {
var prefix;
if(ax.labelprefix && ax.labelprefix.length > 0) {
prefix = ax.labelprefix.replace(/ = $/, '');
} else {
prefix = ax._hovertitle;
}
text.push(prefix + ': ' + val.toFixed(3) + ax.labelsuffix);
}
if(!trace.hovertemplate) {
var hoverinfo = cdi.hi || trace.hoverinfo;
var parts = hoverinfo.split('+');
if(parts.indexOf('all') !== -1) parts = ['a', 'b', 'text'];
if(parts.indexOf('a') !== -1) textPart(carpet.aaxis, cdi.a);
if(parts.indexOf('b') !== -1) textPart(carpet.baxis, cdi.b);
text.push('y: ' + newPointData.yLabel);
if(parts.indexOf('text') !== -1) {
fillText(cdi, trace, text);
}
newPointData.extraText = text.join('<br>');
}
return scatterPointData;
};
|
/**
* Partition
*
* Write code to partition a linked list around a value x,
* such that all nodes less than x come before all nodes greater than or equal to x
* If x is contained within the list, the values of x only need to be after the elements less than x.
* The partition element x can appear anywhere in the "right partition";
* it does not need to appear between the left and right partitions
*/
// Approach: We'll traverse the list and dynamically append the nodes to either a left or right list based on its value
// Since we visit each element only once, the run time is O(n)
function partition(list, partitionValue) {
let leftStart, leftEnd;
let rightStart, rightEnd;
let ref = list.head;
while(ref) {
if (ref.value < partitionValue) {
if (!leftStart) {
leftStart = ref;
leftEnd = ref;
}
else {
leftEnd.next = ref;
leftEnd = ref;
}
}
else {
if (!rightStart) {
rightStart = ref;
rightEnd = ref;
}
else {
rightEnd.next = ref;
rightEnd = ref;
}
}
ref = ref.next;
}
// concatenate lists
if (leftStart) {
leftEnd.next = rightStart;
if (rightEnd) {
rightEnd.next = null;
}
list._head = leftStart;
}
else {
if (rightEnd) {
rightEnd.next = null;
}
list._head = rightStart;
}
return list;
}
const LinkedList = require('../../../collections/LinkedList');
const tests = [
{
list: new LinkedList({data: [3, 5, 8, 5, 10, 2, 1]}),
partition: 5
},
{
list: new LinkedList({data: [2, 6, 3, 4, 0, 3, 4, 6, 5, 2, 6, 9, 8, 7]}),
partition: 5
},
{
list: new LinkedList({data: [2, 6, 3, 4, 0, 3, 4, 6, 5, 2, 6, 9, 8, 7]}),
partition: -1
},
{
list: new LinkedList({data: [2, 6, 3, 4, 0, 3, 4, 6, 5, 2, 6, 9, 8, 7]}),
partition: 0
},
{
list: new LinkedList({data: [2, 6, 3, 4, 0, 3, 4, 6, 5, 2, 6, 9, 8, 7]}),
partition: 9
},
{
list: new LinkedList({data: [2, 6, 3, 4, 0, 3, 4, 6, 5, 2, 6, 9, 8, 7]}),
partition: 10
}
];
const expected = [
[3, 2, 1, 5, 8, 5, 10],
[2, 3, 4, 0, 3, 4, 2, 6, 6, 5, 6, 9, 8, 7],
[2, 6, 3, 4, 0, 3, 4, 6, 5, 2, 6, 9, 8, 7],
[2, 6, 3, 4, 0, 3, 4, 6, 5, 2, 6, 9, 8, 7],
[2, 6, 3, 4, 0, 3, 4, 6, 5, 2, 6, 8, 7, 9],
[2, 6, 3, 4, 0, 3, 4, 6, 5, 2, 6, 9, 8, 7]
];
const should = require('should');
for (let i in tests) {
console.log(tests[i].list.toString());
console.log('partitioning around ' + tests[i].partition);
partition(tests[i].list, tests[i].partition).values.should.eql(expected[i]);
console.log(tests[i].list.toString());
console.log();
}
console.log();
console.log('Success!\n');
module.exports = partition;
|
const friendlyName = (str) => {
// capitalize first letter
str = str.charAt(0).toUpperCase() + str.slice(1);
// split capitals
str = str.replace(/([a-z])([A-Z])/g, '$1 $2');
// CCW
str = str.replace('CCW', '(Counter Clockwise)');
// CW
str = str.replace('CW', '(Clockwise)');
return str;
};
export { friendlyName };
|
'use strict';
var yeoman = require('yeoman-generator');
var fs = require('fs');
var path = require('path');
module.exports = yeoman.generators.Base.extend({
initializing: function () {
var base_path = this.config.get('path');
var fileList = {
foundation: getScssFileList(path.join(base_path, 'foundation')),
layout: getScssFileList(path.join(base_path, 'layout')),
component: getScssFileList(path.join(base_path, 'object/component')),
project: getScssFileList(path.join(base_path, 'object/project')),
utility: getScssFileList(path.join(base_path, 'object/utility'))
}
this.fileList = fileList;
this.log('flocss import file generate.');
},
writing: function () {
this.fs.copyTpl(
this.templatePath('import.scss'),
this.destinationPath(path.join(this.config.get('path'), '_import.scss')),
{ base_path: this.config.get('path'), fileList: this.fileList }
);
}
});
function getScssFileList(dir_path) {
var results = [];
if (!fs.existsSync(dir_path)) {
return results;
}
var files = fs.readdirSync(dir_path);
files.filter(function(file) {
return fs.statSync(path.join(dir_path, file)).isFile() && /.*\.scss$/.test(file); //絞り込み
}).forEach(function (file) {
var filename = path.basename(file, '.scss');
if (/^_.*$/.test(filename)) {
filename = filename.substring(1);
}
results.push(filename);
});
return results;
}
|
function doContact(){var e={name:document.getElementById("contact-name").value,email:document.getElementById("contact-email").value,subject:document.getElementById("contact-subject").value,message:document.getElementById("contact-message").value};if(e.name.length<=1||e.name.length>64)return alert("The name must be between 1 and 64 characters length"),void 0;if(e.email.length<=5||e.email.length>96||e.email.indexOf("@")<=0||-1===e.email.indexOf("."))return alert("The email must be between 5 and 86 characters length, including a '@' and a '.'"),void 0;if(e.subject.length<=1||e.subject.length>256)return alert("The subject must be between 1 and 256 characters length"),void 0;var t=new a.ajax({url:"contact",method:"POST",data:e},function(e){"ok"===e?alert("Message has been successfully sended to team"):alert("An error occurs, can't send email: "+e)},function(){alert("An error occurs, can't send email")});t.send()} |
'use strict';
// eslint 2.9.0
function e(opts) {
return v('error', opts);
}
function w(opts) {
return v('warn', opts);
}
function off() {
return v('off');
}
function v(level, opts) {
if (!opts) {
opts = [];
}
return [level].concat(opts);
}
module.exports = {
root: true,
parserOptions: {
sourceType: 'script',
ecmaVersion: 6,
ecmaFeatures: {}
},
env: {
es6: true,
node: true,
commonjs: true
},
rules: {
// http://eslint.org/docs/rules/#possible-errors
'comma-dangle': e(['never']), // http://eslint.org/docs/rules/comma-dangle
'no-cond-assign': e(), // http://eslint.org/docs/rules/no-cond-assign
'no-console': e(), // http://eslint.org/docs/rules/no-console
'no-constant-condition': e(), // http://eslint.org/docs/rules/no-constant-condition
'no-control-regex': e(), // http://eslint.org/docs/rules/no-control-regex
'no-debugger': e(), // http://eslint.org/docs/rules/no-debugger
'no-dupe-args': e(), // http://eslint.org/docs/rules/no-dupe-args
'no-dupe-keys': e(), // http://eslint.org/docs/rules/no-dupe-keys
'no-duplicate-case': e(), // http://eslint.org/docs/rules/no-duplicate-case
'no-empty': e(), // http://eslint.org/docs/rules/no-empty
'no-empty-character-class': e(), // http://eslint.org/docs/rules/no-empty-character-class
'no-ex-assign': e(), // http://eslint.org/docs/rules/no-ex-assign
'no-extra-boolean-cast': e(), // http://eslint.org/docs/rules/no-extra-boolean-cast
'no-extra-parens': e(), // http://eslint.org/docs/rules/no-extra-parens
'no-extra-semi': e(), // http://eslint.org/docs/rules/no-extra-semi
'no-func-assign': e(), // http://eslint.org/docs/rules/no-func-assign
'no-inner-declarations': e(['functions']), // http://eslint.org/docs/rules/no-inner-declarations
'no-invalid-regexp': e(), // http://eslint.org/docs/rules/no-invalid-regexp
'no-irregular-whitespace': e(), // http://eslint.org/docs/rules/no-irregular-whitespace
'no-negated-in-lhs': e(), // http://eslint.org/docs/rules/no-negated-in-lhs
'no-obj-calls': e(), // http://eslint.org/docs/rules/no-obj-calls
'no-regex-spaces': e(), // http://eslint.org/docs/rules/no-regex-spaces
'no-sparse-arrays': e(), // http://eslint.org/docs/rules/no-sparse-arrays
'no-unexpected-multiline': e(), // http://eslint.org/docs/rules/no-unexpected-multiline
'no-unreachable': e(), // http://eslint.org/docs/rules/no-unreachable
'use-isnan': e(), // http://eslint.org/docs/rules/use-isnan
'valid-jsdoc': w([{ // http://eslint.org/docs/rules/valid-jsdoc
requireReturn: false
}]),
'valid-typeof': e(), // http://eslint.org/docs/rules/valid-typeof
// http://eslint.org/docs/rules/#best-practices
'accessor-pairs': e(), // http://eslint.org/docs/rules/accessor-pairs
'array-callback-return': e(), // http://eslint.org/docs/rules/array-callback-return
'block-scoped-var': e(), // http://eslint.org/docs/rules/block-scoped-var
'complexity': e([5]), // http://eslint.org/docs/rules/complexity
'consistent-return': e(), // http://eslint.org/docs/rules/consistent-return
'curly': e(['all']), // http://eslint.org/docs/rules/curly
'default-case': e(), // http://eslint.org/docs/rules/default-case
'dot-location': e(['property']), // http://eslint.org/docs/rules/dot-location
'dot-notation': e(), // http://eslint.org/docs/rules/dot-notation
'eqeqeq': e(), // http://eslint.org/docs/rules/eqeqeq
'guard-for-in': e(), // http://eslint.org/docs/rules/guard-for-in
'no-alert': e(), // http://eslint.org/docs/rules/no-alert
'no-caller': e(), // http://eslint.org/docs/rules/no-caller
'no-case-declarations': e(), // http://eslint.org/docs/rules/no-case-declarations
'no-div-regex': off(), // http://eslint.org/docs/rules/no-div-regex
'no-else-return': e(), // http://eslint.org/docs/rules/no-else-return
'no-empty-function': e(), // http://eslint.org/docs/rules/no-empty-function
'no-empty-pattern': e(), // http://eslint.org/docs/rules/no-empty-pattern
'no-eq-null': e(), // http://eslint.org/docs/rules/no-eq-null
'no-eval': e(), // http://eslint.org/docs/rules/no-eval
'no-extend-native': e(), // http://eslint.org/docs/rules/no-extend-native
'no-extra-bind': e(), // http://eslint.org/docs/rules/no-extra-bind
'no-extra-label': e(), // http://eslint.org/docs/rules/no-extra-label
'no-fallthrough': e(), // http://eslint.org/docs/rules/no-fallthrough
'no-floating-decimal': e(), // http://eslint.org/docs/rules/no-floating-decimal
'no-implicit-coercion': e(), // http://eslint.org/docs/rules/no-implicit-coercion
'no-implicit-globals': e(), // http://eslint.org/docs/rules/no-implicit-globals
'no-implied-eval': e(), // http://eslint.org/docs/rules/no-implied-eval
'no-invalid-this': off(), // http://eslint.org/docs/rules/no-invalid-this
'no-iterator': e(), // http://eslint.org/docs/rules/no-iterator
'no-labels': e([{ // http://eslint.org/docs/rules/no-labels
allowLoop: true
}]),
'no-lone-blocks': e(), // http://eslint.org/docs/rules/no-lone-blocks
'no-loop-func': e(), // http://eslint.org/docs/rules/no-loop-func
'no-magic-numbers': off(), // Bullshit, http://eslint.org/docs/rules/no-magic-numbers
'no-multi-spaces': e(), // http://eslint.org/docs/rules/no-multi-spaces
'no-multi-str': e(), // http://eslint.org/docs/rules/no-multi-str
'no-native-reassign': e(), // http://eslint.org/docs/rules/no-native-reassign
'no-new': e(), // http://eslint.org/docs/rules/no-new
'no-new-func': e(), // http://eslint.org/docs/rules/no-new-func
'no-new-wrappers': e(), // http://eslint.org/docs/rules/no-new-wrappers
'no-octal': e(), // http://eslint.org/docs/rules/no-octal
'no-octal-escape': e(), // http://eslint.org/docs/rules/no-octal-escape
'no-param-reassign': off(), // http://eslint.org/docs/rules/no-param-reassign
'no-proto': e(), // http://eslint.org/docs/rules/no-proto
'no-redeclare': e(), // http://eslint.org/docs/rules/no-redeclare
'no-return-assign': e(), // http://eslint.org/docs/rules/no-return-assign
'no-script-url': e(), // http://eslint.org/docs/rules/no-script-url
'no-self-assign': e(), // http://eslint.org/docs/rules/no-self-assign
'no-self-compare': e(), // http://eslint.org/docs/rules/no-self-compare
'no-sequences': e(), // http://eslint.org/docs/rules/no-sequences
'no-throw-literal': e(), // http://eslint.org/docs/rules/no-throw-literal:
'no-unmodified-loop-condition': e(), // http://eslint.org/docs/rules/no-unmodified-loop-condition
'no-unused-expressions': e(), // http://eslint.org/docs/rules/no-unused-expressions
'no-unused-labels': e(), // http://eslint.org/docs/rules/no-unused-labels
'no-useless-call': e(), // http://eslint.org/docs/rules/no-useless-call
'no-useless-concat': e(), // http://eslint.org/docs/rules/no-useless-concat
'no-useless-escape': e(), // http://eslint.org/docs/rules/no-useless-escape
'no-void': e(), // http://eslint.org/docs/rules/no-void
'no-warning-comments': w([{ // http://eslint.org/docs/rules/no-warning-comments
location: 'anywhere',
terms: [
'todo',
'fix',
'fixme',
'xxx',
'eslint'
]
}]),
'no-with': e(), // http://eslint.org/docs/rules/no-with
'radix': e(), // http://eslint.org/docs/rules/radix
'vars-on-top': off(), // http://eslint.org/docs/rules/vars-on-top
'wrap-iife': e(['inside']), // http://eslint.org/docs/rules/wrap-iife
'yoda': e(['never']), // http://eslint.org/docs/rules/yoda
// http://eslint.org/docs/rules/#strict-mode
'strict': e(['safe']), // http://eslint.org/docs/rules/strict
// http://eslint.org/docs/rules/#variables
'init-declarations': off(), // http://eslint.org/docs/rules/init-declarations
'no-catch-shadow': e(), // http://eslint.org/docs/rules/no-catch-shadow
'no-delete-var': e(), // http://eslint.org/docs/rules/no-delete-var
'no-label-var': e(), // http://eslint.org/docs/rules/no-label-var
'no-restricted-globals': e([]), // http://eslint.org/docs/rules/no-restricted-globals
'no-shadow': e([{ // http://eslint.org/docs/rules/no-shadow
builtinGlobals: false,
hoist: 'all'
}]),
'no-shadow-restricted-names': e(), // http://eslint.org/docs/rules/no-shadow-restricted-names
'no-undef': e(), // http://eslint.org/docs/rules/no-undef
'no-undef-init': off(), // http://eslint.org/docs/rules/no-undef-init
'no-undefined': e(), // http://eslint.org/docs/rules/no-undefined
'no-unused-vars': e(), // http://eslint.org/docs/rules/no-unused-vars
'no-use-before-define': e([{ // http://eslint.org/docs/rules/no-use-before-define
functions: true,
classes: false
}]),
// http://eslint.org/docs/rules/#nodejs-and-commonjs
'callback-return': e(), // http://eslint.org/docs/rules/callback-return
'global-require': e(), // http://eslint.org/docs/rules/global-require
'handle-callback-err': e(), // http://eslint.org/docs/rules/handle-callback-err
'no-mixed-requires': e(), // http://eslint.org/docs/rules/no-mixed-requires
'no-new-require': e(), // http://eslint.org/docs/rules/no-new-require
'no-path-concat': e(), // http://eslint.org/docs/rules/no-path-concat
'no-process-env': off(), // http://eslint.org/docs/rules/no-process-env
'no-process-exit': e(), // http://eslint.org/docs/rules/no-process-exit
'no-restricted-modules': e([]), // http://eslint.org/docs/rules/no-restricted-modules
'no-sync': off([]), // http://eslint.org/docs/rules/no-sync
// http://eslint.org/docs/rules/#stylistic-issues
'array-bracket-spacing': e(['never']), // http://eslint.org/docs/rules/array-bracket-spacing
'block-spacing': e(['never']), // http://eslint.org/docs/rules/block-spacing
'brace-style': e(['1tbs']), // http://eslint.org/docs/rules/brace-style
'camelcase': off(), // http://eslint.org/docs/rules/camelcase
'comma-spacing': e([{ // http://eslint.org/docs/rules/comma-spacing
before: false,
after: true
}]),
'comma-style': e(['last']), // http://eslint.org/docs/rules/comma-style
'computed-property-spacing': e(['never']), // http://eslint.org/docs/rules/computed-property-spacing
'consistent-this': e(['that']), // http://eslint.org/docs/rules/consistent-this
'eol-last': e(['unix']), // http://eslint.org/docs/rules/eol-last
'func-names': off(), // http://eslint.org/docs/rules/func-names
'func-style': off(), // http://eslint.org/docs/rules/func-style
'id-blacklist': e([]), // http://eslint.org/docs/rules/id-blacklist
'id-length': off(), // Bullshit, http://eslint.org/docs/rules/id-length
'id-match': off(), // http://eslint.org/docs/rules/id-match
'indent': e([4, {SwitchCase: 1}]), // http://eslint.org/docs/rules/indent
'jsx-quotes': e(['prefer-double']), // http://eslint.org/docs/rules/jsx-quotes
'key-spacing': e([{ // http://eslint.org/docs/rules/key-spacing
beforeColon: false,
afterColon: true,
mode: 'strict'
}]),
'keyword-spacing': e([{ // http://eslint.org/docs/rules/keyword-spacing
before: true,
after: true,
overrides: {}
}]),
'linebreak-style': e(['unix']), // http://eslint.org/docs/rules/linebreak-style
'lines-around-comment': e([{ // http://eslint.org/docs/rules/lines-around-comment
beforeBlockComment: true,
afterBlockComment: false,
beforeLineComment: false,
afterLineComment: false,
allowBlockStart: true,
allowBlockEnd: true,
allowObjectStart: true,
allowObjectEnd: true,
allowArrayStart: true,
allowArrayEnd: true
}]),
'max-depth': e([{max: 4}]), // http://eslint.org/docs/rules/max-depth
'max-len': e([{ // http://eslint.org/docs/rules/max-len
code: 120,
tabWidth: 4,
comments: 120,
ignoreComments: false,
ignoreTrailingComments: false,
ignoreUrls: false
}]),
'max-nested-callbacks': e([{max: 3}]), // http://eslint.org/docs/rules/max-nested-callbacks
'max-params': e([{max: 4}]), // http://eslint.org/docs/rules/max-params
'max-statements': off(), // http://eslint.org/docs/rules/max-statements
'max-statements-per-line': e([{max: 1}]), // http://eslint.org/docs/rules/max-statements-per-line
'new-cap': e([{ // http://eslint.org/docs/rules/new-cap
newIsCap: true,
capIsNew: true,
newIsCapExceptions: [],
capIsNewExceptions: [
'Boolean',
'Number',
'Object',
'String',
'Symbol',
'I18N',
'Event'
],
properties: true
}]),
'new-parens': e(), // http://eslint.org/docs/rules/new-cap
'newline-after-var': e(['always']), // http://eslint.org/docs/rules/newline-after-var
'newline-before-return': off(), // http://eslint.org/docs/rules/newline-before-return
'newline-per-chained-call': e([{ // http://eslint.org/docs/rules/newline-per-chained-call
ignoreChainWithDepth: 3
}]),
'no-array-constructor': off(), // http://eslint.org/docs/rules/no-array-constructor
'no-bitwise': e([{ // http://eslint.org/docs/rules/no-bitwise
allow: ['|', '|='],
int32Hint: false
}]),
'no-continue': off(), // http://eslint.org/docs/rules/no-continue
'no-inline-comments': off(), // http://eslint.org/docs/rules/no-inline-comments
'no-lonely-if': e(), // http://eslint.org/docs/rules/no-lonely-if
'no-mixed-spaces-and-tabs': e(), // http://eslint.org/docs/rules/no-mixed-spaces-and-tabs
'no-multiple-empty-lines': e([{max: 1}]), // http://eslint.org/docs/rules/no-multiple-empty-lines
'no-negated-condition': e(), // http://eslint.org/docs/rules/no-negated-condition
'no-nested-ternary': e(), // http://eslint.org/docs/rules/no-nested-ternary
'no-new-object': e(), // http://eslint.org/docs/rules/no-new-object
'no-plusplus': e(), // http://eslint.org/docs/rules/no-plusplus
'no-restricted-syntax': e([ // http://eslint.org/docs/rules/no-restricted-syntax
'WithStatement'
]),
'no-spaced-func': e(), // http://eslint.org/docs/rules/no-spaced-func
'no-ternary': off(), // http://eslint.org/docs/rules/no-ternary
'no-trailing-spaces': e([{ // http://eslint.org/docs/rules/no-trailing-spaces
skipBlankLines: false
}]),
'no-underscore-dangle': off(), // http://eslint.org/docs/rules/no-underscore-dangle
'no-unneeded-ternary': e([{ // http://eslint.org/docs/rules/no-unneeded-ternary
defaultAssignment: false
}]),
'no-whitespace-before-property': e(), // http://eslint.org/docs/rules/no-whitespace-before-property
'object-curly-spacing': e(['never']), // http://eslint.org/docs/rules/object-curly-spacing
'one-var': e(['never']), // http://eslint.org/docs/rules/one-var
'one-var-declaration-per-line': e([ // http://eslint.org/docs/rules/one-var-declaration-per-line
'always'
]),
'operator-assignment': e(['always']), // http://eslint.org/docs/rules/operator-assignment
'operator-linebreak': e(['after', { // http://eslint.org/docs/rules/operator-linebreak
overrides: {}
}]),
'quote-props': e(['as-needed']), // http://eslint.org/docs/rules/quote-props
'quotes': e(['single', { // http://eslint.org/docs/rules/quotes
avoidEscape: false,
allowTemplateLiterals: true
}]),
'require-jsdoc': e([{ // http://eslint.org/docs/rules/require-jsdoc
require: {
FunctionDeclaration: false,
MethodDefinition: false,
ClassDeclaration: true
}
}]),
'semi': e(['always']), // http://eslint.org/docs/rules/semi
'semi-spacing': e([{ // http://eslint.org/docs/rules/semi-spacing
before: false,
after: true
}]),
'sort-vars': off(), // http://eslint.org/docs/rules/sort-vars
'space-before-blocks': e([{ // http://eslint.org/docs/rules/space-before-blocks
functions: 'always',
keywords: 'always',
classes: 'always'
}]),
'space-before-function-paren': e([{ // http://eslint.org/docs/rules/space-before-function-paren
anonymous: 'always',
named: 'never'
}]),
'space-in-parens': e(['never']), // http://eslint.org/docs/rules/space-in-parens
'space-infix-ops': e([{ // http://eslint.org/docs/rules/space-infix-ops
int32Hint: false
}]),
'space-unary-ops': e([{ // http://eslint.org/docs/rules/space-unary-ops
words: true,
nonwords: false,
overrides: {}
}]),
'spaced-comment': e(['always', { // http://eslint.org/docs/rules/spaced-comment
markers: [],
exceptions: [],
block: {
markers: [],
exceptions: []
},
line: {
markers: [],
exceptions: []
}
}]),
'wrap-regex': off(), // http://eslint.org/docs/rules/wrap-regex
// http://eslint.org/docs/rules/#ecmascript-6
'arrow-body-style': e(['as-needed']), // http://eslint.org/docs/rules/arrow-body-style
'arrow-parens': e(['always']), // http://eslint.org/docs/rules/arrow-parens
'arrow-spacing': e([{ // http://eslint.org/docs/rules/arrow-spacing
before: true,
after: true
}]),
'constructor-super': e(), // http://eslint.org/docs/rules/constructor-super
'generator-star-spacing': e([{ // http://eslint.org/docs/rules/generator-star
before: true,
after: false
}]),
'no-class-assign': e(), // http://eslint.org/docs/rules/no-class-assign
'no-confusing-arrow': e([{ // http://eslint.org/docs/rules/no-confusing-arrow
allowParens: true
}]),
'no-const-assign': e(), // http://eslint.org/docs/rules/no-confusing-arrow
'no-dupe-class-members': e(), // http://eslint.org/docs/rules/no-dupe-class-members
'no-duplicate-imports': e(), // http://eslint.org/docs/rules/no-duplicate-imports
'no-new-symbol': e(), // http://eslint.org/docs/rules/no-new-symbol
'no-restricted-imports': e([]), // http://eslint.org/docs/rules/no-restricted-imports
'no-this-before-super': e(), // http://eslint.org/docs/rules/no-this-before-super
'no-useless-computed-key': e(), // http://eslint.org/docs/rules/no-useless-computed-key
'no-useless-constructor': e(), // http://eslint.org/docs/rules/no-useless-constructor
'no-var': off(), // ES5 incompatible,
// http://eslint.org/docs/rules/no-var
'object-shorthand': off(), // ES5 incompatible,
// http://eslint.org/docs/rules/object-shorthand
'prefer-arrow-callback': off(), // ES5 incompatible,
// http://eslint.org/docs/rules/prefer-arrow-callback
'prefer-const': off(), // ES5 incompatible,
// http://eslint.org/docs/rules/no-useless-constructor
'prefer-reflect': off(), // ES5 incompatible,
// http://eslint.org/docs/rules/prefer-reflect
'prefer-rest-params': off(), // ES5 incompatible,
// http://eslint.org/docs/rules/prefer-rest-params
'prefer-spread': off(), // ES5 incompatible,
// http://eslint.org/docs/rules/prefer-spread
'prefer-template': off(), // ES5 incompatible,
// http://eslint.org/docs/rules/prefer-template
'require-yield': e(), // http://eslint.org/docs/rules/require-yield
'sort-imports': off(), // http://eslint.org/docs/rules/sort-imports
'template-curly-spacing': e(['never']), // http://eslint.org/docs/rules/template-curly-spacing
'yield-star-spacing': e([{ // http://eslint.org/docs/rules/yield-star-spacing
before: true,
after: false
}])
}
};
|
'use strict';
const utils = require('../utils/utils');
const emberUtils = require('../utils/ember');
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
const ERROR_MESSAGE = "Don't specify injected service name as an argument when it matches the property name.";
module.exports = {
meta: {
docs: {
description: 'Disallow unnecessary argument when injecting service',
category: 'Best Practices',
recommended: false
},
fixable: 'code',
ERROR_MESSAGE
},
create(context) {
return {
Property(node) {
if (!emberUtils.isInjectedServiceProp(node.value) ||
node.value.arguments.length !== 1 ||
!utils.isLiteral(node.value.arguments[0])) {
return;
}
const keyName = node.key.name;
const firstArgValue = node.value.arguments[0].value;
if (keyName === firstArgValue) {
context.report({
node: node.value.arguments[0],
message: ERROR_MESSAGE,
fix(fixer) {
return fixer.remove(node.value.arguments[0]);
}
});
}
}
};
}
};
|
import {
Color,
ShaderChunk,
ShaderLib,
UniformsUtils
} from "../../../build/three.module.js";
/**
* ------------------------------------------------------------------------------------------
* Subsurface Scattering shader
* Based on GDC 2011 – Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look
* https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/
*------------------------------------------------------------------------------------------
*/
function replaceAll( string, find, replace ) {
return string.split( find ).join( replace );
}
var meshphong_frag_head = ShaderChunk[ "meshphong_frag" ].slice( 0, ShaderChunk[ "meshphong_frag" ].indexOf( 'void main() {' ) );
var meshphong_frag_body = ShaderChunk[ "meshphong_frag" ].slice( ShaderChunk[ "meshphong_frag" ].indexOf( 'void main() {' ) );
var SubsurfaceScatteringShader = {
uniforms: UniformsUtils.merge( [
ShaderLib[ "phong" ].uniforms,
{
"thicknessMap": { value: null },
"thicknessColor": { value: new Color( 0xffffff ) },
"thicknessDistortion": { value: 0.1 },
"thicknessAmbient": { value: 0.0 },
"thicknessAttenuation": { value: 0.1 },
"thicknessPower": { value: 2.0 },
"thicknessScale": { value: 10.0 }
}
] ),
vertexShader: [
"#define USE_UV",
ShaderChunk[ "meshphong_vert" ],
].join( "\n" ),
fragmentShader: [
"#define USE_UV",
"#define SUBSURFACE",
meshphong_frag_head,
"uniform sampler2D thicknessMap;",
"uniform float thicknessPower;",
"uniform float thicknessScale;",
"uniform float thicknessDistortion;",
"uniform float thicknessAmbient;",
"uniform float thicknessAttenuation;",
"uniform vec3 thicknessColor;",
"void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {",
" vec3 thickness = thicknessColor * texture2D(thicknessMap, uv).r;",
" vec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));",
" float scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;",
" vec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;",
" reflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;",
"}",
meshphong_frag_body.replace( "#include <lights_fragment_begin>",
replaceAll(
ShaderChunk[ 'lights_fragment_begin' ],
'RE_Direct( directLight, geometry, material, reflectedLight );',
[
"RE_Direct( directLight, geometry, material, reflectedLight );",
"#if defined( SUBSURFACE ) && defined( USE_UV )",
" RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);",
"#endif",
].join( "\n" )
),
),
].join( "\n" ),
};
export { SubsurfaceScatteringShader };
|
export const ic_calendar_today_outline = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M0 0h24v24H0V0z","fill":"none"},"children":[]},{"name":"path","attribs":{"d":"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V10h16v11zm0-13H4V5h16v3z"},"children":[]}]}; |
var mongoose = require('mongoose');
var uriUtil = require('mongodb-uri');
/*
* // Pulled from https://gist.github.com/mongolab-org/9959376#file-mongoose-connection-options-js
* Mongoose by default sets the auto_reconnect option to true.
* We recommend setting socket options at both the server and replica set level.
* We recommend a 30 second connection timeout because it allows for
* plenty of time in most operating environments.
*/
var options = { server: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } },
replset: { socketOptions: { keepAlive: 1, connectTimeoutMS : 30000 } } };
/*
* Mongoose uses a different connection string format than MongoDB's standard.
* Use the mongodb-uri library to help you convert from the standard format to
* Mongoose's format.
*/
if (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === undefined) {
// mongoose.connect(process.env.MONGOLAB_URI || 'mongodb://localhost/scene_dev');
mongoose.connect(process.env.MONGOLAB_URI);
}
if (process.env.NODE_ENV === 'test') {
mongoose.connect('mongodb://localhost/scene_test');
}
if (process.env.NODE_ENV === 'production') {
var mongodbUri = process.env.MONGOLAB_URI;
var mongooseUri = uriUtil.formatMongoose(mongodbUri);
mongoose.connect(mongooseUri, options);
}
|
"use strict";
class TsReader {
constructor(buffer, position) {
this.buffer = buffer;
this.position = position || 0;
}
readBitsRaw(length) {
if (this.position + length > this.buffer.length << 3) {
this.position += length;
return 0;
}
let value = 0;
while (length > 7) {
const index = this.position >> 3;
const shift = this.position & 0x07;
const mask = Math.pow(2, 8 - shift) - 1;
value <<= 8;
value |= (this.buffer[index] & mask) << shift;
value |= this.buffer[index + 1] >> (8 - shift);
this.position += 8;
length -= 8;
}
while (length > 0) {
const index = this.position >> 3;
const shift = this.position & 0x07 ^ 0x07;
value <<= 1;
value |= this.buffer[index] >> shift & 0x01;
this.position++;
length--;
}
return value;
}
readBits(length) {
let value = 0;
while (length > 31) {
const bits = (length - 1) % 31 + 1;
value *= 0x80000000;
value += this.readBitsRaw(bits);
length -= bits;
}
value += this.readBitsRaw(length);
return value;
}
readBytesRaw(length) {
if (this.position + (length << 3) > this.buffer.length << 3) {
this.position += length << 3;
return Buffer.alloc(0);
}
const start = this.position >> 3;
this.position += length << 3;
return this.buffer.slice(start, start + length);
}
readBytes(length) {
return Buffer.from(this.readBytesRaw(length));
}
next(length) {
this.position += length;
}
previous(length) {
this.position -= length;
}
bslbf(length) {
return this.readBits(length);
}
uimsbf(length) {
return this.readBits(length);
}
tcimsbf(length) {
return (-this.readBits(1) << length - 1) | this.readBits(length - 1);
}
rpchof(length) {
return this.readBits(length);
}
}
module.exports = TsReader;
|
import React, { Component } from 'react';
import classnames from 'classnames';
import api from '../../utils/api-interface';
import StripeCheckout from 'react-stripe-checkout';
class UserPaymentBlock extends Component {
constructor(props) {
super(props);
this.state = {
errorMessage: '',
paymentInProgress: false,
paid: false
};
if (window.location.hostname == 'hackschedule.com') {
this.stripeKey = 'pk_live_qmovCOmw8NHmyjlH9PPu3Jgp';
} else {
this.stripeKey = 'pk_test_VJUKGjbH9Amo8DwJhqDeCAtM';
}
this.socket = io();
this.onToken = this.onToken.bind(this);
this.close = this.close.bind(this);
this.userChangedPaid = this.userChangedPaid.bind(this);
}
componentWillMount() {
this.socket.on('receive:userChangedPaid', this.userChangedPaid);
}
componentWillUnmount() {
this.socket.off('receive:userChangedPaid', this.userChangedPaid);
}
userChangedPaid({ email: userChangedEmail, paid }) {
const { email } = this.props;
if (email == userChangedEmail && paid)
this.setState({ paid });
}
renderPayment() {
const { email } = this.props;
const { errorMessage, paymentInProgress } = this.state;
return <div className='start upgrade'>
<h3 className='red'>Upgrade Features for $2 🙏</h3>
<div>
<p>Hosting and maintaining this service is expensive!
I need your help to offset the costs of building and running this app.
For $2, you get to unlock the ability to <b>see more than 25 options, pin class sections, and block out unavailabilities</b>!</p>
</div>
<div>
<StripeCheckout
token={this.onToken}
stripeKey={this.stripeKey}
name="HackSChedule Upgrade"
description="by Andrew Jiang"
amount={200}
currency="USD"
allowRememberMe={false}
email={email}>
<button className="red">Pay With Card</button>
</StripeCheckout>
<button className="blue" onClick={() => {
window.open('https://venmo.com/?txn=pay&audience=friends&recipients=ninjiangstar&amount=2¬e=hackschedule_id:' + email.split('@')[0])
}}>Venmo</button>
</div>
{(() => {
if (errorMessage.length > 0) return <div className='alert'>{errorMessage}</div>;
})()}
</div>;
}
renderThankYou() {
return <div className='start upgrade'>
<p><b>Thank you and good luck!</b></p>
<button onClick={this.close}>Activate Upgrades Now</button>
</div>;
}
render() {
const { paid } = this.state;
const { paid: isUserPaid } = this.props;
if (isUserPaid) return null;
else if(!paid) return this.renderPayment();
else return this.renderThankYou();
}
onToken(token) {
let { email, pin } = this.props;
this.setState({ paymentInProgress: true, errorMessage: '' });
api.post(api.user.pay(email), { pin, token })
.then(response => {
if (response.paid) {
this.setState({ paid: true });
} else {
this.setState({
paymentInProgress: false,
paid: false,
errorMessage: 'Unable to process payment: ' + response.error
});
}
});
}
close() {
this.props.close({
action: 'PAYMENT',
paid: this.state.paid
});
}
}
export default UserPaymentBlock;
|
var BVH = { REVISION:'0.1a'};
BVH.TO_RAD = Math.PI / 180;
window.URL = window.URL || window.webkitURL;
BVH.Reader = function(){
this.debug = true;
this.type = "";
this.data = null;
this.root = null;
this.numFrames = 0;
this.secsPerFrame = 0;
this.play = false;
this.channels = null;
this.lines = "";
this.speed = 1;
this.nodes = null;
this.frame = 0;
this.oldFrame = 0;
this.startTime = 0;
this.position = new THREE.Vector3( 0, 0, 0 );
this.scale = 1;
this.tmpOrder = "";
this.tmpAngle = [];
this.skeleton = null;
this.bones = [];
this.boneSize = 1.5;
this.material = new THREE.MeshNormalMaterial();//new THREE.MeshBasicMaterial({ color:0xffffff });
}
BVH.Reader.prototype = {
constructor: BVH.Reader,
load:function(fname){
this.type = fname.substring(fname.length-3,fname.length);
var _this = this;
var xhr = new XMLHttpRequest();
xhr.open( 'GET', fname, true );
if(this.type === 'bvh'){ // direct from file
xhr.onreadystatechange = function(){ if ( this.readyState == 4 ){ _this.parseData(this.responseText.split(/\s+/g));}};
} else if(this.type === 'png'){ // from png compress
xhr.responseType = 'blob';
xhr.onload = function(e) {
if (this.readyState == 4 ) {//if (this.status == 200) {
var blob = this.response;
var img = document.createElement('img');
img.onload = function(e) {
var c=document.createElement("canvas"), r='', pix, i, string = "";
c.width = this.width;
c.height = this.height;
c.getContext('2d').drawImage(this, 0, 0);
var d = c.getContext('2d').getImageData(0, 0, c.width, c.height).data;
for ( i = 0, l=d.length; i<l; i+=4){
pix = d[i];
if( pix<96 ) string += String.fromCharCode(pix+32);
}
var array = string.split(",");
_this.parseData(array);
window.URL.revokeObjectURL(img.src); // Clean up after yourself.
}
img.src = window.URL.createObjectURL(blob);
}
}
}
xhr.send( null );
},
parseData:function(data){
this.data = data;
this.channels = [];
this.nodes = [];
var done = false;
while (!done) {
switch (this.data.shift()) {
case 'ROOT':
if(this.root !== null) this.clearNode();
this.root = this.parseNode(this.data);
this.root.position.copy(this.position);
this.root.scale.set(this.scale,this.scale,this.scale);
if(this.debug){
this.addSkeleton( this.nodes.length );
}
break;
case 'MOTION':
this.data.shift();
this.numFrames = parseInt( this.data.shift() );
this.data.shift();
this.data.shift();
this.secsPerFrame = parseFloat(this.data.shift());
done = true;
}
}
debugTell("BVH frame:"+this.numFrames+" s/f:"+this.secsPerFrame + " channels:"+this.channels.length + " node:"+ this.nodes.length);
this.getNodeList();
this.startTime = Date.now();
this.play = true;
},
reScale:function (s) {
this.scale = s;
this.root.scale.set(this.scale,this.scale,this.scale);
},
rePosition:function (v) {
this.position = v;
this.root.position.copy(this.position);
},
getNodeList:function () {
var n = this.nodes.length, node, s = "";
for(var i=0; i<n; i++){
node = this.nodes[i];
s += node.name + " _ "+ i +"<br>"//+" _ "+node.parent.name +" _ "+node.children[0].name+"<br>";
}
if(out2)out2.innerHTML = s;
},
addSkeleton:function ( n ) {
this.skeleton = new THREE.Object3D();
this.bones = [];
var n = this.nodes.length, node, bone;
//var geo = new THREE.CubeGeometry( 0.2, 0.2, 10 );//new THREE.Geometry();
var geo = new THREE.CubeGeometry( this.boneSize, this.boneSize, 1);
//geo.applyMatrix( new THREE.Matrix4().makeTranslation( 0, 0, 6 ) );
geo.applyMatrix( new THREE.Matrix4().makeTranslation( 0, 0, 0.5 ) );
//var mat = new THREE.MeshNormalMaterial();
for(var i=0; i<n; i++){
node = this.nodes[i];
if ( node.name !== 'Site' ){
bone = new THREE.Mesh(geo, this.material);
bone.castShadow = true;
bone.rotation.order = 'XYZ';
bone.name = node.name;
this.skeleton.add(bone);
this.bones[i] = bone;
}
}
scene.add( this.skeleton );
},
updateSkeleton:function ( ) {
var mtx, node, bone;
var n = this.nodes.length;
var target;
for(var i=0; i<n; i++){
node = this.nodes[i];
bone = this.bones[i];
if ( node.name !== 'Site' ){
mtx = node.matrixWorld;
bone.position.setFromMatrixPosition( mtx );
//this.skeletonBones[i].rotation.setFromRotationMatrix( mtx );
if(node.children.length){
target = new THREE.Vector3().setFromMatrixPosition( node.children[0].matrixWorld );
bone.lookAt(target);
bone.rotation.z = 0;
if(bone.name==="Head")bone.scale.set(this.boneSize*2,this.boneSize*2,BVH.DistanceTest(bone.position, target)*(this.boneSize*1.5));
else bone.scale.set(this.boneSize,this.boneSize,BVH.DistanceTest(bone.position, target));
}
/*if(node.parent){
target = new THREE.Vector3().setFromMatrixPosition( node.parent.matrixWorld );
this.skeletonBones[i].lookAt(target);
}*/
}
}
},
transposeName:function(name){
if(name==="hip") name = "Hips";
if(name==="abdomen") name = "Spine1";
if(name==="chest") name = "Chest";
if(name==="neck") name = "Neck";
if(name==="head") name = "Head";
if(name==="lCollar") name = "LeftCollar";
if(name==="rCollar") name = "RightCollar";
if(name==="lShldr") name = "LeftUpArm";
if(name==="rShldr") name = "RightUpArm";
if(name==="lForeArm") name = "LeftLowArm";
if(name==="rForeArm") name = "RightLowArm";
if(name==="lHand") name = "LeftHand";
if(name==="rHand") name = "RightHand";
if(name==="lFoot") name = "LeftFoot";
if(name==="rFoot") name = "RightFoot";
if(name==="lThigh") name = "LeftUpLeg";
if(name==="rThigh") name = "RightUpLeg";
if(name==="lShin") name = "RightLowLeg";
if(name==="rShin") name = "LeftLowLeg";
// leg
if(name==="RightHip") name = "RightUpLeg";
if(name==="LeftHip") name = "LeftUpLeg";
if(name==="RightKnee") name = "RightLowLeg";
if(name==="LeftKnee") name = "LeftLowLeg";
if(name==="RightAnkle") name = "RightFoot";
if(name==="LeftAnkle") name = "LeftFoot";
// arm
if(name==="RightShoulder") name = "RightUpArm";
if(name==="LeftShoulder") name = "LeftUpArm";
if(name==="RightElbow") name = "RightLowArm";
if(name==="LeftElbow") name = "LeftLowArm";
if(name==="RightWrist") name = "RightHand";
if(name==="LeftWrist") name = "LeftHand";
if(name==="rcollar") name = "RightCollar";
if(name==="lcollar") name = "LeftCollar";
if(name==="rtoes") name = "RightToe";
if(name==="ltoes") name = "LeftToe";
if(name==="upperback") name = "Spine1";
return name;
},
parseNode:function(data){
var name, done, n, node, t;
name = data.shift();
name = this.transposeName(name);
node = new THREE.Object3D();
node.name = name;
done = false;
while ( !done ) {
switch ( t = data.shift()) {
case 'OFFSET':
node.position.set( parseFloat( data.shift() ), parseFloat( data.shift() ), parseFloat( data.shift() ) );
node.offset = node.position.clone();
break;
case 'CHANNELS':
n = parseInt( data.shift() );
for ( var i = 0; 0 <= n ? i < n : i > n; 0 <= n ? i++ : i-- ) {
this.channels.push({ node: node, prop: data.shift() });
}
break;
case 'JOINT':
case 'End':
node.add( this.parseNode(data) );
break;
case '}':
done = true;
}
}
this.nodes.push(node);
return node;
},
clearNode:function(){
var i;
if(out2)out2.innerHTML = "";
if(this.nodes){
for (i=0; i<this.nodes.length; i++){
this.nodes[i] = null;
}
this.nodes.length = 0;
if(this.bones.length > 0){
for ( i=0; i<this.bones.length; i++){
if(this.bones[i]){
this.bones[i].geometry.dispose();
}
}
this.bones.length = 0;
scene.remove( this.skeleton );
}
}
},
animate:function(){
//debugTell("frame" + this.frame);
var ch;
var n = this.frame % this.numFrames * this.channels.length;
var ref = this.channels;
var isRoot = false;
for ( var i = 0, len = ref.length; i < len; i++) {
ch = ref[ i ];
if(ch.node.name === "Hips") isRoot = true;
else isRoot = false;
switch ( ch.prop ) {
case 'Xrotation':
this.autoDetectRotation(ch.node, "X", parseFloat(this.data[n]));
//ch.node.rotation.x = (parseFloat(this.data[n])) * BVH.TO_RAD;
break;
case 'Yrotation':
this.autoDetectRotation(ch.node, "Y", parseFloat(this.data[n]));
//ch.node.rotation.y = (parseFloat(this.data[n])) * BVH.TO_RAD;
break;
case 'Zrotation':
this.autoDetectRotation(ch.node, "Z", parseFloat(this.data[n]));
//ch.node.rotation.z = (parseFloat(this.data[n])) * BVH.TO_RAD;
break;
case 'Xposition':
if(isRoot) ch.node.position.x = ch.node.offset.x + parseFloat(this.data[n])+ this.position.x;
else ch.node.position.x = ch.node.offset.x + parseFloat(this.data[n]);
break;
case 'Yposition':
if(isRoot) ch.node.position.y = ch.node.offset.y + parseFloat(this.data[n])+ this.position.y;
else ch.node.position.y = ch.node.offset.y + parseFloat(this.data[n]);
break;
case 'Zposition':
if(isRoot) ch.node.position.z = ch.node.offset.z + parseFloat(this.data[n])+ this.position.z;
else ch.node.position.z = ch.node.offset.z + parseFloat(this.data[n]);
break;
}
n++;
}
if(this.bones.length > 0) this.updateSkeleton();
},
autoDetectRotation:function(Obj, Axe, Angle){
this.tmpOrder+=Axe;
var angle = Angle * BVH.TO_RAD;
if(Axe === "X")this.tmpAngle[0] = angle;
else if(Axe === "Y")this.tmpAngle[1] = angle;
else this.tmpAngle[2] = angle;
if(this.tmpOrder.length===3){
var e = new THREE.Euler( this.tmpAngle[0], this.tmpAngle[1], this.tmpAngle[2], this.tmpOrder );
Obj.setRotationFromEuler(e);
Obj.updateMatrixWorld();
this.tmpOrder = "";
this.tmpAngle.length = 0;
}
},
matrixRotation:function(Obj, Axe, Angle){
//this.tmpAngle.push(Angle * BVH.TO_RAD);
//Obj.rotation[Axe] = Angle * BVH.TO_RAD;
//Obj.rotationAutoUpdate = false;
//Obj.matrix.matrixAutoUpdate = false;
/*var axis = new THREE.Vector3( 0, 0, 0 );
if(Axe === "x") axis.x = 1;
else if (Axe === "y") axis.y = 1;
else axis.z = 1;
axis.normalize();
*/
/*var quat = new THREE.Quaternion();
quat.setFromAxisAngle(axis,angle);
var vector = axis.clone();//new THREE.Vector3( 1, 0, 0 );
vector.applyQuaternion( quat )
//Obj.rotateOnAxis(axe.normalize(), angle);
// world axes
//Obj.quaternion.multiplyQuaternions(quat,Obj.quaternion);
Obj.lookAt(vector);*/
// body axes
//Obj.quaternion.multiply(quat);
//Obj.quaternion = quat;
/*var mtx = Obj.matrix.clone();
Obj.applyMatrix()
//mtx.extractRotation()
var mtx2 = Obj.matrix.clone();
mtx.matrixAutoUpdate = false;
mtx2.matrixAutoUpdate = false;
mtx.makeRotationAxis(axe.normalize(), angle);
Obj.matrixAutoUpdate = false;
Obj.matrix.multiplyMatrices(mtx, mtx2);
Obj.matrixAutoUpdate = true;*/
//Obj.rotation.setFromRotationMatrix( mtx );
},
update:function(){
if ( this.play ) {
this.frame = ((((Date.now() - this.startTime) / this.secsPerFrame / 1000) )*this.speed)| 0;
if(this.oldFrame!==0)this.frame += this.oldFrame;
if(this.frame > this.numFrames ){this.frame = 0;this.oldFrame=0; this.startTime =Date.now() }
this.animate();
}
},
next:function(){
this.play = false;
this.frame ++;
if(this.frame > this.numFrames )this.frame = 0;
this.animate();
},
prev:function(){
this.play = false;
this.frame --;
if(this.frame<0)this.frame = this.numFrames;
this.animate();
}
}
BVH.DistanceTest = function( p1, p2 ){
var x = p2.x-p1.x;
var y = p2.y-p1.y;
var z = p2.z-p1.z;
var d = Math.sqrt(x*x + y*y + z*z);
if(d<=0)d=0.1;
return d;
} |
'use strict';
/**
* Grunt setup
*/
module.exports = function(grunt) {
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
project: {
src: 'src',
filename: 'flare',
dist: 'dist',
test: 'test',
core: ['<%= project.src %>/<%= project.filename %>.js']
},
banner: '/*! <%= pkg.title %> v<%= pkg.version %> | (c) <%= grunt.template.today(\'yyyy\') %> @toddmotto | <%= pkg.homepage %> */\n',
jshint: {
gruntfile: 'Gruntfile.js',
files: ['<%= project.core %>'],
options: {
jshintrc: '.jshintrc'
}
},
jasmine : {
src : 'src/**/*.js',
options : {
specs : 'test/**/*-spec.js'
}
},
concat: {
dist: {
src: ['<%= project.core %>'],
dest: '<%= project.dist %>/<%= project.filename %>.js',
},
options: {
stripBanners: true,
banner: '<%= banner %>'
}
},
uglify: {
options: {
banner: '<%= banner %>'
},
dist: {
src: '<%= project.dist %>/<%= project.filename %>.js',
dest: '<%= project.dist %>/<%= project.filename %>.min.js'
},
},
clean: {
dist: [ 'dist' ]
},
copy: {
test: {
src: '<%= project.src %>/<%= project.filename %>.js',
dest: '<%= project.test %>/<%= project.filename %>.js',
},
},
connect: {
test: {
options: {
port: 9000,
hostname: '*',
open: true,
keepalive: true,
base: 'test'
}
}
},
watch: {
gruntfile: {
files: 'Gruntfile.js',
tasks: ['jshint:gruntfile'],
},
js: {
files: '<%= jshint.files %>',
tasks: ['jshint', 'uglify'],
}
}
});
grunt.registerTask('default', [
'clean',
'jshint',
'concat',
'uglify',
'jasmine'
]);
grunt.registerTask('travis', [
'jshint',
'jasmine'
]);
};
|
import { props, childTypes } from './util';
import validChildren from './executable';
export default function foreach(node, check) {
props(node, check, {
'array': true,
'item': true,
'index': false
});
childTypes(node, check, validChildren);
};
|
import mixin from '../../../mixin/field/mixin/value-behaviour';
export default mixin; |
#!/usr/bin/env node
'use strict';
if (process.version < 'v4.2.1') {
console.log('请将Node更新至4.2.1及以上版本,可以使用nvm在本地安装并管理多个Node版本。');
process.exit(1);
}
var main = require('../main');
var Args = require('../lib/util/args');
var splitChars = /[,;,;]/;
// run command for single id
var run = function (name, event) {
var opt = event.options || {};
var id = (event.args || [])[0];
if (!id) {
this.show(name);
process.exit(0);
} else {
opt.id = id;
this.format(name, opt);
main[name](opt);
}
};
var options = {
message: require('./config.js'),
package: require('../package.json'),
exit: function (code) {
if (typeof(code) === 'undefined') {
code = 0;
}
process.exit(code);
},
log: function (msg) {
console.log(msg);
},
build: function (event) {
var action = 'build';
var config = event.options || {};
var id = (event.args || [])[0];
config = this.format(action, config);
config.action = action;
if (!id) {
if (config.template === 'mobile') {
// build empty mobile project
main.buildEmpty(config);
} else {
this.show(action);
this.emit('exit', 0);
}
} else {
id.split(splitChars).forEach(function (it) {
config.id = it;
main.build(config);
});
}
},
update: function (event) {
var config = event.options || {};
var id = (event.args || [])[0] || '';
var action = 'update';
config = this.format(action, config);
config.action = action;
if (id) {
id.split(splitChars).forEach(function (it) {
config.id = it;
main.build(config);
});
} else {
// update all project
main.update(config);
}
},
mock: function (event) {
run.call(this, 'mock', event);
},
mobile: function (event) {
var opt = event.options || {};
opt.action = 'mobile';
this.format(opt.action, opt);
run.call(this, opt.action, event);
}
};
var args = new Args(options);
// do command
args.exec(process.argv.slice(2)); |
module.exports = function() {
let heroes = ["leto", "duncan", "goku", "batman", "asterix", "naruto", "totoro"];
for(let index = Math.min(heroes.length - 1, 5), __ks_0 = 2, hero; index >= __ks_0; index -= 2) {
hero = heroes[index];
console.log("The hero at index %d is %s", index, hero);
}
}; |
/*global define*/
define(
['marionette','vent','tpl!templates/nav/navbar.tmpl'],
function (Marionette, vent, tmpl) {
'use strict';
return Marionette.ItemView.extend({
template: tmpl
});
}
); |
import { extend } from '../core/core.js';
import { now } from '../core/time.js';
import { path } from '../core/path.js';
import { URI } from '../core/uri.js';
import { math } from '../math/math.js';
/**
* Callback used by {@link Http#get}, {@link Http#post}, {@link Http#put}, {@link Http#del}, and
* {@link Http#request}.
*
* @callback httpResponseCallback
* @param {number|string|Error|null} err - The error code, message, or exception in the case where the request fails.
* @param {*} [response] - The response data if no errors were encountered. (format depends on response type: text, Object, ArrayBuffer, XML).
*/
/**
* Used to send and receive HTTP requests.
*/
class Http {
static ContentType = {
FORM_URLENCODED: "application/x-www-form-urlencoded",
GIF: "image/gif",
JPEG: "image/jpeg",
DDS: "image/dds",
JSON: "application/json",
PNG: "image/png",
TEXT: "text/plain",
XML: "application/xml",
WAV: "audio/x-wav",
OGG: "audio/ogg",
MP3: "audio/mpeg",
MP4: "audio/mp4",
AAC: "audio/aac",
BIN: "application/octet-stream",
BASIS: "image/basis",
GLB: "model/gltf-binary"
};
static ResponseType = {
TEXT: 'text',
ARRAY_BUFFER: 'arraybuffer',
BLOB: 'blob',
DOCUMENT: 'document',
JSON: 'json'
};
static binaryExtensions = [
'.model',
'.wav',
'.ogg',
'.mp3',
'.mp4',
'.m4a',
'.aac',
'.dds',
'.basis',
'.glb'
];
static retryDelay = 100;
/**
* @function
* @name Http#get
* @description Perform an HTTP GET request to the given url.
* @param {string} url - The URL to make the request to.
* @param {httpResponseCallback} callback - The callback used when the response has returned. Passed (err, data)
* where data is the response (format depends on response type: text, Object, ArrayBuffer, XML) and
* err is the error code.
* @example
* pc.http.get("http://example.com/", function (err, response) {
* console.log(response);
* });
* @returns {XMLHttpRequest} The request object.
*/
/**
* @function
* @name Http#get
* @variation 2
* @description Perform an HTTP GET request to the given url with additional options such as headers, retries, credentials, etc.
* @param {string} url - The URL to make the request to.
* @param {object} options - Additional options.
* @param {object} [options.headers] - HTTP headers to add to the request.
* @param {boolean} [options.async] - Make the request asynchronously. Defaults to true.
* @param {object} [options.cache] - If false, then add a timestamp to the request to prevent caching.
* @param {boolean} [options.withCredentials] - Send cookies with this request. Defaults to false.
* @param {string} [options.responseType] - Override the response type.
* @param {Document|object} [options.postdata] - Data to send in the body of the request.
* Some content types are handled automatically. If postdata is an XML Document, it is handled. If
* the Content-Type header is set to 'application/json' then the postdata is JSON stringified.
* Otherwise, by default, the data is sent as form-urlencoded.
* @param {boolean} [options.retry] - If true then if the request fails it will be retried with an exponential backoff.
* @param {number} [options.maxRetries] - If options.retry is true this specifies the maximum number of retries. Defaults to 5.
* @param {number} [options.maxRetryDelay] - If options.retry is true this specifies the maximum amount of time to wait between retries in milliseconds. Defaults to 5000.
* @param {httpResponseCallback} callback - The callback used when the response has returned. Passed (err, data)
* where data is the response (format depends on response type: text, Object, ArrayBuffer, XML) and
* err is the error code.
* @example
* pc.http.get("http://example.com/", { "retry": true, "maxRetries": 5 }, function (err, response) {
* console.log(response);
* });
* @returns {XMLHttpRequest} The request object.
*/
get(url, options, callback) {
if (typeof options === "function") {
callback = options;
options = {};
}
return this.request("GET", url, options, callback);
}
/**
* @function
* @name Http#post
* @description Perform an HTTP POST request to the given url.
* @param {string} url - The URL to make the request to.
* @param {object} data - Data to send in the body of the request.
* Some content types are handled automatically. If postdata is an XML Document, it is handled. If
* the Content-Type header is set to 'application/json' then the postdata is JSON stringified.
* Otherwise, by default, the data is sent as form-urlencoded.
* @param {httpResponseCallback} callback - The callback used when the response has returned. Passed (err, data)
* where data is the response (format depends on response type: text, Object, ArrayBuffer, XML) and
* err is the error code.
* @example
* pc.http.post("http://example.com/", { "name": "Alix" }, function (err, response) {
* console.log(response);
* });
* @returns {XMLHttpRequest} The request object.
*/
/**
* @function
* @name Http#post
* @variation 2
* @description Perform an HTTP POST request to the given url with additional options such as headers, retries, credentials, etc.
* @param {string} url - The URL to make the request to.
* @param {object} data - Data to send in the body of the request.
* Some content types are handled automatically. If postdata is an XML Document, it is handled. If
* the Content-Type header is set to 'application/json' then the postdata is JSON stringified.
* Otherwise, by default, the data is sent as form-urlencoded.
* @param {object} options - Additional options.
* @param {object} [options.headers] - HTTP headers to add to the request.
* @param {boolean} [options.async] - Make the request asynchronously. Defaults to true.
* @param {object} [options.cache] - If false, then add a timestamp to the request to prevent caching.
* @param {boolean} [options.withCredentials] - Send cookies with this request. Defaults to false.
* @param {string} [options.responseType] - Override the response type.
* @param {boolean} [options.retry] - If true then if the request fails it will be retried with an exponential backoff.
* @param {number} [options.maxRetries] - If options.retry is true this specifies the maximum number of retries. Defaults to 5.
* @param {number} [options.maxRetryDelay] - If options.retry is true this specifies the maximum amount of time to wait between retries in milliseconds. Defaults to 5000.
* @param {httpResponseCallback} callback - The callback used when the response has returned. Passed (err, data)
* where data is the response (format depends on response type: text, Object, ArrayBuffer, XML) and
* err is the error code.
* @example
* pc.http.post("http://example.com/", { "name": "Alix" }, { "retry": true, "maxRetries": 5 }, function (err, response) {
* console.log(response);
* });
* @returns {XMLHttpRequest} The request object.
*/
post(url, data, options, callback) {
if (typeof options === "function") {
callback = options;
options = {};
}
options.postdata = data;
return this.request("POST", url, options, callback);
}
/**
* @function
* @name Http#put
* @description Perform an HTTP PUT request to the given url.
* @param {string} url - The URL to make the request to.
* @param {Document|object} data - Data to send in the body of the request.
* Some content types are handled automatically. If postdata is an XML Document, it is handled. If
* the Content-Type header is set to 'application/json' then the postdata is JSON stringified.
* Otherwise, by default, the data is sent as form-urlencoded.
* @param {httpResponseCallback} callback - The callback used when the response has returned. Passed (err, data)
* where data is the response (format depends on response type: text, Object, ArrayBuffer, XML) and
* err is the error code.
* @example
* pc.http.put("http://example.com/", { "name": "Alix" }, function (err, response) {
* console.log(response);
* });
* @returns {XMLHttpRequest} The request object.
*/
/**
* @function
* @name Http#put
* @variation 2
* @description Perform an HTTP PUT request to the given url with additional options such as headers, retries, credentials, etc.
* @param {string} url - The URL to make the request to.
* @param {Document|object} data - Data to send in the body of the request.
* Some content types are handled automatically. If postdata is an XML Document, it is handled. If
* the Content-Type header is set to 'application/json' then the postdata is JSON stringified.
* Otherwise, by default, the data is sent as form-urlencoded.
* @param {object} options - Additional options.
* @param {object} [options.headers] - HTTP headers to add to the request.
* @param {boolean} [options.async] - Make the request asynchronously. Defaults to true.
* @param {object} [options.cache] - If false, then add a timestamp to the request to prevent caching.
* @param {boolean} [options.withCredentials] - Send cookies with this request. Defaults to false.
* @param {string} [options.responseType] - Override the response type.
* @param {boolean} [options.retry] - If true then if the request fails it will be retried with an exponential backoff.
* @param {number} [options.maxRetries] - If options.retry is true this specifies the maximum number of retries. Defaults to 5.
* @param {number} [options.maxRetryDelay] - If options.retry is true this specifies the maximum amount of time to wait between retries in milliseconds. Defaults to 5000.
* @param {httpResponseCallback} callback - The callback used when the response has returned. Passed (err, data)
* where data is the response (format depends on response type: text, Object, ArrayBuffer, XML) and
* err is the error code.
* @example
* pc.http.put("http://example.com/", { "name": "Alix" }, { "retry": true, "maxRetries": 5 }, function (err, response) {
* console.log(response);
* });
* @returns {XMLHttpRequest} The request object.
*/
put(url, data, options, callback) {
if (typeof options === "function") {
callback = options;
options = {};
}
options.postdata = data;
return this.request("PUT", url, options, callback);
}
/**
* @function
* @name Http#del
* @description Perform an HTTP DELETE request to the given url.
* @param {object} url - The URL to make the request to.
* @param {httpResponseCallback} callback - The callback used when the response has returned. Passed (err, data)
* where data is the response (format depends on response type: text, Object, ArrayBuffer, XML) and
* err is the error code.
* @example
* pc.http.del("http://example.com/", function (err, response) {
* console.log(response);
* });
* @returns {XMLHttpRequest} The request object.
*/
/**
* @function
* @name Http#del
* @variation 2
* @description Perform an HTTP DELETE request to the given url with additional options such as headers, retries, credentials, etc.
* @param {object} url - The URL to make the request to.
* @param {object} options - Additional options.
* @param {object} [options.headers] - HTTP headers to add to the request.
* @param {boolean} [options.async] - Make the request asynchronously. Defaults to true.
* @param {object} [options.cache] - If false, then add a timestamp to the request to prevent caching.
* @param {boolean} [options.withCredentials] - Send cookies with this request. Defaults to false.
* @param {string} [options.responseType] - Override the response type.
* @param {Document|object} [options.postdata] - Data to send in the body of the request.
* Some content types are handled automatically. If postdata is an XML Document, it is handled. If
* the Content-Type header is set to 'application/json' then the postdata is JSON stringified.
* Otherwise, by default, the data is sent as form-urlencoded.
* @param {boolean} [options.retry] - If true then if the request fails it will be retried with an exponential backoff.
* @param {number} [options.maxRetries] - If options.retry is true this specifies the maximum number of retries. Defaults to 5.
* @param {number} [options.maxRetryDelay] - If options.retry is true this specifies the maximum amount of time to wait between retries in milliseconds. Defaults to 5000.
* @param {httpResponseCallback} callback - The callback used when the response has returned. Passed (err, data)
* where data is the response (format depends on response type: text, Object, ArrayBuffer, XML) and
* err is the error code.
* @example
* pc.http.del("http://example.com/", { "retry": true, "maxRetries": 5 }, function (err, response) {
* console.log(response);
* });
* @returns {XMLHttpRequest} The request object.
*/
del(url, options, callback) {
if (typeof options === "function") {
callback = options;
options = {};
}
return this.request("DELETE", url, options, callback);
}
/**
* @function
* @name Http#request
* @description Make a general purpose HTTP request.
* @param {string} method - The HTTP method "GET", "POST", "PUT", "DELETE".
* @param {string} url - The url to make the request to.
* @param {httpResponseCallback} callback - The callback used when the response has returned. Passed (err, data)
* where data is the response (format depends on response type: text, Object, ArrayBuffer, XML) and
* err is the error code.
* @example
* pc.http.request("get", "http://example.com/", function (err, response) {
* console.log(response);
* });
* @returns {XMLHttpRequest} The request object.
*/
/**
* @function
* @name Http#request
* @variation 2
* @description Make a general purpose HTTP request with additional options such as headers, retries, credentials, etc.
* @param {string} method - The HTTP method "GET", "POST", "PUT", "DELETE".
* @param {string} url - The url to make the request to.
* @param {object} options - Additional options.
* @param {object} [options.headers] - HTTP headers to add to the request.
* @param {boolean} [options.async] - Make the request asynchronously. Defaults to true.
* @param {object} [options.cache] - If false, then add a timestamp to the request to prevent caching.
* @param {boolean} [options.withCredentials] - Send cookies with this request. Defaults to false.
* @param {boolean} [options.retry] - If true then if the request fails it will be retried with an exponential backoff.
* @param {number} [options.maxRetries] - If options.retry is true this specifies the maximum number of retries. Defaults to 5.
* @param {number} [options.maxRetryDelay] - If options.retry is true this specifies the maximum amount of time to wait between retries in milliseconds. Defaults to 5000.
* @param {string} [options.responseType] - Override the response type.
* @param {Document|object} [options.postdata] - Data to send in the body of the request.
* Some content types are handled automatically. If postdata is an XML Document, it is handled. If
* the Content-Type header is set to 'application/json' then the postdata is JSON stringified.
* Otherwise, by default, the data is sent as form-urlencoded.
* @param {httpResponseCallback} callback - The callback used when the response has returned. Passed (err, data)
* where data is the response (format depends on response type: text, Object, ArrayBuffer, XML) and
* err is the error code.
* @example
* pc.http.request("get", "http://example.com/", { "retry": true, "maxRetries": 5 }, function (err, response) {
* console.log(response);
* });
* @returns {XMLHttpRequest} The request object.
*/
request(method, url, options, callback) {
let uri, query, postdata;
let errored = false;
if (typeof options === "function") {
callback = options;
options = {};
}
// if retryable we are going to store new properties
// in the options so create a new copy to not affect
// the original
if (options.retry) {
options = Object.assign({
retries: 0,
maxRetries: 5
}, options);
}
// store callback
options.callback = callback;
// setup defaults
if (options.async == null) {
options.async = true;
}
if (options.headers == null) {
options.headers = {};
}
if (options.postdata != null) {
if (options.postdata instanceof Document) {
// It's an XML document, so we can send it directly.
// XMLHttpRequest will set the content type correctly.
postdata = options.postdata;
} else if (options.postdata instanceof FormData) {
postdata = options.postdata;
} else if (options.postdata instanceof Object) {
// Now to work out how to encode the post data based on the headers
let contentType = options.headers["Content-Type"];
// If there is no type then default to form-encoded
if (contentType === undefined) {
options.headers["Content-Type"] = Http.ContentType.FORM_URLENCODED;
contentType = options.headers["Content-Type"];
}
switch (contentType) {
case Http.ContentType.FORM_URLENCODED: {
// Normal URL encoded form data
postdata = "";
let bFirstItem = true;
// Loop round each entry in the map and encode them into the post data
for (const key in options.postdata) {
if (options.postdata.hasOwnProperty(key)) {
if (bFirstItem) {
bFirstItem = false;
} else {
postdata += "&";
}
const encodedKey = encodeURIComponent(key);
const encodedValue = encodeURIComponent(options.postdata[key]);
postdata += `${encodedKey}=${encodedValue}`;
}
}
break;
}
default:
case Http.ContentType.JSON:
if (contentType == null) {
options.headers["Content-Type"] = Http.ContentType.JSON;
}
postdata = JSON.stringify(options.postdata);
break;
}
} else {
postdata = options.postdata;
}
}
if (options.cache === false) {
// Add timestamp to url to prevent browser caching file
const timestamp = now();
uri = new URI(url);
if (!uri.query) {
uri.query = "ts=" + timestamp;
} else {
uri.query = uri.query + "&ts=" + timestamp;
}
url = uri.toString();
}
if (options.query) {
uri = new URI(url);
query = extend(uri.getQuery(), options.query);
uri.setQuery(query);
url = uri.toString();
}
const xhr = new XMLHttpRequest();
xhr.open(method, url, options.async);
xhr.withCredentials = options.withCredentials !== undefined ? options.withCredentials : false;
xhr.responseType = options.responseType || this._guessResponseType(url);
// Set the http headers
for (const header in options.headers) {
if (options.headers.hasOwnProperty(header)) {
xhr.setRequestHeader(header, options.headers[header]);
}
}
xhr.onreadystatechange = () => {
this._onReadyStateChange(method, url, options, xhr);
};
xhr.onerror = () => {
this._onError(method, url, options, xhr);
errored = true;
};
try {
xhr.send(postdata);
} catch (e) {
// DWE: Don't callback on exceptions as behavior is inconsistent, e.g. cross-domain request errors don't throw an exception.
// Error callback should be called by xhr.onerror() callback instead.
if (!errored) {
options.error(xhr.status, xhr, e);
}
}
// Return the request object as it can be handy for blocking calls
return xhr;
}
_guessResponseType(url) {
const uri = new URI(url);
const ext = path.getExtension(uri.path);
if (Http.binaryExtensions.indexOf(ext) >= 0) {
return Http.ResponseType.ARRAY_BUFFER;
}
if (ext === ".xml") {
return Http.ResponseType.DOCUMENT;
}
return Http.ResponseType.TEXT;
}
_isBinaryContentType(contentType) {
const binTypes = [
Http.ContentType.MP4,
Http.ContentType.WAV,
Http.ContentType.OGG,
Http.ContentType.MP3,
Http.ContentType.BIN,
Http.ContentType.DDS,
Http.ContentType.BASIS,
Http.ContentType.GLB
];
if (binTypes.indexOf(contentType) >= 0) {
return true;
}
return false;
}
_onReadyStateChange(method, url, options, xhr) {
if (xhr.readyState === 4) {
switch (xhr.status) {
case 0: {
// If status code 0, it is assumed that the browser has cancelled the request
// Add support for running Chrome browsers in 'allow-file-access-from-file'
// This is to allow for specialized programs and libraries such as CefSharp
// which embed Chromium in the native app.
if (xhr.responseURL && xhr.responseURL.startsWith('file:///')) {
// Assume that any file loaded from disk is fine
this._onSuccess(method, url, options, xhr);
} else {
this._onError(method, url, options, xhr);
}
break;
}
case 200:
case 201:
case 206:
case 304: {
this._onSuccess(method, url, options, xhr);
break;
}
default: {
this._onError(method, url, options, xhr);
break;
}
}
}
}
_onSuccess(method, url, options, xhr) {
let response;
let contentType;
const header = xhr.getResponseHeader("Content-Type");
if (header) {
// Split up header into content type and parameter
const parts = header.split(";");
contentType = parts[0].trim();
}
try {
// Check the content type to see if we want to parse it
if (contentType === Http.ContentType.JSON || url.split('?')[0].endsWith(".json")) {
// It's a JSON response
response = JSON.parse(xhr.responseText);
} else if (this._isBinaryContentType(contentType)) {
response = xhr.response;
} else {
// #if _DEBUG
if (contentType) {
console.warn(`responseType: ${xhr.responseType} being served with Content-Type: ${contentType}`);
}
// #endif
if (xhr.responseType === Http.ResponseType.ARRAY_BUFFER) {
response = xhr.response;
} else if (xhr.responseType === Http.ResponseType.BLOB || xhr.responseType === Http.ResponseType.JSON) {
response = xhr.response;
} else {
if (xhr.responseType === Http.ResponseType.DOCUMENT || contentType === Http.ContentType.XML) {
// It's an XML response
response = xhr.responseXML;
} else {
// It's raw data
response = xhr.responseText;
}
}
}
options.callback(null, response);
} catch (err) {
options.callback(err);
}
}
_onError(method, url, options, xhr) {
if (options.retrying) {
return;
}
// retry if necessary
if (options.retry && options.retries < options.maxRetries) {
options.retries++;
options.retrying = true; // used to stop retrying when both onError and xhr.onerror are called
const retryDelay = math.clamp(Math.pow(2, options.retries) * Http.retryDelay, 0, options.maxRetryDelay || 5000);
console.log(`${method}: ${url} - Error ${xhr.status}. Retrying in ${retryDelay} ms`);
setTimeout(() => {
options.retrying = false;
this.request(method, url, options, options.callback);
}, retryDelay);
} else {
// no more retries or not retry so just fail
options.callback(xhr.status === 0 ? 'Network error' : xhr.status, null);
}
}
}
const http = new Http();
export { http, Http };
|
function solve(args) {
let min,
l,
i,
j,
temp,
index;
args.splice(0, 1);
l = args.length;
for (i = 0; i < l; i += 1) {
min = Number.MAX_VALUE;
for (j = 0 + i; j < l; j += 1) {
if (min > +args[j]) {
min = +args[j];
index = j;
}
}
if (args[i] > min) {
temp = +args[i];
args[i] = min;
args[index] = temp;
}
}
for (i = 0; i < l; i += 1) {
console.log(args[i]);
}
}
solve(['8', '7', '3', '2', '3', '4', '2', '2', '-4']); |
// ==UserScript==
// @name test-utils
// @name:de test-utils
// @namespace dannysaurus.camamba
// @version 0.1
// @license MIT License
// @description primitive assert-methods for unit-testing
// @description:de primitive assert-methods for unit-testing
// ==/UserScript==
var LIB = LIB || {};
/**
* @type {{assertTrue}}
*/
LIB.testUtils = (function() {
'use strict';
function messageNotEquals(expected, actual) {
return "Assertion failed. expected: " + expected + " actual: " + actual
}
/**
* Throws an error if assertion fails
* @param {boolean} condition - condition to be checked</br><code>true</code> has the assertion succeed </br>false has the assertion fail (and throws an Error)
* @param {string} [message] - debug-message to display if the assertion fails
*/
var assertTrue = function(condition, message) {
message = message || "Assertion failed";
if (!condition) {
throw new Error(message);
}
};
/**
* Asserts that two values or objects are equal. Throws an Error if assertion fails.
* Strict comparison (<code>===</code>) is used to check for equality.
* @param {*} expected - the expected value or object
* @param {*} actual - the value or object to check against <code>expected</code>
*/
var assertEquals = function(expected, actual) {
var message = messageNotEquals(expected, actual);
assertTrue(expected === actual, message);
};
/**
* Asserts that two values or objects are equal. Throws an Error if assertion fails.
* Nonstrict comparison with type convertation (<code>==</code>) is used to check for equality.
* @param {*} expected - the expected value or object
* @param {*} actual - the value or object to check against <code>expected</code>
*/
var assertEqualsNonStrict = function(expected, actual) {
var message = messageNotEquals(expected, actual);
assertTrue(expected == actual, message);
};
return {
assertTrue: assertTrue,
assertEquals: assertEquals,
assertEqualsNonStrict: assertEqualsNonStrict
};
})(); |
var starwarsNames = require('./starwars-names');
var uniqueRandomArray = require('unique-random-array');
module.exports = {
all:starwarsNames,
random:uniqueRandomArray(starwarsNames)
} |
// Generated by CoffeeScript 1.8.0
(function() {
'use strict';
/*
Channel Example -- worker01
This app waits for URLs to become available in the 'demo:urlq' queue, as provided
by worker01. Then, for each one it receives, the app gets the page for the URL,
computes an SHA1 value, and outputs it to the console log.
However, if it receives a '***stop***' message, it closes the connection and
quits immediately.
Usage:
cd demo/lib
node worker01.js
Use this app in conjunction with provider01.js. See the provider01 source code
for more details.
*/
var Channel, SHA1, channel, initEventHandlers, onData, request, shutDown, urlQueueName;
Channel = require('node-redis-queue').Channel;
request = require('request');
SHA1 = require('./lib/helpers/tinySHA1.r4.js').SHA1;
urlQueueName = 'demo:urlq';
channel = null;
channel = new Channel();
channel.connect(function() {
initEventHandlers();
channel.pop(urlQueueName, onData);
return console.log('Waiting for data...');
});
initEventHandlers = function() {
channel.on('end', function() {
console.log('worker01 detected Redis connection ended');
return shutDown();
});
return channel.on('error', function(error) {
console.log('worker01 stopping due to: ' + error);
return shutDown();
});
};
onData = function(url) {
console.log('message url = ' + url);
if (typeof url === 'string') {
if (url === '***stop***') {
console.log('worker01 stopping');
shutDown();
}
console.log('worker01 processing URL "' + url + '"');
return request(url, function(error, response, body) {
var sha1;
if (!error && response.statusCode === 200) {
sha1 = SHA1(body);
console.log(url + ' SHA1 = ' + sha1);
channel.pop(urlQueueName, onData);
} else {
console.log(error);
}
});
} else {
return console.log('Unexpected message: ', url);
}
};
shutDown = function() {
channel.end();
return process.exit();
};
}).call(this);
|
/*global module: true */
var WebpayJsError = function WebpayJsError(message) {
Error.apply(this, arguments);
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.message = message;
};
WebpayJsError.prototype = new Error();
WebpayJsError.prototype.constructor = WebpayJsError;
module.exports = WebpayJsError;
|
/* ----------------------------------------------------------------------------------
* Author: Grant Storey & Dillon Reisman
* Written: 8/15/16
* Last Updated: 8/15/16
* Description: Contains a map between locale codes and the corresponding
* "Sponsored" text, as well as a default list if the locale cannot be
* determined.
* ----------------------------------------------------------------------------------
*/
// all locales accessible to me on facebook.
var TEXT_POSSIBILITIES_DEFAULT = [
"\u0110\u01B0\u1EE3c t\u00E0i tr\u1EE3", // (Được tài trợ) Vietnamese
"\u03A7\u03BF\u03C1\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03B7", // (Χορηγούμενη) Greek
"\u0411\u043E \u0441\u0430\u0440\u043F\u0430\u0440\u0430\u0441\u0442\u04E3", // (Бо сарпарастӣ) Tajik
"\u0414\u0435\u043C\u0435\u0443\u0448\u0456\u043B\u0456\u043A \u043A\u04E9\u0440\u0441\u0435\u0442\u043A\u0435\u043D", // (Демеушілік көрсеткен) Kazakh
"\u0418\u0432\u044D\u044D\u043D \u0442\u044D\u0442\u0433\u044D\u0441\u044D\u043D", // (Ивээн тэтгэсэн) Mongolian
"\u0420\u0435\u043A\u043B\u0430\u043C\u0430", // (Реклама) Russian, Ukranian
"\u0420\u044D\u043A\u043B\u0430\u043C\u0430", // (Рэклама) Belarusian
"\u0421\u043F\u043E\u043D\u0437\u043E\u0440\u0438\u0440\u0430\u043D\u043E", // (Спонзорирано) Macedonian
"\u0421\u043F\u043E\u043D\u0437\u043E\u0440\u0438\u0441\u0430\u043D\u043E", // (Спонзорисано) Serbian
"\u0421\u043F\u043E\u043D\u0441\u043E\u0440\u0438\u0440\u0430\u043D\u043E", // (Спонсорирано) Bulgarian
"\u0533\u0578\u057E\u0561\u0566\u0564\u0561\u0575\u056B\u0576", // (Գովազդային) Armenian
"\u05D1\u05D7\u05E1\u05D5\u05EA", // (בחסות) Hebrew
"\u0625\u0639\u0644\u0627\u0646 \u0645\u064F\u0645\u0648\u0651\u064E\u0644", // (إعلان مُموَّل) Arabic
"\u062A\u0639\u0627\u0648\u0646 \u06A9\u0631\u062F\u06C1", // (تعاون کردہ) Urdu
"\u062A\u0645\u0648\u064A\u0644 \u0634\u0648\u064A", // (تمويل شوي) Pashto
"\u062F\u0627\u0631\u0627\u06CC \u067E\u0634\u062A\u06CC\u0628\u0627\u0646\u06CC \u0645\u0627\u0644\u06CC", // (دارای پشتیبانی مالی) Farsi
"\u067E\u0627\u06B5\u067E\u0634\u062A\u06CC\u06A9\u0631\u0627\u0648", // (پاڵپشتیکراو) Sorani Kurdish
"\u0712\u0718\u0715\u0729\u0710 \u0721\u0721\u0718\u0718\u0722\u0710", // (browser cannot render) Syriac
"\u092A\u094D\u0930\u093E\u092F\u094B\u091C\u093F\u0924", // (प्रायोजित) Hindi, Marathi, Nepali
"\u09AA\u09C3\u09B7\u09CD\u09A0\u09AA\u09CB\u09B7\u0995\u09A4\u09BE \u0995\u09F0\u09BE", // (পৃষ্ঠপোষকতা কৰা) Assamese
"\u09B8\u09CC\u099C\u09A8\u09CD\u09AF\u09C7", // (সৌজন্যে) Bengali
"\u0A38\u0A30\u0A2A\u0A4D\u0A30\u0A38\u0A24\u0A40 \u0A2A\u0A4D\u0A30\u0A3E\u0A2A\u0A24", // (ਸਰਪ੍ਰਸਤੀ ਪ੍ਰਾਪਤ) Punjabi
"\u0AAA\u0ACD\u0AB0\u0ABE\u0AAF\u0ACB\u0A9C\u0ABF\u0AA4", // (પ્રાયોજિત) Gujarati
"\u0B2A\u0B4D\u0B30\u0B2F\u0B4B\u0B1C\u0B3F\u0B24", // (ପ୍ରଯୋଜିତ) Oriya
"\u0BB8\u0BCD\u0BAA\u0BBE\u0BA9\u0BCD\u0BB8\u0BB0\u0BCD \u0B9A\u0BC6\u0BAF\u0BCD\u0BAF\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1", // (ஸ்பான்ஸர் செய்யப்பட்டது) Tamil
"\u0C38\u0C4D\u0C2A\u0C3E\u0C28\u0C4D\u0C38\u0C30\u0C4D \u0C1A\u0C47\u0C38\u0C3F\u0C28\u0C35\u0C3F", // (స్పాన్సర్ చేసినవి) Telegu
"\u0CAA\u0CCD\u0CB0\u0CBE\u0CAF\u0CCB\u0C9C\u0CBF\u0CA4", // (ಪ್ರಾಯೋಜಿತ) Kannada
"\u0D38\u0D4D\u0D2A\u0D4B\u0D7A\u0D38\u0D7C \u0D1A\u0D46\u0D2F\u0D4D\u0D24\u0D24\u0D4D", // (സ്പോൺസർ ചെയ്തത്) Malayalam
"\u0D85\u0DB1\u0DD4\u0D9C\u0DCA\u200D\u0DBB\u0DC4\u0DBA \u0DAF\u0D9A\u0DCA\u0DC0\u0DB1 \u0DBD\u0DAF", // (අනුග්රහය දක්වන ලද) Sinhalese
"\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19", // (ได้รับการสนับสนุน) Thai
"\u1015\u1036\u1037\u1015\u102D\u102F\u1038\u1011\u102C\u1038\u101E\u100A\u103A", // (ပံ့ပိုးထားသည်) Burmese
"\u10E0\u10D4\u10D9\u10DA\u10D0\u10DB\u10D0", // (რეკლამა) Georgian
"\u1794\u17B6\u1793\u17A7\u1794\u178F\u17D2\u1790\u1798\u17D2\u1797", // (បានឧបត្ថម្ភ) Khmer
"\u2D49\u2D37\u2D4D", // (browser cannot render) Tamazight
"\u5E83\u544A", // (広告) Japanese (Standard, Kansai)
"\u8D0A\u52A9", // (贊助) Chinese (Traditional) (Hong Kong, Taiwan)
"\u8D5E\u52A9\u5185\u5BB9", // (赞助内容) Chinese (Simplified)
"5p4m", // Leet Speak
"Apmaks\u0101ta rekl\u0101ma", // (Apmaksāta reklāma) Latvian
"Babestua", // Basque
"Bersponsor", // Indonesian
"Chartered", // Pirate
"Commandit\u00E9", // (Commandité) French (Canada)
"Daukar Nauyi", // Hausa
"Disponsori", // Javanese
"Ditaja", // Malay
"Expensum", // Latin
"Geborg", // Afrikaans
"Gesponsert", // German
"Gesponsord", // Dutch, Belgian Dutch
"Giisponsoran", // Bisaya
"Hirdet\u00E9s", // (Hirdetés) Hungarian
"Icyamamaza ndasukirwaho", // Kinyarwanda
"Imedhaminiwa", // Swahili
"Kosta\u00F0", // (Kostað) Icelandic
"La maalgeliyey", // Somali
"May Sponsor", // Filipino
"Misy mpanohana", // Malagasy
"O\u00F1epatrosinapyre", // (Oñepatrosinapyre) Guarani
"p\u0259\u0279osuodS", // (pəɹosuodS) English (Upside Down)
"Paeroniet", // Breton
"Patrocinado", // Galician, Portuguese (Brasil, Portugal), Spanish (Columbia)
"Patrocinat", // Catalan
"Patronadu de:", // Sardinian
"Pla\u0107eni oglas", // (Plaćeni oglas) Croation
"Publicidad", // Spanish (Standard, Spain)
"R\u0117m\u0117jai", // (Rėmėjai) Lithuanian
"Reklama", // Uzbek
"Sponsa", // Norwegian (Nynorsk)
"Sponset", // Norwegian (Bokmal)
"Sponsitud", // Estonian
"Sponsor d\u0259st\u0259kli", // (Sponsor dəstəkli) Azerbaijani
"Sponsore", // Western Frisian
"Sponsored", // English (UK, US), Korean
"Sponsoreret", // Danish
"Sponsoris\u00E9", // (Sponsorisé) French (France)
"Sponsorita", // Esperanto
"Sponsorizat", // Romanian
"Sponsorizuar", // Albanian
"Sponsorizzata", // Italian
"Sponsorkir\u00EE", // (Sponsorkirî) Northern Kurdish
"Sponsorlu", // Turkish
"Sponsoroitu", // Finnish
"Sponsorowane", // Polish
"Sponsrad", // Swedish
"Sponzorirano", // Bosnian, Slovenian
"Sponzorov\u00E1no", // (Sponzorováno) Czech
"Sponzorovan\u00E9", // (Sponzorované) Slovak
"Stu\u00F0la\u00F0", // (Stuðlað) Faroese
"Szp\u014Dnzorowane", // (Szpōnzorowane) Silesian
"Urraithe" // Irish
];
var LOCALE_MAP = {
"so_SO": "La maalgeliyey", // Somali; works as of 8/15/16
"af_ZA": "Geborg", // Afrikaans; works as of 8/15/16
"az_AZ": "Sponsor d\u0259st\u0259kli", // (Sponsor dəstəkli) Azerbaijani; works as of 8/15/16
"id_ID": "Bersponsor", // Indonesian; works as of 8/15/16
"ms_MY": "Ditaja", // Malay; works as of 8/15/16
"jv_ID": "Disponsori", // Javanese; works as of 8/15/16
"cx_PH": "Giisponsoran", // Bisaya; works as of 8/15/16
"bs_BA": "Sponzorirano", // Bosnian; works as of 8/15/16
"br_FR": "Paeroniet", // Breton; works as of 8/15/16
"ca_ES": "Patrocinat", // Catalan; works as of 8/15/16
"cs_CZ": "Sponzorov\u00E1no", // (Sponzorováno) Czech; works as of 8/15/16
"da_DK": "Sponsoreret", // Danish; works as of 8/15/16
"de_DE": "Gesponsert", // German; works as of 8/15/16
"et_EE": "Sponsitud", // Estonian; works as of 8/15/16
"en_PI": "Chartered", // Pirate; works as of 8/15/16
"en_GB": "Sponsored", // English (UK); works as of 8/15/16
"en_US": "Sponsored", // English (US); works as of 8/15/16
"en_UD": "p\u0259\u0279osuodS", // (pəɹosuodS) English (Upside Down); works as of 8/15/16
"es_LA": "Publicidad", // Spanish; works as of 8/15/16
"es_CO": "Patrocinado", // Spanish (Columbia); works as of 8/15/16
"es_ES": "Publicidad", // Spanish (Spain); works as of 8/15/16
"eo_EO": "Sponsorita", // Esperanto; works as of 8/15/16
"eu_ES": "Babestua", // Basque; works as of 8/15/16
"tl_PH": "May Sponsor", // Filipino; works as of 8/15/16
"fr_CA": "Commandit\u00E9", // (Commandité) French (Canada); works as of 8/15/16
"fr_FR": "Sponsoris\u00E9", // (Sponsorisé) French (France); works as of 8/15/16
"fy_NL": "Sponsore", // Western Frisian; works as of 8/15/16
"fo_FO": "Stu\u00F0la\u00F0", // (Stuðlað) Faroese; works as of 8/15/16
"ga_IE": "Urraithe", // Irish; works as of 8/15/16
"gl_ES": "Patrocinado", // Galician; works as of 8/15/16
"gn_PY": "O\u00F1epatrosinapyre", // (Oñepatrosinapyre) Guarani; works as of 8/15/16
"ha_NG": "Daukar Nauyi", // Hausa; works as of 8/15/16
"hr_HR": "Pla\u0107eni oglas", // (Plaćeni oglas) Croatian; works as of 8/15/16
"rw_RW": "Icyamamaza ndasukirwaho", // Kinyarwanda; works as of 8/15/16
"is_IS": "Kosta\u00F0", // (Kostað) Icelandic; works as of 8/15/16
"it_IT": "Sponsorizzata", // Italian; works as of 8/15/16
"sw_KE": "Imedhaminiwa", // Swahili; works as of 8/15/16
"ku_TR": "Sponsorkir\u00EE", // (Sponsorkirî) Northern Kurdish; works as of 8/15/16
"lv_LV": "Apmaks\u0101ta rekl\u0101ma", // (Apmaksāta reklāma) Latvian; works as of 8/15/16
"fb_LT": "5p4m", // Leet Speak - particularly funny that they literally just call it "spam"; works as of 8/15/16
"lt_LT": "R\u0117m\u0117jai", // (Rėmėjai) Lithuanian; works as of 8/15/16
"la_VA": "Expensum", // Latin; works as of 8/15/16
"hu_HU": "Hirdet\u00E9s", // (Hirdetés) Hungarian; works as of 8/15/16
"mg_MG": "Misy mpanohana", // Malagasy; works as of 8/15/16
"nl_NL": "Gesponsord", // Dutch; works as of 8/15/16
"nl_BE": "Gesponsord", // Dutch (Belgian); works as of 8/15/16
"nb_NO": "Sponset", // Norwegian (Bokmal); works as of 8/15/16
"nn_NO": "Sponsa", // Norwegian (Nynorsk); works as of 8/15/16
"uz_UZ": "Reklama", // Uzbek; works as of 8/15/16
"pl_PL": "Sponsorowane", // Polish; works as of 8/15/16
"pt_BR": "Patrocinado", // Portuguese (Brasil); works as of 8/15/16
"pt_PT": "Patrocinado", // Portuguese (Portugal); works as of 8/15/16
"ro_RO": "Sponsorizat", // Romanian; works as of 8/15/16
"sc_IT": "Patronadu de:", // Sardinian; works as of 8/15/16
"sq_AL": "Sponsorizuar", // Albanian; works as of 8/15/16
"sz_PL": "Szp\u014Dnzorowane", // (Szpōnzorowane) Silesian; works as of 8/15/16
"sk_SK": "Sponzorovan\u00E9", // (Sponzorované) Slovak; works as of 8/15/16
"sl_SI": "Sponzorirano", // Slovenian; works as of 8/15/16
"fi_FI": "Sponsoroitu", // Finnish; works as of 8/15/16
"sv_SE": "Sponsrad", // Swedish; works as of 8/15/16
"vi_VN": "\u0110\u01B0\u1EE3c t\u00E0i tr\u1EE3", // (Được tài trợ) Vietnamese; works as of 8/15/16
"tr_TR": "Sponsorlu", // Turkish; works as of 8/15/16
"el_GR": "\u03A7\u03BF\u03C1\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03B7", // (Χορηγούμενη) Greek; works as of 8/15/16
"be_BY": "\u0420\u044D\u043A\u043B\u0430\u043C\u0430", // (Рэклама) Belarusian; works as of 8/15/16
"bg_BG": "\u0421\u043F\u043E\u043D\u0441\u043E\u0440\u0438\u0440\u0430\u043D\u043E", // (Спонсорирано) Bulgarian; works as of 8/15/16
"kk_KZ": "\u0414\u0435\u043C\u0435\u0443\u0448\u0456\u043B\u0456\u043A \u043A\u04E9\u0440\u0441\u0435\u0442\u043A\u0435\u043D", // (Демеушілік көрсеткен) Kazakh; works as of 8/15/16
"mk_MK": "\u0421\u043F\u043E\u043D\u0437\u043E\u0440\u0438\u0440\u0430\u043D\u043E", // (Спонзорирано) Macedonian; works as of 8/15/16
"mn_MN": "\u0418\u0432\u044D\u044D\u043D \u0442\u044D\u0442\u0433\u044D\u0441\u044D\u043D", // (Ивээн тэтгэсэн) Mongolian; works as of 8/15/16
"ru_RU": "\u0420\u0435\u043A\u043B\u0430\u043C\u0430", // (Реклама) Russian; works as of 8/15/16
"sr_RS": "\u0421\u043F\u043E\u043D\u0437\u043E\u0440\u0438\u0441\u0430\u043D\u043E", // (Спонзорисано) Serbian; works as of 8/15/16
"tg_TJ": "\u0411\u043E \u0441\u0430\u0440\u043F\u0430\u0440\u0430\u0441\u0442\u04E3", // (Бо сарпарастӣ) Tajik; works as of 8/15/16
"uk_UA": "\u0420\u0435\u043A\u043B\u0430\u043C\u0430", // (Реклама) Ukranian; works as of 8/15/16
"ka_GE": "\u10E0\u10D4\u10D9\u10DA\u10D0\u10DB\u10D0", // (რეკლამა) Georgian; works as of 8/15/16
"hy_AM": "\u0533\u0578\u057E\u0561\u0566\u0564\u0561\u0575\u056B\u0576", // (Գովազդային) Armenian; works as of 8/15/16
"he_IL": "\u05D1\u05D7\u05E1\u05D5\u05EA", // (בחסות) Hebrew; works as of 8/15/16
"ur_PK": "\u062A\u0639\u0627\u0648\u0646 \u06A9\u0631\u062F\u06C1", // (تعاون کردہ) Urdu; works as of 8/15/16
"ar_AR": "\u0625\u0639\u0644\u0627\u0646 \u0645\u064F\u0645\u0648\u0651\u064E\u0644", // (إعلان مُموَّل) Arabic; works as of 8/15/16
"ps_AF": "\u062A\u0645\u0648\u064A\u0644 \u0634\u0648\u064A", // (تمويل شوي) Pashto; works as of 8/15/16
"fa_IR": "\u062F\u0627\u0631\u0627\u06CC \u067E\u0634\u062A\u06CC\u0628\u0627\u0646\u06CC \u0645\u0627\u0644\u06CC", // (دارای پشتیبانی مالی) Farsi; works as of 8/15/16
"cb_IQ": "\u067E\u0627\u06B5\u067E\u0634\u062A\u06CC\u06A9\u0631\u0627\u0648", // (پاڵپشتیکراو) Sorani Kurdish; works as of 8/15/16
"sy_SY": "\u0712\u0718\u0715\u0729\u0710 \u0721\u0721\u0718\u0718\u0722\u0710", // (browser cannot render) Syriac; works as of 8/15/16
"tz_MA": "\u2D49\u2D37\u2D4D", // (browser cannot render) Tamazight; works as of 8/15/16
"ne_NP": "\u092A\u094D\u0930\u093E\u092F\u094B\u091C\u093F\u0924", // (प्रायोजित) Nepali; works as of 8/15/16
"mr_IN": "\u092A\u094D\u0930\u093E\u092F\u094B\u091C\u093F\u0924", // (प्रायोजित) Marathi; works as of 8/15/16
"hi_IN": "\u092A\u094D\u0930\u093E\u092F\u094B\u091C\u093F\u0924", // (प्रायोजित) Hindi; works as of 8/15/16
"as_IN": "\u09AA\u09C3\u09B7\u09CD\u09A0\u09AA\u09CB\u09B7\u0995\u09A4\u09BE \u0995\u09F0\u09BE", // (পৃষ্ঠপোষকতা কৰা) Assamese; works as of 8/15/16
"bn_IN": "\u09B8\u09CC\u099C\u09A8\u09CD\u09AF\u09C7", // (সৌজন্যে) Bengali; works as of 8/15/16
"pa_IN": "\u0A38\u0A30\u0A2A\u0A4D\u0A30\u0A38\u0A24\u0A40 \u0A2A\u0A4D\u0A30\u0A3E\u0A2A\u0A24", // (ਸਰਪ੍ਰਸਤੀ ਪ੍ਰਾਪਤ) Punjabi; works as of 8/15/16
"gu_IN": "\u0AAA\u0ACD\u0AB0\u0ABE\u0AAF\u0ACB\u0A9C\u0ABF\u0AA4", // (પ્રાયોજિત) Gujarati; works as of 8/15/16
"or_IN": "\u0B2A\u0B4D\u0B30\u0B2F\u0B4B\u0B1C\u0B3F\u0B24", // (ପ୍ରଯୋଜିତ) Oriya; works as of 8/15/16
"ta_IN": "\u0BB8\u0BCD\u0BAA\u0BBE\u0BA9\u0BCD\u0BB8\u0BB0\u0BCD \u0B9A\u0BC6\u0BAF\u0BCD\u0BAF\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1", // (ஸ்பான்ஸர் செய்யப்பட்டது) Tamil; works as of 8/15/16
"te_IN": "\u0C38\u0C4D\u0C2A\u0C3E\u0C28\u0C4D\u0C38\u0C30\u0C4D \u0C1A\u0C47\u0C38\u0C3F\u0C28\u0C35\u0C3F", // (స్పాన్సర్ చేసినవి) Telegu; works as of 8/15/16
"kn_IN": "\u0CAA\u0CCD\u0CB0\u0CBE\u0CAF\u0CCB\u0C9C\u0CBF\u0CA4", // (ಪ್ರಾಯೋಜಿತ) Kannada; works as of 8/15/16
"ml_IN": "\u0D38\u0D4D\u0D2A\u0D4B\u0D7A\u0D38\u0D7C \u0D1A\u0D46\u0D2F\u0D4D\u0D24\u0D24\u0D4D", // (സ്പോൺസർ ചെയ്തത്) Malayalam; works as of 8/15/16
"si_LK": "\u0D85\u0DB1\u0DD4\u0D9C\u0DCA\u200D\u0DBB\u0DC4\u0DBA \u0DAF\u0D9A\u0DCA\u0DC0\u0DB1 \u0DBD\u0DAF", // (අනුග්රහය දක්වන ලද) Sinhalese; works as of 8/15/16
"th_TH": "\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19", // (ได้รับการสนับสนุน) Thai; works as of 8/15/16
"my_MM": "\u1015\u1036\u1037\u1015\u102D\u102F\u1038\u1011\u102C\u1038\u101E\u100A\u103A", // (ပံ့ပိုးထားသည်) Burmese; works as of 8/15/16
"km_KH": "\u1794\u17B6\u1793\u17A7\u1794\u178F\u17D2\u1790\u1798\u17D2\u1797", // (បានឧបត្ថម្ភ) Khmer; works as of 8/15/16
"ko_KR": "Sponsored", // Korean - while most text is Korean, for ads it literally just says "Sponsored" in English; works as of 8/15/16
"ja_JP": "\u5E83\u544A", // (広告) Japanese; works as of 8/15/16
"ja_KS": "\u5E83\u544A", // (広告) Japanese (Kansai); works as of 8/15/16
"zh_CN": "\u8D5E\u52A9\u5185\u5BB9", // (赞助内容) Chinese (Simplified); works as of 8/15/16
"zh_TW": "\u8D0A\u52A9", // (贊助) Chinese (Taiwan); works as of 8/15/16
"zh_HK": "\u8D0A\u52A9" // (贊助) Chinese (Hong Kong); works as of 8/15/16
};
//*/
// Stores whether we are in a non-english locale
var NON_ENGLISH_LOCALE = false;
// use the source code to determine the locale, and if it is in the list,
// narrow down the number of possible "sponsored" text strings
function getLocale() {
var allHTML = $("html").html();
var myRe = /\"locale\":\"([^\"]+)\"/g;
var resultArray = myRe.exec(allHTML);
if (resultArray && resultArray.length >= 2) {
var localeCode = resultArray[1];
if (VERBOSE) {
console.log(localeCode);
}
if (!((localeCode == "en_PI") || (localeCode == "en_US") || (localeCode == "en_UK"))) {
NON_ENGLISH_LOCALE = true;
}
if (localeCode in LOCALE_MAP) {
return [LOCALE_MAP[localeCode]];
}
}
return null;
}
|
const { Observable } = require('rxjs/Observable');
const { isFSA } = require('flux-standard-action');
const fetch = require('node-fetch');
function toObservable(anything) {
if (
typeof anything === 'object' &&
typeof anything.then === 'function'
) {
return Observable.fromPromise(anything);
} else if (anything instanceof Observable) {
return anything;
} else {
return Observable.of(anything);
}
}
const toResponseAction = requestAction => anything => {
return Object.assign({}, requestAction, {
meta: Object.assign({}, requestAction.meta, {
protocol: 'response'
}),
payload: isFSA(anything)
? anything.payload
: anything
});
};
const toErrorAction = requestAction => anything => {
return Object.assign({}, requestAction, {
meta: Object.assign({}, requestAction.meta, {
protocol: 'response'
}),
error: true,
payload: isFSA(anything)
? anything.payload
: anything
});
};
function fetchAction(endpoint, action) {
const responsePromise = fetch(endpoint, {
method: 'post',
body: JSON.stringify(action),
headers: { 'Content-Type': 'application/json' }
})
.then(response => response.json())
.catch(error => toErrorAction(action)({ message: error.message }));
return toObservable(responsePromise);
}
function devLog(...args) {
/* eslint-disable no-console */
if (process.env.NODE_ENV === 'development') {
console.log(...args);
}
}
module.exports = {
toResponseAction,
toErrorAction,
toObservable,
fetchAction,
devLog
};
|
module.exports = {
entry: './build/src//prettyPrint.js',
output: {
path: __dirname + '/dist',
filename: 'bundle.js',
libraryTarget: 'umd',
library: 'prettyPrint',
globalObject: 'typeof self !== \'undefined\' ? self : this',
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'awesome-typescript-loader'
},
{
test: /\.scss$/,
loaders: ["style", "css", "sass"]
},
{
test: /\.css$/,
loaders: ["style", "css"]
}
]
/*
loaders: [
{ test: /\.(t|j)sx?$/, use: { loader: 'awesome-typescript-loader' } },
{
test: /\.scss$/,
loaders: ["style", "css", "sass"]
},
{
test: /\.css$/,
loaders: ["style", "css"]
}
]
*/
}
};
|
import store from '../store';
import PokerAPI from '../utils/poker-api';
import {
SET_PICKED_CARD, USER_LOGGED_OUT, USER_NAME_CHANGED, USER_SAVED,
} from './types';
const s4 = () => Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
export const generateGUID = () => `${s4() + s4()}-${s4()}-${s4()}-${s4()}-${s4() + s4() + s4()}`;
export const getRandomNumber = (min, max) => Math
.floor(Math.random() * ((((max - min) + 1)) + min));
export const pickCard = (card) => {
const { activeTask, game, user } = store.getState();
if (activeTask && activeTask.status === 'flipped') {
return;
}
store.dispatch({ type: SET_PICKED_CARD, card });
PokerAPI.patch(`/games/${game.id}/players/${user.guid}/pick`, { taskId: activeTask.id, vote: card.value });
};
// export const onCardPick = (message) => {
// const { game } = store.getState();
// game.getPlayerByGUID(message.player).isReady.set(true);
// };
export const apiSaveUser = () => async (dispatch) => {
const { user } = store.getState();
await PokerAPI.post('/players', {
guid: user.guid,
name: user.name,
});
dispatch({ type: USER_SAVED });
};
//
// export const joinGame = () => {
// const { game, user } = store.getState();
// return PokerAPI.patch(`/games/${game.id.get()}/players/${user.guid.get()}/add`);
// };
export const logout = () => async (dispatch) => {
// const { game, user } = store.getState();
// await PokerAPI.get(`/game/${game.id}/logout/${user.guid}`);
dispatch({ type: USER_LOGGED_OUT });
return true;
};
// export const onPlayerOffline = (message) => {
// // game.greyoutPlayer(message.playerID);
// };
// export const patchPlayerName = (name) => async () => {
// const { user } = store.getState();
//
// await PokerAPI.patch(`/players/${user.guid}`, { name });
// };
export const onLoggedPlayerNameChanged = name => (dispatch) => {
dispatch({ type: USER_NAME_CHANGED, name });
};
// export const onPlayerNameChanged = action(player => {
// const { game } = store.getState();
//
// const gamePlayer = find(game.players, { guid: player.guid });
// gamePlayer.name = player.name;
// });
|
'use strict';
describe('Service: graph', function () {
// load the service's module
beforeEach(module('ngfbApp'));
// instantiate service
var graph;
beforeEach(inject(function (_graph_) {
graph = _graph_;
}));
it('should do something', function () {
expect(!!graph).toBe(true);
});
});
|
//
// Copyright (c) 2016 by Koen van Gilst (@vnglst) | MIT license
//
import 'babel/polyfill'
import React from 'react'
import ReactDOM from 'react-dom'
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment'
import Location from './core/Location'
import Layout from './components/Layout'
const routes = {} // Auto-generated on build. See tools/lib/routes-loader.js
const route = async (path, callback) => {
const handler = routes[path] || routes['/404']
const component = await handler()
await callback(<Layout>{React.createElement(component)}</Layout>)
}
function run() {
const container = document.getElementById('app')
Location.listen(location => {
route(location.pathname, async component =>
ReactDOM.render(component, container, () => {}),
)
})
}
if (canUseDOM) {
// Run the application when both DOM is ready and page content is loaded
if (
['complete', 'loaded', 'interactive'].includes(document.readyState) &&
document.body
) {
run()
} else {
document.addEventListener('DOMContentLoaded', run, false)
}
}
export default { route, routes }
|
/*
* Copyright (c) 2016 airbug Inc. http://airbug.com
*
* bugcore may be freely distributed under the MIT license.
*/
//-------------------------------------------------------------------------------
// Annotations
//-------------------------------------------------------------------------------
//@TestFile
//@Require('Class')
//@Require('Obj')
//@Require('Set')
//@Require('bugmeta.BugMeta')
//@Require('bugunit.TestTag')
//-------------------------------------------------------------------------------
// Context
//-------------------------------------------------------------------------------
require('bugpack').context("*", function(bugpack) {
//-------------------------------------------------------------------------------
// BugPack
//-------------------------------------------------------------------------------
var Class = bugpack.require('Class');
var Obj = bugpack.require('Obj');
var Set = bugpack.require('Set');
var BugMeta = bugpack.require('bugmeta.BugMeta');
var TestTag = bugpack.require('bugunit.TestTag');
//-------------------------------------------------------------------------------
// Simplify References
//-------------------------------------------------------------------------------
var bugmeta = BugMeta.context();
var test = TestTag.test;
//-------------------------------------------------------------------------------
// Declare Tests
//-------------------------------------------------------------------------------
/**
* This tests
* 1) Instantiate a simple Set
*/
var setInstantiationTest = {
// Setup Test
//-------------------------------------------------------------------------------
setup: function() {
this.testSet = new Set();
},
// Run Test
//-------------------------------------------------------------------------------
test: function(test) {
test.assertTrue(this.testSet.isEmpty(),
"Assert that the Set is empty");
test.assertTrue(Class.doesExtend(this.testSet, Set),
"Assert that the testSet extends Set");
}
};
bugmeta.tag(setInstantiationTest).with(
test().name("Set instantiation test")
);
/**
* This tests
* 1) creates a shallow clone of the Set
*/
var setShallowCloneTest = {
// Setup Test
//-------------------------------------------------------------------------------
setup: function() {
this.testSet = new Set();
this.testObject = {};
this.testSet.add(this.testObject);
this.testSetClone = this.testSet.clone();
},
// Run Test
//-------------------------------------------------------------------------------
test: function(test) {
test.assertTrue(this.testSet.contains(this.testObject),
"Assert that the Set contains the testObject");
test.assertTrue(this.testSetClone.contains(this.testObject),
"Assert that the cloned Set contains the testObject");
}
};
bugmeta.tag(setShallowCloneTest).with(
test().name("Set shallow clone test")
);
/**
* This tests
* 1) creates a deep clone of the Set
*/
var setDeepCloneTest = {
// Setup Test
//-------------------------------------------------------------------------------
setup: function() {
this.testSet = new Set();
this.testObject = {
key: "value"
};
this.testSet.add(this.testObject);
this.testSetClone = this.testSet.clone(true);
},
// Run Test
//-------------------------------------------------------------------------------
test: function(test) {
var testObjectClone = this.testSetClone.toArray()[0];
test.assertTrue(this.testSet.contains(this.testObject),
"Assert that the Set contains the testObject");
test.assertFalse(this.testSet.contains(testObjectClone),
"Assert that the Set does not contain the cloned object");
test.assertTrue(this.testSetClone.contains(testObjectClone),
"Assert that the cloned Set contains the testObjectClone");
test.assertFalse(this.testSetClone.contains(this.testObject),
"Assert that the cloned Set contains the testObjectClone");
test.assertEqual(testObjectClone.key, "value",
"Assert that the cloned object has key:'value'");
}
};
bugmeta.tag(setDeepCloneTest).with(
test().name("Set - deep clone test")
);
/**
* This tests
* 1) Adding as simple string to a set
* 2) Adding a second simple string to a set
*/
var setAddTest = {
// Setup Test
//-------------------------------------------------------------------------------
setup: function() {
this.testValue1 = "value1";
this.testValue2 = "value2";
this.set = new Set();
},
// Run Test
//-------------------------------------------------------------------------------
test: function(test) {
var result1 = this.set.add(this.testValue1);
test.assertTrue(this.set.contains(this.testValue1),
"Assert first item added to the set is contained within the set.");
test.assertEqual(this.set.getCount(), 1,
"Assert count is 1 after adding 1 item.");
test.assertTrue(result1,
"Assert that true was returned when adding value1");
var result2 = this.set.add(this.testValue2);
test.assertTrue(this.set.contains(this.testValue1),
"Assert first item added to the list is still contained within the set after adding a second item.");
test.assertTrue(this.set.contains(this.testValue2),
"Assert second item added to the set is contained within the set.");
test.assertEqual(this.set.getCount(), 2,
"Assert count is 2 after adding 2 items.");
test.assertTrue(result2,
"Assert that true was returned when adding value2");
}
};
bugmeta.tag(setAddTest).with(
test().name("Set add test")
);
/**
*
*/
var setAddRepeatTest = {
// Setup Test
//-------------------------------------------------------------------------------
setup: function() {
this.set = new Set();
},
// Run Test
//-------------------------------------------------------------------------------
test: function(test) {
var result1 = this.set.add("value1");
test.assertTrue(this.set.contains('value1'),
"Assert first item added to the set is contained within the set.");
test.assertEqual(this.set.getCount(), 1,
"Assert count is 1 after adding 1 item.");
test.assertTrue(result1,
"Assert that true was returned when adding value1");
var result2 = this.set.add("value1");
test.assertEqual(this.set.getCount(), 1,
"Assert count is still 1 after adding the same item a second time.");
test.assertTrue(this.set.contains("value1"),
"Assert set still contains the item after adding it twice.");
test.assertFalse(result2,
"Assert that false was returned when adding value1 again");
}
};
bugmeta.tag(setAddRepeatTest).with(
test().name("Set add repeat test")
);
/**
* This tests...
* 1) That two different class instances that are equal will be treated as the same value by Set
* and thus only one of them will be stored.
* 2) That adding one of the two instances to the Set will cause the Set's contains function to return true for
* both instances
*/
var setAddEqualObjectsTest = {
// Setup Test
//-------------------------------------------------------------------------------
setup: function() {
var _context = this;
this.set = new Set();
this.NewClass = Class.extend(Obj, {
equals: function(value) {
if (Class.doesExtend(value, _context.NewClass)) {
return true;
}
},
hashCode: function() {
return 12345;
}
});
this.instance1 = new this.NewClass();
this.instance2 = new this.NewClass();
},
// Run Test
//-------------------------------------------------------------------------------
test: function(test) {
this.set.add(this.instance1);
test.assertTrue(this.set.contains(this.instance1),
"Assert instance 1 is contained within the set after adding it to the set.");
test.assertEqual(this.set.getCount(), 1, "Assert count is 1 after adding instance 1.");
test.assertTrue(this.set.contains(this.instance2),
"Assert contains returns true for instance 2 even though instance 2 hasn't been added but is equal to instance1.");
this.set.add(this.instance2);
test.assertEqual(this.set.getCount(), 1, 'Assert count is still 1 after adding instance 2.');
}
};
bugmeta.tag(setAddEqualObjectsTest).with(
test().name("Set add equal objects test")
);
/**
*
*/
var setContainsNonEqualObjectsWithSameHashCodesTest = {
// Setup Test
//-------------------------------------------------------------------------------
setup: function() {
var _context = this;
this.valueCount = 123;
this.NewClass = Class.extend(Obj, {
_constructor: function() {
this.valueCount = _context.valueCount++;
},
equals: function(value) {
if (Class.doesExtend(value, _context.NewClass)) {
//NOTE BRN: This should always return false for instances of this class
return (this.getValue() === value.getValue());
}
},
getValue: function() {
return this.valueCount;
},
hashCode: function() {
return 123;
}
});
this.instance1 = new this.NewClass();
this.instance2 = new this.NewClass();
this.set = new Set();
},
// Run Test
//-------------------------------------------------------------------------------
test: function(test) {
this.set.add(this.instance1);
test.assertEqual(this.set.contains(this.instance1), true,
"Assert sanity check that set contains instance1");
test.assertEqual(this.set.contains(this.instance2), false,
"Assert set does not contain instance2 since instance1 and instance2 are not equal");
this.set.add(this.instance2);
test.assertEqual(this.set.getCount(), 2,
"Set count is 2 after adding instance2");
test.assertEqual(this.set.contains(this.instance1), true,
"Assert set contains instance1");
test.assertEqual(this.set.contains(this.instance2), true,
"Assert set contains instance2");
}
};
bugmeta.tag(setContainsNonEqualObjectsWithSameHashCodesTest).with(
test().name("Set contains non equal objects that have the same hashCodes test")
);
});
|
//@ A status is an exclusive, set-like container whose doubly-linked members form a ring.
'Object'.subclass(I => {
"use strict";
I.have({
//@{string} descriptive status name
statusName: null,
//@{Std.Status.$._.Link?} first member link of this status
firstLink: null,
//@{integer} number of members in this status
memberCount: 0
});
I.access({
//@{string} get status name
name: function() {
return this.statusName;
},
//@{integer} get number of members in this status
size: function() {
return this.memberCount;
}
});
I.know({
//@ Iterable status.
//@unique Symbol.iterator
//@return {iterator} iterator over status members
[Symbol.iterator]: function* () {
const first = this.firstLink;
if (first) {
let link, next = first;
do {
link = next;
next = link.next;
yield link.member;
} while (next !== first);
}
return;
},
//@param name {string?} descriptive status name
build: function(name) {
I.$super.build.call(this);
this.statusName = name || 'anonymous status';
},
//@ Put member in this status.
//@param member {object} status member
//@return {Std.Status} this status
add: function(member) {
const link = member[I.Symbol]();
if (link.next) {
const old = link.status;
if (this === old) {
// member is already in this status
return this;
}
if (--old.memberCount === 0) {
// old status is empty
old.firstLink = null;
} else {
const previous = link.previous, next = link.next;
previous.next = next;
next.previous = previous;
if (old.firstLink === link) {
// removed first link from old status
old.firstLink = next;
}
}
}
// add member link to this status
link.status = this;
if (++this.memberCount === 1) {
// first and only link in this status
this.firstLink = link.previous = link.next = link;
} else {
// add last link to this status
const first = this.firstLink, previous = first.previous;
link.previous = previous;
link.next = first;
first.previous = previous.next = link;
}
return this;
},
//@ Delete all members from this status.
//@return nothing
clear: function() {
const first = this.firstLink;
if (first) {
this.firstLink = null;
this.memberCount = 0;
let link, next = first;
do {
link = next;
next = link.next;
link.status = link.previous = link.next = null;
} while (next !== first);
}
},
//@ Create link for a future member of this status.
//@param member {object} status member
//@return {Std.Status.$._.Link} member link
createLink: function(member) {
return I.Link.create(this, member);
},
//@ Remove member from this status.
//@param member {*} candidate status member
//@return {boolean} true if member was removed, otherwise false
delete: function(member) {
const link = member && member[I.Symbol] && member[I.Symbol]();
const next = link && link.next;
if (next && link.status === this) {
if (--this.memberCount === 0) {
// removed last link from this status
this.firstLink = link.status = link.previous = link.next = null;
} else {
const previous = link.previous;
next.previous = previous;
previous.next = next;
link.status = link.previous = link.next = null;
if (this.firstLink === link) {
// removed first link from this status
this.firstLink = next;
}
}
return true;
}
return false;
},
//@ Iterate over member pairs in this status.
//@return {iterable} iterable over pairs with two identical members
entries: function () {
return I.Loop.map(this.values(), member => [member, member]);
},
//@ Perform routine on enumerated members.
//@param routine {function} routine to perform on enumerated member
//@param thisReceiver {*} this receiver in code
//@return nothing
forEach: function(routine, thisReceiver) {
const first = this.firstLink;
if (first) {
let link, next = first;
do {
link = next;
next = link.next;
routine.call(thisReceiver, link.member, link.member, this);
} while (next !== first);
}
},
//@ Test whether member is in this status.
//@param member {*} candidate status member
//@return {boolean} true if member is in this status, otherwise false
has: function(member) {
const link = member && member[I.Symbol] && member[I.Symbol]();
return !!link && !!link.next && link.status === this;
},
//@ Iterate over members in this status.
//@return {iterable} iterable members
values: function () {
return this[Symbol.iterator]();
}
});
I.share({
//@{symbol} unique symbol for member method that obtains status link
Symbol: Symbol('status link')
});
I.nest({
//@ A link between a member and its status.
Link: 'Object'.subclass(I => {
I.am({
Final: true
});
I.have({
//@{Std.Status} status of this link
status: null,
//@{object} member of this link
member: null,
//@{Std.Status.$._.Link?} next link of status or nothing if not contained
next: null,
//@{Std.Status.$._.Link?} previous link of status or nothing if not contained
previous: null
});
I.know({
//@param status {Std.Status} status of this link
//@param member {object} member of this link
build: function(status, member) {
I.$super.build.call(this);
this.status = status;
this.member = member;
}
});
})
});
}) |
var fs = require('fs');
var util = require('util');
var mixin = require('./util').mixin;
var EventEmitter = require('events').EventEmitter;
/**
* Hash containing regular expressions (or strings convertible to RegExps)
* to use for scanning log lines. All properties are optional, and will
* default to regular expressions which match against irssi's default
* log format.
* @typedef {Object} ParserRegexps
* @property {string|RegExp} logopen "Log opened" message; `$1` = date+time
* @property {string|RegExp} logclose "Log closed" message; `$1` = date+time
* @property {string|RegExp} daychange "Day changed" message; `$1` = date+time;
* Note that these lines will not emit events
* @property {string|RegExp} timestamp Timestamp (prefixes all other message types listed below)
* @property {string|RegExp} join "X has joined" message;
* `$1` = nick, `$2` = mask
* @property {string|RegExp} part "X has left" message;
* `$1` = nick, `$2` = mask, `$3` = message
* @property {string|RegExp} quit "X has quit" message;
* `$1` = nick, `$2` = mask, `$3` = message
* @property {string|RegExp} kick "X was kicked" message;
* `$1` = nick, `$2` = kicker, `$3` = message
* @property {string|RegExp} nick "X is now known as Y" message;
* `$1` = old nick, `$2` = new nick
* @property {string|RegExp} ownNick "You're now known as X" message;
* `$1` = new nick
* @property {string|RegExp} nicks "Total of ..." message;
* `$1` = total, `$2` = ops, `$3` = halfops, `$4` = voices, `$5` = normal
* @property {string|RegExp} mode "mode ... by X" message;
* `$1` = modes, `$2` = moder
* @property {string|RegExp} message Normal message;
* `$1` = mode, `$2` = nick, `$3` = message
* @property {string|RegExp} action Action (i.e. the /me command);
* `$1` = nick, `$2` = message
*/
// Default regular expressions for log parsing; see above for capture group meanings
var defaultRegexps = {
logopen: /^--- Log opened (.*)$/,
logclose: /^--- Log closed (.*)$/,
daychange: /^--- Day changed (.*)$/,
timestamp: /^\d\d:\d\d(?::\d\d)?\s*/,
join: /^-!- (\S+) \[([^\]]+)\] has joined/,
part: /^-!- (\S+) \[([^\]]+)\] has left(?:[^\[]*\[([^\]]*))?/,
quit: /^-!- (\S+) \[([^\]]+)\] has quit(?:[^\[]*\[([^\]]*))?/,
kick: /^-!- (\S+) was kicked from \S by (\S) \[([^\]]+)\]$/,
nick: /^-!- (\S+) is now known as (\S+)$/,
ownNick: /^\W+You're now known as (\S+)$/,
nicks: /^\W+Irssi: \S+ Total of (\d+) nicks \[(\d+) ops, (\d+) halfops, (\d+) voices, (\d+) normal\]$/,
mode: /^-!- (?:ServerM|m)ode\/\S+ \[([^\]]+)\] by (\S*)$/,
message: /^<(.)([^>]+)> (.*)$/,
action: /^\s*\* (\S+) (.*)$/
};
// Actions to be taken for each line type above
var mappings = {
logopen: function (match) {
return {
time: (this.currentDate = this._openTime = new Date(match[1]))
};
},
logclose: function (match) {
return {
time: (this.currentDate = new Date(match[1]))
};
},
daychange: function (match) {
// Update currentDate but don't bother emitting an event
this.currentDate = new Date(match[1]);
},
join: function (match, time) {
if (this._openTime && !this._joinNick &&
(time - this._openTime) < 2000) {
// First join after a log open should be the logging client
// (unless log rotation is in play);
// update internal variable which will be confirmed
// once we receive a total nicks message
this._joinNick = match[1];
}
return {
time: time,
nick: match[1],
mask: match[2]
};
},
part: function (match, time) {
return {
time: time,
nick: match[1],
mask: match[2],
message: match[3]
};
},
quit: function (match, time) {
return {
time: time,
nick: match[1],
mask: match[2],
message: match[3]
};
},
kick: function (match, time) {
return {
time: time,
nick: match[1],
by: match[2],
message: match[3]
};
},
nick: function (match, time) {
return {
time: time,
nick: match[1],
newNick: match[2]
};
},
ownNick: function (match, time) {
return {
type: 'nick',
time: time,
nick: this._nick || this.defaultNick,
newNick: (this._nick = match[1])
};
},
nicks: function (match, time) {
// "Total of x nicks" message logs immediately after client joins,
// but also any time the /names command is manually run;
// in only the former case, update logging client's current nick
// (since the client's own nick change messages don't include it)
if (this._joinNick && (time - this._openTime) < 2000) {
this._nick = this._joinNick;
delete this._joinNick;
delete this._openTime;
}
return {
time: time,
total: match[1],
ops: match[2],
halfops: match[3],
voices: match[4],
normal: match[5]
};
},
mode: function (match, time) {
return {
time: time,
mode: match[1],
by: match[2]
};
},
message: function (match, time) {
return {
time: time,
mode: match[1],
nick: match[2],
message: match[3]
};
},
action: function (match, time) {
return {
time: time,
nick: match[1],
message: match[2]
};
}
};
// Order to test RegExps in, from roughly least to most common (will iterate backwards)
var testOrderNoStamp = [
'daychange',
'logclose',
'logopen'
];
var testOrderStamp = [
'nicks',
'ownNick',
'kick',
'mode',
'nick',
'part',
'quit',
'join',
'action',
'message'
];
function combineDateTime(date, time) {
// Yields a new Date object combining the given Date object and
// a "hh:mm" or "hh:mm:ss" time string.
var dateTime = new Date(date);
var timeParts = time.split(':');
dateTime.setHours(+timeParts[0]);
dateTime.setMinutes(+timeParts[1]);
dateTime.setSeconds(+timeParts[2] || 0);
return dateTime;
}
/**
* Options recognized by the Parser constructor.
* @typedef {Object} ParserOptions
* @property {string} defaultNick
* Default initial nick to use for the logging client's own nick changes,
* in case it cannot be discerned automatically from logopen + join + names
* messages
* @property {boolean} debug
* Flag which will cause unhandled log lines to be output to stderr
* @property {Object.<string, ParserRegexps>} regexps
* Custom regular expressions to override the defaults; useful to handle custom log message formats
*/
/**
* Creates a new Parser with the specified options.
* @class
* @augments EventEmitter
* @param {ParserOptions} options Options to apply to the Parser instance
*/
var Parser = module.exports = function (options) {
var regexps = options && options.regexps;
EventEmitter.call(this);
if (regexps) {
for (var key in regexps) {
// Allow strings to be passed in (e.g. from JSON),
// instantiating RegExps from them here
var rx = regexps[key];
if (typeof rx === 'string') {
regexps[key] = new RegExp(rx);
}
}
// Mix provided regexps on top of defaults to allow partial override
options.regexps = mixin({}, defaultRegexps, regexps);
}
options && mixin(this, options);
this._onAllHandlers = [];
};
util.inherits(Parser, EventEmitter);
mixin(Parser.prototype, /** @lends Parser.prototype */ {
defaultNick: 'logging client',
_parseLine: function (line) {
var regexps = this.regexps || defaultRegexps;
var matchstamp = regexps.timestamp.exec(line);
var time;
var testOrder = matchstamp ? testOrderStamp : testOrderNoStamp;
if (matchstamp) {
line = line.slice(matchstamp[0].length);
time = combineDateTime(this.currentDate, matchstamp[0]);
}
var i = testOrder.length;
var match;
while (i--) {
var key = testOrder[i];
if ((match = regexps[key].exec(line))) {
var object = mappings[key].call(this, match, time);
if (object && !object.type) {
object.type = key;
}
return object;
}
}
if (this.debug) {
console.warn('Unhandled line: ' + line);
}
},
_parseLines: function (str) {
// Parses any full lines in str and adds their info to the `parsed` object.
// Returns any remainder of str (i.e. from a final line with no newline).
var lines = str.split('\n');
var i = 0;
var remainder = lines.pop();
var len = lines.length;
var parsedObj;
do {
parsedObj = this._parseLine(lines[i]);
if (parsedObj) {
this.emit(parsedObj.type, parsedObj);
}
}
while (++i < len);
return remainder;
},
/**
* Parses the given log file.
*
* @param {string} filename File to parse
*/
parse: function (filename) {
var resume = filename === true; // should only ever be set by resume calls
var fd = this._fd = resume ? this._fd : fs.openSync(filename, 'r');
var buffer = new Buffer(4096);
var bytesRead;
var current = '';
var remainder = resume ? this._remainder : '';
while (!this._paused && (bytesRead = fs.readSync(fd, buffer, 0, buffer.length))) {
current = buffer.toString('utf-8');
if (current.length > bytesRead) {
current = current.slice(0, bytesRead);
}
remainder = this._remainder = this._parseLines(remainder + current);
}
// The loop will end either when EOF is reached, or pause was called.
// In the former case, close the file; in the latter case, leave it
// open with the expectation that we'll pick up where we left off.
if (!this._paused) {
fs.closeSync(fd);
}
},
/**
* Pauses parsing after the currently-read chunk.
* This means that it might not pause right after the current line, but it
* will before the file is read any further.
* Additional calls to this function when already paused do nothing.
*/
pause: function () {
this._paused = true;
},
/**
* Causes the previous parse to continue where it left off.
*/
resume: function () {
if (this._paused) {
this._paused = false;
this.parse(true);
}
},
emit: function () {
var i;
var handlers = this._onAllHandlers;
var len = handlers.length;
// Emit as usual
EventEmitter.prototype.emit.apply(this, arguments);
// Also invoke any handlers registered for all events
for (i = 0; i < len; i++) {
if (handlers[i]) {
handlers[i].apply(this, handlers.slice.call(arguments, 1));
}
}
},
/**
* Object containing a `remove` method for unhooking itself.
* @typedef {Object} RemovableListener
* @property {function} remove Method that can be called to unhook the listener
*/
/**
* Binds a function to all emitted events.
* @param handler {function} The handler to fire on every processed log message
* @return {RemovableListener}
*/
onAll: function (handler) {
// Binds a function to all emitted events.
// Rather than impose an obtuse separate removal method,
// this method returns an object with a remove function.
var i = this._onAllHandlers.push(handler) - 1;
return {
remove: function () {
this._onAllHandlers[i] = null;
}
};
}
});
|
"use strict";
// Import
// =========
var _ = require('underscore');
var Chronicle = require('../index');
var Calculator = require('./example');
var Test = require("substance-test");
// Test
// =========
var __ID__ = 0;
var __OP__ = 1;
var __VAL__ = 2;
var __RESULT__ = 3;
var ROOT = Chronicle.ROOT;
// Index structure:
//
// ROOT - 01 - 02 - 03 - 04
// | |
// | - 05 - 06
// - 07 - 08
var INDEX = [
["01", "plus", 5, 5], // = 5
["02", "minus", 3, 2], // = 2
["03", "times", 3, 6], // = 6
["04", "div", 2, 3], // = 3
["05", "plus", 1, 7], // = 7 // applied on 03
["06", "plus", 2, 9], // = 9
["07", "minus", 1, -1], // = -1 // applied on __ROOT__
["08", "minus", 2, -3], // = -3
];
//function ID(i) {return INDEX[i][__ID__];}
function OP(i) {return INDEX[i][__OP__];}
function VAL(i) {return INDEX[i][__VAL__];}
var ID_IDX = 1;
var ChronicleTest = function() {
Test.call(this);
};
ChronicleTest.Prototype = function() {
this.RESULTS = _.reduce(INDEX, function(memo, e) {
memo[e[__ID__]] = e[__RESULT__]; return memo;
}, {});
this.RESULTS[ROOT] = 0;
function _uuid(idx) {
return (idx < 10) ? "0"+idx : ""+idx;
}
this.uuid = function() {
return _uuid(ID_IDX++);
};
this.next_uuid = function() {
return _uuid(ID_IDX);
};
this.op = function(idx) {
this.comp[OP(idx)](VAL(idx));
};
this.setup = function() {
ID_IDX = 1;
this.chronicle = Chronicle.create({mode: Chronicle.HYSTERICAL});
this.index = this.chronicle.index;
this.comp = new Calculator.ChronicleAdapter(this.chronicle);
this.chronicle.uuid = this.uuid;
this.fixture();
};
this.fixture = function() {
// Attention: these call will automatically increment the UUIDs
var idx;
for (idx=0; idx < 4; idx++) {
this.comp[OP(idx)](VAL(idx));
}
this.chronicle.reset("03");
for (idx=4; idx < 6; idx++) {
this.comp[OP(idx)](VAL(idx));
}
this.chronicle.reset(ROOT);
for (idx=6; idx < 8; idx++) {
this.comp[OP(idx)](VAL(idx));
}
this.comp.reset();
};
};
ChronicleTest.Prototype.prototype = Test.prototype;
ChronicleTest.prototype = new ChronicleTest.Prototype();
// Export
// ====
module.exports = ChronicleTest;
|
'use strict';
var path = require('path');
var config = {
entry: {
pillow: path.resolve('src')
},
output: {
path: path.join(__dirname, 'build'),
filename: '[name].js',
library: '[name]'
},
externals: {
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'jsx-loader?harmony'
},
{
test: /\.js$/,
loader: 'babel-loader'
},
{
test: /\.json$/,
loader: 'json-loader'
}
]
}
};
module.exports = config;
|
const LIST_DRAG_DROP_ITEM_CSS_CLASSES = [
{
cssClass : 'col-md-12',
numberItemPerRow: 0
},
{
cssClass : 'col-md-12',
numberItemPerRow: 1
},
{
cssClass : 'col-md-6',
numberItemPerRow: 2
},
{
cssClass : 'col-md-4',
numberItemPerRow: 3
}
];
const DRAG_DROP_CONFIG_MODEL = {
dropZoneConfig : {
decoration : [
{
WhenIndex: 0,
ApplycssClass: 'col-md-4',
fontAwesomeIcon: 'fa fa-level-up',
title: 'Drag control from here : '
},
{
WhenIndex: 1,
ApplycssClass: 'col-md-8',
fontAwesomeIcon: 'fa fa-level-down',
title: 'Drop control into here : '
}
],
verboseMode : false
},
containerConfig : {
decoration : [
{
WhenIndex : 0,
ApplycssClass : 'col-md-12',
title : 'Blank : ',
groupId : 'blank',
isCollapsed : true
},
{
WhenIndex : 1,
ApplycssClass : 'col-md-12',
title : 'Headers : ',
groupId : 'headers',
isCollapsed : true
},
{
WhenIndex : 2,
ApplycssClass : 'col-md-12',
title : 'Text inputs : ',
groupId : 'inputs' ,
isCollapsed : true
},
{
WhenIndex : 3,
ApplycssClass : 'col-md-12',
title : 'Textareas : ',
groupId : 'textareas',
isCollapsed : true
},
{
WhenIndex : 4,
ApplycssClass : 'col-md-12',
title : 'Radios : ',
groupId : 'radios',
isCollapsed : true
},
{
WhenIndex : 5,
ApplycssClass : 'col-md-12',
title : 'Checkboxes : ',
groupId : 'checkboxes',
isCollapsed : true
},
{
WhenIndex : 6,
ApplycssClass : 'col-md-12',
title : 'Selects : ',
groupId : 'selects',
isCollapsed : true
}
],
verboseMode : false,
collapseEnabled : true,
collapseCtrl : [
{
atIndex : 0,
collapse : true
},
{
atIndex : 1,
collapse : true
}
]
},
itemConfig : {
verboseMode : false
}
};
const DRAG_DROP_PRESENTATION_MODEL = [
//1 column here is control selection column
[],
[
//empty 1st line at initialisation
[]
]
];
const ITEMS_NOT_TO_COUNT_FOR_REAL = {
//placeholder : '',
itemBeingDragged : ''
};
export {
LIST_DRAG_DROP_ITEM_CSS_CLASSES,
DRAG_DROP_CONFIG_MODEL,
DRAG_DROP_PRESENTATION_MODEL,
ITEMS_NOT_TO_COUNT_FOR_REAL
};
|
Support.Me.CustomizeController = Ember.ObjectController.extend({
language:null,
config:{
headerBackground:'#000000',
headerForeground:'#ffffff',
textColor:'#bdc3c7',
agentColor:'#16a085',
guestColor:'#e67e22',
chatBackgroundColor:'#e5e5e5',
languageHeaderText:'Chúng tôi đang Online. Hỏi ngay',
languageInputText:'Type and press <Enter>',
languageEmptyText:'Bạn có câu hỏi hoặc cần tư vấn, nhập nội dung phía dưới và chúng tôi sẽ tư vấn cho bạn.',
languageEmptyOfflineText:'Hiện đang ngoài giờ làm việc. Bạn vui lòng nhập nội dung và chọn gửi. Trả lời tin nhắn là việc đầu tiên của chúng tôi trong ngày làm việc',
languageConnectingText:'Connecting to Agent',
languageEmailText:'Email',
languageEmailSuccessful:'Thông tin đã được gửi',
},
}); |
describe("cache", function () {
'use strict';
var cache = require('js/cache');
var serial = (new Date()).valueOf();
var serial2 = serial + Math.floor(Math.random() * 10000);
beforeEach(function () {
cache.set(serial, 'foo', 'bar');
cache.set(serial, 'bar', 'baz');
cache.set(serial2, 'baz', 'qux');
});
it("get cache", function () {
var val = cache.get(serial, 'foo');
expect(val).toEqual('bar');
val = cache.get(serial, 'bar');
expect(val).toEqual('baz');
});
it("when no cache, return null", function () {
var val = cache.get('baz', 'foo');
expect(val).toBeNull();
val = cache.get(serial, 'bar');
expect(val).not.toBeNull();
});
it("set cache (simple string)", function () {
var random = Math.floor(Math.random() * 100000);
cache.set(random, 'Lorem', 'ipsum');
var val = cache.get(random, 'Lorem');
expect(val).toEqual('ipsum');
});
it("set cache (JSON data)", function () {
var random = Math.floor(Math.random() * 100000);
cache.set(random, 'Lorem', {
ipsum: 'dolor',
sit: 777,
amet: {
foo: 'bar'
}
});
var val = cache.get(random, 'Lorem');
expect(val.ipsum).toEqual('dolor');
expect(val.sit).toEqual(777);
expect(val.amet.foo).toEqual('bar');
});
it("clear cache (only one key)", function () {
var val = cache.get(serial, 'foo');
expect(val).toEqual('bar');
val = cache.get(serial, 'bar');
expect(val).toEqual('baz');
cache.clear(serial, 'foo');
val = cache.get(serial, 'foo');
expect(val).not.toBeDefined();
val = cache.get(serial, 'bar');
expect(val).toEqual('baz');
});
it("clear cache (for id)", function () {
var val = cache.get(serial, 'foo');
expect(val).toEqual('bar');
val = cache.get(serial, 'bar');
expect(val).toEqual('baz');
cache.clear(serial);
val = cache.get(serial2, 'baz');
expect(val).toEqual('qux');
val = cache.get(serial, 'foo');
expect(val).toBeDefined();
val = cache.get(serial, 'bar');
expect(val).toBeDefined();
});
it("clear all", function () {
var val = cache.get(serial, 'foo');
expect(val).toEqual('bar');
val = cache.get(serial, 'bar');
expect(val).toEqual('baz');
val = cache.get(serial2, 'baz');
expect(val).toEqual('qux');
cache.clearAll();
val = cache.get(serial, 'foo');
expect(val).toBeNull();
val = cache.get(serial, 'bar');
expect(val).toBeNull();
val = cache.get(serial2, 'baz');
expect(val).toBeNull();
});
});
|
import express from 'express';
import path from 'path';
import open from 'open';
import webpack from 'webpack';
import config from '../webpack.config.dev';
/* eslint-disable no-console */
const port = 3000;
const app = express();
const compiler = webpack(config);
app.use(require('webpack-dev-middleware')(compiler,{
noInfo: true,
publicPath: config.output.publicPath
}));
app.get('/', function(req,res){
res.sendFile(path.join(__dirname, '../src/index.html'));
});
app.get('/users', function(req,res){
res.json([
{"id": 1,"firstName":"Nikola","lastName":"Haralampije","email":"nikola@gmail.com"},
{"id": 2,"firstName":"Jovana","lastName":"Dzovana","email":"dzovana@gmail.com"},
{"id": 3,"firstName":"Milos","lastName":"Pajeet","email":"customer_service_mumbai@gmail.com"},
]);
});
app.listen(port, function(err){
if(err){
console.log(err);
} else {
open('http://localhost:' + port);
}
});
|
"use strict";
/**
*
* ----------------------------------------------------------------------------
* stat.js
* ----------------------------------------------------------------------------
*
* This file is part of browser Project.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
var mime = require('../lib/mime'),
path = require('path'),
should = require('should');
describe('#Mime State', function(){
it('> State: Should have folder properties name, path and type.', function(){
var stat = mime.stat(path.join(__dirname, 'home'));
stat.should.have.property('name', 'home');
stat.should.have.property('path', path.join(__dirname, 'home'));
stat.should.have.property('type', 'folder');
stat.should.have.property('display');
});
it('> State: Should have file properties name, path and type.', function(){
var stat = mime.stat(path.join(__dirname, 'home', 'mongodb.pdf'));
stat.should.have.property('name', 'mongodb.pdf');
stat.should.have.property('path', path.join(__dirname, 'home', 'mongodb.pdf'));
stat.should.have.property('type', 'pdf');
stat.should.have.property('display');
});
it('> State: Should have default mime types.', function(){
var stat = mime.getMimes();
var types = {
'compressed' : ['zip', 'rar', 'gz', 'tar'],
'text' : ['txt', 'md', 'nfo'],
'image' : ['jpg', 'jpge', 'png', 'gif', 'bmp', 'svg'],
'pdf' : ['pdf'],
'css' : ['css'],
'html' : ['html'],
'word' : ['doc', 'docx'],
'powerpoint' : ['ppt', 'pptx'],
'movie' : ['mkv', 'avi', 'rmvb', 'mpeg', 'wmv']
};
stat.should.be.eql(types);
});
it('> State: Should append more mime types.', function(){
mime.setMimes({
'excel': ['xsl'],
'xml': ['xml']
});
var stat = mime.getMimes();
var types = {
'compressed' : ['zip', 'rar', 'gz', 'tar'],
'text' : ['txt', 'md', 'nfo'],
'image' : ['jpg', 'jpge', 'png', 'gif', 'bmp', 'svg'],
'pdf' : ['pdf'],
'css' : ['css'],
'html' : ['html'],
'word' : ['doc', 'docx'],
'powerpoint' : ['ppt', 'pptx'],
'movie' : ['mkv', 'avi', 'rmvb', 'mpeg', 'wmv'],
'excel' : ['xsl'],
'xml' : ['xml']
};
stat.should.be.eql(types);
});
it('> Error: Should throw exception path not found.', function(){
mime.stat.bind(mime.stat, 'path/xpto').should.throw(Error);
});
}); |
// Generated by CoffeeScript 1.4.0
(function() {
module.exports = require('./lib/soda-sync');
}).call(this);
|
(function () {
'use strict';
angular
.module('blocks.logger')
.factory('logger', logger);
logger.$inject = ['$log', 'toastr'];
/* @ngInject */
function logger($log, toastr) {
var service = {
showToasts: true,
error: error,
info: info,
success: success,
warning: warning,
// straight to console; bypass toastr
log: $log.log
};
return service;
/////////////////////
function error(message, data, title) {
toastr.error(message, title);
$log.error('Error: ' + message, data);
}
function info(message, data, title) {
toastr.info(message, title);
$log.info('Info: ' + message, data);
}
function success(message, data, title) {
toastr.success(message, title);
$log.info('Success: ' + message, data);
}
function warning(message, data, title) {
toastr.warning(message, title);
$log.warn('Warning: ' + message, data);
}
}
}());
|
angular.module('d83.core')
.directive('d83Annotation', function (projectDataSrvc) {
"use strict"
return{
restrict: 'E',
templateUrl: '../d83/annotation/d83.annotation.tpl.html',
require:'^d83-Navigator',
controller: function ($scope, projectDataSrvc) {
projectDataSrvc.getProjectData().then(
function (dta) {
$scope.projetcData = dta;
}
)
}
}
}) |
'use strict'
// This is a custom Jest transformer turning style imports into empty objects.
// http://facebook.github.io/jest/docs/tutorial-webpack.html
module.exports = {
process () {
return 'module.exports = {};'
},
getCacheKey () {
// The output is always the same.
return 'cssTransform'
},
}
|
angular.module('sample', [
'auth0',
'ngRoute',
'auth0UserExport.main',
'auth0UserExport.home',
'auth0UserExport.login',
'auth0UserExport.users',
'auth0UserExport.users.table',
'auth0UserExport.users.configure',
'angular-storage',
'angular-jwt',
'datatables'
])
.config(function myAppConfig($routeProvider, authProvider, $httpProvider, $locationProvider,
jwtInterceptorProvider) {
$routeProvider
.when('/', {
controller: 'HomeCtrl',
templateUrl: '/home/home.html',
pageTitle: 'Homepage',
requiresLogin: true
})
.when('/usersConfigure', {
templateUrl: '/usersConfigure/usersConfigure.html',
pageTitle: 'Configure the Users Information',
requiresLogin: true
})
.when('/usersTable', {
templateUrl: '/usersTable/usersTable.html',
pageTitle: 'View the Users Information',
requiresLogin: true
})
.when('/redirectTest', {
templateUrl: '/redirectTest/redirect.html',
pageTitle: 'Send them back to applab'
})
.when('/login', {
controller: 'LoginCtrl',
templateUrl: '/login/login.html',
pageTitle: 'Login'
});
authProvider.init({
domain: AUTH0_DOMAIN,
clientID: AUTH0_CLIENT_ID,
loginUrl: '/login'
});
jwtInterceptorProvider.tokenGetter = function (store) {
return store.get('token');
}
// Add a simple interceptor that will fetch all requests and add the jwt token to its authorization header.
// NOTE: in case you are calling APIs which expect a token signed with a different secret, you might
// want to check the delegation-token example
$httpProvider.interceptors.push('jwtInterceptor');
}).run(function ($rootScope, auth, store, jwtHelper, $location) {
$rootScope.$on('$locationChangeStart', function () {
if (!auth.isAuthenticated) {
var token = store.get('token');
if (token) {
if (!jwtHelper.isTokenExpired(token)) {
auth.authenticate(store.get('profile'), token);
} else {
$location.path('/login');
}
}
}
});
})
.controller('AppCtrl', function AppCtrl($scope, $location) {
// $scope.$on('$routeChangeSuccess', function (e, nextRoute) {
// if (nextRoute.$$route && angular.isDefined(nextRoute.$$route.pageTitle)) {
// $scope.pageTitle = nextRoute.$$route.pageTitle + ' | Auth0 Sample';
// }
// });
})
;
|
import * as React from 'react';
import Link from 'next/link'
import Head from '../component/Head';
import css from 'next/css'
import Menu2 from '../component/Menu2';
const styles = {
header: css({
display: 'flex',
marginBottom: 20,
marginTop: 150
})
}
export default class App extends React.Component {
constructor(props) {
super(props);
}
render() {
return <div>
<Head />
<Menu2 currentUrl={this.props.currentUrl} />
<div className={styles.header + " row"}>
<div className="column column-50 column-offset-25">
<h1>Server Sent Events are in most cases better alternative to Web Sockets</h1>
</div>
</div>
</div>
}
} |
/*
@license Angular Treeview version 0.1.6
? 2013 AHN JAE-HA http://github.com/eu81273/angular.treeview
License: MIT
[TREE attribute]
angular-treeview: the treeview directive
tree-id : each tree's unique id.
tree-model : the tree model on $scope.
node-id : each node's id
node-label : each node's label
node-children: each node's children
<div
data-angular-treeview="true"
data-tree-id="tree"
data-tree-model="roleList"
data-node-id="roleId"
data-node-label="roleName"
data-node-children="children" >
</div>
*/
(function ( angular ) {
'use strict';
angular.module( 'angularTreeview', [] ).directive( 'treeModel', ['$compile', function( $compile ) {
return {
restrict: 'A',
link: function ( scope, element, attrs ) {
//tree id
var treeId = attrs.treeId;
//tree model
var treeModel = attrs.treeModel;
//node id
var nodeId = attrs.nodeId || 'id';
//node label
var nodeLabel = attrs.nodeLabel || 'label';
//children
var nodeChildren = attrs.nodeChildren || 'children';
//tree template
var template =
'<ul>' +
'<li data-ng-repeat="node in ' + treeModel + '">' +
'<i class="collapsed" data-ng-show="node.' + nodeChildren + '.length && node.collapsed" data-ng-click="' + treeId + '.selectNodeHead(node)"></i>' +
'<i class="expanded" data-ng-show="node.' + nodeChildren + '.length && !node.collapsed" data-ng-click="' + treeId + '.selectNodeHead(node)"></i>' +
'<i class="normal" data-ng-hide="node.' + nodeChildren + '.length"></i> ' +
'<span data-ng-class="node.selected" data-ng-click="' + treeId + '.selectNodeLabel(node)">{{node.' + nodeLabel + '}}</span>' +
'<div data-ng-hide="node.collapsed" data-tree-id="' + treeId + '" data-tree-model="node.' + nodeChildren + '" data-node-id=' + nodeId + ' data-node-label=' + nodeLabel + ' data-node-children=' + nodeChildren + '></div>' +
'</li>' +
'</ul>';
//check tree id, tree model
if( treeId && treeModel ) {
//root node
if( attrs.angularTreeview ) {
//create tree object if not exists
scope[treeId] = scope[treeId] || {};
//if node head clicks,
scope[treeId].selectNodeHead = scope[treeId].selectNodeHead || function( selectedNode ){
if (selectedNode.collapsed) {
selectedNode.LoadChildData(selectedNode);
}
//Collapse or Expand
selectedNode.collapsed = !selectedNode.collapsed;
};
//if node label clicks,
scope[treeId].selectNodeLabel = scope[treeId].selectNodeLabel || function( selectedNode ){
//remove highlight from previous node
if( scope[treeId].currentNode && scope[treeId].currentNode.selected ) {
scope[treeId].currentNode.selected = undefined;
}
//set highlight to selected node
selectedNode.selected = 'selected';
//set currentNode
scope[treeId].currentNode = selectedNode;
};
}
//Rendering template.
element.html('').append( $compile( template )( scope ) );
}
}
};
}]);
})( angular );
|
import { expect } from 'chai'
import { filterTodos, actions } from './filterTodos'
describe('Validate FilterTodos', () => {
it('should filter the list of toods', () => {
const todos = [
{id: 0, text: "This is an item", done: false},
{id: 1, text: "Another item", done: true}
]
const all = filterTodos(todos, actions.SHOW_ALL)
const completed = filterTodos(todos, actions.SHOW_COMPLETED)
const active = filterTodos(todos, actions.SHOW_ACTIVE)
expect(all.length).to.equal(2)
expect(completed.length).to.equal(1)
expect(active.length).to.equal(1)
expect(all[0].id).to.equal(0)
expect(all[1].id).to.equal(1)
expect(completed[0].id).to.equal(1)
expect(active[0].id).to.equal(0)
})
})
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isTuesday;
var _index = require('../toDate/index.js');
var _index2 = _interopRequireDefault(_index);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @name isTuesday
* @category Weekday Helpers
* @summary Is the given date Tuesday?
*
* @description
* Is the given date Tuesday?
*
* @param {Date|String|Number} date - the date to check
* @param {Options} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options}
* @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}
* @returns {Boolean} the date is Tuesday
* @throws {TypeError} 1 argument required
* @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2
*
* @example
* // Is 23 September 2014 Tuesday?
* var result = isTuesday(new Date(2014, 8, 23))
* //=> true
*/
function isTuesday(dirtyDate, dirtyOptions) {
if (arguments.length < 1) {
throw new TypeError('1 argument required, but only ' + arguments.length + ' present');
}
return (0, _index2.default)(dirtyDate, dirtyOptions).getDay() === 2;
}
module.exports = exports['default']; |
import firebase from 'firebase';
var config = {
apiKey: "AIzaSyA_9VpHPRHh_PEEIYfeRyhYZ4v0PY8iP-A",
authDomain: "react-todo-app-8e60f.firebaseapp.com",
databaseURL: "https://react-todo-app-8e60f.firebaseio.com",
projectId: "react-todo-app-8e60f",
storageBucket: "react-todo-app-8e60f.appspot.com",
messagingSenderId: "945685757549"
};
firebase.initializeApp(config);
var firebaseRef = firebase.database().ref();
firebaseRef.set({
app: {
name: 'Todo App',
version: '1.0.0'
},
isRunning: true,
user: {
name: 'Quentin',
age: 25
}
});
firebaseRef.child('app').once('value').then((snapshot)=>{
console.log('this is database', snapshot.key, snapshot.val());
},(e)=>{
console.log('ERROR !');
});
firebaseRef.on('value', (snapshot)=>{
console.log('got value', snapshot.val());
});
firebaseRef.update({isRunning: false});
|
'use strict';
var express = require('express');
var controller = require('./instance.controller');
var router = express.Router();
router.get('/', controller.index);
module.exports = router; |
/*
===============================================================================================
Unify Project
Homepage: unify-project.org
License: MIT + Apache (V2)
Copyright: 2010, Sebastian Fastner, Mainz, Germany, http://unify-training.com
===============================================================================================
*/
/**
* EXPERIMENTAL
*/
core.Class("unify.ui.layout.special.TabViewLayout", {
include : [unify.ui.layout.Base],
members : {
__content : null,
__bar : null,
/**
* Render part of layout stack that is managed by this layout manager. The part
* has size @availWidth {Integer} and @availHeight {Integer}.
*/
renderLayout : function(availWidth, availHeight) {
if (this._invalidChildrenCache) {
this.__rebuildCache();
}
var content = this.__content;
var bar = this.__bar;
var contentMarginLeft = content.getMarginLeft();
var contentMarginRight = content.getMarginRight();
var contentMarginTop = content.getMarginTop();
var barMarginLeft = bar.getMarginLeft();
var barMarginBottom = bar.getMarginBottom();
var barMarginRight = bar.getMarginRight();
var barMarginTop = bar.getMarginTop();
var barSizeHint = bar.getSizeHint();
var barOuterHeight = barSizeHint.height + barMarginTop + barMarginBottom;
bar.renderLayout(barMarginLeft, availHeight-barSizeHint.height-barMarginBottom, availWidth-barMarginLeft-barMarginRight, barSizeHint.height);
content.renderLayout(contentMarginLeft, contentMarginTop, availWidth-contentMarginLeft-contentMarginRight, availHeight-barOuterHeight);
},
/**
* Rebuilds cache of layout children
*/
__rebuildCache : function() {
var all = this._getLayoutChildren();
if (all.length != 2) {
this.error("TabView supports only exactly 2 children!");
}
for (var i=0,ii=all.length; i<ii; i++) {
var child = all[i];
var childProp = child.getLayoutProperties();
var type = childProp.type;
if (type == "bar") {
this.__bar = child;
} else {
this.__content = child;
}
}
}
}
});
|
if (process.env.NODE_ENV === 'production') {
const child_process = require('child_process');
const path = require('path');
const webpackExec = `${path.resolve(process.cwd(), 'node_modules/.bin/webpack')}`;
const file = `${path.resolve(__dirname, 'webpack/webpack.production.config.js')}`;
const command = `${webpackExec} -p --config ${file}`;
console.log('Building production bundle...');
child_process.exec(command, (error, stdout, stderr) => {
console.log(`stdout: ${stdout}`);
console.log(`warnings: ${stderr}`);
console.log('Bundle complete!');
if (error !== null) {
console.log(`Bundle execution failed: ${error}`);
}
});
}
|
var getChildren = exports.getChildren = function(elem){
return elem.children;
};
var getParent = exports.getParent = function(elem){
return elem.parent;
};
exports.getSiblings = function(elem){
var parent = getParent(elem);
return parent ? getChildren(parent) : [elem];
};
exports.getAttributeValue = function(elem, name){
return elem.getAttribute(name);
};
exports.hasAttrib = function(elem, name){
return elem.hasAttribute(name);
};
exports.getName = function(elem){
return elem.name;
};
|
var path = require("path");
var ugli = require("uglify-js");
var chalk = require('chalk');
var suber = require('./super');
var sixto5 = require('6to5');
var syntax = require('./syntax');
/**
* Here it comes.
* @param {Grunt} grunt
*/
module.exports = function(grunt) {
"use strict";
var SPACER = "\n\n\n";
var HEADER = '(function(window) {\n\n"use strict";';
var FOOTER = '}(self));'; // crappy module loader hides the window :/
/**
* Defaults.
*/
var defaultoptions = {
classword: ['extend', 'mixin'],
superword: ['this.super'],
transpile: ['.es'],
min: true,
max: true,
map: false
};
/*
* Task to concat and minify files.
*/
grunt.registerMultiTask("guibundles", "Spiritual bundles", function() {
var sources, content, options = this.options(defaultoptions);
this.files.forEach(function(pair) {
sources = grunt.file.expand({nonull: true}, pair.orig.src);
if(sources.every(exists)) {
content = process(sources, options);
if(options.max) {
writefile(pair.dest, content, options);
} else if(options.map) {
grunt.log.error('Sourcemap expects a maxified file');
}
if(options.min) {
uglyfile(pair.dest, content, options);
} else if(options.map) {
grunt.log.error('Sourcemap expects a minfied file');
}
}
});
});
/**
* Process sources with options.
* @param {Array<string>} sources
* @param {object} options
* @returns {string}
*/
function process(sources, options) {
sources = explodeall(sources);
if(!grunt.fail.errorcount) {
var content = extract(sources, options);
return enclose(content.join(SPACER));
}
}
/**
* Extract content from files and
* parse through various options.
* @param {Array<string>} sources
* @param {object} options
* @returns {Array<string>}
*/
function extract(sources, options) {
return sources.map(function(src) {
return [src, grunt.file.read(src)];
}).filter(function(list) {
return syntax.valid(grunt, list[0], list[1]);
}).map(function(list) {
return extras(list[0], list[1], options);
});
}
/**
* Apply source code extras:
*
* 1. Replace pseudosuperkeyword with `proto.call(this)`
* 2. Transpile from ES6 to ES5 if file name matches
* @param {string} src
* @param {string} js
* @param {object} options
*/
function extras(src, js, options) {
if(options.superword) {
js = suber.pseudokeyword(js,
getwords(options.superword, defaultoptions.superword),
getwords(options.classword, defaultoptions.classword)
);
}
if(options.transpile) {
js = maybetranspile(src, js, options.transpile);
}
return js;
}
/**
* @param {boolean|string|Array<string>} words
* @param {Array<string>} defaults
* @returns {Array<string>}
*/
function getwords(words, defaults) {
words = words === true ? defaults : words;
words = words ? words : defaults;
return words.charAt ? [words] : words;
}
/**
* Transpile from ES6 to ES5 if filename matches something
* specified. Default transpiling everything with '.es'.
* @param {string|Array<string>} js
* @returns {string}
*/
function maybetranspile(src, js, transpile) {
transpile = transpile.charAt ? [transpile] : transpile;
if(transpile.indexOf(path.extname(src)) >-1) {
js = sixto5.transform(js).code;
js = js.replace(/"use strict";\n/, '');
}
return js;
}
/**
* Wrap script in humongous closure.
* @param {String} filepath
* @returns {String}
*/
function enclose(source) {
return HEADER + SPACER + source + SPACER + FOOTER;
}
/**
* File exists?
* @param {String} filepath
* @returns {boolean}
*/
function exists(filepath) {
var does = grunt.file.exists(filepath);
if (!does) {
grunt.log.error('Human error: ' + chalk.cyan(filepath) + ' not found.');
grunt.fail.errorcount++;
}
return does;
}
/**
* Write file and report to console.
* @param {String} filepath
* @param {String} filetext
*/
function writefile(filepath, filetext, options) {
var version = '-1.0.0';
var packag = filename('package.json', options);
var banner = filename('BANNER.txt', options);
if (grunt.file.exists(banner)) {
filetext = grunt.file.read(banner) + '\n' + filetext;
}
if (grunt.file.exists(packag)) {
var json = grunt.file.readJSON(packag);
version = json.version;
}
grunt.file.write(filepath, grunt.template.process(filetext, {
data: {
version: version
}
}));
grunt.log.writeln("File \"" + chalk.cyan(filepath) + "\" created.");
}
/**
* Write uglified file
* @param {string} prettyfile
* @param {object} options
*/
function uglyfile(prettyfile, sourcecode, options) {
var mintarget = prettyfile.replace('.js', '.min.js');
var maptarget = prettyfile.replace('.js', '.js.map');
var uglycodes = uglify(options.max ? prettyfile : sourcecode);
writefile(mintarget, uglycodes.code, options);
if(options.map) {
writefile(maptarget, uglycodes.map, options);
}
}
/**
* Uglify file or sourcecode string.
* @param {string} prettyfile
* @param @optional {string} sourcecode
*/
function uglify(prettyfile, sourcecode) {
console.warn('Not quite getting the right path to source in the map :/');
return ugli.minify(sourcecode || prettyfile, {
fromString: sourcecode !== undefined,
outSourceMap: path.basename(prettyfile) + '.map',
compress: {
warnings: false
}
});
}
/**
* Get weirdo filename relative to base.
* @param {string} name
* @param {Map} options
* @returns {string}
*/
function filename(name, options) {
return path.normalize(options.base + '/' + name);
}
/**
* Expand sources via JSON files.
* @param {Array<String>} sources
* @returns {Array<String>}
*/
function explodeall(sources) {
sources = grunt.file.expand({nonull: true}, sources);
return explode(sources.filter(exists).map(relpath));
}
/**
* Source to relative something.
* @param {String} filepath
* @returns {String}
*/
function relpath(filepath) {
return path.relative(path.dirname("."), filepath);
}
/**
* If source is a JSON file, resolve the file
* as a new source list relative to that file.
* @param {Array<String>} sources
* @returns {Array<String>}
*/
function explode(sources) {
var json, res = [];
sources.forEach(function(source) {
switch (path.extname(source)) {
case ".json":
json = grunt.file.readJSON(source);
res.push.apply(res, json.map(function(filepath) {
return path.dirname(source) + "/" + filepath;
}));
break;
case ".js":
res.push(source);
break;
}
});
return res;
}
};
|
var React = require('react');
var AlbumViewer = require('../../components/album-viewer/album-viewer');
var Header = require('../../components/header/header');
var Footer = require('../../components/footer/footer');
var albums = require('../../config/albums');
var RightSidebar = require('../../components/right-sidebar');
var $ = require('jquery');
var browserHistory = require('react-router').browserHistory;
var StaticHeader = require('../../components/static-header')
import "./albums.css"
module.exports = React.createClass({
displayName: 'AlbumsController',
pages_loaded: [],
getInitialState: function() {
return {
scrolledDown: false,
scrolledPastHeader: true,
};
},
componentDidMount: function() {
document.title = "Litronix - Albums"
var self = this;
},
componentDidUpdate: function() {
},
componentWillUnmount: function() {
},
render: function() {
var self = this
return (
<div className='Albums-Controller'>
<RightSidebar />
<Header
visible={true}
activeLink={"albums"} />
<div
className='albums-main-container'
data-is-scrolled-past-header={this.state.scrolledPastHeader}>
<StaticHeader className="outer-container" activeLink='albums'/>
<AlbumViewer
className="outer-container"
scrolledDown={this.state.scrolledDown}
albums={albums}
theme={'default'} />
<Footer />
</div>
</div>
)
}
})
|
/// <reference path='../typescript-definitions/mocha.d.ts' />
/// <reference path='../typescript-definitions/node.d.ts' />
/* jshint mocha:true */
'use strict';
var rdr = require('../index');
var assert = require('assert');
var _a = [rdr.deepReaddir, rdr.deepReaddirSync], deepReaddir = _a[0], deepReaddirSync = _a[1];
describe('deep-readdir', function () {
it('should return an array', function () {
assert(Array.isArray(deepReaddirSync('test/mocks/onlyfiles/')));
assert(Array.isArray(deepReaddirSync('test/mocks/empty/')));
});
it('should throw an error if first argument is not a directory', function () {
assert.throws(deepReaddirSync);
assert.throws(function () { deepReaddirSync('foo'); });
});
it('should return a list of files in directory', function () {
assert.equal(deepReaddirSync('test/mocks/onlyfiles/').length, 5);
assert.equal(deepReaddirSync('test/mocks/onlyfiles').length, 5);
assert.equal(deepReaddirSync('test/mocks/subs').length, 6);
});
it('should call a callback (if provided) with results', function (done) {
var promises = 4;
deepReaddir('test/mocks/onlyfiles/', function (result) {
promises--;
assert.equal(result.length, 5);
if (promises === 0) {
done();
}
});
deepReaddir('test/mocks/onlyfiles', function (result) {
promises--;
assert.equal(result.length, 5);
if (promises === 0) {
done();
}
});
deepReaddir('test/mocks/subs', function (result) {
promises--;
assert.equal(result.length, 6);
if (promises === 0) {
done();
}
});
deepReaddir('test/mocks/empty', function (result) {
promises--;
assert(Array.isArray(result));
if (promises === 0) {
done();
}
});
});
it('should accept an optional options object', function (done) {
deepReaddir('test/mocks/onlyfiles/', function (result) {
assert(Array.isArray(result));
done();
}, {});
});
it('should allow filtering by extension', function (done) {
var promises = 3;
deepReaddir('test/mocks/extensions/', function (result) {
promises--;
assert(Array.isArray(result));
assert.equal(result.length, 2);
if (promises === 0) {
done();
}
}, { extension: 'html' });
deepReaddir('test/mocks/extensions/', function (result) {
promises--;
assert(Array.isArray(result));
assert.equal(result.length, 3);
if (promises === 0) {
done();
}
}, { extension: '.txt' });
deepReaddir('test/mocks/extensions/', function (result) {
promises--;
assert(Array.isArray(result));
assert.equal(result.length, 6);
if (promises === 0) {
done();
}
}, { extension: '' });
});
it('should allow filtering hidden files', function (done) {
var promises = 3;
deepReaddir('test/mocks/hidden/', function (result) {
promises--;
assert(Array.isArray(result));
assert.equal(result.length, 4);
if (promises === 0) {
done();
}
}, { hidden: true });
deepReaddir('test/mocks/hidden/', function (result) {
promises--;
assert(Array.isArray(result));
assert.equal(result.length, 1);
if (promises === 0) {
done();
}
}, { hidden: false });
deepReaddir('test/mocks/hidden/', function (result) {
promises--;
assert(Array.isArray(result));
assert.equal(result.length, 1);
if (promises === 0) {
done();
}
}, {});
});
});
|
export const name = 'Provider';
/**
* Generate provider uid name from provider name and user ID
* @param {String} providerName Provider name
* @param {String} uid User ID
* @return {String} Provider UID
*/
export function genNameUID(providerName, uid) {
return providerName + '_' + uid;
}
export function createSchema(Schema) {
// add properties to schema
const schema = new Schema({
user: { type: Schema.Types.ObjectId, ref: 'User', required: true },
name: { type: String, required: true },
uid: { type: String, required: true },
nameUID: { type: String, required: true },
data: { type: String },
});
// add indexes
schema.index({ user: 1, name: 1 });
schema.index({ nameUID: 1 }, { unique: true });
// add preprocess validation
schema.pre('save', function saveCallback(next) {
// only hash the password if it has been modified (or is new)
if (this.isModified('name') || this.isModified('uid') || !this.nameUID) {
this.nameUID = genNameUID(this.name, this.uid);
}
next();
});
return schema;
}
|
'use strict';
//csbindはclientとserverで
//[{},{}...]
//の形式の抽象テーブル型を共有するためのライブラリ
//underscore.jsとunderscore-contrib.jsに依存する。
//
var _ = require('underscore-contrib');
var def = require('deferred');
var csbs = {};
//deepClone
//Date型のみ対応
(function() {
function _deepClone(obj) {
var _dc;
if (!_.isArray(obj)) {
_dc = {};
_.each(obj, function(value, key, list) {
if (!_.isObject(value) || typeof value === 'function') {
this[key] = value;
} else if (_.isDate(value)) {
this[key] = new Date(value.valueOf());
} else {
var memo = _deepClone(value);
this[key] = memo;
}
}, _dc);
} else {
_dc = _.map(obj, function(value, key, list) {
if (!_.isObject(value) || typeof value === 'function') {
if (_.isDate(value)) {
return new Date(value);
} else {
return value;
}
}
var memo = _deepClone(value);
return memo;
});
}
return _dc;
}
function deepClone(obj) {
if (!_.isObject(obj) || typeof obj === 'function') {
if (_.isDate(obj)) {
return new Date(obj);
} else {
return obj;
}
}
var dc = _deepClone(obj);
return dc;
}
csbs.deepClone = deepClone;
})();
(function() {
//util
/**
* fail [引数をエラーに格納して投げる関数。]
* @param {object} thing [new Errorの引数にできるなら何でもよい。]
* @return {[type]} undefined []
*/
function fail(thing) {
throw new Error(thing);
}
/**
* validator [validationを生成する関数。戻り値の関数のmessageプロパティにエラーメッセージがセットされる。]
* @param {string} message [エラーメッセージ]
* @param {function} fun [検証用のpredicate]
* @return {function} validator [エラーメッセージがセットされたプレディケート]
*/
function validator(message, fun) {
var f = function() {
return fun.apply(fun, arguments);
};
f.message = message;
return f;
}
/**
* hasKeys [オブジェクトが必要なキーを持っているかを判定するpredicateを返す高階関数]
* @return {function} f [プロパティにエラーメッセージが格納された関数。(validatorの形式に準拠している。)]
*/
function hasKeys() {
var keys = _.toArray(arguments);
var f = function(obj) {
return _.every(keys, function(k) {
return _.has(obj, k);
});
};
f.message = _.cat(["以下のキーが存在する必要があります:"], keys).join(" ");
return f;
}
/**
* hasAnyValue [指定したオブジェクトのプロパティが必要な値かを判定するpredicateを返す高階関数]
* @param {string} prop [プロパティ]
* @param {Array} values [プロパティが持つべき値の配列]
* @return {function} f [プロパティにエラーメッセージが格納された関数。(validatorの形式に準拠している。)]
*/
function hasAnyValue(prop, values) {
var f = function(obj) {
return _.has(obj, prop) && _.some(values, function(value) {
return obj[prop] === value;
});
};
f.message = _.cat(['プロパティ' + prop + 'の値は以下のどれかである必要があります:'], values).join(" ");
return f;
}
/**
* isEveryPredArray [引数のpredにtrueになる配列であることを確かめる関数を返す高階関数。]
* @param {string} message [エラーメッセージ]
* @param {function} pred [predicate]
* @return {function} fun [引数のpredにtrueになる配列であることを確かめる関数]
*/
function isEveryPredArray(pred) {
return function(obj) {
return _.truthy(obj) && _.isArray(obj) && _.every(obj, function(v) {
return pred(v);
});
};
}
/**
* condition [検証関数の配列をセットして、呼び出し時に対応する検証を実行する関数を返す高階関数。(引数例:[val1-1,val1-2],[val2-1,val2-2])]
* @return {function} con [関数とそれに適応したい引数をとる関数。]
*/
function condition() {
var validatorArrays = _.toArray(arguments);
return function(f) {
var args = _.rest(arguments);
var errors = _.mapcat(args, function(arg, index) {
if (_.exists(validatorArrays[index]) && _.isArray(validatorArrays[index])) return _.mapcat(validatorArrays[index], function(validator) {
if (!validator(arg)) return [validator.message];
});
});
var err = _.filter(errors, function(x) {
return _.truthy(x);
});
if (err.length !== 0) {
fail(err.join());
}
return f.apply(f, args);
};
}
/**
* tryDo [try-catch処理を実行する関数を返す高階関数。]
* @param {function} f [関数]
* @param {function} errcb [エラーが発生した時に呼ばれるcalback]
* @return {function} [try-catch処理を実行する関数。]
*/
function tryDo(f, errcb) {
return function() {
var args = _.toArray(arguments);
try {
return f.apply(f, args);
} catch (e) {
return _.isFunction(errcb) ? errcb(e) : fail(e);
}
};
}
/**
* genPipeline [underscore-contibのpiplelineにoption引数を追加。]
* @return {funciton} pipeline [登録された関数を逐次実行していく。]
*/
function genPipeline() {
var funs = (_.isArray(arguments[0])) ? arguments[0] : arguments;
return function(seed) {
var option = _.rest(arguments);
return _.reduce(funs,
function(l, r) {
return r.apply(r, _.cat([l], option));
},
seed);
};
}
function eachCall(fArray) {
var args = _.rest(arguments);
_.each(fArray, function(f) {
f.apply(f, args);
});
}
function preIfExist(pre) {
return function(x) {
return !_.exists(x) || pre(x);
};
}
function isInRange(v, min, max) {
return _.isNumber(v) && (min <= v && v <= max);
}
function nilGuard(target, def) {
if (!_.truthy(target)) target = def;
return target;
}
//utilから生成される関数。
var isRightGetFunction = function(necKeysArray) {
return function(x) {
return _.isFunction(x) && isEveryHasKeysArray(csbs.deepClone(x()), necKeysArray);
};
};
var isRightGetFunctionDef = function(necKeysArray) {
return function(x) {
return _.isFunction(x) && _.isObject(x()) && _.every(necKeysArray, function(val) {
return _.exists(x()[val]);
});
};
};
var isEveryHasKeysArray = function(x, necKeysArray) {
return (isEveryPredArray(function(y) {
return _.isObject(y) && hasKeys.apply(hasKeys, necKeysArray)(y);
})(x));
};
var isSeveralHasKeys = function(hkMap, kKey) {
return function(obj) {
return _.has(obj, kKey) && _.has(hkMap, obj[kKey]) && hasKeys.apply(hasKeys, hkMap[obj[kKey]])(obj);
};
};
//validator - init
var validNameInit = validator('第一引数はstring形式である必要があります。', _.isString);
var validHasKeysInit = hasKeys('receive', 'send', "edit", "insert", "remove", "add");
var validIsEveryFuncArrayInit = validator('第二引数のハッシュの値は関数である必要があります。',
function(obj) {
return _.every(obj, function(value) {
return _.isFunction(value);
});
});
var validIsEveryStringArrayInit = validator('第三引数の値は文字列の配列である必要があります。', isEveryPredArray(_.isString));
var validIsFunctionIfExistInit = validator('第四引数は関数である必要があります。', preIfExist(_.isFunction));
//validator - start
var validGenIsRightGetFunStart = function(necKeysArray) {
return validator('第一引数はオブジェクトの配列(キーとして' + necKeysArray.join(', ') + 'を持つ)を返す関数である必要があります。', isRightGetFunction(necKeysArray));
};
var validIsFunIfExistStart = validator('第二引数は関数である必要があります。', preIfExist(_.isFunction));
//validator - startDef
var validGenIsRightGetFunStartDef = function(necKeysArray) {
return validator('第一引数はプロパティとして' + necKeysArray.join(', ') + 'を持つオブジェクトを返す関数である必要があります。', isRightGetFunctionDef(necKeysArray));
};
//validator - set
var validGenHasKeysSet = function(modePropMap, kKey) {
return validator('第一引数にはmodeプロパティが必要です。またmodeプロパティがedit,insertの時はvalues、indexプロパティ、removeの場合はindexプロパティ、addの場合はvaluesプロパティが追加で必要です。', isSeveralHasKeys(modePropMap, kKey));
};
var validGenIsRightIndexSet = function(necModesArray, values) {
return validator('第一引数のindexプロパティは範囲内の整数である必要があります。', function(x) {
return !_.contains(necModesArray, x.mode) || isInRange(x.index, 0, values.length);
});
};
var validGenHasAnySet = function(modeKeys) {
return validator('第一引数のmodeプロパティは' + modeKeys.join() + 'のいずれかである必要があります。', function(x) {
return hasAnyValue('mode', modeKeys)(x);
});
};
var validGenIsRightValuesSet = function(necKeysArray, necModesArray) {
return validator('第一引数のvaluesプロパティはオブジェクトの配列(キーとして' + necKeysArray.join(', ') + 'を持つ)である必要があります。',
function(x) {
return !_.contains(necModesArray, x.mode) || isEveryHasKeysArray(x.values, necKeysArray);
});
};
var validIsFunIfExistSet = validator('第二引数は関数である必要があります。', preIfExist(_.isFunction));
//validator - addUpdates
var validIsEveryFuncArrayAddUpdates = validator('第一引数の値は関数の配列である必要があります。', isEveryPredArray(_.isFunction));
var validIsFunIfExistAddUpdates = validator('第二引数は関数である必要があります。', preIfExist(_.isFunction));
//validator - receive
//pipeline用の関数
//piplelineではmodeとdataとlastValuesを引数に取りnewValuesを返す。
var plInsert = function(und, data, funs) {
if (data.mode === 'insert') {
funs.insert(data);
}
};
var plEdit = function(und, data, funs) {
if (data.mode === 'edit') {
funs.edit(data);
}
};
var plAdd = function(und, data, funs) {
if (data.mode === 'add') {
funs.add(data);
}
};
var plRemove = function(und, data, funs) {
if (data.mode === 'remove') {
funs.remove(data);
}
};
var plInsertDef = function(promise, data, funs) {
if (data.mode === 'insert') {
return funs.insert(data);
}
return promise;
};
var plEditDef = function(promise, data, funs) {
if (data.mode === 'edit') {
return funs.edit(data);
}
return promise;
};
var plAddDef = function(promise, data, funs) {
if (data.mode === 'add') {
return funs.add(data);
}
return promise;
};
var plRemoveDef = function(promise, data, funs) {
if (data.mode === 'remove') {
return funs.remove(data);
}
return promise;
};
//observable内で使われる関数
var preInit = condition(
[validNameInit], [validHasKeysInit, validIsEveryFuncArrayInit], [validIsEveryStringArrayInit], [validIsFunctionIfExistInit]);
var preStart = function(necKeysArray) {
return condition(
[validGenIsRightGetFunStart(necKeysArray)], [], [validIsFunIfExistStart]);
};
var preStartDef = function(necKeysArray) {
return condition(
[validGenIsRightGetFunStartDef(necKeysArray)], [], [validIsFunIfExistStart]);
};
var preSet = function(necKeysArray, modeKeys, modePropMap, values) {
return condition(
[validGenHasKeysSet(modePropMap, 'mode'),
validGenIsRightIndexSet(['insert', 'edit', 'remove'], values),
validGenHasAnySet(modeKeys),
validGenIsRightValuesSet(necKeysArray, ['add', 'insert', 'edit'])
], [validIsFunIfExistSet]);
};
var preAddUpdates = condition(
[validIsEveryFuncArrayAddUpdates], [validIsFunIfExistAddUpdates]);
var preReceive = function(necKeysArray, modeKeys, modePropMap, values) {
return preSet(necKeysArray, modeKeys, modePropMap, values);
};
var plReceive = genPipeline(
plInsert,
plEdit,
plRemove,
plAdd
);
var plReceiveDef = genPipeline(
plInsertDef,
plEditDef,
plRemoveDef,
plAddDef
);
/**
* observable [各処理をセットしobservableを初期化するメソッド。]
* @param {string} name [observableごとに固有の名前(サーバーと対応させる必要がある。)]
* @param {object} funs [updates・sends・receivesをプロパティに持つobject(各プロパティには関数が登録されている配列を渡す。)]
* @return {object} obs [各種処理を公開しているobjectを返す。]
*/
function observable(n, fs, nec, type, errcb) {
var funs, name, necKeys, baseModeKeys, sendModeKeys, receiveModeKeys, lastValues, returnObj, baseModePropMap, sendModePropMap, receiveModePropMap;
baseModeKeys = ['insert', 'edit', 'add', 'remove'];
sendModeKeys = _.cat(baseModeKeys, []);
receiveModeKeys = _.cat(baseModeKeys, ['check']);
baseModePropMap = {
edit: ['index', 'values', 'mode'],
insert: ['index', 'values', 'mode'],
remove: ['index', 'mode'],
add: ['values', 'mode'],
};
sendModePropMap = _.merge(baseModePropMap, {});
receiveModePropMap = _.merge(baseModePropMap, {
check: ['values', 'mode']
});
function _setValues(newValues) {
if (!_.isEqual(newValues, lastValues)) {
lastValues = newValues;
return true;
} else {
return false;
}
}
function _getValues() {
return csbs.deepClone(funs.get());
}
function _getValuesDef() {
var d = def();
funs.get().then(function(rData) {
d.resolve(csbs.deepClone(rData));
});
return d.promise;
}
//初期化処理
tryDo(function() {
preInit(function(n, fs, nec, errcb) {
name = n;
funs = _.selectKeys(fs, ["receive", "send", "edit", "insert", "remove", "add"]);
necKeys = _.clone(nec);
}, n, fs, nec, errcb);
}, errcb)();
function _start(get, errcb) {
tryDo(function() {
preStart(necKeys)(function(get, errcb) {
if (_.isFunction(get)) {
funs.get = csbs.deepClone(get);
lastValues = csbs.deepClone(get());
} else {
lastValues = csbs.deepClone(get);
}
funs.receive('csbindSend' + name, _setReceived);
}, get, errcb);
}, errcb)();
return returnObj;
}
function _startDef(get, errcb) {
var d = def();
tryDo(function() {
preStartDef(['then'])(function(get, errcb) {
funs.get = csbs.deepClone(get);
funs.get().then(function(rData) {
lastValues = csbs.deepClone(rData);
funs.receive('csbindSend' + name, _setReceivedDef);
d.resolve(returnObj);
});
}, get, errcb);
}, errcb)();
return d.promise;
}
function _basicSet(data) {
if (data.mode !== 'check') {
plReceive(undefined, data, funs);
if (_setValues(funs.get())) {
eachCall(funs.updates, lastValues, data);
funs.send('csbindReceive' + name, data);
}
} else {
_check(data.values, funs.get());
}
}
function _basicSetDef(data, errcb) {
var d = def();
if (data.mode !== 'check') {
plReceiveDef(null, data, funs)
.then(function() {
return tryDo(function() {
return _getValuesDef();
}, errcb)();
})
.then(function(rData) {
tryDo(function() {
if (_setValues(csbs.deepClone(rData))) {
eachCall(funs.updates, lastValues, data);
funs.send('csbindReceive' + name, data);
d.resolve(returnObj);
} else {
d.reject(returnObj);
}
}, errcb)();
});
} else {
_getValuesDef().then(function(rData) {
_check(data.values, rData);
});
}
return d.promise;
}
function _set(data, errcb) {
tryDo(function() {
preSet(necKeys, sendModeKeys, sendModePropMap, _getValues())(function(data, errcb) {
_basicSet(data);
}, data, errcb);
}, errcb)();
return returnObj;
}
function _setDef(data, errcb) {
return tryDo(function() {
_getValuesDef().then(function(rData) {
return preSet(necKeys, sendModeKeys, sendModePropMap, rData)(function(data, errcb) {
return _basicSetDef(data, errcb);
}, data, errcb);
});
}, errcb)();
}
function _setReceived(data, errcb) {
tryDo(function() {
preReceive(necKeys, receiveModeKeys, receiveModePropMap, _getValues())(function(data, errcb) {
_basicSet(data);
}, data, errcb);
}, errcb)();
}
function _setReceivedDef(data, errcb) {
tryDo(function() {
_getValuesDef().then(function(rData) {
preReceive(necKeys, receiveModeKeys, receiveModePropMap, rData)(function(data, errcb) {
_basicSetDef(data, errcb);
}, data, errcb);
});
}, errcb)();
}
function _addUpdates(fArray, errcb) {
tryDo(function() {
preAddUpdates(function(fArray, errcb) {
funs.updates = _.cat(nilGuard(funs.updates, []), fArray);
}, fArray, errcb);
}, errcb)();
return returnObj;
}
function _addUpdatesDef(fArray, errcb) {
var d = def();
tryDo(function() {
preAddUpdates(function(fArray, errcb) {
funs.updates = _.cat(nilGuard(funs.updates, []), fArray);
}, fArray, errcb);
}, errcb)();
d.resolve(returnObj);
return d.promise;
}
function _check(checkValues, lastValues) {
if (!_.isEqual(checkValues, lastValues)) {
funs.send('csbindReceive' + name, {
values: lastValues,
mode: 'changeAll'
});
}
}
returnObj = (function() {
if (type === 'deferred') {
return {
start: _startDef,
set: _setDef,
addUpdates: _addUpdatesDef,
get: _getValuesDef
};
} else {
return {
start: _start,
set: _set,
addUpdates: _addUpdates,
get: _getValues
};
}
})();
return returnObj;
}
csbs.observable = observable;
})();
module.exports = csbs;
|
// load the things we need
var mongoose = require('mongoose');
var bcrypt = require('bcrypt-nodejs');
// define the schema for our user model
var userSchema = mongoose.Schema({
local : {
email : String,
pass : String,
country : String,
date : String,
name : String,
imgpath : String
},
facebook : {
id : String,
token : String,
email : String,
name : String
},
google : {
id : String,
token : String,
email : String,
name : String
}
});
// generating a hash
userSchema.methods.generateHash = function(password) {
return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null);
};
// checking if password is valid
userSchema.methods.validPassword = function(password) {
return bcrypt.compareSync(password, this.local.password);
};
// create the model for users and expose it to our app
module.exports = mongoose.model('Accounts', userSchema);
|
var ModAPI = require('modapi')
var _ = require('lodash')
var fs = require('fs')
var path = require('path')
var readLocalFile = function(name) {
return fs.readFileSync(path.join(__dirname, name))
}
var qml = ModAPI.QMLFileV2("Controls/SelfSwitchBox.qml")
var node = qml.root
node.type = "LabeledEditableComboBox"
node.set("currentCharacter", "model.get(currentIndex).name")
node.set("model", ModAPI.QMLCompileV2("ListModel { id: listModel }"))
node.set("textRole", '"name"')
node.set("onEditTextChanged", [
'{',
' var character = editText;',
' setCharacter(character, true);',
' if (member.length && DataManager.setObjectValue(object, member, character)) {',
' helper.setModified();',
' modified();',
' }',
'}',
].join("\n"))
node.set("onCurrentIndexChanged", [
'{',
' var character = model.get(currentIndex).name.toString();',
' if (member.length && DataManager.setObjectValue(object, member, character)) {',
' helper.setModified();',
' modified();',
' }',
'}',
].join("\n"))
node.set("Component.onCompleted", [
'{',
' initModel();',
'}',
].join("\n"))
node.def("setCharacter", "Function", [
'function setCharacter(character, notForce) {',
' initModel();',
' if (!notForce) currentIndex = 0;',
' for (var i = 0; i < model.count; i++) {',
' if (model.get(i).name === character) {',
' if (!notForce || (notForce && currentIndex !== i)) currentIndex = i;',
' return;',
' }',
' }',
' if (!model.get(model.count - 1).input) {',
' model.append({"name": "", "input": true});',
' }',
' model.get(model.count - 1).name = character;',
' if (!notForce || (notForce && currentIndex !== model.count - 1)) currentIndex = model.count - 1;',
'}',
].join("\n"))
var x = node.def("initModel", "Function", [
'function initModel() {',
' if (model.count == 0) {',
' model.append({"name": "A"});',
' model.append({"name": "B"});',
' model.append({"name": "C"});',
' model.append({"name": "D"});',
' }',
'}',
].join("\n"))
qml.save()
|
/**
* Events from selenium control flow
*/
const Channel = require('chnl');
//const promise = require('selenium-webdriver/lib/promise');
// const {IDLE, UNCAUGHT_EXCEPTION} = promise.ControlFlow.EventType;
exports.onError = new Channel();
exports.onIdle = new Channel();
exports.onErrorOrIdle = new Channel();
/*
_listenFlowEvents() {
this._flow.on(IDLE, () => super.stop());
this._flow.on(UNCAUGHT_EXCEPTION, () => super.stop());
}
*/
|
'use strict';
var fs = require('fs'),
os = require('os'),
path = require('path'),
chalk = require('chalk');
module.exports = function (grunt) {
var coverage = process.env.GRUNT_MOVE_COVERAGE,
tmp = os.tmpdir(),
succeedingTasks = [
'move:empty', 'move:missing', 'move:rename',
'move:move_with_rename', 'move:move_without_rename',
'move:move_more', 'move:move_with_wildcard',
'move:move_with_wildcard_and_cwd', 'move:move_directory',
'move:move_across_volumes', 'move:rename_multiple',
'move:move_multiple'
],
failingTasks = [
'move:failed_empty', 'move:failed_missing',
'move:failed_invalid_destination'
],
failingWarnings = [
'No files or directories specified.',
'No files or directories found at ' +
chalk.cyan('test/work/missing/old') + '.',
'Error: Unable to create directory "test/work/failed_invalid_destination/blocked" (Error code: EEXIST).'
],
tasks;
if (!process.env.TRAVIS) {
failingTasks.push('move:failed_move_across_volumes');
failingWarnings.push('Moving files across devices has not been enabled.');
}
require('time-grunt')(grunt);
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/*.js',
'<%= nodeunit.tests %>'
],
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
}
},
copy: {
tests: {
expand: true,
cwd: 'test/data',
src: '**',
dest: 'test/work/'
}
},
move: {
empty: {
options: {
ignoreMissing: true
}
},
missing: {
options: {
ignoreMissing: true
},
src: 'test/work/missing/old',
dest: 'test/work/missing/new'
},
rename: {
src: 'test/work/rename/old',
dest: 'test/work/rename/new'
},
move_with_rename: {
src: 'test/work/move_with_rename/source/old',
dest: 'test/work/move_with_rename/target/new'
},
move_without_rename: {
src: 'test/work/move_without_rename/source/file',
dest: 'test/work/move_without_rename/target/'
},
move_more: {
src: ['test/work/move_more/source/first',
'test/work/move_more/source/second'],
dest: 'test/work/move_more/target/'
},
move_with_wildcard: {
src: ['test/work/move_with_wildcard/source/*'],
dest: 'test/work/move_with_wildcard/target/'
},
move_with_wildcard_and_cwd: {
cwd: 'test/work/move_with_wildcard_and_cwd/source',
expand: true,
src: ['*'],
dest: 'test/work/move_with_wildcard_and_cwd/target/'
},
move_directory: {
src: 'test/work/move_directory/source',
dest: 'test/work/move_directory/target'
},
move_across_volumes: {
options: {
moveAcrossVolumes: true
},
src: 'test/work/move_across_volumes/file',
dest: path.join(tmp, 'grunt-move/file')
},
rename_multiple: {
files: [
{
src: 'test/work/rename_multiple/first',
dest: 'test/work/rename_multiple/third'
},
{
src: 'test/work/rename_multiple/second',
dest: 'test/work/rename_multiple/fourth'
}
]
},
move_multiple: {
files: [
{
src: ['test/work/move_multiple/source1/first',
'test/work/move_multiple/source1/second'],
dest: 'test/work/move_multiple/target1/'
},
{
src: 'test/work/move_multiple/source2/*',
dest: 'test/work/move_multiple/target2/'
}
]
},
failed_empty: {
},
failed_missing: {
src: 'test/work/missing/old',
dest: 'test/work/missing/new'
},
failed_invalid_destination: {
src: 'test/work/failed_invalid_destination/file',
dest: 'test/work/failed_invalid_destination/blocked/file',
},
failed_move_across_volumes: {
src: 'test/work/failed_move_across_volumes/file',
dest: path.join(tmp, 'grunt-move/file')
}
},
'continue:check-warnings': {
test: {
warnings: failingWarnings
}
},
nodeunit: {
tests: ['test/*_test.js'],
options: {
reporter: coverage ? 'lcov' : 'verbose',
reporterOutput: coverage ? 'coverage/tests.lcov' : undefined
}
},
clean: {
options: {
force: true
},
tests: ['test/work', path.join(tmp, 'grunt-move')],
coverage: ['coverage']
},
instrument: {
files: 'tasks/*.js',
options: {
lazy: true,
basePath: 'coverage/'
}
},
storeCoverage: {
options: {
dir: 'coverage'
}
},
makeReport: {
src: 'coverage/coverage.json',
options: {
type: 'lcov',
dir: 'coverage',
print: 'detail'
}
},
coveralls: {
tests: {
src: 'coverage/lcov.info'
}
}
});
grunt.loadTasks(coverage && fs.existsSync('coverage/tasks') ?
'coverage/tasks' : 'tasks');
grunt.loadNpmTasks('grunt-continue-ext');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-coveralls');
grunt.loadNpmTasks('grunt-istanbul');
tasks = ['copy'].concat(succeedingTasks)
.concat(['continue:on'])
.concat(failingTasks)
.concat(['continue:off', 'continue:check-warnings',
'nodeunit']);
if (coverage) {
tasks = ['clean', 'instrument'].concat(tasks)
.concat(['storeCoverage', 'makeReport']);
} else {
tasks = ['clean:tests'].concat(tasks);
}
tasks = ['jshint'].concat(tasks);
grunt.registerTask('default', tasks);
};
|
Package.describe({
name: 'telescope:users',
summary: 'Telescope permissions.',
version: '0.1.0'
});
Package.onUse(function (api) {
api.versionsFrom(['METEOR@1.0']);
api.use([
'telescope:lib@0.3.1',
'telescope:settings@0.1.0',
'telescope:i18n@0.1.0'
]);
api.addFiles([
'package-tap.i18n',
'lib/namespace.js',
'lib/roles.js',
'lib/permissions.js',
'lib/users.js',
'lib/avatars.js',
'lib/callbacks.js',
'lib/modules.js',
'lib/helpers.js',
'lib/menu.js',
'lib/pubsub.js',
'lib/methods.js',
'lib/routes.js'
], ['client', 'server']);
api.addFiles([
'lib/client/templates/account/user_account.html',
'lib/client/templates/account/user_account.js',
'lib/client/templates/dashboard/users-dashboard.html',
'lib/client/templates/dashboard/users-dashboard.js',
'lib/client/templates/dashboard/users_list_actions.html',
'lib/client/templates/dashboard/users_list_actions.js',
'lib/client/templates/dashboard/users_list_avatar.html',
'lib/client/templates/dashboard/users_list_created_at.html',
'lib/client/templates/dashboard/users_list_email.html',
'lib/client/templates/dashboard/users_list_username.html',
'lib/client/templates/dashboard/users_list_display_name.html',
'lib/client/templates/profile/user_comments.html',
'lib/client/templates/profile/user_comments.js',
'lib/client/templates/profile/user_downvoted_posts.html',
'lib/client/templates/profile/user_downvoted_posts.js',
'lib/client/templates/profile/user_info.html',
'lib/client/templates/profile/user_info.js',
'lib/client/templates/profile/user_posts.html',
'lib/client/templates/profile/user_posts.js',
'lib/client/templates/profile/user_upvoted_posts.html',
'lib/client/templates/profile/user_upvoted_posts.js',
'lib/client/templates/sign_out.html',
'lib/client/templates/user_edit.html',
'lib/client/templates/user_complete.html',
'lib/client/templates/user_complete.js',
'lib/client/templates/user_item.html',
'lib/client/templates/user_item.js',
'lib/client/templates/user_profile.html'
], ['client']);
api.addFiles([
'lib/server/publications.js',
'lib/server/create_user.js'
], ['server']);
api.addFiles([
"i18n/en.i18n.json",
"i18n/fr.i18n.json"
], ["client", "server"]);
api.export('Users');
});
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = history;
var _routing = require('../actions/routing');
var initialState = {}; /**
* Created by sidchik on 28.03.17.
*/
function history() {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
var action = arguments[1];
var payload = action.payload;
switch (action.type) {
case _routing.SET_KWARGS_ROUTING:
var newState = Object.assign({}, state);
var path = payload.path;
if (path.substr(-1) == '/') {
path = path.slice(0, -1);
}
newState[path] = payload.kwargs;
if (payload.absName) {
newState[payload.absName] = payload.kwargs;
}
return newState;
}
return state;
}
//# sourceMappingURL=routeKwargs.js.map |
$(document).ready(function() {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* BEGIN DECLARATIONS OF VARS *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// utility functions
var dskOpenArticle = function(e,u) {
$(document).off('click', '.front.no-mobile.gt-768 #articles a#prev, .front.no-mobile.gt-768 #articles a#next', dskBtnClk);
//console.log( e + ' >> ' + u )
if( $('section[rel="' + e + '"]').hasClass('first') )
{ hideBtnPrev(e); }
else
{ showBtnPrev(e); }
if( $('section[rel="' + e + '"]').hasClass('last') )
{ hideBtnNext(e); }
else
{ showBtnNext(e); }
//console.log( $('#articles article#' + e).is(e) )
if ( !$('#articles article#' + e).is('#'+e) ) {
$.ajax({
url: u,
type: "GET",
cache: false,
beforeSend: function ( xhr ) {
//xhr.overrideMimeType("text/plain; charset=x-user-defined");
$('#overlay').addClass('progress')
}
}).done(function ( data ) {
//var article = '<article id="' + e + '">' + data + '</article>';
var article = data
$( article ).appendTo('div#articles').attr('id', e);
}).always(function() {
$('#overlay').removeClass('progress')
animPosWin(e)
updLocaleLinks(e)
});
} else {
animPosWin(e)
updLocaleLinks(e)
}
}
// utility functions
var dskOpenArticleNF = function(e,u,a,d) {
var currArticle = $('#page div.main article[rel="'+a+'"]')
$(document).off('click', '.not-front.no-mobile.gt-640 a[rel="ajax"]', dskBtnClkNF);
//console.log( e + ' >> ' + u )
//console.log( e )
if( $('section#footer footer nav li.' + e).hasClass('first') )
{ hideBtnPrev(e); }
else
{ showBtnPrev(e); }
if( $('section#footer footer nav li.' + e).hasClass('last') )
{ hideBtnNext(e); }
else
{ showBtnNext(e); }
$.ajax({
url: u,
type: "GET",
cache: false,
beforeSend: function ( xhr ) {
//xhr.overrideMimeType("text/plain; charset=x-user-defined");
if ( d == 'left' ) {
currArticle.animate({'left': +(window.outerWidth / 2 + currArticle.width())}, 600, 'swing', function (){ $(this).remove() })
} else if ( d == 'right' ) {
currArticle.animate({'left': -(window.outerWidth / 2 + currArticle.width())}, 600, 'swing', function (){ $(this).remove() })
} else {
currArticle.slideUp(300, 'swing', function (){ $(this).remove() })
}
//$('#overlay').addClass('progress')
}
}).done(function ( data ) {
//$( data ).appendTo('#page div.main').css({'display': 'none'}).delay(100).slideDown(500);
var newArticle = $( data ).appendTo('#page div.main').css({'display': 'none'})
//console.log( data )
if ( d == 'left' ) {
newArticle.css({'left': -(window.outerWidth / 2 + newArticle.width()), 'display': 'block'})
.animate({'left': 0 }, 600, 'easeOutBack')
} else if ( d == 'right' ) {
newArticle.css({'left': +(window.outerWidth / 2 + newArticle.width()), 'display': 'block'})
.animate({'left': 0 }, 600, 'easeOutBack')
} else {
newArticle.delay(100).slideDown(500);
}
history.pushState(null, null, u);
}).always(function() {
//$('#overlay').removeClass('progress')
updLocaleLinks(e)
$(document).on('click', '.not-front.no-mobile.gt-640 a[rel="ajax"]', dskBtnClkNF);
});
}
var dskCloseArticle = function(e){
$('#'+e).css({'z-index': '50'})
.animate({'top': '100%', 'opacity': '0', 'marginTop': '0px'}, 600, 'easeInBack', function(){
$(this).removeClass('opened').removeAttr('style');
});
};
var showBtnPrev = function(e) {
$('a#prev').css({visibility: 'visible'})
.animate({opacity: '0.6', 'left': '-5px'}, 500, 'easeOutQuint');
};
var showBtnNext = function(e) {
$('a#next').css({visibility: 'visible'})
.animate({opacity: '0.6', 'right': '-5px'}, 500, 'easeOutQuint');
};
var hideBtnPrev = function(e) {
$('a#prev').animate({opacity: '0'}, 300, 'easeInQuint', function(){
$(this).css({opacity: '0', visibility: 'hidden', 'left': '-60px'})
});
};
var hideBtnNext = function(e) {
$('a#next').animate({opacity: '0'}, 300, 'easeInQuint', function(){
$(this).css({opacity: '0', visibility: 'hidden', 'right': '-60px'})
});
};
var dskBtnClk = function(e) {
var active = $('#articles article.opened').attr('id'),
next = $('section[rel="'+ active +'"]').next().attr('rel'),
prev = $('section[rel="'+ active +'"]').prev().attr('rel');
//console.log( active )
if ( $(this).is('#next') ) {
dskOpenArticle( next, $('section[rel="'+next+'"] a').attr('href') );
}
if ( $(this).is('#prev') ) {
dskOpenArticle( prev, $('section[rel="'+prev+'"] a').attr('href') );
}
dskCloseArticle( active );
// Prevent the anchor's default click action
e.preventDefault();
};
var dskBtnClkNF = function(e) {
var active = $('div.main article.node').attr('rel'),
next = $('section#footer footer nav li.'+active).next().find('a'),
prev = $('section#footer footer nav li.'+active).prev().find('a');
//console.log( $('section#footer a[rel="'+ next +'"]').attr('href') )
//console.log( $(this).next().attr("id") )
if ( $(this).is('#next') ) {
dskOpenArticleNF( next.attr('id'), next.attr('href'), active, 'right' );
} else if ( $(this).is('#prev') ) {
dskOpenArticleNF( prev.attr('id'), prev.attr('href'), active, 'left' );
} else {
if ( $(this).attr("id") != active) {
dskOpenArticleNF( $(this).attr("id"), $(this).attr('href'), active, 'left' );
}
}
// Prevent the anchor's default click action
e.preventDefault();
};
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* BEGIN FUNCTIONS AND EVENTS BIND *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
$(this).on('click', 'html.gt-768 #sections section a', function(e){
// Prevent the anchor's default click action
e.preventDefault();
dskOpenArticle( $(this).attr('rel'), $(this).attr('href') );
$('html.gt-768 div#overlay').css({'display':'block'}).animate({'opacity': '1'}, 300, function(){
$('html').addClass('overlay');
});
});
$(this).on('click', 'html.gt-768 #articles article header', function(){
var active = $(this).parents('article').attr('id');
//console.log( active )
dskCloseArticle(active);
$('html.gt-768 div#overlay').delay(500).animate({'opacity': '0'}, 300, function(){
//$(this).css({'display':'none'});
$('html').removeClass('overlay');
$(this).removeAttr('style');
});
hideBtnPrev(this);
hideBtnNext(this);
});
// add bind for buttons previous and next
$(this).on('click', '.front.no-mobile.gt-768 #articles a#prev, .front.no-mobile.gt-768 #articles a#next', dskBtnClk);
$(this).on('click', '.not-front.no-mobile.gt-640 a[rel="ajax"]', dskBtnClkNF);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* BEGIN FUNCTIONS AND EVENTS BIND FOR MOBILE *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// utility functions
/*var mobOpenArticle = function(e) {
//console.log( e )
$('#articles article.opened').css({'display': 'none'}).removeClass('opened');
$('article#' + e).addClass('opened')
.css({'display': 'block'})
.animate({'opacity': '1'}, 300, 'easeOutBack');
};
var mobCloseArticle = function(e){
$('article#' + e)
.animate({'opacity': '0'}, 300, 'easeInBack', function(){
$(this).css({'display': 'none'}).removeClass('opened');
});
};*/
// bind event to open article
/*$(this).on('click', 'html.lt-768 #sections section a', function(e){
mobOpenArticle( $(this).parent().attr('rel') );
// Prevent the anchor's default click action
e.preventDefault();
});
// bind event to close article
$(this).on('click', 'html.lt-768 #articles article header', function(){
var active = $(this).parents('article').attr('id');
mobCloseArticle(active);
});*/
// bind event to navicon
//$('html.mobile.lt-480 section#footer footer nav ul li a').first().attr('href', 'javascript:void(0)')
$('html.mobile.lt-480 section#footer footer nav ul li:not(".home")').hide(10)
$(this).on('click', 'html.mobile.lt-480 section#footer footer nav ul li a:first', function(e){
e.preventDefault();
$('html.mobile.lt-480 section#footer footer nav ul li:not(".home")').toggle()
});
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* HELPER FUNCTIONS *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// show buttons for the not-front pages
if ( $('html.page-node.desktop.gt-640').is('.not-front') ) {
var active = $('div.main article.node').attr('rel');
if( $('section#footer footer nav li.' + active).hasClass('first') )
{ hideBtnPrev(); }
else
{ showBtnPrev(); }
if( $('section#footer footer nav li.' + active).hasClass('last') )
{ hideBtnNext(); }
else
{ showBtnNext(); }
// activate wallpaper changer
setInterval(function() {
cloneAnimBg('#bg')
}, 60000);
}
// animate the exiting of article
var animPosWin = function(el) {
var hArt = $('#articles article#' + el).height(),
hWin = $(window).height()
var wBox = $('#articles article#' + el).width(),
hBox = (hWin <= hArt) ? 0 : hArt;
var top = hBox == 0 ? '0px' : '50%',
marginTop = ( hBox / 2 ) <= 10 ? '20px' : -( hBox / 2 );
//console.log( hBox )
if ( ( hBox / 2 ) <= 10 ) {
$('div#articles article#' + el).css({'position': 'fixed'})
}
$('div#articles article#' + el)
.addClass('opened')
.css({'top': -hBox, 'margin-left': -(wBox / 2), 'display': 'block', 'z-index': '100'})
.stop(true, false).animate({'top': top, 'opacity': '1', 'marginTop': marginTop }, 600, 'easeOutBack', function(){
if ( ( hBox / 2 ) <= 10 ) {
$('div#articles article#' + el).css({'position': 'absolute'})
}
$(document).on('click', '.front.no-mobile.gt-768 #articles a#prev, .front.no-mobile.gt-768 #articles a#next', dskBtnClk);
});
} // END animPosWin
function updLocaleLinks(e) {
var nodes = $('article[rel="'+e+'"]').data('nodes');
for (x in nodes) {
//console.log( x +' '+ nodes[x] );
$('#block-locale-0 li.'+x).find('a').attr('href', 'http://'+globalVars.langsLabel[x]+nodes[x])
}
}
function microtime (get_as_float) {
// http://kevin.vanzonneveld.net
// + original by: Paulo Freitas
// * example 1: timeStamp = microtime(true);
// * results 1: timeStamp > 1000000000 && timeStamp < 2000000000
var now = new Date().getTime() / 1000;
var s = parseInt(now, 10);
return (get_as_float) ? now : (Math.round((now - s) * 1000) / 1000) + ' ' + s;
}
window.cloneAnimBg = function(id) {
var currBg = $(id).first(),
randmtime = microtime(true);
$(id).clone().css({ 'left': window.outerWidth, 'right': -(window.outerWidth), 'background-image': 'url("http://www.spidersolutions.it/sites/default/themes/spidersolutions_it/rotate_wallpapers_colored.php?_='+randmtime+'")'}).appendTo('body')
.delay(600).animate({'left': '0px', 'right': '0px'}, 600, 'swing', function(){
currBg[0].remove()
})
}
String.prototype.replaceAll = function(str1, str2, ignore) {
return this.replace(new RegExp(str1.replace(/([^\w\,\!\\\^\$\{\}\[\]\(\)\.\*\+\?\|\<\>\-\&])/g, function(c){return "\\" + c;}), "g"+(ignore?"i":"")), str2);
};
});
|
"use strict";
var fx = require("framework");
var Class = fx.import("framework.Class");
var Controller = fx.import("framework.controller.Controller");
var View = fx.import("framework.ui.view.View");
Class.define("MyApp.Other2Controller", Controller, {
initialize: function() {
Controller.prototype.initialize.apply(this, arguments);
var view = new View();
view.background = "#0000FF";
view.left = 110;
view.top = 110;
view.width = 100;
view.height = 100;
view.addEventListener("click", this.onClick.bind(this));
this.view = view;
},
onClick: function() {
console.log("Other2Controller clicked");
console.log("Other2Controller app:", this.app);
}
}, module);
|
var assert = require('assert')
var crypto = require('crypto')
var fs = require('fs')
var _ = require('lodash')
var mockery = require('mockery')
var sinon = require('sinon')
var tmp = require('tmp')
var _o = require('@carbon-io/carbon-core').bond._o(module)
var o = require('@carbon-io/carbon-core').atom.o(module).main
var testtube = require('@carbon-io/carbon-core').testtube
var service = require('../fixtures/Service1')
module.exports = o({
_type: testtube.Test,
name: 'DocgenTests',
description: 'docgen tests',
_setup: function() {
mockery.enable({
useCleanCache: true,
warnOnReplace: false,
warnOnUnregistered: false
})
},
_teardown: function() {
mockery.disable()
},
tests: [
o({
_type: testtube.Test,
name: 'singlePageTest',
description: 'single page test',
setup: function() {
throw new testtube.errors.SkipTestError('fix carbon-io/atom#32')
this.parent._setup()
this.tmpFile = tmp.fileSync()
this.sandbox = sinon.sandbox.create()
this.sandbox.stub(process, 'argv', [
'node', 'Service1.js', 'gen-static-docs', '-o', 'single-page', '--out', this.tmpFile.name
])
this.sandbox.stub(process, 'exit', function() {
throw new Error('exit')
})
this.service = _.cloneDeep(service)
this.service.runMainInFiber = false
},
teardown: function() {
throw new testtube.errors.SkipTestError('fix carbon-io/atom#32')
this.sandbox.restore()
this.parent._teardown()
},
doTest: function() {
var self = this
var o = require('@carbon-io/carbon-core').atom.o(require.main).main
assert.throws(function() {
o(self.service)
}, Error)
var fixtureHash = crypto.createHash('sha256')
var serviceHash = crypto.createHash('sha256')
fixtureHash.update(
fs.readFileSync(
__dirname + '/../fixtures/Service1_README.md'))
var fileData = fs.readFileSync(this.tmpFile.name)
assert(fileData.length > 0)
serviceHash.update(fileData)
assert.equal(
serviceHash.digest('hex'), fixtureHash.digest('hex'))
}
})
]
})
|
/**
*
* Container
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import { Wrapper } from './style';
function Container(props) {
return (
<Wrapper>
{props.children}
</Wrapper>
);
}
Container.propTypes = {
children: PropTypes.node,
};
export default Container;
|
var patient={}
var patientid=getCookie('patientId');
$(function(){
var username = getCookie('username');
var header = $('#header');
header.append('Patient - '+username);
var pid=getCookie('patientId');
var km=getCookie('Kilometers');
if(pid=='' || pid=='null' || pid==null)
{
pid = getParameterByName('id');
setCookie('patientId',pid,1);
}
if(pid != null)
{
getResultSet(app, 'get_patient_details', 'PatientsKey='+pid, function(data){
var json = JSON.parse(data)[0];
var headerLeft = $('#headerLeft');
//var title = $('#title');
var bDate = new Date.fromISO(json.birth);
var cDate = new Date();
var age = cDate.getFullYear() - bDate.getFullYear();
//var lastDigits = bDate.getFullYear();
headerLeft.append(json.last_name +", "+ json.first_name+", "+ json.gender_label + ", " + age+"Yr ");
patient.first_name=json.first_name;
patient.last_name=json.last_name;
patient.Kilometers=json.Kilometers;
patient.age=json.age;
patient.gender_label=json.gender_label;
if(setValue)
setValue();
setCookie('kms',json.Kilometers,1);
//title.append(json.first_name +" "+ json.last_name);
});
if($('form').length>0 && document.location.pathname != "/palis3/patient/patientinfo.html")
{
$('form').append('<input type=hidden id=PatientKey name=PatientKey value='+pid+' />');
}
}
});
function setValue()
{
$('#Kilometers').val(patient.Kilometers);
}
function goBack()
{
setCookie('patientId','',1);
window.location='../patients.html';
}
function getParameterByName(name) {
var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}
function loadEsasReport()
{
var patientid=getCookie('patientId');
var l=1;
loadReportInTable(app,'education','EsasTable','PatientKey:'+patientid,function(rData1){
var clipData = loadSummaryClipboardData(rData1,l);
$('#clipEsasTable').val(clipData);
});
// loadReportInTable(app,'education','AgeSexStatsTotal','fYear:'+jsonYear+';MonthNum:'+jsonMonth);
var j= new Array();
var json= getResultSet(app,'EsasTopRow','PatientKey:'+patientid,function(data){
if(isJSONString(data))
{
json = JSON.parse(data);
j[0]=json[0].Pain;
j[2]=json[0].Mood;
j[3]=json[0].Nausea;
j[1]=json[0].Tiredness;
j[4]=json[0].Anxiety;
j[5]=json[0].Drowsiness;
j[6]=json[0].Appetite;
j[7]=json[0].WellBeing;
j[8]=json[0].ShortnessOfBreath;
}
/**
0. [Pain] 1
1. [Tiredness]3
2. [Mood]4
3. [Nausea] 2
4. [Anxiety] 5
5.[Drowsiness]9
6. [Appetite]6
7. [WellBeing]7
8. [ShortnessOfBreath]8
*/
drawVisualization(parseInt(j[0]),parseInt(j[3]),parseInt(j[1]),parseInt(j[2]),parseInt(j[4]),parseInt(j[6]),parseInt(j[7]),parseInt(j[8]),parseInt(j[5]));
// Create and populate the data table.
});
j[4]=j[2];
}
function loadSummaryClipboardData(d1,l)
{
var clipData = "";
$(d1).each(function(i,dom){
var j = 0;
var k= d1.length;
for(var prop in dom)
{
if(j>0)
clipData += dom[prop]+"\t";
j++;
}
if(l<=k-1)
{
clipData += "\n";
l++;
}
});
//clipData = clipData.substring(0,clipData.length - 2)
return clipData;
}
function patientFieldSelection()
{
var pid=getCookie('patientId');
if(pid=='')
getFieldSelection(app,'patients');
else
getFieldSelection(app,'patients',pid);
} |
import run from 'ember-metal/run_loop';
import EmberObject from 'ember-runtime/system/object';
import jQuery from 'ember-views/system/jquery';
import Test from 'ember-testing/test';
import EmberRoute from 'ember-routing/system/route';
import EmberApplication from 'ember-application/system/application';
import { compile } from 'ember-htmlbars-template-compiler';
import Controller from 'ember-runtime/controllers/controller';
import { A as emberA } from 'ember-runtime/system/native_array';
import { setTemplates, set as setTemplate } from 'ember-templates/template_registry';
import 'ember-application';
var App, find, visit;
var originalAdapter = Test.adapter;
QUnit.module('ember-testing Integration', {
setup() {
jQuery('<div id="ember-testing-container"><div id="ember-testing"></div></div>').appendTo('body');
run(function() {
setTemplate('people', compile('<div>{{#each model as |person|}}<div class="name">{{person.firstName}}</div>{{/each}}</div>'));
setTemplate('application', compile('{{outlet}}'));
App = EmberApplication.create({
rootElement: '#ember-testing'
});
App.Router.map(function() {
this.route('people', { path: '/' });
});
App.PeopleRoute = EmberRoute.extend({
model() {
return App.Person.find();
}
});
App.PeopleController = Controller.extend({});
App.Person = EmberObject.extend({
firstName: ''
});
App.Person.reopenClass({
find() {
return emberA();
}
});
App.setupForTesting();
});
run(function() {
App.reset();
});
App.injectTestHelpers();
find = window.find;
visit = window.visit;
},
teardown() {
App.removeTestHelpers();
setTemplates({});
jQuery('#ember-testing-container, #ember-testing').remove();
run(App, App.destroy);
App = null;
Test.adapter = originalAdapter;
}
});
import { test } from 'internal-test-helpers/tests/skip-if-glimmer';
test('template is bound to empty array of people', function() {
App.Person.find = function() {
return emberA();
};
run(App, 'advanceReadiness');
visit('/').then(function() {
var rows = find('.name').length;
equal(rows, 0, 'successfully stubbed an empty array of people');
});
});
test('template is bound to array of 2 people', function() {
App.Person.find = function() {
var people = emberA();
var first = App.Person.create({ firstName: 'x' });
var last = App.Person.create({ firstName: 'y' });
run(people, people.pushObject, first);
run(people, people.pushObject, last);
return people;
};
run(App, 'advanceReadiness');
visit('/').then(function() {
var rows = find('.name').length;
equal(rows, 2, 'successfully stubbed a non empty array of people');
});
});
test('template is again bound to empty array of people', function() {
App.Person.find = function() {
return emberA();
};
run(App, 'advanceReadiness');
visit('/').then(function() {
var rows = find('.name').length;
equal(rows, 0, 'successfully stubbed another empty array of people');
});
});
test('`visit` can be called without advancedReadiness.', function() {
App.Person.find = function() {
return emberA();
};
visit('/').then(function() {
var rows = find('.name').length;
equal(rows, 0, 'stubbed an empty array of people without calling advancedReadiness.');
});
});
|
'use strict';
const exec = require('cp-sugar').exec;
const reporter = require('../reporters/current');
module.exports = function printReleaseInfo(pkgVersion, publishTag) {
let commitInfo = null;
return exec('git log -1 --oneline')
.then((info) => {
commitInfo = info;
return exec('npm whoami --silent');
})
.catch(() => reporter.current().reportError('<not logged in>'))
.then((publisher) => {
// prettier-ignore
reporter.current().reportRunningSequence('Release info');
// prettier-ignore
reporter.current().reportAsIs(` Version: ${pkgVersion}`);
// prettier-ignore
reporter.current().reportAsIs(` Latest commit: ${commitInfo}`);
// prettier-ignore
reporter.current().reportAsIs(` Publish tag: ${publishTag}`);
// prettier-ignore
reporter.current().reportAsIs(` Publisher: ${publisher}`);
});
};
|
'use strict';
jest.dontMock('../lib/terminator');
jest.setMock('../lib/pipeline-steps/format-extractor', {
extract: () => {
return { responseFormat: 'json' };
}
});
jest.setMock('../lib/parsers', {
search: () => ({
mime: 'application/json',
serialize: jest.genMockFunction()
})
});
const Terminator = require('../lib/terminator');
let terminator;
describe('Terminator', () => {
it('get content type', () => {
terminator = new Terminator();
expect(terminator.getContentType()).toEqual({'Content-Type': 'application/json'});
});
it('can end the request with a given code', () => {
terminator = new Terminator(null, {
writeHead: jest.genMockFunction(),
end: jest.genMockFunction()
});
terminator.terminate(Terminator.codes.BAD_REQUEST, 'invalid request, dude');
expect(terminator.response.end).toBeCalled();
});
}); |
/* jshint node: true */
'use strict';
module.exports = {
name: 'ember-maps',
contentFor: function(type, config) {
if (type === 'head-footer') {
// config aus eviroment holen
let mapsConfig = config.mapsConfig || {};
let apiKey = mapsConfig.googleMap.apiKey;
let gmapsURL = 'https://maps.googleapis.com/maps/api/js';
let scriptURL = gmapsURL;
if(apiKey !== undefined) {
scriptURL += '?key='+apiKey;
}
return '<script async defer src="'+scriptURL+'"></script>';
}
}
};
|
import PortMixin from 'ember-debug/mixins/port-mixin';
const Ember = window.Ember;
const { String: { classify, dasherize }, computed, observer, run: { later }, Object: EmberObject } = Ember;
const { oneWay, readOnly } = computed;
const { hasOwnProperty } = Object.prototype;
export default EmberObject.extend(PortMixin, {
namespace: null,
port: oneWay('namespace.port').readOnly(),
router: computed('namespace.owner', function() {
return this.get('namespace.owner').lookup('router:main');
}),
applicationController: computed('namespace.owner', function() {
const container = this.get('namespace.owner');
return container.lookup('controller:application');
}),
currentPath: oneWay('applicationController.currentPath').readOnly(),
currentURL: oneWay('namespace.owner.router.currentURL').readOnly(),
portNamespace: 'route',
emberCliConfig: readOnly('namespace.generalDebug.emberCliConfig'),
messages: {
getTree() {
this.sendTree();
},
getCurrentRoute() {
this.sendCurrentRoute();
}
},
sendCurrentRoute: observer('currentURL', function() {
const {
currentPath: name,
currentURL: url,
} = this.getProperties(
'currentPath',
'currentURL',
);
later(() => {
this.sendMessage('currentRoute', { name, url });
}, 50);
}),
routeTree: computed('router', function() {
const router = this.get('router');
const routerLib = router._routerMicrolib || router.router;
let routeNames = routerLib.recognizer.names;
let routeTree = {};
for (let routeName in routeNames) {
if (!hasOwnProperty.call(routeNames, routeName)) {
continue;
}
let route = routeNames[routeName];
buildSubTree.call(this, routeTree, route);
}
return arrayizeChildren({ children: routeTree });
}),
sendTree() {
const routeTree = this.get('routeTree');
this.sendMessage('routeTree', { tree: routeTree });
},
getClassName(name, type) {
let container = this.get('namespace.owner');
let resolver = container.application.__registry__.resolver;
let prefix = this.get('emberCliConfig.modulePrefix');
let podPrefix = this.get('emberCliConfig.podModulePrefix');
let usePodsByDefault = this.get('emberCliConfig.usePodsByDefault');
let className;
if (prefix || podPrefix) {
// Uses modules
name = dasherize(name);
let fullName = `${type}:${name}`;
if (resolver.lookupDescription) {
className = resolver.lookupDescription(fullName);
} else if (resolver.describe) {
className = resolver.describe(fullName);
}
if (className === fullName) {
// full name returned as is - this resolver does not look for the module.
className = className.replace(new RegExp(`^${type}\:`), '');
} else if (className) {
// Module exists and found
className = className.replace(new RegExp(`^/?(${prefix}|${podPrefix})/${type}s/`), '');
} else {
// Module does not exist
if (usePodsByDefault) {
// we don't include the prefix since it's redundant
// and not part of the file path.
// (podPrefix - prefix) is part of the file path.
let currentPrefix = '';
if (podPrefix) {
currentPrefix = podPrefix.replace(new RegExp(`^/?${prefix}/?`), '');
}
className = `${currentPrefix}/${name}/${type}`;
} else {
className = name.replace(/\./g, '/');
}
}
className = className.replace(/\./g, '/');
} else {
// No modules
if (type !== 'template') {
className = classify(`${name.replace(/\./g, '_')}_${type}`);
} else {
className = name.replace(/\./g, '/');
}
}
return className;
}
});
function buildSubTree(routeTree, route) {
let handlers = route.handlers;
let owner = this.get('namespace.owner');
let subTree = routeTree;
let item, routeClassName, routeHandler, controllerName,
controllerClassName, templateName, controllerFactory;
for (let i = 0; i < handlers.length; i++) {
item = handlers[i];
let handler = item.handler;
if (handler.match(/(loading|error)$/)) {
// make sure it has been defined before calling `getHandler` because
// we don't want to generate sub routes as this has side-effects.
if (!routeHasBeenDefined(owner, handler)) {
continue;
}
}
if (subTree[handler] === undefined) {
routeClassName = this.getClassName(handler, 'route');
const router = this.get('router');
const routerLib = router._routerMicrolib || router.router;
routeHandler = routerLib.getHandler(handler);
controllerName = routeHandler.get('controllerName') || routeHandler.get('routeName');
controllerFactory = owner.factoryFor ? owner.factoryFor(`controller:${controllerName}`) : owner._lookupFactory(`controller:${controllerName}`);
controllerClassName = this.getClassName(controllerName, 'controller');
templateName = this.getClassName(handler, 'template');
subTree[handler] = {
value: {
name: handler,
routeHandler: {
className: routeClassName,
name: handler
},
controller: {
className: controllerClassName,
name: controllerName,
exists: !!controllerFactory
},
template: {
name: templateName
}
}
};
if (i === handlers.length - 1) {
// it is a route, get url
subTree[handler].value.url = getURL(owner, route.segments);
subTree[handler].value.type = 'route';
} else {
// it is a resource, set children object
subTree[handler].children = {};
subTree[handler].value.type = 'resource';
}
}
subTree = subTree[handler].children;
}
}
function arrayizeChildren(routeTree) {
let obj = {};
// Top node doesn't have a value
if (routeTree.value) {
obj.value = routeTree.value;
}
if (routeTree.children) {
let childrenArray = [];
for (let i in routeTree.children) {
let route = routeTree.children[i];
childrenArray.push(arrayizeChildren(route));
}
obj.children = childrenArray;
}
return obj;
}
function getURL(container, segments) {
const locationImplementation = container.lookup('router:main').location;
let url = [];
for (let i = 0; i < segments.length; i++) {
let name = null;
if (typeof segments[i].generate !== 'function') {
// After changes in RouteRecognizer in >= 2.12
let { type, value } = segments[i];
if (type === 1) { // dynamic
name = `:${value}`;
} else if (type === 2) { // star
name = `*${value}`;
} else {
name = value;
}
} else {
// 2.11 and before
try {
name = segments[i].generate();
} catch (e) { // is dynamic
name = `:${segments[i].name}`;
}
}
if (name) {
url.push(name);
}
}
url = url.join('/');
if (url.match(/_unused_dummy_/)) {
url = '';
} else {
url = `/${url}`;
url = locationImplementation.formatURL(url);
}
return url;
}
function routeHasBeenDefined(owner, name) {
return owner.hasRegistration(`template:${name}`) || owner.hasRegistration(`route:${name}`);
}
|
throw new Error("Something bad happened.");
|
'use strict';
/**
* simplecached: simplified memcached server and client.
* (C) 2013 Alex Fernández.
*/
var server = require('./lib/server.js');
var client = require('./lib/client.js');
exports.Server = server.Server;
exports.Client = client.Client;
|
/**
* @name watch-once
* @version 2.0.0
* @fileOverview The watchOnce module adds $watchOnce functionality to your $rootScope
*
* http://www.github.com/kentcdodds/watchOnce
*
* @license Scope.$watchOnce may be freely distributed under the MIT license.
* @copyright (c) 2015 Kent C. Dodds
* @author Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com)
*/
(function(n){if(typeof define==="function"&&define.amd){define(["angular"],n)}else if(typeof exports==="object"){module.exports=n(require("angular"))}else{n(angular)}})(function(n){"use strict";var e=n.module("Scope.$watchOnce",[]);e.run(["$rootScope",function(e){var t={$watch:n.isDefined,$watchCollection:n.isDefined,$watchGroup:function(e){return!!e&&!e.some(function(e){return!n.isDefined(e)})}};var r=Object.getPrototypeOf(e);var i=r.$new;r.$new=function f(){var n=i.apply(this,arguments);o(n);return n};o(e);function o(e){if(!e.$watchOnce){n.forEach(["$watch","$watchGroup","$watchCollection"],function(t){if(n.isFunction(e[t])){e[t+"Once"]=u(t)}})}}function u(e){return function r(i,o,u){var f={fn:n.noop};var a=c(o,f,t[e]);f.fn=this[e].apply(this,[i,a,u]);return f.fn}}function c(n,e,t){return function r(i){if(!t(i)){return}n.apply(this,arguments);e.fn()}}}]);return e.name}); |
/*
* Copyright 2017 Palantir Technologies, Inc. All rights reserved.
*
* Licensed under the terms of the LICENSE file distributed with this project.
*/
import * as tslib_1 from "tslib";
import * as classNames from "classnames";
import * as React from "react";
import * as Classes from "../../common/classes";
import * as Keys from "../../common/keys";
import { safeInvoke } from "../../common/utils";
import { Icon } from "../icon/icon";
import { Spinner } from "../spinner/spinner";
var AbstractButton = (function (_super) {
tslib_1.__extends(AbstractButton, _super);
function AbstractButton() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.state = {
isActive: false,
};
_this.refHandlers = {
button: function (ref) {
_this.buttonRef = ref;
safeInvoke(_this.props.elementRef, ref);
},
};
_this.currentKeyDown = null;
// we're casting as `any` to get around a somewhat opaque safeInvoke error
// that "Type argument candidate 'KeyboardEvent<T>' is not a valid type
// argument because it is not a supertype of candidate
// 'KeyboardEvent<HTMLElement>'."
_this.handleKeyDown = function (e) {
if (isKeyboardClick(e.which)) {
e.preventDefault();
if (e.which !== _this.currentKeyDown) {
_this.setState({ isActive: true });
}
}
_this.currentKeyDown = e.which;
safeInvoke(_this.props.onKeyDown, e);
};
_this.handleKeyUp = function (e) {
if (isKeyboardClick(e.which)) {
_this.setState({ isActive: false });
_this.buttonRef.click();
}
_this.currentKeyDown = null;
safeInvoke(_this.props.onKeyUp, e);
};
return _this;
}
AbstractButton.prototype.getCommonButtonProps = function () {
var disabled = this.props.disabled || this.props.loading;
var className = classNames(Classes.BUTTON, (_a = {},
_a[Classes.ACTIVE] = this.state.isActive || this.props.active,
_a[Classes.DISABLED] = disabled,
_a[Classes.LOADING] = this.props.loading,
_a), Classes.iconClass(this.props.iconName), Classes.intentClass(this.props.intent), this.props.className);
return {
className: className,
disabled: disabled,
onClick: disabled ? undefined : this.props.onClick,
onKeyDown: this.handleKeyDown,
onKeyUp: this.handleKeyUp,
ref: this.refHandlers.button,
};
var _a;
};
AbstractButton.prototype.renderChildren = function () {
var _a = this.props, loading = _a.loading, rightIconName = _a.rightIconName, text = _a.text;
var children = React.Children.map(this.props.children, function (child, index) {
if (child === "") {
// render as undefined to avoid extra space after icon
return undefined;
}
else if (typeof child === "string") {
// must wrap string children in spans so loading prop can hide them
return React.createElement("span", { key: "text-" + index }, child);
}
return child;
});
return [
loading ? React.createElement(Spinner, { className: "pt-small pt-button-spinner", key: "spinner" }) : undefined,
text != null ? React.createElement("span", { key: "text" }, text) : undefined
].concat(children, [
React.createElement(Icon, { className: Classes.ALIGN_RIGHT, iconName: rightIconName, key: "icon" }),
]);
};
return AbstractButton;
}(React.Component));
export { AbstractButton };
function isKeyboardClick(keyCode) {
return keyCode === Keys.ENTER || keyCode === Keys.SPACE;
}
|
import pg from 'pg'
import debug from 'debug'
const log = debug('livro_nodejs:config:pg')
const pool = new pg.Pool({
user: 'wbruno',
password: '',
host: 'localhost',
port: 5432,
database: 'livro_nodejs',
max: 5
})
pool.on('error', (err) => log('postgres err', err))
pool.check = async () => {
let result = {}
try {
const data = await pool.query('select version()')
result.ok = !!data.rows[0].version
} catch (e) {
result.ok = false
result.message = e.message
}
return {
name: 'postgres',
...result
}
}
export default pool
|
Meteor.autorun(function () {
Meteor.subscribe("itemsLocal", Session.get("bounds"));
});
// http://stackoverflow.com/questions/20751523/removing-leaflet-layers-and-l-marker-method
getRandomLocation = function (map) {
var bounds = map.getBounds();
var southWest = bounds.getSouthWest();
var northEast = bounds.getNorthEast();
var lngSpan = northEast.lng - southWest.lng;
var latSpan = northEast.lat - southWest.lat;
var location = new L.LatLng(southWest.lat + latSpan * Math.random(),
southWest.lng + lngSpan * Math.random());
return [location.lat, location.lng];
};
|
module.exports.rewrite = function (context, data, next, done) {
console.error('DEPRECATED. Use .find(selector).get(callback) instead.');
next(context, data);
done();
};
|
org_hudsonci.UiUtil = name_edwards_dean_Base.extend({
getStatusSkinType: function(type) {
var statusSkinType;
if (type == org_hudsonci_buildMonitorConst.TYPE_EXECUTOR()) {
statusSkinType = 'executor';
} else {
statusSkinType = 'build';
}
return statusSkinType;
},
getVisualStatus: function(status, successColor) {
var visualStatus;
if (status == 'success' && successColor == 'green') {
visualStatus = status + '_' + successColor;
} else {
visualStatus = status;
}
return visualStatus;
},
getUrl: function(type, feed) {
var url;
if (type == org_hudsonci_buildMonitorConst.TYPE_EXECUTOR()) {
url = feed.getExecutorUrl();
} else {
url = feed.getUrl();
}
return url;
},
clear: function(elem) {
while (elem.firstChild) {
elem.removeChild(elem.firstChild);
}
}
}); |
'use strict'
/**
* @ImmutableCoreModel deviceSession
*
* columns: createTime, sessionId, deviceId
*
* link device to session
*/
module.exports = {
// disable default columns
columns: {
n: false,
c: false,
d: false,
accountId: false,
data: false,
deviceId: {
index: true,
null: false,
type: 'id',
},
id: false,
originalId: false,
parentId: false,
},
name: 'deviceSession',
} |
module.exports = {
env: process.env.NODE_ENV || 'development',
port: process.env.PORT || 3000,
key: {
riot: process.env.KEY_RIOT
},
redis: {
host: process.env.REDIS_HOST,
port: process.env.REDIS_PORT,
prefix: process.env.REDIS_PREFIX
}
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.