code stringlengths 2 1.05M | repo_name stringlengths 5 114 | path stringlengths 4 991 | language stringclasses 1 value | license stringclasses 15 values | size int32 2 1.05M |
|---|---|---|---|---|---|
/* globals: sinon */
var expect = require("chai").expect;
var Keen = require("../../../../src/core"),
keenHelper = require("../../helpers/test-config");
describe("Keen.Dataviz", function(){
beforeEach(function(){
this.project = new Keen({
projectId: keenHelper.projectId,
readKey: keenHelper.readKey
});
this.query = new Keen.Query("count", {
eventCollection: "test-collection"
});
this.dataviz = new Keen.Dataviz();
// console.log(this.dataviz);
});
afterEach(function(){
this.project = null;
this.query = null;
this.dataviz = null;
Keen.Dataviz.visuals = new Array();
});
describe("constructor", function(){
it("should create a new Keen.Dataviz instance", function(){
expect(this.dataviz).to.be.an.instanceof(Keen.Dataviz);
});
it("should contain a new Keen.Dataset instance", function(){
expect(this.dataviz.dataset).to.be.an.instanceof(Keen.Dataset);
});
it("should contain a view object", function(){
expect(this.dataviz.view).to.be.an("object");
});
it("should contain view attributes matching Keen.Dataviz.defaults", function(){
expect(this.dataviz.view.attributes).to.deep.equal(Keen.Dataviz.defaults);
});
it("should contain view defaults also matching Keen.Dataviz.defaults", function(){
expect(this.dataviz.view.defaults).to.deep.equal(Keen.Dataviz.defaults);
});
it("should be appended to Keen.Dataviz.visuals", function(){
expect(Keen.Dataviz.visuals).to.have.length(1);
expect(Keen.Dataviz.visuals[0]).and.to.be.an.instanceof(Keen.Dataviz);
});
});
describe("#attributes", function(){
it("should get the current properties", function(){
expect(this.dataviz.attributes()).to.deep.equal(Keen.Dataviz.defaults);
});
it("should set a hash of properties", function(){
this.dataviz.attributes({ title: "Updated Attributes", width: 600 });
expect(this.dataviz.view.attributes.title).to.be.a("string")
.and.to.eql("Updated Attributes");
expect(this.dataviz.view.attributes.width).to.be.a("number")
.and.to.eql(600);
});
it("should unset properties by passing null", function(){
this.dataviz.adapter({ height: null });
expect(this.dataviz.view.adapter.height).to.not.exist;
});
});
// it("should", function(){});
describe("#colors", function(){
it("should get the current color set", function(){
expect(this.dataviz.colors()).to.be.an("array")
.and.to.eql(Keen.Dataviz.defaults.colors);
});
it("should set a new array of colors", function(){
var array = ["red","green","blue"];
this.dataviz.colors(array);
expect(this.dataviz.colors()).to.be.an("array")
.and.to.have.length(3)
.and.to.eql(array);
});
it("should unset the colors set by passing null", function(){
var array = ["red","green","blue"];
this.dataviz.colors(array);
this.dataviz.colors(null);
expect(this.dataviz.colors()).to.not.exist;
});
});
describe("#colorMapping", function(){
it("should return undefined by default", function(){
expect(this.dataviz.colorMapping()).to.be.an("undefined");
});
it("should set and get a hash of properties", function(){
var hash = { "A": "#aaa", "B": "#bbb" };
this.dataviz.colorMapping(hash);
expect(this.dataviz.colorMapping()).to.be.an("object")
.and.to.deep.equal(hash);
});
it("should unset a property by passing null", function(){
var hash = { "A": "#aaa", "B": "#bbb" };
this.dataviz.colorMapping(hash);
expect(this.dataviz.colorMapping().A).to.be.a("string")
.and.to.eql("#aaa");
this.dataviz.colorMapping({ "A": null });
expect(this.dataviz.colorMapping().A).to.not.exist;
});
});
describe("#labels", function(){
it("should return an empty array by default", function(){
expect(this.dataviz.labels()).to.be.an("array").and.to.have.length(0);
});
it("should set and get a new array of labels", function(){
var array = ["A","B","C"];
this.dataviz.labels(array);
expect(this.dataviz.labels()).to.be.an("array")
.and.to.have.length(3)
.and.to.eql(array);
});
it("should unset the labels set by passing null", function(){
var array = ["A","B","C"];
this.dataviz.labels(array);
this.dataviz.labels(null);
expect(this.dataviz.labels()).to.be.an("array").and.to.have.length(0);
});
});
describe("#labelMapping", function(){
it("should return undefined by default", function(){
expect(this.dataviz.labelMapping()).to.be.an("undefined");
});
it("should set and get a hash of properties", function(){
var hash = { "_a_": "A", "_b_": "B" };
this.dataviz.labelMapping(hash);
expect(this.dataviz.labelMapping()).to.be.an("object")
.and.to.deep.equal(hash);
});
it("should unset a property by passing null", function(){
var hash = { "_a_": "A", "_b_": "B" };
this.dataviz.labelMapping(hash);
expect(this.dataviz.labelMapping()._a_).to.be.a("string")
.and.to.eql("A");
this.dataviz.labelMapping({ "_a_": null });
expect(this.dataviz.labelMapping()._a_).to.not.exist;
});
it("should provide full text replacement of categorical values", function(){
var num_viz = new Keen.Dataviz()
.call(function(){
this.dataset.output([
[ "Index", "Count" ],
[ "Sunday", 10 ],
[ "Monday", 11 ],
[ "Tuesday", 12 ],
[ "Wednesday", 13 ]
]);
this.dataset.meta.schema = { records: "result", select: true };
this.dataType("categorical");
})
.labelMapping({
"Sunday" : "Sun",
"Monday" : "Mon",
"Tuesday" : "Tues"
});
expect(num_viz.dataset.output()[1][0]).to.be.a("string")
.and.to.eql("Sun");
expect(num_viz.dataset.output()[2][0]).to.be.a("string")
.and.to.eql("Mon");
expect(num_viz.dataset.output()[3][0]).to.be.a("string")
.and.to.eql("Tues");
expect(num_viz.dataset.output()[4][0]).to.be.a("string")
.and.to.eql("Wednesday");
});
});
describe("#height", function(){
it("should return undefined by default", function(){
expect(this.dataviz.height()).to.be.an("undefined");
});
it("should set and get a new height", function(){
var height = 375;
this.dataviz.height(height);
expect(this.dataviz.height()).to.be.a("number")
.and.to.eql(height);
});
it("should unset the height by passing null", function(){
this.dataviz.height(null);
expect(this.dataviz.height()).to.not.exist;
});
});
describe("#title", function(){
it("should return undefined by default", function(){
expect(this.dataviz.title()).to.be.an("undefined");
});
it("should set and get a new title", function(){
var title = "New Title";
this.dataviz.title(title);
expect(this.dataviz.title()).to.be.a("string")
.and.to.eql(title);
});
it("should unset the title by passing null", function(){
this.dataviz.title(null);
expect(this.dataviz.title()).to.not.exist;
});
});
describe("#width", function(){
it("should return undefined by default", function(){
expect(this.dataviz.width()).to.be.an("undefined");
});
it("should set and get a new width", function(){
var width = 900;
this.dataviz.width(width);
expect(this.dataviz.width()).to.be.a("number")
.and.to.eql(width);
});
it("should unset the width by passing null", function(){
this.dataviz.width(null);
expect(this.dataviz.width()).to.not.exist;
});
});
describe("#adapter", function(){
it("should get the current adapter properties", function(){
expect(this.dataviz.adapter()).to.be.an("object")
.and.to.contain.keys("library", "chartType", "defaultChartType", "dataType");
expect(this.dataviz.adapter().library).to.be.an("undefined");
expect(this.dataviz.adapter().chartType).to.be.an("undefined");
});
it("should set a hash of properties", function(){
this.dataviz.adapter({ library: "lib2", chartType: "pie" });
expect(this.dataviz.view.adapter.library).to.be.a("string")
.and.to.eql("lib2");
expect(this.dataviz.view.adapter.chartType).to.be.a("string")
.and.to.eql("pie");
});
it("should unset properties by passing null", function(){
this.dataviz.adapter({ library: null });
expect(this.dataviz.view.adapter.library).to.not.exist;
});
});
describe("#library", function(){
it("should return undefined by default", function(){
expect(this.dataviz.library()).to.be.an("undefined");
});
it("should set and get a new library", function(){
var lib = "nvd3";
this.dataviz.library(lib);
expect(this.dataviz.library()).to.be.a("string")
.and.to.eql(lib);
});
it("should unset the library by passing null", function(){
this.dataviz.library(null);
expect(this.dataviz.library()).to.not.exist;
});
});
describe("#chartOptions", function(){
it("should set and get a hash of properties", function(){
var hash = { legend: { position: "none" }, isStacked: true };
this.dataviz.chartOptions(hash);
expect(this.dataviz.view.adapter.chartOptions.legend).to.be.an("object")
.and.to.deep.eql(hash.legend);
expect(this.dataviz.view.adapter.chartOptions.isStacked).to.be.a("boolean")
.and.to.eql(true);
});
it("should unset properties by passing null", function(){
var hash = { legend: { position: "none" }, isStacked: true };
this.dataviz.chartOptions(hash);
this.dataviz.chartOptions({ legend: null });
expect(this.dataviz.view.adapter.chartOptions.legend).to.not.exist;
});
});
describe("#chartType", function(){
it("should return undefined by default", function(){
expect(this.dataviz.chartType()).to.be.an("undefined");
});
it("should set and get a new chartType", function(){
var chartType = "magic-pie"
this.dataviz.chartType(chartType);
expect(this.dataviz.chartType()).to.be.a("string")
.and.to.eql(chartType);
});
it("should unset properties by passing null", function(){
this.dataviz.chartType(null);
expect(this.dataviz.chartType()).to.not.exist;
});
});
describe("#defaultChartType", function(){
it("should return undefined by default", function(){
expect(this.dataviz.defaultChartType()).to.be.an("undefined");
});
it("should set and get a new chartType", function(){
var defaultType = "backup-pie";
this.dataviz.defaultChartType(defaultType);
expect(this.dataviz.defaultChartType()).to.be.a("string")
.and.to.eql(defaultType);
});
it("should unset chartType by passing null", function(){
this.dataviz.defaultChartType(null);
expect(this.dataviz.defaultChartType()).to.not.exist;
});
});
describe("#dataType", function(){
it("should return undefined by default", function(){
expect(this.dataviz.dataType()).to.be.an("undefined");
});
it("should set and get a new dataType", function(){
var dataType = "cat-interval";
this.dataviz.dataType(dataType);
expect(this.dataviz.dataType()).to.be.a("string")
.and.to.eql(dataType);
});
it("should unset dataType by passing null", function(){
this.dataviz.dataType(null);
expect(this.dataviz.dataType()).to.not.exist;
});
});
describe("#el", function(){
beforeEach(function(){
var elDiv = document.createElement("div");
elDiv.id = "chart-test";
document.body.appendChild(elDiv);
});
it("should return undefined by default", function(){
expect(this.dataviz.el()).to.be.an("undefined");
});
it("should set and get a new el", function(){
this.dataviz.el(document.getElementById("chart-test"));
expect(this.dataviz.el()).to.be.an("object");
if (this.dataviz.el().nodeName) {
expect(this.dataviz.el().nodeName).to.be.a("string")
.and.to.eql("DIV");
}
});
it("should unset el by passing null", function(){
this.dataviz.el(null);
expect(this.dataviz.el()).to.not.exist;
});
});
describe("#indexBy", function(){
it("should return \"timeframe.start\" by default", function(){
expect(this.dataviz.indexBy()).to.be.a("string")
.and.to.eql("timeframe.start");
});
it("should set and get a new indexBy property", function(){
this.dataviz.indexBy("timeframe.end");
expect(this.dataviz.indexBy()).to.be.a("string")
.and.to.eql("timeframe.end");
});
it("should revert the property to default value by passing null", function(){
this.dataviz.indexBy(null);
expect(this.dataviz.indexBy()).to.be.a("string")
.and.to.eql(Keen.Dataviz.defaults.indexBy);
});
});
describe("#sortGroups", function(){
it("should return undefined by default", function(){
expect(this.dataviz.sortGroups()).to.be.an("undefined");
});
it("should set and get a new sortGroups property", function(){
this.dataviz.sortGroups("asc");
expect(this.dataviz.sortGroups()).to.be.a("string")
.and.to.eql("asc");
});
it("should unset property by passing null", function(){
this.dataviz.sortGroups(null);
expect(this.dataviz.sortGroups()).to.not.exist;
});
});
describe("#sortIntervals", function(){
it("should return undefined by default", function(){
expect(this.dataviz.sortIntervals()).to.be.an("undefined");
});
it("should set and get a new sortIntervals property", function(){
this.dataviz.sortIntervals("asc");
expect(this.dataviz.sortIntervals()).to.be.a("string")
.and.to.eql("asc");
});
it("should unset property by passing null", function(){
this.dataviz.sortIntervals(null);
expect(this.dataviz.sortIntervals()).to.not.exist;
});
});
describe("#stacked", function(){
it("should return false by default", function(){
expect(this.dataviz.stacked()).to.be.a("boolean").and.to.eql(false);
});
it("should set `stacked` to true by passing true", function(){
this.dataviz.stacked(true);
expect(this.dataviz.stacked()).to.be.a("boolean").and.to.eql(true);
});
it("should set `stacked` to false by passing null", function(){
this.dataviz.stacked(true);
this.dataviz.stacked(null);
expect(this.dataviz.stacked()).to.be.a("boolean").and.to.eql(false);
});
});
describe("#prepare", function(){
it("should set the view._prepared flag to true", function(){
expect(this.dataviz.view._prepared).to.be.false;
this.dataviz.el(document.getElementById("chart-test")).prepare();
expect(this.dataviz.view._prepared).to.be.true;
// terminate the spinner instance
this.dataviz.initialize();
});
});
describe("Adapter actions", function(){
beforeEach(function(){
Keen.Dataviz.register("demo", {
"chart": {
initialize: sinon.spy(),
render: sinon.spy(),
update: sinon.spy(),
destroy: sinon.spy(),
error: sinon.spy()
}
});
this.dataviz.adapter({ library: "demo", chartType: "chart" });
});
describe("#initialize", function(){
it("should call the #initialize method of a given adapter", function(){
this.dataviz.initialize();
expect(Keen.Dataviz.libraries.demo.chart.initialize.called).to.be.ok;
});
it("should set the view._initialized flag to true", function(){
expect(this.dataviz.view._initialized).to.be.false;
this.dataviz.initialize();
expect(this.dataviz.view._initialized).to.be.true;
});
});
describe("#render", function(){
it("should call the #initialize method of a given adapter", function(){
this.dataviz.initialize();
expect(Keen.Dataviz.libraries.demo.chart.initialize.called).to.be.ok;
});
it("should call the #render method of a given adapter", function(){
this.dataviz.el(document.getElementById("chart-test")).render();
expect(Keen.Dataviz.libraries.demo.chart.render.called).to.be.ok;
});
it("should NOT call the #render method if el is NOT set", function(){
this.dataviz.render();
expect(Keen.Dataviz.libraries.demo.chart.render.called).to.not.be.ok;
});
it("should set the view._rendered flag to true", function(){
expect(this.dataviz.view._rendered).to.be.false;
this.dataviz.el(document.getElementById("chart-test")).render();
expect(this.dataviz.view._rendered).to.be.true;
});
});
describe("#update", function(){
it("should call the #update method of a given adapter if available", function(){
this.dataviz.update();
expect(Keen.Dataviz.libraries.demo.chart.update.called).to.be.ok;
});
it("should call the #render method of a given adapter if NOT available", function(){
Keen.Dataviz.libraries.demo.chart.update = void 0;
this.dataviz.el(document.getElementById("chart-test")).update();
expect(Keen.Dataviz.libraries.demo.chart.render.called).to.be.ok;
});
});
describe("#destroy", function(){
it("should call the #destroy method of a given adapter", function(){
this.dataviz.destroy();
expect(Keen.Dataviz.libraries.demo.chart.destroy.called).to.be.ok;
});
});
describe("#error", function(){
it("should call the #error method of a given adapter if available", function(){
this.dataviz.error();
expect(Keen.Dataviz.libraries.demo.chart.error.called).to.be.ok;
});
});
});
});
| vebinua/keen-js | test/unit/modules/dataviz/dataviz-spec.js | JavaScript | mit | 18,031 |
var fs = require('fs');
var daff = require('daff');
var assert = require('assert');
var Fiber = null;
var sqlite3 = null;
try {
Fiber = require('fibers');
sqlite3 = require('sqlite3');
} catch (err) {
// We don't have what we need for accessing the sqlite database.
// Not an error.
console.log("No sqlite3/fibers");
return;
}
Fiber(function() {
var sql = new SqliteDatabase(new sqlite3.Database(':memory:'),null,Fiber);
sql.exec("CREATE TABLE ver1 (id INTEGER PRIMARY KEY, name TEXT)");
sql.exec("CREATE TABLE ver2 (id INTEGER PRIMARY KEY, name TEXT)");
sql.exec("INSERT INTO ver1 VALUES(?,?)",[1, "Paul"]);
sql.exec("INSERT INTO ver1 VALUES(?,?)",[2, "Naomi"]);
sql.exec("INSERT INTO ver1 VALUES(?,?)",[4, "Hobbes"]);
sql.exec("INSERT INTO ver2 VALUES(?,?)",[2, "Noemi"]);
sql.exec("INSERT INTO ver2 VALUES(?,?)",[3, "Calvin"]);
sql.exec("INSERT INTO ver2 VALUES(?,?)",[4, "Hobbes"]);
var st1 = new daff.SqlTable(sql,"ver1")
var st2 = new daff.SqlTable(sql,"ver2")
var sc = new daff.SqlCompare(sql,st1,st2)
var alignment = sc.apply();
var flags = new daff.CompareFlags();
var td = new daff.TableDiff(alignment,flags);
var out = new daff.TableView([]);
td.hilite(out);
var target = new daff.TableView([['@@', 'id', 'name'],
['+++', 3, 'Calvin'],
['->', 2, 'Naomi->Noemi'],
['---', 1, 'Paul']]);
assert(target.isSimilar(out));
}).run();
| dplusic/daff | test/test_sqlite.js | JavaScript | mit | 1,473 |
/**
* @fileoverview transition parser/implementation - still WIP
*
* @author Tony Parisi
*/
goog.provide('glam.TransitionElement');
goog.require('glam.AnimationElement');
glam.TransitionElement.DEFAULT_DURATION = glam.AnimationElement.DEFAULT_DURATION;
glam.TransitionElement.DEFAULT_TIMING_FUNCTION = glam.AnimationElement.DEFAULT_TIMING_FUNCTION;
// transition:transform 2s, background-color 5s linear 2s;
glam.TransitionElement.parse = function(docelt, style, obj) {
var transition = style.transition || "";
var transitions = {
};
var comps = transition.split(",");
var i, len = comps.length;
for (i = 0; i < len; i++) {
var comp = comps[i];
if (comp) {
var params = comp.split(" ");
if (params[0] == "")
params.shift();
var propname = params[0];
var duration = params[1];
var timingFunction = params[2] || glam.TransitionElement.DEFAULT_TIMING_FUNCTION;
var delay = params[3] || "";
duration = glam.AnimationElement.parseTime(duration);
timingFunction = glam.AnimationElement.parseTimingFunction(timingFunction);
delay = glam.AnimationElement.parseTime(delay);
transitions[propname] = {
duration : duration,
timingFunction : timingFunction,
delay : delay
};
}
}
}
| beni55/glam | src/dom/transition.js | JavaScript | mit | 1,258 |
var assert = require('assert');
var common = require('../../common');
var path = common.fixtures + '/data.csv';
var table = 'multi_load_data_test';
var newline = common.detectNewline(path);
common.getTestConnection({multipleStatements: true}, function (err, connection) {
assert.ifError(err);
common.useTestDb(connection);
connection.query([
'CREATE TEMPORARY TABLE ?? (',
'`id` int(11) unsigned NOT NULL AUTO_INCREMENT,',
'`title` varchar(400),',
'PRIMARY KEY (`id`)',
') ENGINE=InnoDB DEFAULT CHARSET=utf8'
].join('\n'), [table], assert.ifError);
var stmt =
'LOAD DATA LOCAL INFILE ? INTO TABLE ?? CHARACTER SET utf8 ' +
'FIELDS TERMINATED BY ? ' +
'LINES TERMINATED BY ? ' +
'(id, title)';
var sql =
connection.format(stmt, [path, table, ',', newline]) + ';' +
connection.format(stmt, [path, table, ',', newline]) + ';';
connection.query(sql, function (err, results) {
assert.ifError(err);
assert.equal(results.length, 2);
assert.equal(results[0].affectedRows, 5);
assert.equal(results[1].affectedRows, 0);
});
connection.query('SELECT * FROM ??', [table], function (err, rows) {
assert.ifError(err);
assert.equal(rows.length, 5);
assert.equal(rows[0].id, 1);
assert.equal(rows[0].title, 'Hello World');
assert.equal(rows[3].id, 4);
assert.equal(rows[3].title, '中文内容');
assert.equal(rows[4].id, 5);
assert.equal(rows[4].title.length, 321);
assert.equal(rows[4].title, 'this is a long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long string');
});
connection.end(assert.ifError);
});
| mysqljs/mysql | test/integration/connection/test-multiple-statements-load-data-infile.js | JavaScript | mit | 1,877 |
/***
* Contains core SlickGrid classes.
* @module Core
* @namespace Slick
*/
(function ($) {
// register namespace
$.extend(true, window, {
"Slick": {
"Event": Event,
"EventData": EventData,
"EventHandler": EventHandler,
"Range": Range,
"NonDataRow": NonDataItem,
"Group": Group,
"GroupTotals": GroupTotals,
"EditorLock": EditorLock,
/***
* A global singleton editor lock.
* @class GlobalEditorLock
* @static
* @constructor
*/
"GlobalEditorLock": new EditorLock(),
"TreeColumns": TreeColumns
}
});
/***
* An event object for passing data to event handlers and letting them control propagation.
* <p>This is pretty much identical to how W3C and jQuery implement events.</p>
* @class EventData
* @constructor
*/
function EventData() {
var isPropagationStopped = false;
var isImmediatePropagationStopped = false;
/***
* Stops event from propagating up the DOM tree.
* @method stopPropagation
*/
this.stopPropagation = function () {
isPropagationStopped = true;
};
/***
* Returns whether stopPropagation was called on this event object.
* @method isPropagationStopped
* @return {Boolean}
*/
this.isPropagationStopped = function () {
return isPropagationStopped;
};
/***
* Prevents the rest of the handlers from being executed.
* @method stopImmediatePropagation
*/
this.stopImmediatePropagation = function () {
isImmediatePropagationStopped = true;
};
/***
* Returns whether stopImmediatePropagation was called on this event object.\
* @method isImmediatePropagationStopped
* @return {Boolean}
*/
this.isImmediatePropagationStopped = function () {
return isImmediatePropagationStopped;
}
}
/***
* A simple publisher-subscriber implementation.
* @class Event
* @constructor
*/
function Event() {
var handlers = [];
/***
* Adds an event handler to be called when the event is fired.
* <p>Event handler will receive two arguments - an <code>EventData</code> and the <code>data</code>
* object the event was fired with.<p>
* @method subscribe
* @param fn {Function} Event handler.
*/
this.subscribe = function (fn) {
handlers.push(fn);
};
/***
* Removes an event handler added with <code>subscribe(fn)</code>.
* @method unsubscribe
* @param fn {Function} Event handler to be removed.
*/
this.unsubscribe = function (fn) {
for (var i = handlers.length - 1; i >= 0; i--) {
if (handlers[i] === fn) {
handlers.splice(i, 1);
}
}
};
/***
* Fires an event notifying all subscribers.
* @method notify
* @param args {Object} Additional data object to be passed to all handlers.
* @param e {EventData}
* Optional.
* An <code>EventData</code> object to be passed to all handlers.
* For DOM events, an existing W3C/jQuery event object can be passed in.
* @param scope {Object}
* Optional.
* The scope ("this") within which the handler will be executed.
* If not specified, the scope will be set to the <code>Event</code> instance.
*/
this.notify = function (args, e, scope) {
e = e || new EventData();
scope = scope || this;
var returnValue;
for (var i = 0; i < handlers.length && !(e.isPropagationStopped() || e.isImmediatePropagationStopped()); i++) {
returnValue = handlers[i].call(scope, e, args);
}
return returnValue;
};
}
function EventHandler() {
var handlers = [];
this.subscribe = function (event, handler) {
handlers.push({
event: event,
handler: handler
});
event.subscribe(handler);
return this; // allow chaining
};
this.unsubscribe = function (event, handler) {
var i = handlers.length;
while (i--) {
if (handlers[i].event === event &&
handlers[i].handler === handler) {
handlers.splice(i, 1);
event.unsubscribe(handler);
return;
}
}
return this; // allow chaining
};
this.unsubscribeAll = function () {
var i = handlers.length;
while (i--) {
handlers[i].event.unsubscribe(handlers[i].handler);
}
handlers = [];
return this; // allow chaining
}
}
/***
* A structure containing a range of cells.
* @class Range
* @constructor
* @param fromRow {Integer} Starting row.
* @param fromCell {Integer} Starting cell.
* @param toRow {Integer} Optional. Ending row. Defaults to <code>fromRow</code>.
* @param toCell {Integer} Optional. Ending cell. Defaults to <code>fromCell</code>.
*/
function Range(fromRow, fromCell, toRow, toCell) {
if (toRow === undefined && toCell === undefined) {
toRow = fromRow;
toCell = fromCell;
}
/***
* @property fromRow
* @type {Integer}
*/
this.fromRow = Math.min(fromRow, toRow);
/***
* @property fromCell
* @type {Integer}
*/
this.fromCell = Math.min(fromCell, toCell);
/***
* @property toRow
* @type {Integer}
*/
this.toRow = Math.max(fromRow, toRow);
/***
* @property toCell
* @type {Integer}
*/
this.toCell = Math.max(fromCell, toCell);
/***
* Returns whether a range represents a single row.
* @method isSingleRow
* @return {Boolean}
*/
this.isSingleRow = function () {
return this.fromRow == this.toRow;
};
/***
* Returns whether a range represents a single cell.
* @method isSingleCell
* @return {Boolean}
*/
this.isSingleCell = function () {
return this.fromRow == this.toRow && this.fromCell == this.toCell;
};
/***
* Returns whether a range contains a given cell.
* @method contains
* @param row {Integer}
* @param cell {Integer}
* @return {Boolean}
*/
this.contains = function (row, cell) {
return row >= this.fromRow && row <= this.toRow &&
cell >= this.fromCell && cell <= this.toCell;
};
/***
* Returns a readable representation of a range.
* @method toString
* @return {String}
*/
this.toString = function () {
if (this.isSingleCell()) {
return "(" + this.fromRow + ":" + this.fromCell + ")";
}
else {
return "(" + this.fromRow + ":" + this.fromCell + " - " + this.toRow + ":" + this.toCell + ")";
}
}
}
/***
* A base class that all special / non-data rows (like Group and GroupTotals) derive from.
* @class NonDataItem
* @constructor
*/
function NonDataItem() {
this.__nonDataRow = true;
}
/***
* Information about a group of rows.
* @class Group
* @extends Slick.NonDataItem
* @constructor
*/
function Group() {
this.__group = true;
/**
* Grouping level, starting with 0.
* @property level
* @type {Number}
*/
this.level = 0;
/***
* Number of rows in the group.
* @property count
* @type {Integer}
*/
this.count = 0;
/***
* Grouping value.
* @property value
* @type {Object}
*/
this.value = null;
/***
* Formatted display value of the group.
* @property title
* @type {String}
*/
this.title = null;
/***
* Whether a group is collapsed.
* @property collapsed
* @type {Boolean}
*/
this.collapsed = false;
/***
* GroupTotals, if any.
* @property totals
* @type {GroupTotals}
*/
this.totals = null;
/**
* Rows that are part of the group.
* @property rows
* @type {Array}
*/
this.rows = [];
/**
* Sub-groups that are part of the group.
* @property groups
* @type {Array}
*/
this.groups = null;
/**
* A unique key used to identify the group. This key can be used in calls to DataView
* collapseGroup() or expandGroup().
* @property groupingKey
* @type {Object}
*/
this.groupingKey = null;
}
Group.prototype = new NonDataItem();
/***
* Compares two Group instances.
* @method equals
* @return {Boolean}
* @param group {Group} Group instance to compare to.
*/
Group.prototype.equals = function (group) {
return this.value === group.value &&
this.count === group.count &&
this.collapsed === group.collapsed &&
this.title === group.title;
};
/***
* Information about group totals.
* An instance of GroupTotals will be created for each totals row and passed to the aggregators
* so that they can store arbitrary data in it. That data can later be accessed by group totals
* formatters during the display.
* @class GroupTotals
* @extends Slick.NonDataItem
* @constructor
*/
function GroupTotals() {
this.__groupTotals = true;
/***
* Parent Group.
* @param group
* @type {Group}
*/
this.group = null;
/***
* Whether the totals have been fully initialized / calculated.
* Will be set to false for lazy-calculated group totals.
* @param initialized
* @type {Boolean}
*/
this.initialized = false;
}
GroupTotals.prototype = new NonDataItem();
/***
* A locking helper to track the active edit controller and ensure that only a single controller
* can be active at a time. This prevents a whole class of state and validation synchronization
* issues. An edit controller (such as SlickGrid) can query if an active edit is in progress
* and attempt a commit or cancel before proceeding.
* @class EditorLock
* @constructor
*/
function EditorLock() {
var activeEditController = null;
/***
* Returns true if a specified edit controller is active (has the edit lock).
* If the parameter is not specified, returns true if any edit controller is active.
* @method isActive
* @param editController {EditController}
* @return {Boolean}
*/
this.isActive = function (editController) {
return (editController ? activeEditController === editController : activeEditController !== null);
};
/***
* Sets the specified edit controller as the active edit controller (acquire edit lock).
* If another edit controller is already active, and exception will be thrown.
* @method activate
* @param editController {EditController} edit controller acquiring the lock
*/
this.activate = function (editController) {
if (editController === activeEditController) { // already activated?
return;
}
if (activeEditController !== null) {
throw "SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController";
}
if (!editController.commitCurrentEdit) {
throw "SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()";
}
if (!editController.cancelCurrentEdit) {
throw "SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()";
}
activeEditController = editController;
};
/***
* Unsets the specified edit controller as the active edit controller (release edit lock).
* If the specified edit controller is not the active one, an exception will be thrown.
* @method deactivate
* @param editController {EditController} edit controller releasing the lock
*/
this.deactivate = function (editController) {
if (activeEditController !== editController) {
throw "SlickGrid.EditorLock.deactivate: specified editController is not the currently active one";
}
activeEditController = null;
};
/***
* Attempts to commit the current edit by calling "commitCurrentEdit" method on the active edit
* controller and returns whether the commit attempt was successful (commit may fail due to validation
* errors, etc.). Edit controller's "commitCurrentEdit" must return true if the commit has succeeded
* and false otherwise. If no edit controller is active, returns true.
* @method commitCurrentEdit
* @return {Boolean}
*/
this.commitCurrentEdit = function () {
return (activeEditController ? activeEditController.commitCurrentEdit() : true);
};
/***
* Attempts to cancel the current edit by calling "cancelCurrentEdit" method on the active edit
* controller and returns whether the edit was successfully cancelled. If no edit controller is
* active, returns true.
* @method cancelCurrentEdit
* @return {Boolean}
*/
this.cancelCurrentEdit = function cancelCurrentEdit() {
return (activeEditController ? activeEditController.cancelCurrentEdit() : true);
};
}
/**
*
* @param {Array} treeColumns Array com levels of columns
* @returns {{hasDepth: 'hasDepth', getTreeColumns: 'getTreeColumns', extractColumns: 'extractColumns', getDepth: 'getDepth', getColumnsInDepth: 'getColumnsInDepth', getColumnsInGroup: 'getColumnsInGroup', visibleColumns: 'visibleColumns', filter: 'filter', reOrder: reOrder}}
* @constructor
*/
function TreeColumns(treeColumns) {
var columnsById = {};
function init() {
mapToId(treeColumns);
}
function mapToId(columns) {
columns
.forEach(function (column) {
columnsById[column.id] = column;
if (column.columns)
mapToId(column.columns);
});
}
function filter(node, condition) {
return node.filter(function (column) {
var valid = condition.call(column);
if (valid && column.columns)
column.columns = filter(column.columns, condition);
return valid && (!column.columns || column.columns.length);
});
}
function sort(columns, grid) {
columns
.sort(function (a, b) {
var indexA = getOrDefault(grid.getColumnIndex(a.id)),
indexB = getOrDefault(grid.getColumnIndex(b.id));
return indexA - indexB;
})
.forEach(function (column) {
if (column.columns)
sort(column.columns, grid);
});
}
function getOrDefault(value) {
return typeof value === 'undefined' ? -1 : value;
}
function getDepth(node) {
if (node.length)
for (var i in node)
return getDepth(node[i]);
else if (node.columns)
return 1 + getDepth(node.columns);
else
return 1;
}
function getColumnsInDepth(node, depth, current) {
var columns = [];
current = current || 0;
if (depth == current) {
if (node.length)
node.forEach(function(n) {
if (n.columns)
n.extractColumns = function() {
return extractColumns(n);
};
});
return node;
} else
for (var i in node)
if (node[i].columns) {
columns = columns.concat(getColumnsInDepth(node[i].columns, depth, current + 1));
}
return columns;
}
function extractColumns(node) {
var result = [];
if (node.hasOwnProperty('length')) {
for (var i = 0; i < node.length; i++)
result = result.concat(extractColumns(node[i]));
} else {
if (node.hasOwnProperty('columns'))
result = result.concat(extractColumns(node.columns));
else
return node;
}
return result;
}
function cloneTreeColumns() {
return $.extend(true, [], treeColumns);
}
init();
this.hasDepth = function () {
for (var i in treeColumns)
if (treeColumns[i].hasOwnProperty('columns'))
return true;
return false;
};
this.getTreeColumns = function () {
return treeColumns;
};
this.extractColumns = function () {
return this.hasDepth()? extractColumns(treeColumns): treeColumns;
};
this.getDepth = function () {
return getDepth(treeColumns);
};
this.getColumnsInDepth = function (depth) {
return getColumnsInDepth(treeColumns, depth);
};
this.getColumnsInGroup = function (groups) {
return extractColumns(groups);
};
this.visibleColumns = function () {
return filter(cloneTreeColumns(), function () {
return this.visible;
});
};
this.filter = function (condition) {
return filter(cloneTreeColumns(), condition);
};
this.reOrder = function (grid) {
return sort(treeColumns, grid);
};
this.getById = function (id) {
return columnsById[id];
}
this.getInIds = function (ids) {
return ids.map(function (id) {
return columnsById[id];
});
}
}
})(jQuery);
| chrisghost/X-SlickGrid | slick.core.js | JavaScript | mit | 17,007 |
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "Incident number": 71820028, "Date": "7\/1\/2007", "Time": "02:18 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "7001 N 43RD ST #5", "Location": [ 43.144909, -87.965720 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.965719603150504, 43.144909396070091 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820073, "Date": "7\/1\/2007", "Time": "10:30 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4722 N TEUTONIA AV", "Location": [ 43.102543, -87.945519 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.94551865582207, 43.102542803630179 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830015, "Date": "7\/1\/2007", "Time": "11:55 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4945 N 39TH ST", "Location": [ 43.106861, -87.961571 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.961571080053773, 43.106860906154616 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820081, "Date": "7\/1\/2007", "Time": "11:03 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "7115 W SILVER SPRING DR #1", "Location": [ 43.119247, -87.999929 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.99992879853319, 43.119246997216656 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820136, "Date": "7\/1\/2007", "Time": "04:40 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5135 N 106TH ST", "Location": [ 43.110999, -88.044593 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.044592571354215, 43.110998528997676 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820026, "Date": "7\/1\/2007", "Time": "02:17 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3501 N 6TH ST", "Location": [ 43.083238, -87.919072 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.919072245344694, 43.083237966868069 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820040, "Date": "7\/1\/2007", "Time": "03:40 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3351 N 8TH ST", "Location": [ 43.080031, -87.921220 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.921219580933496, 43.080030838190318 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820096, "Date": "7\/1\/2007", "Time": "11:43 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "220 E HADLEY ST", "Location": [ 43.069358, -87.908733 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.908733, 43.069357507646046 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830001, "Date": "7\/1\/2007", "Time": "11:26 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1209 W KEEFE AV", "Location": [ 43.081628, -87.926463 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.926462696087498, 43.081628481245438 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820017, "Date": "7\/1\/2007", "Time": "12:04 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3125 N 25TH ST", "Location": [ 43.075827, -87.944791 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.944791099255355, 43.075826863725545 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820030, "Date": "7\/1\/2007", "Time": "02:48 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2526 W LEGION ST #UPPER", "Location": [ 43.009307, -87.945984 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.945983832361946, 43.009306500432693 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820193, "Date": "7\/1\/2007", "Time": "10:48 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "6824 W APPLETON AV #7", "Location": [ 43.082213, -87.997756 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.997755700502211, 43.082213331957924 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820029, "Date": "7\/1\/2007", "Time": "02:09 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DISORDERLY CONDUCT", "Address": "725 W LAPHAM BL #24", "Location": [ 43.014036, -87.920593 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92059348458389, 43.014035849605904 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820036, "Date": "7\/1\/2007", "Time": "02:02 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1818 S 10TH ST #UPR", "Location": [ 43.010511, -87.924117 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92411668495032, 43.010510982514859 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820037, "Date": "7\/1\/2007", "Time": "02:34 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "510 W ORCHARD ST", "Location": [ 43.016057, -87.917283 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.917283, 43.016056500432704 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820082, "Date": "7\/1\/2007", "Time": "10:33 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2441 S 18TH ST", "Location": [ 43.000300, -87.935609 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.935609088146862, 43.000299670552266 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820023, "Date": "7\/1\/2007", "Time": "12:53 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2628 N 20TH ST", "Location": [ 43.066619, -87.937494 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.937493875209412, 43.066619245628722 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120029, "Date": "7\/31\/2007", "Time": "02:36 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2614 W PORT SUNLIGHT WA", "Location": [ 43.097621, -87.946164 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.946164450458781, 43.097621467684107 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120196, "Date": "7\/31\/2007", "Time": "05:18 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "1812 W CONGRESS ST", "Location": [ 43.096886, -87.933500 ], "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 5, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.933500329447725, 43.096886453257376 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120236, "Date": "7\/31\/2007", "Time": "09:57 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "4136 N GREEN BAY AV #1", "Location": [ 43.092420, -87.924433 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.924433298055476, 43.09241987705574 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110020, "Date": "7\/30\/2007", "Time": "12:38 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "1932 W HAMPTON AV", "Location": [ 43.104439, -87.935161 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 8, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.935161499999978, 43.104439486005965 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110034, "Date": "7\/30\/2007", "Time": "02:02 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5770 N 41ST ST", "Location": [ 43.123014, -87.963344 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.963343886317915, 43.123014220093488 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110242, "Date": "7\/30\/2007", "Time": "07:14 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "7140 N 48TH ST", "Location": [ 43.147656, -87.972284 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.972284390213048, 43.147655633360273 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110271, "Date": "7\/30\/2007", "Time": "11:23 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "6827 N DARIEN ST #1", "Location": [ 43.141853, -87.956351 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.956350847056768, 43.141852687172175 ] } },
{ "type": "Feature", "properties": { "Incident number": 72100044, "Date": "7\/29\/2007", "Time": "05:18 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4735 W LUSCHER AV", "Location": [ 43.105505, -87.972782 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.972781999423091, 43.105504506780669 ] } },
{ "type": "Feature", "properties": { "Incident number": 72100104, "Date": "7\/29\/2007", "Time": "12:04 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5442 N 20TH ST", "Location": [ 43.116245, -87.936482 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.936482328034103, 43.116245245628697 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110001, "Date": "7\/29\/2007", "Time": "11:25 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "3820 W GREEN TREE RD #2", "Location": [ 43.141317, -87.958832 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.958832184361597, 43.141317312115042 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110005, "Date": "7\/29\/2007", "Time": "09:50 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "PURSE SNATCHING", "Address": "5770 N 41ST ST", "Location": [ 43.123014, -87.963344 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.963343886317915, 43.123014220093488 ] } },
{ "type": "Feature", "properties": { "Incident number": 72070074, "Date": "7\/26\/2007", "Time": "07:41 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "7373 N TEUTONIA AV", "Location": [ 43.151928, -87.957885 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.957884841421617, 43.151927647786991 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060015, "Date": "7\/25\/2007", "Time": "01:11 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "3636 W GOOD HOPE RD #5", "Location": [ 43.148644, -87.957481 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.957481143083797, 43.148643504327843 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060017, "Date": "7\/25\/2007", "Time": "01:23 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4564 N 26TH ST", "Location": [ 43.100375, -87.945585 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.945585099342267, 43.100375374689825 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060038, "Date": "7\/25\/2007", "Time": "04:41 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5264-A N 34TH ST", "Location": [ 43.113330, -87.955134 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.955134393531267, 43.113329664723857 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060047, "Date": "7\/25\/2007", "Time": "07:04 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3916 W FAIRMOUNT AV", "Location": [ 43.108284, -87.962110 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.962110051070468, 43.108284456575603 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050107, "Date": "7\/24\/2007", "Time": "11:42 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4909 N 20TH ST", "Location": [ 43.106760, -87.936958 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.936958113682081, 43.106760199001684 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050245, "Date": "7\/24\/2007", "Time": "09:48 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "3000 W ORIOLE DR", "Location": [ 43.123772, -87.950044 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.95004363918865, 43.123772460470754 ] } },
{ "type": "Feature", "properties": { "Incident number": 72040040, "Date": "7\/23\/2007", "Time": "03:26 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "7007-B N 42ND ST", "Location": [ 43.145097, -87.964420 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.964420383340766, 43.145096661384628 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030035, "Date": "7\/22\/2007", "Time": "03:16 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "6050 N 40TH ST #LOWER", "Location": [ 43.127775, -87.962396 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.962396356887552, 43.127775303912536 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030041, "Date": "7\/22\/2007", "Time": "03:39 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4140 N 24TH PL", "Location": [ 43.092486, -87.943406 ], "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 5, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.943405879104532, 43.092486220093491 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030043, "Date": "7\/22\/2007", "Time": "04:11 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5550 N 27TH ST #7", "Location": [ 43.118198, -87.946215 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.946215352992397, 43.118197994171616 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020038, "Date": "7\/21\/2007", "Time": "03:45 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "6864 N DARIEN ST #1", "Location": [ 43.142692, -87.956732 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.956732178971194, 43.142692431670277 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020142, "Date": "7\/21\/2007", "Time": "03:56 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4023 N 24TH PL", "Location": [ 43.090254, -87.943520 ], "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 5, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.943519653644032, 43.09025377990649 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020160, "Date": "7\/21\/2007", "Time": "05:22 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4260 N 25TH ST", "Location": [ 43.094079, -87.944534 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.944534404639782, 43.09407896863641 ] } },
{ "type": "Feature", "properties": { "Incident number": 72010026, "Date": "7\/20\/2007", "Time": "04:21 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4965 N HOPKINS ST", "Location": [ 43.107754, -87.961519 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.961518676214126, 43.107753940100572 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000250, "Date": "7\/19\/2007", "Time": "10:46 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "ALL OTHER LARCENY", "Address": "5208 N TEUTONIA AV", "Location": [ 43.112142, -87.949942 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.949942495095229, 43.112142314184325 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990057, "Date": "7\/18\/2007", "Time": "07:59 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5500 N TEUTONIA AV", "Location": [ 43.117347, -87.950316 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.95031553621105, 43.117346682209025 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990180, "Date": "7\/18\/2007", "Time": "05:10 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4909 N 39TH ST #1", "Location": [ 43.106537, -87.961561 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.961561254179898, 43.106536652316592 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990240, "Date": "7\/18\/2007", "Time": "10:28 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "6025 N 35TH ST", "Location": [ 43.127137, -87.956150 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.95614957703836, 43.127137424923546 ] } },
{ "type": "Feature", "properties": { "Incident number": 71980104, "Date": "7\/17\/2007", "Time": "02:11 PM", "Police District": 7, "Offense 1": "TRESPASSING", "Offense 2": "SIMPLE ASSAULT", "Address": "4875 N 42ND ST", "Location": [ 43.106266, -87.965080 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.965079588146864, 43.106265701915866 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970147, "Date": "7\/16\/2007", "Time": "04:01 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4777 N 30TH ST", "Location": [ 43.104195, -87.950418 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 1, "e_clusterK4": 1, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.95041811036387, 43.104195167638075 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970155, "Date": "7\/16\/2007", "Time": "06:07 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "5137 N 42ND ST", "Location": [ 43.110648, -87.965042 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.965041617577228, 43.110647947544578 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970189, "Date": "7\/16\/2007", "Time": "08:02 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4105 N 20TH ST", "Location": [ 43.091658, -87.936991 ], "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.936990650325811, 43.091657779906512 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970201, "Date": "7\/16\/2007", "Time": "09:23 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "6152 N 35TH ST #5", "Location": [ 43.129495, -87.955985 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.955985414594437, 43.129494859282161 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960097, "Date": "7\/15\/2007", "Time": "01:36 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4301 W FAIRMOUNT AV", "Location": [ 43.108194, -87.966636 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.966636270074886, 43.108193729925134 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960148, "Date": "7\/15\/2007", "Time": "05:20 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "5028 N 38TH ST", "Location": [ 43.108937, -87.960144 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.960144386317921, 43.108937077990646 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960200, "Date": "7\/15\/2007", "Time": "10:55 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4930 N 53RD ST", "Location": [ 43.107210, -87.978772 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.97877235356934, 43.107209664723882 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950016, "Date": "7\/14\/2007", "Time": "12:38 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5479 N 35TH ST", "Location": [ 43.117273, -87.956302 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.956301643112454, 43.117273173466465 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950124, "Date": "7\/14\/2007", "Time": "01:24 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3501 W MOTHER DANIELS WA #103", "Location": [ 43.106304, -87.956602 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.956601828954945, 43.106304301209285 ] } },
{ "type": "Feature", "properties": { "Incident number": 71940005, "Date": "7\/13\/2007", "Time": "12:30 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "5104 N 47TH ST", "Location": [ 43.110053, -87.971322 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.971322386317922, 43.110053329447744 ] } },
{ "type": "Feature", "properties": { "Incident number": 71940013, "Date": "7\/13\/2007", "Time": "12:33 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "7105 N TEUTONIA AV #105", "Location": [ 43.146662, -87.956336 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.956335910237001, 43.146661840960284 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950001, "Date": "7\/13\/2007", "Time": "11:39 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4020 W HAMPTON AV", "Location": [ 43.104655, -87.963403 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.963403332361949, 43.104655486005974 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950046, "Date": "7\/13\/2007", "Time": "11:44 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5260 N 36TH ST", "Location": [ 43.113257, -87.957566 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.957565886317923, 43.113256994171621 ] } },
{ "type": "Feature", "properties": { "Incident number": 71930183, "Date": "7\/12\/2007", "Time": "08:19 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "4035 N 15TH ST", "Location": [ 43.090300, -87.929522 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.929521624790567, 43.090299754371301 ] } },
{ "type": "Feature", "properties": { "Incident number": 71920050, "Date": "7\/11\/2007", "Time": "07:17 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5239 N 35TH ST", "Location": [ 43.112647, -87.956428 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.956428120895467, 43.112646754371298 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910006, "Date": "7\/10\/2007", "Time": "12:10 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "3815 W GOOD HOPE RD #5", "Location": [ 43.148421, -87.959624 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.959623751457102, 43.148420531738978 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910210, "Date": "7\/10\/2007", "Time": "07:15 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4476 N 29TH ST", "Location": [ 43.098784, -87.949126 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.949125649896985, 43.098783552071239 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890014, "Date": "7\/8\/2007", "Time": "01:17 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4292 N 27TH ST #2", "Location": [ 43.094763, -87.946814 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.946813893531271, 43.094763136274452 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870003, "Date": "7\/6\/2007", "Time": "12:14 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "5139 N 47TH ST", "Location": [ 43.110720, -87.971382 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.971381599255352, 43.110719779906503 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870142, "Date": "7\/6\/2007", "Time": "01:43 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4074 N 24TH ST", "Location": [ 43.091388, -87.941896 ], "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 5, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.941896430174992, 43.091387800998319 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860215, "Date": "7\/5\/2007", "Time": "06:06 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5319 N 39TH ST", "Location": [ 43.114258, -87.961239 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.961238599255353, 43.114258173466453 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860266, "Date": "7\/5\/2007", "Time": "10:49 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "3425 W SILVER SPRING DR", "Location": [ 43.119080, -87.955892 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.955892276992316, 43.119079513994045 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850043, "Date": "7\/4\/2007", "Time": "04:26 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "6914 N 43RD ST", "Location": [ 43.143687, -87.965512 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.965512089495093, 43.143687159511593 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850057, "Date": "7\/4\/2007", "Time": "06:47 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "3507 W KILEY AV #1", "Location": [ 43.144855, -87.955850 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.95584960268512, 43.144855031721171 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840190, "Date": "7\/3\/2007", "Time": "11:54 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "4630 N 29TH ST", "Location": [ 43.101602, -87.949072 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.949072353569321, 43.101602329447758 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840229, "Date": "7\/3\/2007", "Time": "10:34 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2004 W ROOSEVELT DR", "Location": [ 43.097829, -87.937243 ], "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 8, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.937243462999646, 43.097829038871041 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820028, "Date": "7\/1\/2007", "Time": "02:18 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "7001 N 43RD ST #5", "Location": [ 43.144909, -87.965720 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.965719603150504, 43.144909396070091 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820073, "Date": "7\/1\/2007", "Time": "10:30 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4722 N TEUTONIA AV", "Location": [ 43.102543, -87.945519 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.94551865582207, 43.102542803630179 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830015, "Date": "7\/1\/2007", "Time": "11:55 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4945 N 39TH ST", "Location": [ 43.106861, -87.961571 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.961571080053773, 43.106860906154616 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120041, "Date": "7\/31\/2007", "Time": "04:09 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "8200 W VILLARD AV", "Location": [ 43.112266, -88.013371 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.013371499999977, 43.11226550432783 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120176, "Date": "7\/31\/2007", "Time": "03:25 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4559 N 68TH ST", "Location": [ 43.100336, -87.996908 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.99690765364403, 43.100335645017033 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110050, "Date": "7\/30\/2007", "Time": "04:31 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "9331 W SILVER SPRING DR #8", "Location": [ 43.119406, -88.029261 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.029260832361942, 43.119405546742627 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110264, "Date": "7\/30\/2007", "Time": "10:17 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4446 N 76TH ST", "Location": [ 43.098308, -88.006945 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.006944926279857, 43.098307910352595 ] } },
{ "type": "Feature", "properties": { "Incident number": 72100008, "Date": "7\/29\/2007", "Time": "12:25 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5833 N 65TH ST", "Location": [ 43.123760, -87.992279 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.992279186392636, 43.123760276992328 ] } },
{ "type": "Feature", "properties": { "Incident number": 72100164, "Date": "7\/29\/2007", "Time": "05:33 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "5047 N 67TH ST", "Location": [ 43.109416, -87.994898 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.994898164752541, 43.109415670552266 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090036, "Date": "7\/28\/2007", "Time": "03:00 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4164 N 49TH ST", "Location": [ 43.093115, -87.974565 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.974564937388337, 43.093114994171628 ] } },
{ "type": "Feature", "properties": { "Incident number": 72080001, "Date": "7\/26\/2007", "Time": "09:49 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4233 N 60TH ST", "Location": [ 43.094358, -87.986961 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.9869611392173, 43.094358167638063 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060023, "Date": "7\/25\/2007", "Time": "02:06 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4225 N 73RD ST", "Location": [ 43.094168, -88.003072 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.003071573720149, 43.094167994171613 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060044, "Date": "7\/25\/2007", "Time": "06:03 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "6352 N 84TH ST #4", "Location": [ 43.133425, -88.015532 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.0155324001677, 43.133425103525887 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060143, "Date": "7\/25\/2007", "Time": "03:33 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "6432 W HAMPTON AV", "Location": [ 43.104941, -87.992379 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.992379220093483, 43.104940500432704 ] } },
{ "type": "Feature", "properties": { "Incident number": 72040056, "Date": "7\/23\/2007", "Time": "06:50 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "7308 W CAPITOL DR", "Location": [ 43.090022, -88.003292 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.0032915, 43.090022460470763 ] } },
{ "type": "Feature", "properties": { "Incident number": 72040229, "Date": "7\/23\/2007", "Time": "08:12 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "6929 W SILVER SPRING DR", "Location": [ 43.119285, -87.998310 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.998310167638053, 43.119284524525632 ] } },
{ "type": "Feature", "properties": { "Incident number": 72040248, "Date": "7\/23\/2007", "Time": "09:15 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "8810 W SILVER SPRING DR #2", "Location": [ 43.119632, -88.022413 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.022413058283803, 43.119632460470754 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030003, "Date": "7\/22\/2007", "Time": "12:09 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5768 N 92ND ST", "Location": [ 43.122761, -88.027024 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.027024360782676, 43.122761077990646 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030121, "Date": "7\/22\/2007", "Time": "01:00 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "8200 W VILLARD AV", "Location": [ 43.112266, -88.013371 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.013371499999977, 43.11226550432783 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020043, "Date": "7\/21\/2007", "Time": "04:42 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "6306 N 84TH ST", "Location": [ 43.132546, -88.015555 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.015554835247457, 43.132546446015375 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020197, "Date": "7\/21\/2007", "Time": "09:48 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "7317 W BECKETT AV", "Location": [ 43.090833, -88.003357 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.00335749988443, 43.090832777396344 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020204, "Date": "7\/21\/2007", "Time": "09:48 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "7317 W BECKETT AV", "Location": [ 43.090833, -88.003357 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.00335749988443, 43.090832777396344 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990022, "Date": "7\/18\/2007", "Time": "02:42 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "7158 W FOND DU LAC AV", "Location": [ 43.109252, -88.000634 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.000633623376956, 43.109251561515123 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990140, "Date": "7\/18\/2007", "Time": "02:47 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "6826 W CONGRESS ST", "Location": [ 43.097251, -87.997833 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.997833167638049, 43.097251471579249 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990148, "Date": "7\/18\/2007", "Time": "03:28 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4109 N 48TH ST", "Location": [ 43.091911, -87.973490 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.973489632003961, 43.091910586733249 ] } },
{ "type": "Feature", "properties": { "Incident number": 71980186, "Date": "7\/17\/2007", "Time": "09:13 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5856 N 69TH ST #LOWER", "Location": [ 43.124444, -87.997152 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.997152386317921, 43.124444413266794 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990009, "Date": "7\/17\/2007", "Time": "11:14 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5852 N 76TH ST", "Location": [ 43.124136, -88.005835 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.00583515276422, 43.124136039965173 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960026, "Date": "7\/15\/2007", "Time": "02:23 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "7319 W BECKETT AV", "Location": [ 43.090740, -88.003280 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.003279507097801, 43.090739770182999 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950052, "Date": "7\/14\/2007", "Time": "03:32 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "5157 N 61ST ST", "Location": [ 43.111089, -87.987471 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.987471132003961, 43.11108877990651 ] } },
{ "type": "Feature", "properties": { "Incident number": 71940015, "Date": "7\/13\/2007", "Time": "12:42 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5501 N 76TH ST #11", "Location": [ 43.117768, -88.006159 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.006159154220938, 43.117767974464776 ] } },
{ "type": "Feature", "properties": { "Incident number": 71940205, "Date": "7\/13\/2007", "Time": "11:24 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "8946 W LYNX AV #25", "Location": [ 43.129852, -88.023726 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.02372584328846, 43.129852090186652 ] } },
{ "type": "Feature", "properties": { "Incident number": 71930159, "Date": "7\/12\/2007", "Time": "06:40 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "6929 W SILVER SPRING DR", "Location": [ 43.119285, -87.998310 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.998310167638053, 43.119284524525632 ] } },
{ "type": "Feature", "properties": { "Incident number": 71930197, "Date": "7\/12\/2007", "Time": "09:59 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4607 N 68TH ST", "Location": [ 43.101117, -87.996891 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.996891124790579, 43.101117115182632 ] } },
{ "type": "Feature", "properties": { "Incident number": 71920203, "Date": "7\/11\/2007", "Time": "09:42 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "7600 W BOBOLINK AV", "Location": [ 43.125080, -88.006132 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.006132444179357, 43.125079915054314 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910193, "Date": "7\/10\/2007", "Time": "05:31 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "7300 W CAPITOL DR", "Location": [ 43.090071, -88.003104 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.003104246795786, 43.090071246795816 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890026, "Date": "7\/8\/2007", "Time": "02:44 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "6518 W HAMPTON AV", "Location": [ 43.104950, -87.993261 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.993260968636392, 43.104949500432681 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890201, "Date": "7\/8\/2007", "Time": "10:36 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "8814 W CARMEN AV", "Location": [ 43.123480, -88.022574 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.02257441909515, 43.123479504327833 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880032, "Date": "7\/7\/2007", "Time": "03:12 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "5050 N 74TH ST", "Location": [ 43.109775, -88.004514 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.004513846355991, 43.109775 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880115, "Date": "7\/7\/2007", "Time": "01:18 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5730 N 91ST ST", "Location": [ 43.122113, -88.025685 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.025684875209421, 43.12211299417163 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880148, "Date": "7\/7\/2007", "Time": "03:02 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "9326 W SHERIDAN AV #3", "Location": [ 43.118513, -88.029284 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.029283583819009, 43.118513453257378 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880158, "Date": "7\/7\/2007", "Time": "04:26 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "8228 W BENDER AV #2", "Location": [ 43.132324, -88.013952 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.013952, 43.132323518754568 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880212, "Date": "7\/7\/2007", "Time": "10:54 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "6333 N 77TH ST", "Location": [ 43.132967, -88.007301 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.007300599255359, 43.132966910352593 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870031, "Date": "7\/6\/2007", "Time": "03:22 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5612 N 95TH ST", "Location": [ 43.119811, -88.030806 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.030806041550861, 43.119810940722068 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870034, "Date": "7\/6\/2007", "Time": "03:30 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4335 N 48TH ST", "Location": [ 43.096078, -87.973391 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.973390548184923, 43.09607834110453 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860189, "Date": "7\/5\/2007", "Time": "04:05 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4079 N 68TH ST", "Location": [ 43.091596, -87.997069 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.997068595360219, 43.091595922009361 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860236, "Date": "7\/5\/2007", "Time": "07:56 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "6929 W SILVER SPRING DR", "Location": [ 43.119285, -87.998310 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.998310167638053, 43.119284524525632 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840219, "Date": "7\/3\/2007", "Time": "10:16 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "9420 W BECKETT AV UNIT A", "Location": [ 43.117874, -88.030713 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.030713249495207, 43.117873877892464 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820081, "Date": "7\/1\/2007", "Time": "11:03 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "7115 W SILVER SPRING DR #1", "Location": [ 43.119247, -87.999929 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.99992879853319, 43.119246997216656 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120227, "Date": "7\/31\/2007", "Time": "08:55 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2900 N HOLTON ST", "Location": [ 43.071186, -87.905224 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.905223585966695, 43.071185778464034 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060019, "Date": "7\/25\/2007", "Time": "01:44 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1213 N WATER ST", "Location": [ 43.046126, -87.911200 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.911199573720154, 43.046126025535223 ] } },
{ "type": "Feature", "properties": { "Incident number": 72040209, "Date": "7\/23\/2007", "Time": "06:50 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1962 N PROSPECT AV", "Location": [ 43.055747, -87.887990 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.887990115269545, 43.055746943909256 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000006, "Date": "7\/19\/2007", "Time": "12:07 AM", "Police District": 1, "Offense 1": "SIMPLE ASSAULT", "Address": "2970 N FREDERICK AV", "Location": [ 43.072523, -87.884174 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.8841744334932, 43.072522994171635 ] } },
{ "type": "Feature", "properties": { "Incident number": 71980209, "Date": "7\/17\/2007", "Time": "11:28 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2900 N BOOTH ST", "Location": [ 43.071221, -87.903954 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.90395427813435, 43.071221466432533 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960125, "Date": "7\/15\/2007", "Time": "03:58 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2626 N FRATNEY ST", "Location": [ 43.066322, -87.901593 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.901592875209431, 43.066322413266789 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950037, "Date": "7\/14\/2007", "Time": "04:18 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1320 N VAN BUREN ST #7", "Location": [ 43.047386, -87.903474 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.903474436811422, 43.047386381903181 ] } },
{ "type": "Feature", "properties": { "Incident number": 71940019, "Date": "7\/12\/2007", "Time": "10:07 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "2828 N CRAMER ST", "Location": [ 43.070157, -87.886674 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.886674400744653, 43.070156580904843 ] } },
{ "type": "Feature", "properties": { "Incident number": 71920148, "Date": "7\/11\/2007", "Time": "04:54 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "ALL OTHER OFFENSES", "Address": "2656 N BOOTH ST", "Location": [ 43.066934, -87.904066 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.904065926279856, 43.066934245628723 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910020, "Date": "7\/10\/2007", "Time": "01:58 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2430 N MURRAY AV", "Location": [ 43.061993, -87.885556 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.885555955133299, 43.061992826533569 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910029, "Date": "7\/10\/2007", "Time": "01:36 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "820 E HAMILTON ST", "Location": [ 43.054462, -87.901542 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.901542, 43.054462486005967 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900014, "Date": "7\/9\/2007", "Time": "01:00 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2323 N LAKE DR", "Location": [ 43.060852, -87.879769 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.879768851867595, 43.060852442219065 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850030, "Date": "7\/4\/2007", "Time": "03:15 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2645 N FARWELL AV", "Location": [ 43.066999, -87.881848 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.881848106468709, 43.066998586733227 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850077, "Date": "7\/4\/2007", "Time": "09:53 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2057 N CAMBRIDGE AV", "Location": [ 43.058368, -87.892009 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.892009103727418, 43.058367838190314 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830226, "Date": "7\/2\/2007", "Time": "10:21 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "507 E CHAMBERS ST", "Location": [ 43.072915, -87.904872 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.904872167638061, 43.072914532315892 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120178, "Date": "7\/31\/2007", "Time": "04:47 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "3004 W WELLS ST", "Location": [ 43.040327, -87.952190 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.952190306826708, 43.040326533758183 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120235, "Date": "7\/31\/2007", "Time": "09:33 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1601 W HIGHLAND AV", "Location": [ 43.044258, -87.933033 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.933033251457104, 43.04425847013696 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110012, "Date": "7\/30\/2007", "Time": "12:43 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "920 N 28TH ST #107", "Location": [ 43.042210, -87.948954 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.948953510098903, 43.04220973688615 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110046, "Date": "7\/30\/2007", "Time": "03:21 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "3128 W WISCONSIN AV #417", "Location": [ 43.038796, -87.953993 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.953993419499184, 43.038796471579225 ] } },
{ "type": "Feature", "properties": { "Incident number": 72100084, "Date": "7\/29\/2007", "Time": "10:37 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "823 N 24TH ST #203", "Location": [ 43.040861, -87.942962 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.942961548184911, 43.040860994171616 ] } },
{ "type": "Feature", "properties": { "Incident number": 72100132, "Date": "7\/29\/2007", "Time": "02:56 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2522 W WELLS ST #208", "Location": [ 43.040303, -87.945723 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.945722832361952, 43.040303453257387 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110019, "Date": "7\/29\/2007", "Time": "10:51 PM", "Police District": 1, "Offense 1": "SIMPLE ASSAULT", "Address": "139 E KILBOURN AV", "Location": [ 43.042065, -87.910785 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.910785221190011, 43.04206494362078 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090151, "Date": "7\/28\/2007", "Time": "03:20 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "3002 W CHERRY ST #UPPER", "Location": [ 43.050107, -87.951321 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.95132058090482, 43.050107482110825 ] } },
{ "type": "Feature", "properties": { "Incident number": 72070137, "Date": "7\/26\/2007", "Time": "12:30 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2803 W CHERRY ST", "Location": [ 43.049992, -87.948963 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.948963210671536, 43.049991575701455 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030010, "Date": "7\/25\/2007", "Time": "05:27 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "ALL OTHER LARCENY", "Address": "1145 N CALLAHAN PL", "Location": [ 43.045105, -87.932336 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.932336011277329, 43.045105168465525 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060235, "Date": "7\/25\/2007", "Time": "10:03 PM", "Police District": 1, "Offense 1": "SIMPLE ASSAULT", "Address": "606 N JAMES LOVELL ST", "Location": [ 43.037558, -87.920354 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.920354293416636, 43.03755791598919 ] } },
{ "type": "Feature", "properties": { "Incident number": 72040039, "Date": "7\/23\/2007", "Time": "03:00 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "331 N 31ST ST #UPR", "Location": [ 43.034373, -87.952869 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.952868558716489, 43.034373 ] } },
{ "type": "Feature", "properties": { "Incident number": 72010145, "Date": "7\/22\/2007", "Time": "08:30 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2610 W STATE ST", "Location": [ 43.043264, -87.946574 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.946573835276126, 43.043264474897477 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030081, "Date": "7\/22\/2007", "Time": "08:05 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "1150 N 20TH ST #512", "Location": [ 43.045091, -87.937795 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.937795415748269, 43.045091245628726 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020022, "Date": "7\/21\/2007", "Time": "02:58 AM", "Police District": 1, "Offense 1": "SIMPLE ASSAULT", "Address": "1100 N OLD WORLD THIRD ST", "Location": [ 43.044338, -87.914403 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.91440293892704, 43.044338121028261 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000154, "Date": "7\/19\/2007", "Time": "03:54 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DISORDERLY CONDUCT", "Address": "2501 W KILBOURN AV", "Location": [ 43.041575, -87.945008 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.945008167866078, 43.041574821244907 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990119, "Date": "7\/18\/2007", "Time": "12:52 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2850 W HIGHLAND BL #307", "Location": [ 43.044640, -87.950313 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.950313, 43.044640478792608 ] } },
{ "type": "Feature", "properties": { "Incident number": 71980022, "Date": "7\/17\/2007", "Time": "03:12 AM", "Police District": 1, "Offense 1": "SIMPLE ASSAULT", "Address": "833 W WISCONSIN AV", "Location": [ 43.038649, -87.922949 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.922949238415342, 43.038649480668532 ] } },
{ "type": "Feature", "properties": { "Incident number": 71980197, "Date": "7\/17\/2007", "Time": "10:33 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "431 N 30TH ST", "Location": [ 43.035524, -87.951569 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.951569073720151, 43.035524497085817 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970185, "Date": "7\/16\/2007", "Time": "07:50 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "944 N 20TH ST", "Location": [ 43.042624, -87.937796 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.937795977350291, 43.042623988343252 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970211, "Date": "7\/16\/2007", "Time": "09:09 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2460 W JUNEAU AV", "Location": [ 43.045892, -87.944382 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.944382, 43.04589247489745 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960047, "Date": "7\/15\/2007", "Time": "02:52 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2702 W STATE ST", "Location": [ 43.043239, -87.947770 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.947770248542895, 43.043239486005966 ] } },
{ "type": "Feature", "properties": { "Incident number": 71930177, "Date": "7\/12\/2007", "Time": "08:00 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "911 N 24TH ST #9", "Location": [ 43.041924, -87.942942 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.942941599255349, 43.041924335276114 ] } },
{ "type": "Feature", "properties": { "Incident number": 71920134, "Date": "7\/11\/2007", "Time": "04:45 PM", "Police District": 1, "Offense 1": "SIMPLE ASSAULT", "Address": "333 W KILBOURN AV", "Location": [ 43.041336, -87.915122 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.915121721622697, 43.041336498990383 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890124, "Date": "7\/8\/2007", "Time": "06:21 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "3022 W MC KINLEY BL", "Location": [ 43.047356, -87.951883 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.95188308090485, 43.047356467684104 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890144, "Date": "7\/8\/2007", "Time": "05:25 PM", "Police District": 1, "Offense 1": "SIMPLE ASSAULT", "Address": "200 N HARBOR DR", "Location": [ 43.033131, -87.899688 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 4, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.899688203318973, 43.033131354982004 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880087, "Date": "7\/7\/2007", "Time": "09:23 AM", "Police District": 1, "Offense 1": "SIMPLE ASSAULT", "Address": "700 W STATE ST", "Location": [ 43.043007, -87.920883 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.920882800998328, 43.043007494373157 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880130, "Date": "7\/7\/2007", "Time": "02:37 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "950 N 13TH ST", "Location": [ 43.041845, -87.928633 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 1, "e_clusterK8": 4, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.928633151937902, 43.041844970600174 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860120, "Date": "7\/5\/2007", "Time": "11:24 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1900 W HIGHLAND AV", "Location": [ 43.044501, -87.936470 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.936470488317113, 43.044501448079394 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840008, "Date": "7\/3\/2007", "Time": "12:25 AM", "Police District": 1, "Offense 1": "SIMPLE ASSAULT", "Address": "200 N HARBOR DR", "Location": [ 43.033131, -87.899688 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 4, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.899688203318973, 43.033131354982004 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840223, "Date": "7\/3\/2007", "Time": "10:06 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "541 N 33RD ST", "Location": [ 43.036408, -87.955309 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.955308753076494, 43.036408337726186 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830034, "Date": "7\/2\/2007", "Time": "01:56 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2219 W GALENA ST", "Location": [ 43.051395, -87.940831 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.940831499999987, 43.05139547013696 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830202, "Date": "7\/2\/2007", "Time": "07:03 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2743 W HIGHLAND BL #110", "Location": [ 43.044437, -87.949004 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.9490035, 43.044436542847478 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830215, "Date": "7\/2\/2007", "Time": "01:20 PM", "Police District": 3, "Offense 1": "ALL OTHER LARCENY", "Offense 2": "SIMPLE ASSAULT", "Address": "2219 W GALENA ST", "Location": [ 43.051395, -87.940831 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.940831499999987, 43.05139547013696 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120151, "Date": "7\/31\/2007", "Time": "02:22 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4065 N 84TH ST", "Location": [ 43.091209, -88.017558 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.017557613682058, 43.09120875437128 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120244, "Date": "7\/31\/2007", "Time": "10:44 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "9117 W EDGEWATER DR", "Location": [ 43.139552, -88.026002 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.02600202553522, 43.139551528420775 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110007, "Date": "7\/30\/2007", "Time": "12:13 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5142 N 108TH ST", "Location": [ 43.111215, -88.047096 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.047096393531291, 43.11121477990649 ] } },
{ "type": "Feature", "properties": { "Incident number": 72100080, "Date": "7\/29\/2007", "Time": "09:59 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "8875 W POTOMAC AV", "Location": [ 43.108975, -88.023127 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.023127226198667, 43.108974848804465 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110032, "Date": "7\/29\/2007", "Time": "10:36 PM", "Police District": 4, "Offense 1": "KIDNAPING", "Offense 2": "SIMPLE ASSAULT", "Address": "9025 W APPLETON AV", "Location": [ 43.111995, -88.025289 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.025289200415301, 43.111994910612381 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090065, "Date": "7\/28\/2007", "Time": "08:11 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3956 N 88TH ST", "Location": [ 43.089065, -88.022583 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.022582860782677, 43.089065025535234 ] } },
{ "type": "Feature", "properties": { "Incident number": 72080127, "Date": "7\/27\/2007", "Time": "04:04 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "7800 W APPLETON AV #G", "Location": [ 43.097255, -88.009770 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.009769666803706, 43.097254671717785 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060092, "Date": "7\/25\/2007", "Time": "10:39 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "ALL OTHER OFFENSES", "Address": "9631 W CAPITOL DR", "Location": [ 43.089546, -88.033249 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.033248808045457, 43.089545753673903 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030103, "Date": "7\/22\/2007", "Time": "11:34 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "5172 N 108TH ST #2", "Location": [ 43.111656, -88.047105 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.04710487795073, 43.111655779906528 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020187, "Date": "7\/21\/2007", "Time": "08:34 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4450 N 92ND ST #A", "Location": [ 43.098128, -88.027503 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.02750339353129, 43.098128329447746 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000107, "Date": "7\/19\/2007", "Time": "11:45 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4409 N 91ST ST", "Location": [ 43.097267, -88.026358 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.02635803707642, 43.097266592561596 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000181, "Date": "7\/19\/2007", "Time": "06:00 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4803 N 90TH ST", "Location": [ 43.105130, -88.024706 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.024706181750872, 43.105130126401122 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990137, "Date": "7\/18\/2007", "Time": "02:32 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3435 N 83RD ST", "Location": [ 43.081819, -88.016063 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.016062891770929, 43.081818927809067 ] } },
{ "type": "Feature", "properties": { "Incident number": 71980045, "Date": "7\/17\/2007", "Time": "07:57 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5163 N 107TH ST #1", "Location": [ 43.111437, -88.045829 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.045828847365215, 43.111437091515363 ] } },
{ "type": "Feature", "properties": { "Incident number": 71930053, "Date": "7\/12\/2007", "Time": "09:03 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "9021 W APPLETON AV", "Location": [ 43.111884, -88.025225 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.025224544599311, 43.111884317150604 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910018, "Date": "7\/10\/2007", "Time": "01:25 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "8501 W GRANTOSA DR #5", "Location": [ 43.104374, -88.018446 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.018446498009439, 43.104374036355289 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910030, "Date": "7\/10\/2007", "Time": "03:44 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "8329 W CONGRESS ST #5", "Location": [ 43.097038, -88.017003 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.017002580904844, 43.097037539529246 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860216, "Date": "7\/5\/2007", "Time": "06:26 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "10631 W HAMPTON AV", "Location": [ 43.104779, -88.045223 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.04522308050079, 43.104778535634118 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850042, "Date": "7\/4\/2007", "Time": "04:13 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "ALL OTHER OFFENSES", "Address": "4445 N HOUSTON AV", "Location": [ 43.098506, -88.013820 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.013819543741491, 43.098505733539284 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820136, "Date": "7\/1\/2007", "Time": "04:40 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5135 N 106TH ST", "Location": [ 43.110999, -88.044593 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.044592571354215, 43.110998528997676 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120034, "Date": "7\/31\/2007", "Time": "02:24 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3318 N 16TH ST", "Location": [ 43.079481, -87.931004 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.931004419066511, 43.079480549541252 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120177, "Date": "7\/31\/2007", "Time": "04:13 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2857 N 13TH ST", "Location": [ 43.070715, -87.927579 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.927579139217301, 43.070714528449429 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120231, "Date": "7\/31\/2007", "Time": "09:06 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1312 W COTTAGE PL", "Location": [ 43.072727, -87.927943 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.927942913266776, 43.072727489324208 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120240, "Date": "7\/31\/2007", "Time": "10:16 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2634 N RICHARDS ST", "Location": [ 43.066317, -87.907691 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.907691131237257, 43.066317148645055 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120241, "Date": "7\/31\/2007", "Time": "10:51 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1402 W CHAMBERS ST", "Location": [ 43.073270, -87.929275 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.929274732624734, 43.073270216468522 ] } },
{ "type": "Feature", "properties": { "Incident number": 72130006, "Date": "7\/31\/2007", "Time": "11:33 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "2014 W KEEFE AV", "Location": [ 43.082392, -87.937673 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.937673223007678, 43.082391518754555 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110033, "Date": "7\/30\/2007", "Time": "12:11 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2546 N 7TH ST", "Location": [ 43.064955, -87.919875 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.919874882422775, 43.064954580904846 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110236, "Date": "7\/30\/2007", "Time": "07:52 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3163 N 2ND ST", "Location": [ 43.076088, -87.912629 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.91262910257359, 43.076088419095157 ] } },
{ "type": "Feature", "properties": { "Incident number": 72100189, "Date": "7\/29\/2007", "Time": "08:53 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2408 W HOPKINS ST", "Location": [ 43.079871, -87.942403 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.94240320296926, 43.079871040853497 ] } },
{ "type": "Feature", "properties": { "Incident number": 72100199, "Date": "7\/29\/2007", "Time": "10:29 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3350 N 9TH ST #C", "Location": [ 43.080038, -87.922325 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.922325411853123, 43.080037994171619 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090209, "Date": "7\/28\/2007", "Time": "10:06 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2932 N 9TH ST", "Location": [ 43.071922, -87.922484 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.922483907957997, 43.071921639188652 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090218, "Date": "7\/28\/2007", "Time": "10:38 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2616 N 4TH ST #4", "Location": [ 43.066188, -87.915473 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.915473426279846, 43.066187832361955 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090227, "Date": "7\/28\/2007", "Time": "11:19 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3450 N BOOTH ST", "Location": [ 43.081235, -87.903756 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.903756422384717, 43.081235130446089 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090229, "Date": "7\/28\/2007", "Time": "08:23 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1429 W ATKINSON AV #2", "Location": [ 43.086418, -87.929181 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.929181407178589, 43.086417822349965 ] } },
{ "type": "Feature", "properties": { "Incident number": 72080015, "Date": "7\/27\/2007", "Time": "01:09 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1430 W ATKINSON AV #6", "Location": [ 43.086341, -87.928744 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.928743671709938, 43.086340808287609 ] } },
{ "type": "Feature", "properties": { "Incident number": 72080172, "Date": "7\/27\/2007", "Time": "08:50 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2129 W KEEFE AV #3", "Location": [ 43.082355, -87.939342 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.93934216763806, 43.082354536211042 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090015, "Date": "7\/27\/2007", "Time": "10:23 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1300 W CHAMBERS ST", "Location": [ 43.073233, -87.927588 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.92758842377377, 43.073233487899572 ] } },
{ "type": "Feature", "properties": { "Incident number": 72070069, "Date": "7\/26\/2007", "Time": "08:14 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2559 N HOLTON ST", "Location": [ 43.065152, -87.905379 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.90537860646873, 43.065152276992343 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050203, "Date": "7\/24\/2007", "Time": "06:19 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3209 N 2ND ST", "Location": [ 43.076474, -87.912630 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.91263016085739, 43.076474360811346 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050221, "Date": "7\/24\/2007", "Time": "07:14 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1323 W COTTAGE PL", "Location": [ 43.072681, -87.928263 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.928262696087472, 43.072680510675795 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030025, "Date": "7\/22\/2007", "Time": "02:16 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2414 W HOPKINS ST", "Location": [ 43.080063, -87.942702 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.942701998038103, 43.080062761324854 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030028, "Date": "7\/22\/2007", "Time": "02:19 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3212 N 7TH ST #LOWER", "Location": [ 43.076754, -87.919943 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.919943356887543, 43.07675396863641 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030136, "Date": "7\/22\/2007", "Time": "02:19 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3878 N 15TH ST", "Location": [ 43.087553, -87.929514 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.929514379104532, 43.087552994171631 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030215, "Date": "7\/22\/2007", "Time": "11:27 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3005 N 18TH ST", "Location": [ 43.073416, -87.935588 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.93558810257359, 43.073416005828392 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020135, "Date": "7\/21\/2007", "Time": "02:56 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2202 W VIENNA AV", "Location": [ 43.086095, -87.939770 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939770055369593, 43.086095474897483 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020163, "Date": "7\/21\/2007", "Time": "05:11 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2241 N 5TH ST", "Location": [ 43.059608, -87.917134 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.917134094949972, 43.059608205987857 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020166, "Date": "7\/21\/2007", "Time": "04:09 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3358 N 6TH ST", "Location": [ 43.080101, -87.918454 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.918454375209421, 43.080101161809694 ] } },
{ "type": "Feature", "properties": { "Incident number": 72010023, "Date": "7\/20\/2007", "Time": "03:07 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3842 N 13TH ST", "Location": [ 43.087553, -87.927064 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.927063911853125, 43.087552994171631 ] } },
{ "type": "Feature", "properties": { "Incident number": 72010118, "Date": "7\/20\/2007", "Time": "03:01 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1517 W BURLEIGH ST", "Location": [ 43.074953, -87.930352 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.930351838190305, 43.074952535634139 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020008, "Date": "7\/20\/2007", "Time": "11:39 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2558 N 2ND ST", "Location": [ 43.065207, -87.912514 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.912514375209412, 43.065207136274473 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000031, "Date": "7\/19\/2007", "Time": "04:01 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3300 N 21ST ST #A", "Location": [ 43.078805, -87.938476 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.938475911853118, 43.078805245628729 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000057, "Date": "7\/19\/2007", "Time": "08:18 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3294 N 10TH ST", "Location": [ 43.078662, -87.923596 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.923596382422772, 43.078662387731562 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000120, "Date": "7\/19\/2007", "Time": "12:35 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3414 N 15TH ST", "Location": [ 43.080453, -87.929726 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.92972644070656, 43.080452549541242 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000155, "Date": "7\/19\/2007", "Time": "03:44 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "ALL OTHER OFFENSES", "Address": "2920 N 4TH ST", "Location": [ 43.071750, -87.915406 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.9154058424608, 43.07175 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000231, "Date": "7\/19\/2007", "Time": "09:54 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3240 N BUFFUM ST", "Location": [ 43.077563, -87.906316 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.906316444601728, 43.077562575076456 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000236, "Date": "7\/19\/2007", "Time": "10:03 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2958 N 2ND ST #6", "Location": [ 43.072587, -87.912472 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.912472382422777, 43.072587303912506 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990031, "Date": "7\/18\/2007", "Time": "02:15 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3634 N PORTWASHINGTON RD", "Location": [ 43.042000, -87.906870 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.90687, 43.042 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990055, "Date": "7\/18\/2007", "Time": "07:43 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2430 N 2ND ST", "Location": [ 43.062796, -87.912556 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.912555849674192, 43.062795723007696 ] } },
{ "type": "Feature", "properties": { "Incident number": 71980125, "Date": "7\/17\/2007", "Time": "04:30 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2710 N BUFFUM ST", "Location": [ 43.067798, -87.906503 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.906502893531268, 43.067798413266793 ] } },
{ "type": "Feature", "properties": { "Incident number": 71980145, "Date": "7\/17\/2007", "Time": "05:40 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3350 N 14TH ST", "Location": [ 43.080083, -87.928495 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.928494911853136, 43.080082658895492 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990010, "Date": "7\/17\/2007", "Time": "11:27 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3254 N RICHARDS ST", "Location": [ 43.077795, -87.907585 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.907585093917916, 43.07779498251486 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970092, "Date": "7\/16\/2007", "Time": "12:00 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3742 N 3RD ST", "Location": [ 43.084863, -87.913622 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.913622411853126, 43.084862580904854 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970204, "Date": "7\/16\/2007", "Time": "10:01 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2514 N MARTIN L KING JR DR #4", "Location": [ 43.064218, -87.913992 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.913991672664508, 43.06421753103033 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970206, "Date": "7\/16\/2007", "Time": "10:31 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2749 N 1ST ST", "Location": [ 43.068600, -87.911010 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.911010095937115, 43.068600282820711 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960025, "Date": "7\/15\/2007", "Time": "02:13 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3035 N BUFFUM ST", "Location": [ 43.073677, -87.906512 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.906511632003955, 43.073676586733228 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960099, "Date": "7\/15\/2007", "Time": "02:11 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2769 N BUFFUM ST", "Location": [ 43.069015, -87.906560 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.906560073720144, 43.069014586733225 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960145, "Date": "7\/15\/2007", "Time": "06:15 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3338 N MARTIN L KING JR DR", "Location": [ 43.079736, -87.916666 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.916665846500209, 43.079736488487491 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950014, "Date": "7\/14\/2007", "Time": "12:10 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3730 N 16TH ST", "Location": [ 43.085385, -87.930812 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.930812411853125, 43.08538496863639 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950153, "Date": "7\/14\/2007", "Time": "04:58 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1220 W LOCUST ST", "Location": [ 43.071337, -87.927223 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.927222829447729, 43.071337445467108 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950197, "Date": "7\/14\/2007", "Time": "10:04 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "TRESPASSING", "Address": "510 W CONCORDIA AV", "Location": [ 43.078861, -87.917252 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.91725247446476, 43.078861486005962 ] } },
{ "type": "Feature", "properties": { "Incident number": 71930027, "Date": "7\/12\/2007", "Time": "06:19 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2217 N BUFFUM ST", "Location": [ 43.059533, -87.906850 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.906849771192583, 43.059532662502157 ] } },
{ "type": "Feature", "properties": { "Incident number": 71930184, "Date": "7\/12\/2007", "Time": "08:17 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "3242 N 3RD ST", "Location": [ 43.077212, -87.913833 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.913832896849485, 43.077212161809683 ] } },
{ "type": "Feature", "properties": { "Incident number": 71920072, "Date": "7\/11\/2007", "Time": "10:24 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "ALL OTHER OFFENSES", "Address": "2923 N 12TH ST", "Location": [ 43.071858, -87.926769 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.926768620895444, 43.071858031363604 ] } },
{ "type": "Feature", "properties": { "Incident number": 71920192, "Date": "7\/11\/2007", "Time": "08:27 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "1700 W KEEFE AV", "Location": [ 43.081845, -87.932291 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.9322905, 43.081845236326807 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910064, "Date": "7\/10\/2007", "Time": "08:39 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3334 N HOLTON ST", "Location": [ 43.079112, -87.905065 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.905065382422777, 43.079112052455429 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900181, "Date": "7\/9\/2007", "Time": "04:30 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1119 W KEEFE AV", "Location": [ 43.081619, -87.925464 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.925464, 43.08161850678065 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890038, "Date": "7\/8\/2007", "Time": "02:58 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2006 N HOLTON ST", "Location": [ 43.056693, -87.905326 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.905325926279843, 43.056693 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890078, "Date": "7\/8\/2007", "Time": "10:39 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3104 N BUFFUM ST", "Location": [ 43.074882, -87.906390 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.906390102525393, 43.074881763932673 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890107, "Date": "7\/8\/2007", "Time": "12:30 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3223 N 16TH ST", "Location": [ 43.077303, -87.931098 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.931098117577207, 43.077302528449422 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890149, "Date": "7\/8\/2007", "Time": "05:54 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1338 W COLUMBIA ST", "Location": [ 43.074137, -87.928631 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.928631329447725, 43.074136507646038 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890198, "Date": "7\/8\/2007", "Time": "10:34 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3500 N PORT WASHINGTON RD", "Location": [ 43.082279, -87.917323 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.917323360782675, 43.082279077990648 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890204, "Date": "7\/8\/2007", "Time": "10:27 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3212 N 7TH ST", "Location": [ 43.076754, -87.919943 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.919943356887543, 43.07675396863641 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890207, "Date": "7\/8\/2007", "Time": "09:41 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3347 N 14TH ST #A", "Location": [ 43.079976, -87.928571 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.928571066506791, 43.079976450458759 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900010, "Date": "7\/8\/2007", "Time": "11:48 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "1901 W ATKINSON AV", "Location": [ 43.088847, -87.934608 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.934607610623658, 43.088846627791682 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880010, "Date": "7\/7\/2007", "Time": "12:39 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3869 N HUMBOLDT BL #204", "Location": [ 43.087839, -87.898432 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.898431889433652, 43.087839361071147 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880016, "Date": "7\/7\/2007", "Time": "01:26 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2979 N MARTIN L KING JR DR", "Location": [ 43.072582, -87.914069 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.914068847758898, 43.072581712550843 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880058, "Date": "7\/7\/2007", "Time": "05:08 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "212 W HADLEY ST", "Location": [ 43.069400, -87.913090 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.913089555369609, 43.069399500432681 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880071, "Date": "7\/7\/2007", "Time": "08:58 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3921 N HUMBOLDT BL #601", "Location": [ 43.088580, -87.900123 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.900122767672826, 43.088579737174605 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870045, "Date": "7\/6\/2007", "Time": "05:37 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1200 E SINGER CR APT 67", "Location": [ 43.085273, -87.895101 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.895100860667128, 43.085273038865424 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870093, "Date": "7\/6\/2007", "Time": "11:56 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1413 W LOCUST ST", "Location": [ 43.071067, -87.929514 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.929514343629165, 43.071067438844779 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870119, "Date": "7\/6\/2007", "Time": "02:06 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2700 N RICHARDS ST", "Location": [ 43.067557, -87.907702 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.907702030085716, 43.067557247032674 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870129, "Date": "7\/6\/2007", "Time": "03:39 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3703-A N 1ST ST", "Location": [ 43.084045, -87.910978 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.910978120895464, 43.084044922009362 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870178, "Date": "7\/6\/2007", "Time": "08:31 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2318 W KEEFE AV #LOWER", "Location": [ 43.082461, -87.941610 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.94161022009348, 43.082460511541207 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860035, "Date": "7\/5\/2007", "Time": "02:12 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3901 N HUMBOLDT BL #211", "Location": [ 43.088651, -87.899294 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.899293558456691, 43.088650974724601 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860049, "Date": "7\/5\/2007", "Time": "04:46 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3935 N 17TH ST", "Location": [ 43.088427, -87.932109 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.932108544289761, 43.088427366639735 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860070, "Date": "7\/5\/2007", "Time": "07:44 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "134 E CONCORDIA AV", "Location": [ 43.078454, -87.909773 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.9097725, 43.078454474897477 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860219, "Date": "7\/5\/2007", "Time": "05:15 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3537 N 14TH ST", "Location": [ 43.082505, -87.928499 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.928499150325791, 43.082504696087476 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860262, "Date": "7\/5\/2007", "Time": "11:06 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3530 N PORT WASHINGTON AV", "Location": [ 43.082729, -87.917313 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.917312889636136, 43.082729077990649 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850163, "Date": "7\/4\/2007", "Time": "07:49 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3426 N 13TH ST #A", "Location": [ 43.080776, -87.927233 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.927232879104537, 43.080775826533575 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840092, "Date": "7\/3\/2007", "Time": "11:07 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3240 N BUFFUM ST", "Location": [ 43.077563, -87.906316 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.906316444601728, 43.077562575076456 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840137, "Date": "7\/3\/2007", "Time": "03:28 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2639 N 2ND ST", "Location": [ 43.066415, -87.912594 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.912593794225728, 43.066414584986241 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830035, "Date": "7\/2\/2007", "Time": "05:18 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "432 E CHAMBERS ST", "Location": [ 43.072977, -87.905421 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.905420832361941, 43.072977456575614 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830056, "Date": "7\/2\/2007", "Time": "09:00 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3642 N 26TH ST", "Location": [ 43.084574, -87.945774 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.94577437189119, 43.084574497085811 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830228, "Date": "7\/2\/2007", "Time": "10:40 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2640 N 4TH ST", "Location": [ 43.066648, -87.915463 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.91546336799604, 43.066647723007691 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820026, "Date": "7\/1\/2007", "Time": "02:17 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3501 N 6TH ST", "Location": [ 43.083238, -87.919072 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.919072245344694, 43.083237966868069 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820040, "Date": "7\/1\/2007", "Time": "03:40 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "3351 N 8TH ST", "Location": [ 43.080031, -87.921220 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.921219580933496, 43.080030838190318 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820096, "Date": "7\/1\/2007", "Time": "11:43 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "220 E HADLEY ST", "Location": [ 43.069358, -87.908733 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.908733, 43.069357507646046 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830001, "Date": "7\/1\/2007", "Time": "11:26 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1209 W KEEFE AV", "Location": [ 43.081628, -87.926463 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.926462696087498, 43.081628481245438 ] } },
{ "type": "Feature", "properties": { "Incident number": 72120217, "Date": "7\/31\/2007", "Time": "07:05 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2507 W AUER AV", "Location": [ 43.076957, -87.945052 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.94505152553522, 43.076957481245472 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110031, "Date": "7\/30\/2007", "Time": "01:24 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4922 N 60TH ST", "Location": [ 43.107074, -87.986193 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.986193393531266, 43.107074329447755 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110039, "Date": "7\/30\/2007", "Time": "02:28 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4290 W FOND DU LAC AV", "Location": [ 43.082789, -87.966990 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.966990490594327, 43.082788691319855 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110256, "Date": "7\/30\/2007", "Time": "08:10 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2600 W CHAMBERS ST", "Location": [ 43.073431, -87.946097 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.946097081069169, 43.073431339855063 ] } },
{ "type": "Feature", "properties": { "Incident number": 72100181, "Date": "7\/29\/2007", "Time": "08:09 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3050 N 48TH ST", "Location": [ 43.074558, -87.973546 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.973545926279854, 43.074557664723862 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090167, "Date": "7\/28\/2007", "Time": "04:59 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2901 N 21ST ST", "Location": [ 43.071542, -87.938680 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.93868009925535, 43.071542276992318 ] } },
{ "type": "Feature", "properties": { "Incident number": 72080175, "Date": "7\/27\/2007", "Time": "09:15 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2700 W LOCUST ST", "Location": [ 43.071630, -87.947390 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.947389723332577, 43.071630223332576 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060239, "Date": "7\/25\/2007", "Time": "10:43 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2913 N 29TH ST", "Location": [ 43.071939, -87.949829 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.949828632003943, 43.071939419095173 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060244, "Date": "7\/25\/2007", "Time": "11:05 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2828 N 49TH ST", "Location": [ 43.070455, -87.974812 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.97481235356932, 43.070454555369615 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050058, "Date": "7\/24\/2007", "Time": "07:59 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4554 N 42ND ST", "Location": [ 43.100198, -87.965046 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.965046379104535, 43.100197994171623 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050235, "Date": "7\/24\/2007", "Time": "09:08 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3754 N 27TH ST", "Location": [ 43.085933, -87.947014 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.947014360782674, 43.085933497085819 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050242, "Date": "7\/24\/2007", "Time": "09:20 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3383-A N 28TH ST", "Location": [ 43.080885, -87.948452 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.948451632003952, 43.080884612268456 ] } },
{ "type": "Feature", "properties": { "Incident number": 72040170, "Date": "7\/23\/2007", "Time": "02:59 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2964 N 24TH ST", "Location": [ 43.072857, -87.942314 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.942313893531278, 43.072857 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030020, "Date": "7\/22\/2007", "Time": "02:04 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3413 N 36TH ST", "Location": [ 43.081389, -87.958461 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 4, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 8, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.958461084251709, 43.081388884817365 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030037, "Date": "7\/22\/2007", "Time": "03:40 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4819 W CAPITOL DR", "Location": [ 43.089788, -87.974193 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.974192923394341, 43.089787521207406 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030174, "Date": "7\/22\/2007", "Time": "06:17 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3139-A N 35TH ST", "Location": [ 43.076142, -87.957340 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 8, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.957340128108783, 43.076142167638075 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020010, "Date": "7\/21\/2007", "Time": "01:00 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3019 N 21ST ST", "Location": [ 43.073650, -87.938661 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.938660628108792, 43.073649754371303 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000108, "Date": "7\/19\/2007", "Time": "11:07 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "5001 W FOND DU LAC AV", "Location": [ 43.089560, -87.976042 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.976042243291431, 43.089560194818077 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990044, "Date": "7\/18\/2007", "Time": "06:10 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "ALL OTHER OFFENSES", "Address": "4642 W BERNHARD PL", "Location": [ 43.080187, -87.972102 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.972101832361943, 43.080187452680455 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990131, "Date": "7\/18\/2007", "Time": "11:55 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "4500 W KEEFE AV", "Location": [ 43.082602, -87.969839 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.969838972301105, 43.082602465331099 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000001, "Date": "7\/18\/2007", "Time": "11:05 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4767 N 37TH ST", "Location": [ 43.104207, -87.959222 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.959222445094525, 43.104207052224751 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000004, "Date": "7\/18\/2007", "Time": "11:04 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4777 N 50TH ST", "Location": [ 43.104177, -87.975570 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.97556960646871, 43.104177251457088 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970043, "Date": "7\/16\/2007", "Time": "05:40 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "2847 N 45TH ST", "Location": [ 43.070688, -87.969951 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.96995107703836, 43.070688335276117 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960063, "Date": "7\/15\/2007", "Time": "09:40 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4310 W HOPE AV", "Location": [ 43.093495, -87.967326 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.967326344342951, 43.093495024204167 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960071, "Date": "7\/15\/2007", "Time": "10:49 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3754 N 25TH ST", "Location": [ 43.085915, -87.944725 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.944724897426411, 43.085915497085807 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960131, "Date": "7\/15\/2007", "Time": "05:17 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "LIQUOR LAW VIOLATIONS", "Address": "3238 N 35TH ST", "Location": [ 43.077887, -87.957246 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 8, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.95724586799605, 43.077887161809684 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950081, "Date": "7\/14\/2007", "Time": "10:22 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3144 N 34TH ST", "Location": [ 43.076213, -87.956083 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 8, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.956083437388358, 43.076212994171613 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950183, "Date": "7\/14\/2007", "Time": "08:14 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2877 N 23RD ST", "Location": [ 43.071335, -87.941189 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.941188632003943, 43.071335025535234 ] } },
{ "type": "Feature", "properties": { "Incident number": 71940134, "Date": "7\/13\/2007", "Time": "03:39 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2956 N 24TH ST", "Location": [ 43.072614, -87.942315 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.942314889636137, 43.072614 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910081, "Date": "7\/10\/2007", "Time": "09:02 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4932 N 55TH ST", "Location": [ 43.107309, -87.981284 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.98128389353127, 43.107308664723895 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900145, "Date": "7\/9\/2007", "Time": "12:41 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4440 W OLIVE ST", "Location": [ 43.094367, -87.969290 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.969289803912503, 43.094367449362259 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900150, "Date": "7\/9\/2007", "Time": "12:10 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3775 N 42ND ST", "Location": [ 43.085935, -87.965408 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.965407653644007, 43.085934502914199 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900170, "Date": "7\/9\/2007", "Time": "03:20 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "2968 N 36TH ST", "Location": [ 43.073028, -87.958494 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 3, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.958493860782696, 43.07302783236193 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900258, "Date": "7\/9\/2007", "Time": "09:39 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4256 N 40TH ST", "Location": [ 43.094726, -87.962845 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 1, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.962845360782694, 43.094725994171625 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890053, "Date": "7\/8\/2007", "Time": "04:56 AM", "Police District": 7, "Offense 1": "KIDNAPING", "Offense 2": "SIMPLE ASSAULT", "Offense 3": "TRESPASSING", "Address": "2813 N 47TH ST", "Location": [ 43.070121, -87.972388 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.972387566506768, 43.070120612268454 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890011, "Date": "7\/7\/2007", "Time": "11:51 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4477 N 41ST ST", "Location": [ 43.098796, -87.963970 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.963970099255349, 43.098796005828369 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870117, "Date": "7\/6\/2007", "Time": "02:22 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4345 N 46TH ST", "Location": [ 43.096348, -87.970319 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.970318564692761, 43.096348394495287 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870194, "Date": "7\/6\/2007", "Time": "11:06 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3222 N 26TH ST", "Location": [ 43.077518, -87.945923 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.945923411853116, 43.077517994171622 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850130, "Date": "7\/4\/2007", "Time": "02:54 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2974 N 26TH ST", "Location": [ 43.073036, -87.945994 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.945993856887554, 43.073036413266784 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860002, "Date": "7\/4\/2007", "Time": "11:48 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2535 W HOPKINS ST", "Location": [ 43.081989, -87.945222 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.945222214842019, 43.081988910612402 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840017, "Date": "7\/3\/2007", "Time": "12:40 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2718 W BURLEIGH ST", "Location": [ 43.075256, -87.947960 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.947960474464779, 43.075256467684099 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830135, "Date": "7\/2\/2007", "Time": "02:36 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2955 N 45TH ST", "Location": [ 43.072804, -87.969918 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.969917606468741, 43.072803586733215 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830179, "Date": "7\/2\/2007", "Time": "06:14 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2863 N 23RD ST", "Location": [ 43.071002, -87.941188 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.941187573720157, 43.071002025535222 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830225, "Date": "7\/2\/2007", "Time": "10:28 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "4576 N 45TH ST", "Location": [ 43.100585, -87.969306 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.969305846355979, 43.100585161809683 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820017, "Date": "7\/1\/2007", "Time": "12:04 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3125 N 25TH ST", "Location": [ 43.075827, -87.944791 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.944791099255355, 43.075826863725545 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110011, "Date": "7\/30\/2007", "Time": "12:33 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "1300-A S 25TH ST", "Location": [ 43.018002, -87.944943 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.944943386317917, 43.018002335276115 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110218, "Date": "7\/30\/2007", "Time": "05:42 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2417 W BURNHAM ST", "Location": [ 43.010325, -87.944251 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.944251112268446, 43.010324510098897 ] } },
{ "type": "Feature", "properties": { "Incident number": 72100019, "Date": "7\/29\/2007", "Time": "01:25 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "1024 S LAYTON BL", "Location": [ 43.020396, -87.947686 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.947686396849477, 43.020396 ] } },
{ "type": "Feature", "properties": { "Incident number": 72100196, "Date": "7\/29\/2007", "Time": "09:46 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "1046 S 23RD ST", "Location": [ 43.019982, -87.942175 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.942175451815075, 43.019982 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090021, "Date": "7\/28\/2007", "Time": "12:53 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "730 S 30TH ST", "Location": [ 43.023177, -87.951433 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.951433444601733, 43.023177335276138 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050023, "Date": "7\/24\/2007", "Time": "02:20 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1813 S 19TH ST", "Location": [ 43.010847, -87.936598 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.936597946044003, 43.010847398003328 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050036, "Date": "7\/24\/2007", "Time": "01:01 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2003 W ROGERS ST", "Location": [ 43.008417, -87.938271 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.938270779906503, 43.008416550637762 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020105, "Date": "7\/21\/2007", "Time": "11:04 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2419 S 28TH ST", "Location": [ 43.000831, -87.949341 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.949340599255351, 43.000830670552254 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020122, "Date": "7\/21\/2007", "Time": "11:44 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "1973 S 28TH ST", "Location": [ 43.008795, -87.949278 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.949277537076398, 43.008795167638056 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020193, "Date": "7\/21\/2007", "Time": "09:11 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2310 W BURNHAM ST", "Location": [ 43.010362, -87.942781 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.942780555369609, 43.010362486005967 ] } },
{ "type": "Feature", "properties": { "Incident number": 71980005, "Date": "7\/17\/2007", "Time": "12:21 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "3013 W PIERCE ST", "Location": [ 43.023841, -87.951950 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 2, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.951949962808015, 43.023840539529246 ] } },
{ "type": "Feature", "properties": { "Incident number": 71980212, "Date": "7\/17\/2007", "Time": "10:42 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2914 S 51ST ST", "Location": [ 42.991631, -87.977713 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.97771292627985, 42.991631161809686 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970089, "Date": "7\/16\/2007", "Time": "12:01 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2005 W BURNHAM ST", "Location": [ 43.010251, -87.938335 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.938334922009332, 43.01025053952926 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960068, "Date": "7\/15\/2007", "Time": "10:14 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "3118 W PIERCE ST #25", "Location": [ 43.023802, -87.953153 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 2, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.953152792544216, 43.023802468837964 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960197, "Date": "7\/15\/2007", "Time": "09:49 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "1815 S 37TH ST #UNIT0", "Location": [ 43.010776, -87.960388 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.960387559293423, 43.010776173466432 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950205, "Date": "7\/14\/2007", "Time": "11:03 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "1637 S 36TH ST #B", "Location": [ 43.013426, -87.958901 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.958900915603223, 43.013426276174286 ] } },
{ "type": "Feature", "properties": { "Incident number": 71930097, "Date": "7\/12\/2007", "Time": "01:15 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2439 W ROGERS ST #4", "Location": [ 43.008523, -87.944931 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.944931, 43.008522539529245 ] } },
{ "type": "Feature", "properties": { "Incident number": 71920171, "Date": "7\/11\/2007", "Time": "06:37 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "LIQUOR LAW VIOLATIONS", "Address": "2113-A W MITCHELL ST", "Location": [ 43.012376, -87.940053 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.940053335276133, 43.012376488458813 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910011, "Date": "7\/10\/2007", "Time": "12:58 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "767 S 24TH ST #APT2", "Location": [ 43.022673, -87.943610 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.943609569825, 43.022673 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910021, "Date": "7\/10\/2007", "Time": "02:20 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "1024 S 22ND ST", "Location": [ 43.020477, -87.940795 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.94079492627985, 43.020477 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910249, "Date": "7\/10\/2007", "Time": "09:32 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2029-A S 29TH ST", "Location": [ 43.007832, -87.950448 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.950447599255355, 43.007832167638071 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900023, "Date": "7\/9\/2007", "Time": "02:01 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2224 W MITCHELL ST", "Location": [ 43.012450, -87.941713 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.941713332361942, 43.012449511541213 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900025, "Date": "7\/9\/2007", "Time": "02:16 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "1222 S 24TH ST", "Location": [ 43.018515, -87.943556 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.943556411853123, 43.018515 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900229, "Date": "7\/9\/2007", "Time": "07:01 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "3529 W PIERCE ST #A", "Location": [ 43.023568, -87.958051 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 0, "e_clusterK9": 2, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.958050717260207, 43.023568029520533 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890176, "Date": "7\/8\/2007", "Time": "07:48 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "716 S 25TH ST", "Location": [ 43.023627, -87.944914 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.944914396849498, 43.023626832361934 ] } },
{ "type": "Feature", "properties": { "Incident number": 71980183, "Date": "7\/8\/2007", "Time": "06:56 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2900 W OKLAHOMA AV", "Location": [ 42.988589, -87.949431 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.94943116290527, 42.988589488313643 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860230, "Date": "7\/5\/2007", "Time": "06:21 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2734 S 44TH ST #LWR", "Location": [ 42.994844, -87.968964 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.968964470136953, 42.994844413266776 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860241, "Date": "7\/5\/2007", "Time": "06:28 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2953 W MITCHELL ST", "Location": [ 43.012402, -87.950973 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.950972720572153, 43.012402115427335 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850138, "Date": "7\/4\/2007", "Time": "03:50 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2608 W LAPHAM ST #UPR", "Location": [ 43.014236, -87.946574 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.946573636132072, 43.014235992244814 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840216, "Date": "7\/3\/2007", "Time": "09:45 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2031 W FOREST HOME AV", "Location": [ 43.006133, -87.939158 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.939158209244781, 43.006133390761306 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820030, "Date": "7\/1\/2007", "Time": "02:48 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2526 W LEGION ST #UPPER", "Location": [ 43.009307, -87.945984 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.945983832361946, 43.009306500432693 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090127, "Date": "7\/28\/2007", "Time": "12:50 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "6204 W THURSTON AV", "Location": [ 43.121209, -87.988580 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.988579606440069, 43.121209493219318 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090140, "Date": "7\/28\/2007", "Time": "12:21 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "9591 W ALLYN ST #10", "Location": [ 43.183532, -88.030246 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.030246064400629, 43.183531856483526 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090178, "Date": "7\/28\/2007", "Time": "07:34 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5700 N 62ND ST", "Location": [ 43.121380, -87.988304 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.988303772664494, 43.121379855675457 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060022, "Date": "7\/25\/2007", "Time": "01:17 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5419 W CALUMET RD", "Location": [ 43.155807, -87.979490 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.979490025535242, 43.155807477350308 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060163, "Date": "7\/25\/2007", "Time": "04:36 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "9096-E N 95TH ST", "Location": [ 43.183093, -88.027332 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.027331831380977, 43.183092991949898 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060242, "Date": "7\/25\/2007", "Time": "10:41 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "7907 N 64TH CT", "Location": [ 43.161414, -87.989604 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.989603712682268, 43.161414343024546 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050231, "Date": "7\/24\/2007", "Time": "08:42 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "9812 W DARNEL AV", "Location": [ 43.169233, -88.035012 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.035012, 43.169232518754548 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050260, "Date": "7\/24\/2007", "Time": "11:03 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Offense 3": "TRESPASSING", "Address": "9609 W ALLYN ST #6", "Location": [ 43.183830, -88.031626 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.031625720381953, 43.183829684950332 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030166, "Date": "7\/22\/2007", "Time": "05:18 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "8921 N SWAN RD", "Location": [ 43.179755, -88.024327 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.02432681594567, 43.179755321281299 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020150, "Date": "7\/21\/2007", "Time": "04:50 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "6323 W THURSTON AV", "Location": [ 43.121190, -87.990254 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.990254444630381, 43.121190470136959 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000015, "Date": "7\/19\/2007", "Time": "01:08 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "8750 W MILL RD #32", "Location": [ 43.134261, -88.021112 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.021112390645726, 43.13426050822298 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000089, "Date": "7\/19\/2007", "Time": "11:16 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "8110 W BROWN DEER RD", "Location": [ 43.178016, -88.010631 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.010630990947263, 43.178016031295606 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990018, "Date": "7\/18\/2007", "Time": "01:49 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Offense 3": "TRESPASSING", "Address": "9001 N 75TH ST #407", "Location": [ 43.182718, -88.002626 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.00262605940901, 43.182718480985649 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990159, "Date": "7\/18\/2007", "Time": "04:18 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "7057 N 55TH ST", "Location": [ 43.145946, -87.980560 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.980560149748896, 43.145945947544597 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970009, "Date": "7\/16\/2007", "Time": "12:18 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "8843 N 96TH ST #5", "Location": [ 43.178594, -88.030361 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.030361341245779, 43.178594046344394 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970180, "Date": "7\/16\/2007", "Time": "07:41 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "7919 N 60TH ST", "Location": [ 43.161724, -87.984960 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.984960221578433, 43.161724174656676 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970183, "Date": "7\/16\/2007", "Time": "07:19 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "6715 N 53RD ST", "Location": [ 43.139720, -87.978260 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.978260088146882, 43.139719508742587 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960007, "Date": "7\/15\/2007", "Time": "12:16 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "8808 W MILL RD #5", "Location": [ 43.134270, -88.021792 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.02179189064573, 43.134270482687761 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950005, "Date": "7\/13\/2007", "Time": "11:24 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5276 N 46TH ST", "Location": [ 43.113653, -87.970086 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.970085860782675, 43.113653413266775 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910151, "Date": "7\/10\/2007", "Time": "02:29 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "7979 N 66TH ST #9", "Location": [ 43.162488, -87.991819 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.991819211927833, 43.162487832361926 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900069, "Date": "7\/9\/2007", "Time": "07:04 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "5400 N 51ST BL", "Location": [ 43.115699, -87.976183 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.976183114296575, 43.11569878645588 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900242, "Date": "7\/9\/2007", "Time": "08:12 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "8511 W FAIRY CHASM DR #7", "Location": [ 43.184234, -88.015440 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.015440423567242, 43.184233898118904 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880121, "Date": "7\/7\/2007", "Time": "01:23 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "9041 N 75TH ST #7", "Location": [ 43.182624, -88.002608 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.00260815666941, 43.182624364180612 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880181, "Date": "7\/7\/2007", "Time": "06:06 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "9732 W BROWN DEER RD #6", "Location": [ 43.177965, -88.032620 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.032620021007659, 43.177965358932937 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850044, "Date": "7\/4\/2007", "Time": "01:48 AM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Offense 3": "MOTOR VEHICLE THEFT", "Address": "8463 N GRANVILLE RD", "Location": [ 43.171888, -88.039126 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.039126028766532, 43.171888465145294 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860028, "Date": "7\/4\/2007", "Time": "10:38 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "7612 W CALUMET RD #3", "Location": [ 43.156063, -88.005573 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.005572779906515, 43.156063486005962 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840134, "Date": "7\/3\/2007", "Time": "02:46 PM", "Police District": 4, "Offense 1": "SIMPLE ASSAULT", "Address": "6519 W BRADLEY RD #112", "Location": [ 43.163127, -87.991074 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.991074167638061, 43.163127484563674 ] } },
{ "type": "Feature", "properties": { "Incident number": 72100085, "Date": "7\/29\/2007", "Time": "10:30 AM", "Police District": 7, "Offense 1": "DISORDERLY CONDUCT", "Offense 2": "SIMPLE ASSAULT", "Address": "3740 N 61ST ST", "Location": [ 43.085376, -87.988265 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.988264886317921, 43.085376387731543 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090030, "Date": "7\/28\/2007", "Time": "02:28 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1741 N 55TH ST", "Location": [ 43.053956, -87.982014 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.982014347942595, 43.053955687403828 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050018, "Date": "7\/24\/2007", "Time": "01:17 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "6712 W FAIRVIEW AV", "Location": [ 43.031445, -87.996602 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.99660225, 43.031445172280492 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030074, "Date": "7\/22\/2007", "Time": "08:10 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "5000 W CHAMBERS ST", "Location": [ 43.073474, -87.976181 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.976181259074494, 43.073474483841593 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020091, "Date": "7\/21\/2007", "Time": "09:24 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3423 N 60TH ST", "Location": [ 43.081319, -87.987293 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.987292824888783, 43.081319204803407 ] } },
{ "type": "Feature", "properties": { "Incident number": 72010174, "Date": "7\/20\/2007", "Time": "09:14 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3911 N 67TH ST", "Location": [ 43.088320, -87.995880 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.995880077038365, 43.088320005828393 ] } },
{ "type": "Feature", "properties": { "Incident number": 72010187, "Date": "7\/20\/2007", "Time": "11:12 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "433 S 66TH ST", "Location": [ 43.027057, -87.994940 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.994940073720144, 43.027056723007689 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970081, "Date": "7\/16\/2007", "Time": "10:19 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2928 N 59TH ST", "Location": [ 43.072352, -87.986195 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.986194886317918, 43.072352413266771 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960138, "Date": "7\/15\/2007", "Time": "04:16 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "5000 W CHAMBERS ST", "Location": [ 43.073474, -87.976181 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.976181259074494, 43.073474483841593 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970003, "Date": "7\/15\/2007", "Time": "11:11 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "645 S 68TH ST", "Location": [ 43.024996, -87.997419 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.997419117577209, 43.02499550291418 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950175, "Date": "7\/14\/2007", "Time": "07:17 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2949 N 67TH ST", "Location": [ 43.072037, -87.996365 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.996364626624626, 43.072037274063121 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950199, "Date": "7\/14\/2007", "Time": "10:25 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "7240 W APPLETON AV", "Location": [ 43.087582, -88.002088 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.002088346904245, 43.087582182641704 ] } },
{ "type": "Feature", "properties": { "Incident number": 71930089, "Date": "7\/12\/2007", "Time": "10:22 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2681 N 62ND ST #2", "Location": [ 43.067554, -87.989749 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.98974863142702, 43.067553809336893 ] } },
{ "type": "Feature", "properties": { "Incident number": 71920059, "Date": "7\/11\/2007", "Time": "09:48 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2758 N 60TH ST", "Location": [ 43.069356, -87.987383 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.987383426279848, 43.069355832361936 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910202, "Date": "7\/10\/2007", "Time": "06:23 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "5300 W LOCUST ST", "Location": [ 43.071702, -87.979812 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.979812223424133, 43.071702223424161 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900231, "Date": "7\/9\/2007", "Time": "06:58 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "7240 W APPLETON AV #5", "Location": [ 43.087582, -88.002088 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.002088346904245, 43.087582182641704 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900262, "Date": "7\/9\/2007", "Time": "09:19 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "151 S 84TH ST", "Location": [ 43.030430, -88.017368 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.01736804111485, 43.030429643286283 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900265, "Date": "7\/9\/2007", "Time": "10:52 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2200 N 52ND ST", "Location": [ 43.059324, -87.978673 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.978672785142194, 43.059323979636709 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890173, "Date": "7\/8\/2007", "Time": "07:01 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "5000 W CHAMBERS ST", "Location": [ 43.073474, -87.976181 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.976181259074494, 43.073474483841593 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880039, "Date": "7\/7\/2007", "Time": "03:42 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3282 N 54TH ST", "Location": [ 43.078805, -87.980713 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.980712933493209, 43.078804994171627 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880059, "Date": "7\/7\/2007", "Time": "06:51 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1713 N 55TH ST", "Location": [ 43.053323, -87.982018 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.982017646286437, 43.05332276686476 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880063, "Date": "7\/7\/2007", "Time": "06:28 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2675 N 52ND ST #1", "Location": [ 43.067718, -87.978688 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.978688128108786, 43.067718167638084 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870144, "Date": "7\/6\/2007", "Time": "03:22 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "314 S 59TH ST", "Location": [ 43.028199, -87.986245 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.986245444601721, 43.028199 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870199, "Date": "7\/6\/2007", "Time": "11:40 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "6116 W LISBON AV #1", "Location": [ 43.069086, -87.989121 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.989120916597543, 43.069086277701054 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880007, "Date": "7\/6\/2007", "Time": "11:55 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "5712 W VLIET ST", "Location": [ 43.049750, -87.984367 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.984367220810697, 43.049749984719888 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860053, "Date": "7\/5\/2007", "Time": "05:31 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "5000 W CHAMBERS ST", "Location": [ 43.073474, -87.976181 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.976181259074494, 43.073474483841593 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860168, "Date": "7\/5\/2007", "Time": "03:11 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "6224 W STEVENSON ST", "Location": [ 43.032106, -87.990732 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.990731528449416, 43.032105511541204 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860257, "Date": "7\/5\/2007", "Time": "10:23 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2007 N 55TH ST", "Location": [ 43.056198, -87.981988 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.981987580933477, 43.056198 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870014, "Date": "7\/5\/2007", "Time": "04:25 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2140 N 58TH ST", "Location": [ 43.058106, -87.985253 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.985253411853137, 43.058106 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850093, "Date": "7\/4\/2007", "Time": "11:10 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "3877 N 68TH ST", "Location": [ 43.087924, -87.997140 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.997139599255348, 43.087923586733204 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850115, "Date": "7\/4\/2007", "Time": "01:59 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "6021 W STEVENSON ST", "Location": [ 43.032062, -87.988230 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.98823, 43.032062474032095 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850158, "Date": "7\/4\/2007", "Time": "06:50 PM", "Police District": 3, "Offense 1": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Offense 2": "SIMPLE ASSAULT", "Address": "2425 N 56TH ST", "Location": [ 43.063093, -87.983068 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.983067580933493, 43.063092586733227 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820193, "Date": "7\/1\/2007", "Time": "10:48 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "6824 W APPLETON AV #7", "Location": [ 43.082213, -87.997756 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.997755700502211, 43.082213331957924 ] } },
{ "type": "Feature", "properties": { "Incident number": 72070141, "Date": "7\/26\/2007", "Time": "12:41 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DISORDERLY CONDUCT", "Address": "3355 S 27TH ST", "Location": [ 42.984891, -87.948438 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.948437518897833, 42.984890912488318 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050004, "Date": "7\/24\/2007", "Time": "12:01 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "3840 S 43RD ST #23", "Location": [ 42.974533, -87.968054 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.968053911094515, 42.974532915282886 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050182, "Date": "7\/24\/2007", "Time": "05:13 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "7700 W MORGAN AV", "Location": [ 42.981097, -88.009551 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -88.009550832361953, 42.98109749321933 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030031, "Date": "7\/22\/2007", "Time": "01:55 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "7933 W HOWARD AV", "Location": [ 42.973731, -88.012713 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -88.012713441716201, 42.973730510098896 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990154, "Date": "7\/18\/2007", "Time": "03:56 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "3825 S MINER ST #8", "Location": [ 42.975259, -87.953808 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.953808356246483, 42.975258613491775 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970172, "Date": "7\/16\/2007", "Time": "05:52 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "3825 S MINER ST #8", "Location": [ 42.975259, -87.953808 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.953808356246483, 42.975258613491775 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960171, "Date": "7\/15\/2007", "Time": "07:51 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "3651 S 58TH ST", "Location": [ 42.978484, -87.986677 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.986676597037388, 42.978483953067162 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950115, "Date": "7\/14\/2007", "Time": "01:11 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "3894 S MINER ST", "Location": [ 42.974111, -87.953210 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.953209515557759, 42.974111082226784 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900249, "Date": "7\/9\/2007", "Time": "08:55 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "5011 W FOREST HOME AV", "Location": [ 42.983473, -87.976887 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.976887146113555, 42.983472846500185 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880015, "Date": "7\/7\/2007", "Time": "01:16 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "3300 S 27TH ST", "Location": [ 42.984702, -87.948126 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.948125944601728, 42.984702052455425 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840117, "Date": "7\/3\/2007", "Time": "01:19 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DISORDERLY CONDUCT", "Address": "4035 S 51ST ST", "Location": [ 42.971329, -87.978201 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.978200508222955, 42.97132900582838 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830117, "Date": "7\/2\/2007", "Time": "01:23 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "3808 S 48TH ST", "Location": [ 42.975677, -87.974094 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.974093830948291, 42.975677450198965 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900056, "Date": "7\/2\/2007", "Time": "02:07 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "2856 S 69TH ST", "Location": [ 42.992523, -87.998864 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.998864419066493, 42.992522832361935 ] } },
{ "type": "Feature", "properties": { "Incident number": 72130005, "Date": "7\/31\/2007", "Time": "10:57 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1535 W GREENFIELD AV", "Location": [ 43.017003, -87.931623 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.931623106440071, 43.017002510098898 ] } },
{ "type": "Feature", "properties": { "Incident number": 72130025, "Date": "7\/31\/2007", "Time": "10:24 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "922 S 11TH ST", "Location": [ 43.021620, -87.925283 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.925282948496857, 43.021619664723893 ] } },
{ "type": "Feature", "properties": { "Incident number": 72100011, "Date": "7\/29\/2007", "Time": "12:23 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1103 S 15TH ST", "Location": [ 43.020019, -87.930581 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.930580555398279, 43.020019424923532 ] } },
{ "type": "Feature", "properties": { "Incident number": 72080012, "Date": "7\/27\/2007", "Time": "01:13 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "921 W LAPHAM BL #320", "Location": [ 43.014082, -87.923354 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.9233535, 43.014081532315906 ] } },
{ "type": "Feature", "properties": { "Incident number": 72080021, "Date": "7\/27\/2007", "Time": "02:30 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "625 W HAYES AV", "Location": [ 43.001220, -87.919691 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.919691223007675, 43.001219536211032 ] } },
{ "type": "Feature", "properties": { "Incident number": 72080188, "Date": "7\/27\/2007", "Time": "10:34 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "738 W PIERCE ST", "Location": [ 43.024228, -87.920901 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.920900832361951, 43.024227504327847 ] } },
{ "type": "Feature", "properties": { "Incident number": 72070039, "Date": "7\/26\/2007", "Time": "05:54 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1555 S 6TH ST #LWR", "Location": [ 43.014816, -87.918490 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.918489573720151, 43.014816450458774 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060006, "Date": "7\/25\/2007", "Time": "12:56 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1414 W MADISON ST", "Location": [ 43.018080, -87.929852 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.929851667638047, 43.018079529863044 ] } },
{ "type": "Feature", "properties": { "Incident number": 72070013, "Date": "7\/25\/2007", "Time": "11:05 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "702 W BECHER ST", "Location": [ 43.006487, -87.920443 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.920443309740904, 43.006486514859411 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050007, "Date": "7\/24\/2007", "Time": "12:14 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1334 W HARRISON AV", "Location": [ 42.997643, -87.929541 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.929541136274452, 42.99764250043269 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050009, "Date": "7\/24\/2007", "Time": "12:19 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2470 S 9TH PL", "Location": [ 42.999722, -87.923622 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.923622470136948, 42.999722329447756 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050178, "Date": "7\/24\/2007", "Time": "05:12 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "1511 W LINCOLN AV", "Location": [ 43.002879, -87.931494 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.931494, 43.002879477350312 ] } },
{ "type": "Feature", "properties": { "Incident number": 72040138, "Date": "7\/23\/2007", "Time": "12:35 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "327 W NATIONAL AV", "Location": [ 43.023162, -87.914824 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.91482433803148, 43.023161838031498 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030101, "Date": "7\/22\/2007", "Time": "11:00 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2535 S 9TH PL", "Location": [ 42.998409, -87.923729 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.923728548184911, 42.998409031363622 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030128, "Date": "7\/22\/2007", "Time": "12:53 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "1217 S 18TH ST", "Location": [ 43.018614, -87.935569 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.935568566506774, 43.018614167638084 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020029, "Date": "7\/21\/2007", "Time": "01:27 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1208 S 15TH PL #A", "Location": [ 43.018704, -87.931812 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.931812386317915, 43.018704 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020172, "Date": "7\/21\/2007", "Time": "06:49 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2325 S 11TH ST", "Location": [ 43.002244, -87.926069 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.926068548184929, 43.002243670552254 ] } },
{ "type": "Feature", "properties": { "Incident number": 72010021, "Date": "7\/20\/2007", "Time": "02:14 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Offense 3": "DISORDERLY CONDUCT", "Address": "2025 S 15TH PL", "Location": [ 43.007735, -87.932289 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.932289000432675, 43.007734760199668 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000152, "Date": "7\/19\/2007", "Time": "03:52 PM", "Police District": 2, "Offense 1": "DISORDERLY CONDUCT", "Offense 2": "SIMPLE ASSAULT", "Address": "1209 S 7TH ST", "Location": [ 43.018786, -87.919791 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.919791069824996, 43.018786089647428 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000237, "Date": "7\/19\/2007", "Time": "10:21 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1223 W MADISON ST", "Location": [ 43.017993, -87.927111 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.927111221349776, 43.017993410278024 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000238, "Date": "7\/19\/2007", "Time": "09:16 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1524 S 15TH PL", "Location": [ 43.015445, -87.931853 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.931853404639782, 43.01544516180968 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970218, "Date": "7\/16\/2007", "Time": "09:53 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1554 S 8TH ST #444", "Location": [ 43.014994, -87.921132 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.921131770753689, 43.014993945943992 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950018, "Date": "7\/14\/2007", "Time": "12:04 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "921 W LAPHAM BL #320", "Location": [ 43.014082, -87.923354 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.9233535, 43.014081532315906 ] } },
{ "type": "Feature", "properties": { "Incident number": 71940204, "Date": "7\/13\/2007", "Time": "11:29 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2311 S 12TH ST", "Location": [ 43.002669, -87.927291 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.927291015791909, 43.002668607824447 ] } },
{ "type": "Feature", "properties": { "Incident number": 71930103, "Date": "7\/12\/2007", "Time": "02:29 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2023 S 15TH ST", "Location": [ 43.007708, -87.931048 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.931047518754539, 43.007707592561616 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880191, "Date": "7\/7\/2007", "Time": "09:03 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1338 W WINDLAKE AV", "Location": [ 43.003829, -87.929213 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.929212577586625, 43.003829440475457 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870002, "Date": "7\/6\/2007", "Time": "12:10 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "711 W HISTORIC MITCHELL ST", "Location": [ 43.012209, -87.920095 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92009479132706, 43.012208851922423 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870013, "Date": "7\/6\/2007", "Time": "12:07 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1019 W ORCHARD ST", "Location": [ 43.015944, -87.924275 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.924275300759604, 43.015943847186442 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870136, "Date": "7\/6\/2007", "Time": "03:58 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "644 S 9TH ST", "Location": [ 43.024429, -87.922424 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.922424411853129, 43.024428670552254 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870195, "Date": "7\/6\/2007", "Time": "10:37 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "959 W LINCOLN AV", "Location": [ 43.002827, -87.924060 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92406, 43.002827488458827 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850110, "Date": "7\/4\/2007", "Time": "01:35 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1835 S 12TH ST", "Location": [ 43.010226, -87.927022 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.927021573720154, 43.010226419095176 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850157, "Date": "7\/4\/2007", "Time": "07:11 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1813 S 8TH ST", "Location": [ 43.010689, -87.921378 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.921378281724174, 43.010689243407001 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840004, "Date": "7\/3\/2007", "Time": "12:07 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "922 S 21ST ST", "Location": [ 43.021215, -87.939404 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.939403907957995, 43.021215 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850009, "Date": "7\/3\/2007", "Time": "09:14 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2410 S 12TH ST", "Location": [ 43.000965, -87.927202 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92720243738836, 43.000965 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830069, "Date": "7\/2\/2007", "Time": "09:55 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2604 S 15TH ST #3", "Location": [ 42.997527, -87.931216 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.93121615149029, 42.997527139716844 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830205, "Date": "7\/2\/2007", "Time": "08:32 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1429 W MINERAL ST", "Location": [ 43.021126, -87.930220 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.930220332361941, 43.02112554674261 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820029, "Date": "7\/1\/2007", "Time": "02:09 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DISORDERLY CONDUCT", "Address": "725 W LAPHAM BL #24", "Location": [ 43.014036, -87.920593 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92059348458389, 43.014035849605904 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820036, "Date": "7\/1\/2007", "Time": "02:02 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1818 S 10TH ST #UPR", "Location": [ 43.010511, -87.924117 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92411668495032, 43.010510982514859 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820037, "Date": "7\/1\/2007", "Time": "02:34 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "510 W ORCHARD ST", "Location": [ 43.016057, -87.917283 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.917283, 43.016056500432704 ] } },
{ "type": "Feature", "properties": { "Incident number": 72130001, "Date": "7\/31\/2007", "Time": "10:47 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2258-B S 17TH ST", "Location": [ 43.003413, -87.934402 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.934402437388357, 43.003412717179316 ] } },
{ "type": "Feature", "properties": { "Incident number": 72080162, "Date": "7\/27\/2007", "Time": "07:22 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "3777 S 16TH ST", "Location": [ 42.975775, -87.934000 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.934000015436325, 42.975774838190318 ] } },
{ "type": "Feature", "properties": { "Incident number": 72070005, "Date": "7\/26\/2007", "Time": "12:02 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "4578 S 20TH ST", "Location": [ 42.961164, -87.938840 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.938839588978254, 42.961163967314434 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060007, "Date": "7\/24\/2007", "Time": "11:56 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "3005 W PARNELL AV #3", "Location": [ 42.941485, -87.953429 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.953429482110806, 42.941485049656819 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000010, "Date": "7\/19\/2007", "Time": "12:36 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1830 W GRANT ST", "Location": [ 43.004753, -87.936413 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.936412887731549, 43.004753453257386 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970011, "Date": "7\/16\/2007", "Time": "12:28 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2208 S 17TH ST", "Location": [ 43.004456, -87.934376 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.934376495672154, 43.004455742714526 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950038, "Date": "7\/14\/2007", "Time": "04:20 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "4747 S HOWELL AV #1123", "Location": [ 42.957314, -87.909819 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.909818540537927, 42.957313805441736 ] } },
{ "type": "Feature", "properties": { "Incident number": 71920081, "Date": "7\/11\/2007", "Time": "11:34 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "4610 S 20TH ST #1", "Location": [ 42.960515, -87.938831 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.938830815588034, 42.960514736438427 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910005, "Date": "7\/10\/2007", "Time": "12:33 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "TRESPASSING", "Address": "3005 W PARNELL AV #3", "Location": [ 42.941485, -87.953429 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.953429482110806, 42.941485049656819 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910005, "Date": "7\/10\/2007", "Time": "12:33 AM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "3005 W PARNELL AV #3", "Location": [ 42.941485, -87.953429 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.953429482110806, 42.941485049656819 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890145, "Date": "7\/8\/2007", "Time": "03:59 PM", "Police District": 6, "Offense 1": "SIMPLE ASSAULT", "Address": "4400 S 27TH ST", "Location": [ 42.964587, -87.948456 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.948455983409829, 42.964587009175283 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880034, "Date": "7\/7\/2007", "Time": "01:36 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "4747 S HOWELL AV", "Location": [ 42.957314, -87.909819 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.909818540537927, 42.957313805441736 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850122, "Date": "7\/4\/2007", "Time": "02:34 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "3145 S 17TH ST", "Location": [ 42.987268, -87.934928 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.934928073720144, 42.987267586733225 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820082, "Date": "7\/1\/2007", "Time": "10:33 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2441 S 18TH ST", "Location": [ 43.000300, -87.935609 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.935609088146862, 43.000299670552266 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090053, "Date": "7\/28\/2007", "Time": "05:56 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "3338 S WHITNALL AV #1", "Location": [ 42.983791, -87.905383 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.905382582809423, 42.983791292255773 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060176, "Date": "7\/25\/2007", "Time": "05:52 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2811 S 14TH ST", "Location": [ 42.993496, -87.930028 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.930028008222976, 42.993496089647408 ] } },
{ "type": "Feature", "properties": { "Incident number": 72040139, "Date": "7\/23\/2007", "Time": "12:44 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2864 S WENTWORTH AV", "Location": [ 42.992501, -87.883266 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.883266291130582, 42.992501321137887 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050005, "Date": "7\/23\/2007", "Time": "11:45 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1716 E BENNETT AV", "Location": [ 42.989129, -87.888162 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.888162069392322, 42.989129453257391 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020014, "Date": "7\/21\/2007", "Time": "01:34 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "245 W LINCOLN AV", "Location": [ 43.002832, -87.913584 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.913584, 43.002832487881896 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000119, "Date": "7\/19\/2007", "Time": "01:03 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2518 S 9TH ST", "Location": [ 42.998741, -87.922433 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92243341185312, 42.998741329447746 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990035, "Date": "7\/18\/2007", "Time": "04:18 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2479 S 5TH ST #B", "Location": [ 42.999786, -87.917009 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.917008555398269, 42.999785748542912 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990052, "Date": "7\/18\/2007", "Time": "07:36 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2221 S KINNICKINNIC AV", "Location": [ 43.004083, -87.905238 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.905237755640684, 43.004082668042095 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970021, "Date": "7\/16\/2007", "Time": "02:54 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2842 S 9TH PL", "Location": [ 42.992702, -87.923775 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.923775470136945, 42.992702161809682 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970025, "Date": "7\/16\/2007", "Time": "03:19 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2527 S 8TH ST", "Location": [ 42.998580, -87.921299 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.921298548184936, 42.998580419095155 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970039, "Date": "7\/16\/2007", "Time": "04:10 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "3633 S KANSAS AV #UPPER", "Location": [ 42.978339, -87.887101 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.887100602573582, 42.978339 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970195, "Date": "7\/16\/2007", "Time": "09:17 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2521 S LOGAN AV", "Location": [ 42.998995, -87.896758 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.89675755929342, 42.998994974464779 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960035, "Date": "7\/15\/2007", "Time": "03:49 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2226 S 4TH ST", "Location": [ 43.003988, -87.915464 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.915463991777045, 43.003987742714507 ] } },
{ "type": "Feature", "properties": { "Incident number": 71940040, "Date": "7\/13\/2007", "Time": "05:28 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "2345 S HOWELL AV #110", "Location": [ 43.001911, -87.904798 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.904798063188551, 43.001910586733224 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880122, "Date": "7\/7\/2007", "Time": "01:28 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2686 S 10TH ST", "Location": [ 42.995753, -87.924894 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.924893937388362, 42.995752994171632 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860062, "Date": "7\/5\/2007", "Time": "07:03 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "1802 E HOWARD AV #1", "Location": [ 42.973759, -87.886872 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.886872, 42.973759486005967 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840188, "Date": "7\/3\/2007", "Time": "06:36 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "3164 S GRIFFIN AV", "Location": [ 42.986808, -87.903972 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.903972462923591, 42.986807664723862 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840210, "Date": "7\/3\/2007", "Time": "11:19 PM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2264 S KINNICKINNIC AV", "Location": [ 43.003489, -87.904679 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.904678758786034, 43.003489379133207 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830023, "Date": "7\/2\/2007", "Time": "01:58 AM", "Police District": 2, "Offense 1": "SIMPLE ASSAULT", "Address": "2670 S 8TH ST", "Location": [ 42.996104, -87.921253 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.921253437388359, 42.996103742714531 ] } },
{ "type": "Feature", "properties": { "Incident number": 72110270, "Date": "7\/30\/2007", "Time": "11:09 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2148 N 35TH ST APT A", "Location": [ 43.058465, -87.957522 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.957522422384699, 43.05846549708582 ] } },
{ "type": "Feature", "properties": { "Incident number": 72100129, "Date": "7\/29\/2007", "Time": "03:11 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2719 N 11TH ST", "Location": [ 43.068133, -87.925420 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.925420092042003, 43.068132754371284 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090042, "Date": "7\/28\/2007", "Time": "03:15 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1923 N 24TH ST", "Location": [ 43.055326, -87.942701 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.942700632003962, 43.055325502914201 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090148, "Date": "7\/28\/2007", "Time": "02:58 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2523 N 33RD ST", "Location": [ 43.064659, -87.955266 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.955266494196124, 43.064659306845286 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090168, "Date": "7\/28\/2007", "Time": "05:36 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1517 W CENTER ST", "Location": [ 43.067699, -87.931944 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.931944251457097, 43.067698513994038 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090169, "Date": "7\/28\/2007", "Time": "04:58 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1517 W CENTER ST", "Location": [ 43.067699, -87.931944 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.931944251457097, 43.067698513994038 ] } },
{ "type": "Feature", "properties": { "Incident number": 72090193, "Date": "7\/28\/2007", "Time": "08:04 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1327 W CHERRY ST", "Location": [ 43.049939, -87.929504 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.929504193173301, 43.049939481245438 ] } },
{ "type": "Feature", "properties": { "Incident number": 72080035, "Date": "7\/27\/2007", "Time": "04:29 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1724 N 37TH ST", "Location": [ 43.052878, -87.959933 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.95993336410092, 43.052877555369605 ] } },
{ "type": "Feature", "properties": { "Incident number": 72080051, "Date": "7\/27\/2007", "Time": "10:20 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2519 N 48TH ST", "Location": [ 43.064749, -87.973759 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.973758573720147, 43.064748586733224 ] } },
{ "type": "Feature", "properties": { "Incident number": 72080140, "Date": "7\/27\/2007", "Time": "08:06 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "920 W NORTH AV", "Location": [ 43.060382, -87.923263 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.923263164723878, 43.060382453257382 ] } },
{ "type": "Feature", "properties": { "Incident number": 72080197, "Date": "7\/27\/2007", "Time": "10:11 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2140 N 26TH ST", "Location": [ 43.058749, -87.946211 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.946211237911072, 43.058749137704801 ] } },
{ "type": "Feature", "properties": { "Incident number": 72080008, "Date": "7\/26\/2007", "Time": "10:54 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2353 N 39TH ST", "Location": [ 43.061635, -87.962337 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.96233681000362, 43.061634541967891 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060068, "Date": "7\/25\/2007", "Time": "08:46 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2161 N 36TH ST", "Location": [ 43.058763, -87.958781 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.958781080933477, 43.05876341909515 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060146, "Date": "7\/25\/2007", "Time": "01:32 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2714 N 29TH ST", "Location": [ 43.068295, -87.949803 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.949802846355951, 43.068295225921872 ] } },
{ "type": "Feature", "properties": { "Incident number": 72060197, "Date": "7\/25\/2007", "Time": "07:14 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1845 N 39TH ST", "Location": [ 43.054263, -87.962422 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.962421580933494, 43.05426286372554 ] } },
{ "type": "Feature", "properties": { "Incident number": 72070006, "Date": "7\/25\/2007", "Time": "11:38 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2570 N 38TH ST", "Location": [ 43.065828, -87.960993 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.960993393531268, 43.065827664723891 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050008, "Date": "7\/24\/2007", "Time": "12:32 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2354 N 16TH ST", "Location": [ 43.061661, -87.932563 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.932562911853125, 43.061661303912537 ] } },
{ "type": "Feature", "properties": { "Incident number": 72050130, "Date": "7\/24\/2007", "Time": "01:16 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1433 W NORTH AV", "Location": [ 43.060397, -87.930944 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 2, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.93094444463037, 43.060397481245438 ] } },
{ "type": "Feature", "properties": { "Incident number": 72040130, "Date": "7\/23\/2007", "Time": "11:40 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2638 N 49TH ST", "Location": [ 43.067007, -87.974896 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.974896360782694, 43.067007387731572 ] } },
{ "type": "Feature", "properties": { "Incident number": 72040152, "Date": "7\/23\/2007", "Time": "02:31 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1210 W WRIGHT ST", "Location": [ 43.064011, -87.927183 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.927183, 43.064010533181289 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030038, "Date": "7\/22\/2007", "Time": "03:09 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1720 W CLARKE ST", "Location": [ 43.065928, -87.934531 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.934531080904833, 43.065927511541183 ] } },
{ "type": "Feature", "properties": { "Incident number": 72030097, "Date": "7\/22\/2007", "Time": "10:42 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1829 W WRIGHT ST", "Location": [ 43.064092, -87.936021 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.93602116763806, 43.064092499567309 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020017, "Date": "7\/21\/2007", "Time": "01:46 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2367 N 47TH ST", "Location": [ 43.062102, -87.972501 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.972501124790568, 43.062102251457112 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020047, "Date": "7\/21\/2007", "Time": "04:43 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2419 W CENTER ST", "Location": [ 43.067862, -87.942932 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.942932444630401, 43.067861510098894 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020048, "Date": "7\/21\/2007", "Time": "04:43 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2419 W CENTER ST", "Location": [ 43.067862, -87.942932 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.942932444630401, 43.067861510098894 ] } },
{ "type": "Feature", "properties": { "Incident number": 72020119, "Date": "7\/21\/2007", "Time": "04:00 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2622 N 48TH ST", "Location": [ 43.066539, -87.973663 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.973662864100916, 43.066538832361935 ] } },
{ "type": "Feature", "properties": { "Incident number": 72010006, "Date": "7\/20\/2007", "Time": "12:24 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2366 N 15TH ST", "Location": [ 43.061796, -87.931322 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.931322364100907, 43.061795580904857 ] } },
{ "type": "Feature", "properties": { "Incident number": 72010138, "Date": "7\/20\/2007", "Time": "05:36 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2237 N 33RD ST", "Location": [ 43.060095, -87.955158 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.955157606468717, 43.060095335276117 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000013, "Date": "7\/19\/2007", "Time": "12:41 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2339 N 37TH ST", "Location": [ 43.061444, -87.959931 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.959931132003931, 43.061444025535224 ] } },
{ "type": "Feature", "properties": { "Incident number": 72000025, "Date": "7\/19\/2007", "Time": "02:35 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1360 W FOND DU LAC AV", "Location": [ 43.054203, -87.929864 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.929864494142947, 43.0542027541115 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990023, "Date": "7\/18\/2007", "Time": "03:23 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2915 W BROWN ST", "Location": [ 43.056376, -87.950511 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.950511251457101, 43.056375539529249 ] } },
{ "type": "Feature", "properties": { "Incident number": 71990203, "Date": "7\/18\/2007", "Time": "07:47 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2420 W MEDFORD AV #A", "Location": [ 43.062221, -87.942902 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 3, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.942901512464815, 43.062220779646722 ] } },
{ "type": "Feature", "properties": { "Incident number": 71980121, "Date": "7\/17\/2007", "Time": "03:20 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2027 N 35TH ST", "Location": [ 43.057099, -87.957621 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.957621139217324, 43.057098502914194 ] } },
{ "type": "Feature", "properties": { "Incident number": 71980143, "Date": "7\/17\/2007", "Time": "04:51 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "3912 W CHERRY ST", "Location": [ 43.050182, -87.962463 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.962462748542904, 43.05018246768411 ] } },
{ "type": "Feature", "properties": { "Incident number": 71980158, "Date": "7\/17\/2007", "Time": "06:50 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "3538 W VLIET ST", "Location": [ 43.048777, -87.958831 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.958831499999988, 43.048777493219326 ] } },
{ "type": "Feature", "properties": { "Incident number": 71980201, "Date": "7\/17\/2007", "Time": "10:35 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2674 N 36TH ST", "Location": [ 43.067664, -87.958565 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.958565404639756, 43.06766438773154 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970198, "Date": "7\/16\/2007", "Time": "09:49 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2425 N 16TH ST", "Location": [ 43.062705, -87.932620 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.932619595360222, 43.062705251457089 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970199, "Date": "7\/16\/2007", "Time": "09:12 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2843 N 28TH ST", "Location": [ 43.070598, -87.948630 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.948630077038359, 43.070598335276117 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970207, "Date": "7\/16\/2007", "Time": "11:00 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "1843 N 12TH ST", "Location": [ 43.054739, -87.927039 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 5, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.9270391392173, 43.054739360811368 ] } },
{ "type": "Feature", "properties": { "Incident number": 71970210, "Date": "7\/16\/2007", "Time": "09:58 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2608 W MEDFORD AV", "Location": [ 43.064966, -87.946340 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.946340188701228, 43.064966418835361 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960085, "Date": "7\/15\/2007", "Time": "11:48 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "920 N 37TH ST", "Location": [ 43.042123, -87.959605 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.959605382422765, 43.042122974464768 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960109, "Date": "7\/15\/2007", "Time": "03:18 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1733 N 22ND ST", "Location": [ 43.053527, -87.940208 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.94020835501162, 43.053527294477469 ] } },
{ "type": "Feature", "properties": { "Incident number": 71960144, "Date": "7\/15\/2007", "Time": "05:38 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1633 N 36TH ST", "Location": [ 43.052157, -87.958829 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.958829109786947, 43.052156832361931 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950022, "Date": "7\/14\/2007", "Time": "01:33 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2679 N 30TH ST", "Location": [ 43.067754, -87.951122 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.951121646430678, 43.067754335276135 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950040, "Date": "7\/14\/2007", "Time": "05:03 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2154 N 28TH ST", "Location": [ 43.058898, -87.948652 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.948652382422765, 43.058897580904848 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950060, "Date": "7\/14\/2007", "Time": "10:52 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1531 N 38TH ST", "Location": [ 43.050834, -87.960799 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.960799113682057, 43.050834 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950080, "Date": "7\/14\/2007", "Time": "10:24 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "2644 N 9TH ST", "Location": [ 43.066782, -87.922604 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.922604411853129, 43.066781664723862 ] } },
{ "type": "Feature", "properties": { "Incident number": 71940093, "Date": "7\/13\/2007", "Time": "11:16 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2418 N 45TH ST", "Location": [ 43.062894, -87.969952 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.96995235356934, 43.062893664723866 ] } },
{ "type": "Feature", "properties": { "Incident number": 71940094, "Date": "7\/13\/2007", "Time": "11:53 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2766-A N 35TH ST", "Location": [ 43.069383, -87.957366 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.95736639353126, 43.069382832361953 ] } },
{ "type": "Feature", "properties": { "Incident number": 71950002, "Date": "7\/13\/2007", "Time": "11:01 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "ALL OTHER OFFENSES", "Address": "2306 N 32ND ST", "Location": [ 43.060789, -87.953952 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.953951551899053, 43.060789211560198 ] } },
{ "type": "Feature", "properties": { "Incident number": 71930049, "Date": "7\/12\/2007", "Time": "09:30 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "2361 N 44TH ST", "Location": [ 43.061859, -87.968880 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.968880077038364, 43.061859167638062 ] } },
{ "type": "Feature", "properties": { "Incident number": 71930100, "Date": "7\/12\/2007", "Time": "02:00 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2600A N 38TH ST", "Location": [ 43.066100, -87.960974 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.960973565548628, 43.066100249985894 ] } },
{ "type": "Feature", "properties": { "Incident number": 71920144, "Date": "7\/11\/2007", "Time": "04:44 PM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1007 W HADLEY ST", "Location": [ 43.069430, -87.924213 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.924213167638058, 43.069430495672187 ] } },
{ "type": "Feature", "properties": { "Incident number": 71920181, "Date": "7\/11\/2007", "Time": "05:59 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1931 N 38TH ST", "Location": [ 43.055668, -87.961200 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.961199635322174, 43.05566750291419 ] } },
{ "type": "Feature", "properties": { "Incident number": 71910221, "Date": "7\/10\/2007", "Time": "07:54 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2604 N 41ST ST", "Location": [ 43.066124, -87.964492 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.964492382422776, 43.066124025535231 ] } },
{ "type": "Feature", "properties": { "Incident number": 71900169, "Date": "7\/9\/2007", "Time": "01:42 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1600 N 35TH ST", "Location": [ 43.051617, -87.957596 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.957595893531291, 43.051617 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890114, "Date": "7\/8\/2007", "Time": "01:45 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "3124 W GALENA ST #UPPER", "Location": [ 43.051547, -87.953232 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.953232355654848, 43.051547189366424 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890116, "Date": "7\/8\/2007", "Time": "11:51 AM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2823 N 20TH ST", "Location": [ 43.070193, -87.937492 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.937491580933496, 43.070192863725538 ] } },
{ "type": "Feature", "properties": { "Incident number": 71890179, "Date": "7\/8\/2007", "Time": "08:05 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2523 N 36TH ST", "Location": [ 43.064775, -87.958681 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.958681106468717, 43.064775167638061 ] } },
{ "type": "Feature", "properties": { "Incident number": 71880040, "Date": "7\/7\/2007", "Time": "02:40 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1200 W WALNUT ST", "Location": [ 43.052784, -87.927140 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.927140345942405, 43.052783542703686 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870024, "Date": "7\/6\/2007", "Time": "03:02 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "3529 W CLARKE ST", "Location": [ 43.066036, -87.958323 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.958323, 43.066036499567318 ] } },
{ "type": "Feature", "properties": { "Incident number": 71870041, "Date": "7\/6\/2007", "Time": "12:10 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2333 N 49TH ST", "Location": [ 43.061480, -87.974837 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.974836913640729, 43.061479796795332 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860031, "Date": "7\/5\/2007", "Time": "02:31 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1341 W CENTER ST", "Location": [ 43.067654, -87.928864 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.928863868024706, 43.067654488458793 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860033, "Date": "7\/5\/2007", "Time": "02:54 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "928 W MEINECKE AV #2", "Location": [ 43.062173, -87.923763 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.923762832361945, 43.062172500432681 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860043, "Date": "7\/5\/2007", "Time": "04:16 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Offense 2": "ALL OTHER OFFENSES", "Address": "1427 W WRIGHT ST", "Location": [ 43.063997, -87.930873 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.930873335276132, 43.063997481245444 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860047, "Date": "7\/5\/2007", "Time": "04:58 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1922 N 37TH ST", "Location": [ 43.055495, -87.959924 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.959923970136941, 43.055495046627037 ] } },
{ "type": "Feature", "properties": { "Incident number": 71860066, "Date": "7\/5\/2007", "Time": "04:16 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1427 W WRIGHT ST", "Location": [ 43.063997, -87.930873 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.930873335276132, 43.063997481245444 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850018, "Date": "7\/4\/2007", "Time": "01:29 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2055-A N 31ST ST", "Location": [ 43.057630, -87.952569 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.952568613682075, 43.057629502914182 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850034, "Date": "7\/4\/2007", "Time": "03:12 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2357 N 38TH ST", "Location": [ 43.061678, -87.961123 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.961123209497757, 43.061678067262037 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850038, "Date": "7\/4\/2007", "Time": "02:18 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2638 N 19TH ST", "Location": [ 43.066845, -87.936195 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.93619538631792, 43.066844664723867 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850046, "Date": "7\/4\/2007", "Time": "03:57 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2333 N 49TH ST", "Location": [ 43.061480, -87.974837 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.974836913640729, 43.061479796795332 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850154, "Date": "7\/4\/2007", "Time": "06:40 PM", "Police District": 3, "Offense 1": "DISORDERLY CONDUCT", "Offense 2": "SIMPLE ASSAULT", "Address": "1621 N 38TH ST", "Location": [ 43.050585, -87.960819 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.960819347972659, 43.050585228592155 ] } },
{ "type": "Feature", "properties": { "Incident number": 71850185, "Date": "7\/4\/2007", "Time": "10:12 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2631 N 35TH ST", "Location": [ 43.066828, -87.957458 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.957458080933478, 43.06682750291418 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840048, "Date": "7\/3\/2007", "Time": "07:28 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2336 N 51ST ST #2", "Location": [ 43.061321, -87.977478 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.977478385467592, 43.061321320020411 ] } },
{ "type": "Feature", "properties": { "Incident number": 71840205, "Date": "7\/3\/2007", "Time": "08:54 PM", "Police District": 7, "Offense 1": "SIMPLE ASSAULT", "Address": "2800 N 21ST ST", "Location": [ 43.069682, -87.938613 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.938613299772754, 43.069682488455847 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830077, "Date": "7\/2\/2007", "Time": "11:11 AM", "Police District": 5, "Offense 1": "SIMPLE ASSAULT", "Address": "1402 W MEINECKE AV", "Location": [ 43.062584, -87.930342 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.930341832361947, 43.062584467684118 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830152, "Date": "7\/2\/2007", "Time": "04:43 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2234 N 26TH ST", "Location": [ 43.060023, -87.946222 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.946222360782699, 43.060023 ] } },
{ "type": "Feature", "properties": { "Incident number": 71830200, "Date": "7\/2\/2007", "Time": "07:44 PM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "1963 N 36TH ST", "Location": [ 43.056145, -87.958802 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.958801632003954, 43.056144670552271 ] } },
{ "type": "Feature", "properties": { "Incident number": 71820023, "Date": "7\/1\/2007", "Time": "12:53 AM", "Police District": 3, "Offense 1": "SIMPLE ASSAULT", "Address": "2628 N 20TH ST", "Location": [ 43.066619, -87.937494 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 3, "g_clusterK6": 5, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.937493875209412, 43.066619245628722 ] } }
]
}
| marquettecomputationalsocialscience/clusteredcrimemaps | individual_work/marielle/KMeans/datamound/data_2007-simpleassault_jul.js | JavaScript | mit | 381,129 |
'use strict';
// Declare app level module which depends on views, and components
angular.module('sidecar', [
'ngRoute',
'sidecar.services',
// 'sidecar.version'
]).
config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
$locationProvider.hashPrefix('!');
$routeProvider.otherwise({redirectTo: '/services'});
}]);
| newrelic/sidecar | ui/app/app.js | JavaScript | mit | 362 |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _assetloader = require('./assetloader');
var _assetloader2 = _interopRequireDefault(_assetloader);
var _input = require('./input');
var _input2 = _interopRequireDefault(_input);
var _loop = require('./loop');
var _loop2 = _interopRequireDefault(_loop);
var _log = require('./log');
var _log2 = _interopRequireDefault(_log);
var _timer = require('./timer');
var _timer2 = _interopRequireDefault(_timer);
var _math = require('./math');
var _math2 = _interopRequireDefault(_math);
var _types = require('./types');
var _types2 = _interopRequireDefault(_types);
'use strict';
exports['default'] = {
AssetLoader: _assetloader2['default'],
Input: _input2['default'],
Loop: _loop2['default'],
Log: _log2['default'],
Timer: _timer2['default'],
Math: _math2['default'],
Types: _types2['default']
};
module.exports = exports['default']; | freezedev/gamebox | dist/common/index.js | JavaScript | mit | 1,038 |
'use strict';
//Contacts service used to communicate Contacts REST endpoints
angular.module('contacts').factory('Contacts', ['$resource',
function ($resource) {
return $resource('api/v1/contacts/:contactId', {
contactId: '@_id'
}, {
update: {
method: 'PUT'
}
});
}
]);
| steven-st-james/mapping-slc | modules/contacts/client/services/contacts.client.service.js | JavaScript | mit | 312 |
module.exports = {
bundle_id: 'app',
webpack_config: {
entry: './assets/src/app.js',
},
};
| indirectlylit/kolibri | kolibri/plugins/setup_wizard/buildConfig.js | JavaScript | mit | 101 |
var debugpp = require('..');
var debugSystem = debugpp.debug('system', true);
var debugSystemTest = debugpp.debug('system.test', true);
debugSystem.log("Hello system!");
debugSystemTest.log("Hello system test!");
debugSystemTest.log("World");
debugSystemTest.warn("Hm?!");
debugSystemTest.error("Huston!!!"); | mprinc/KnAllEdge | src/frontend/dev_puzzles/knalledge/core/lib/debugpp/demo/index.js | JavaScript | mit | 311 |
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "Incident number": 80300014, "Date": "1\/30\/2008", "Time": "02:56 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "3927 W VILLARD AV", "Location": [ 43.111886, -87.962243 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.9622425, 43.111886481245442 ] } },
{ "type": "Feature", "properties": { "Incident number": 80300143, "Date": "1\/30\/2008", "Time": "10:10 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "2131 W ROOSEVELT DR", "Location": [ 43.096628, -87.939128 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.939127792659804, 43.096628285302202 ] } },
{ "type": "Feature", "properties": { "Incident number": 80290085, "Date": "1\/29\/2008", "Time": "01:18 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "4364 N 15TH ST", "Location": [ 43.096136, -87.929239 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.929239063473133, 43.096136111328256 ] } },
{ "type": "Feature", "properties": { "Incident number": 80280021, "Date": "1\/28\/2008", "Time": "04:10 AM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "2430 W ATKINSON AV", "Location": [ 43.094219, -87.942587 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.942586674418735, 43.09421945741235 ] } },
{ "type": "Feature", "properties": { "Incident number": 80270051, "Date": "1\/27\/2008", "Time": "10:57 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "5173 N 35TH ST", "Location": [ 43.111405, -87.956458 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.956457650325788, 43.111404838190317 ] } },
{ "type": "Feature", "properties": { "Incident number": 80270135, "Date": "1\/27\/2008", "Time": "10:19 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4375 N 27TH ST", "Location": [ 43.096879, -87.946831 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.94683063589909, 43.096878922009353 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260037, "Date": "1\/26\/2008", "Time": "03:55 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "3709 W VILLARD AV", "Location": [ 43.111877, -87.959231 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.959231276992327, 43.111876506780675 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260057, "Date": "1\/26\/2008", "Time": "07:22 AM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "4519 N GREEN BAY AV", "Location": [ 43.099242, -87.928585 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.928584679496382, 43.099242056062117 ] } },
{ "type": "Feature", "properties": { "Incident number": 80240005, "Date": "1\/23\/2008", "Time": "10:46 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "2002 W CAPITOL DR", "Location": [ 43.089697, -87.937340 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.9373399715506, 43.089697486005967 ] } },
{ "type": "Feature", "properties": { "Incident number": 80210010, "Date": "1\/21\/2008", "Time": "02:00 AM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "3200 W SILVER SPRING DR", "Location": [ 43.119336, -87.952744 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.952744471863113, 43.119336389154704 ] } },
{ "type": "Feature", "properties": { "Incident number": 80170200, "Date": "1\/17\/2008", "Time": "06:29 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4820 N 45TH ST", "Location": [ 43.105078, -87.968970 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.968969618557509, 43.105077536552976 ] } },
{ "type": "Feature", "properties": { "Incident number": 80180004, "Date": "1\/17\/2008", "Time": "10:55 PM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "3501 W SILVER SPRING DR", "Location": [ 43.119031, -87.956823 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.956822727595025, 43.119030681503666 ] } },
{ "type": "Feature", "properties": { "Incident number": 80130043, "Date": "1\/13\/2008", "Time": "03:15 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "5000 N 35TH ST", "Location": [ 43.108259, -87.956464 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.956464363523978, 43.108259030238436 ] } },
{ "type": "Feature", "properties": { "Incident number": 80130172, "Date": "1\/13\/2008", "Time": "04:39 PM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "5681 N 35TH ST", "Location": [ 43.120980, -87.956222 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.956221617577228, 43.120980031363622 ] } },
{ "type": "Feature", "properties": { "Incident number": 80130173, "Date": "1\/13\/2008", "Time": "05:37 PM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "5945 N TEUTONIA AV", "Location": [ 43.125521, -87.951790 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.951790159905087, 43.125521354146258 ] } },
{ "type": "Feature", "properties": { "Incident number": 80120147, "Date": "1\/12\/2008", "Time": "04:08 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "2500 W CAPITOL DR", "Location": [ 43.089841, -87.944913 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.944912664723873, 43.089841486005973 ] } },
{ "type": "Feature", "properties": { "Incident number": 80090175, "Date": "1\/9\/2008", "Time": "06:29 PM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "1935 W SILVER SPRING DR #2", "Location": [ 43.118885, -87.936551 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.936550637803691, 43.118884542847489 ] } },
{ "type": "Feature", "properties": { "Incident number": 80090188, "Date": "1\/9\/2008", "Time": "07:28 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4833 N 42ND ST", "Location": [ 43.105322, -87.965124 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.965123710418439, 43.105322122889547 ] } },
{ "type": "Feature", "properties": { "Incident number": 80080011, "Date": "1\/8\/2008", "Time": "12:16 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4803 N TEUTONIA AV", "Location": [ 43.104605, -87.946710 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.946709780169357, 43.104605082798578 ] } },
{ "type": "Feature", "properties": { "Incident number": 80080083, "Date": "1\/8\/2008", "Time": "05:57 PM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "3303 W CUSTER AV", "Location": [ 43.115512, -87.954111 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.954110528449419, 43.115511532315892 ] } },
{ "type": "Feature", "properties": { "Incident number": 80060181, "Date": "1\/6\/2008", "Time": "07:06 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4964 N 53RD ST", "Location": [ 43.107930, -87.978762 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 6, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.978762379104538, 43.107929664723883 ] } },
{ "type": "Feature", "properties": { "Incident number": 80060194, "Date": "1\/6\/2008", "Time": "07:12 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "1950 W COURTLAND AV", "Location": [ 43.102618, -87.935442 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.935441693931196, 43.102617824024755 ] } },
{ "type": "Feature", "properties": { "Incident number": 80050184, "Date": "1\/5\/2008", "Time": "07:46 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "4827 N 18TH ST", "Location": [ 43.104996, -87.932949 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.932949132003955, 43.104996450458778 ] } },
{ "type": "Feature", "properties": { "Incident number": 80060018, "Date": "1\/5\/2008", "Time": "11:45 PM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "2706 W BOBOLINK AV", "Location": [ 43.124564, -87.946159 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.946158637948585, 43.124563962231242 ] } },
{ "type": "Feature", "properties": { "Incident number": 80040142, "Date": "1\/4\/2008", "Time": "11:47 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "3700 W HAMPTON AV", "Location": [ 43.104722, -87.959181 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.95918112745089, 43.104721857800428 ] } },
{ "type": "Feature", "properties": { "Incident number": 80310057, "Date": "1\/31\/2008", "Time": "09:20 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "7931 W VILLARD AV", "Location": [ 43.112222, -88.010311 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.010311416180969, 43.112221535634106 ] } },
{ "type": "Feature", "properties": { "Incident number": 80270077, "Date": "1\/27\/2008", "Time": "03:45 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "5526 W FOND DU LAC AV", "Location": [ 43.094957, -87.982573 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.982572789457151, 43.094956870679113 ] } },
{ "type": "Feature", "properties": { "Incident number": 80280002, "Date": "1\/27\/2008", "Time": "08:09 PM", "Police District": 4, "Offense 1": "KIDNAPING", "Offense 2": "ROBBERY", "Address": "5250 N 90TH ST", "Location": [ 43.113259, -88.024443 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.02444304284748, 43.113258733279466 ] } },
{ "type": "Feature", "properties": { "Incident number": 80250090, "Date": "1\/25\/2008", "Time": "12:09 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "5182 N 76TH ST", "Location": [ 43.111939, -88.005928 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.005928364556141, 43.111939254662794 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260001, "Date": "1\/25\/2008", "Time": "09:53 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4029 N 72ND ST", "Location": [ 43.090678, -88.001840 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.00183963200395, 43.090677723007673 ] } },
{ "type": "Feature", "properties": { "Incident number": 80240117, "Date": "1\/24\/2008", "Time": "05:30 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "9009 W VILLARD AV", "Location": [ 43.112027, -88.023831 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.023831109614051, 43.112027139304217 ] } },
{ "type": "Feature", "properties": { "Incident number": 80230167, "Date": "1\/23\/2008", "Time": "08:08 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "7600 W HAMPTON AV", "Location": [ 43.105146, -88.006664 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.006663765992869, 43.105146265992886 ] } },
{ "type": "Feature", "properties": { "Incident number": 80220158, "Date": "1\/22\/2008", "Time": "09:08 PM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "7141 W GRANTOSA CT", "Location": [ 43.113117, -88.000258 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.000258340239128, 43.113117290034076 ] } },
{ "type": "Feature", "properties": { "Incident number": 80170131, "Date": "1\/17\/2008", "Time": "11:39 AM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "8135 W FLORIST AV", "Location": [ 43.126796, -88.012720 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.012719723007677, 43.126795505049905 ] } },
{ "type": "Feature", "properties": { "Incident number": 80160087, "Date": "1\/16\/2008", "Time": "07:00 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "7540 W CAPITOL DR", "Location": [ 43.090032, -88.006621 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.0066215, 43.090032475474395 ] } },
{ "type": "Feature", "properties": { "Incident number": 80140196, "Date": "1\/14\/2008", "Time": "07:27 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "6175 W HOPE AV", "Location": [ 43.093542, -87.989061 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 0, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.989060596217726, 43.093541748586794 ] } },
{ "type": "Feature", "properties": { "Incident number": 80130109, "Date": "1\/13\/2008", "Time": "11:36 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "7320 W CAPITOL DR", "Location": [ 43.090071, -88.003141 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.003141186879162, 43.090071246795816 ] } },
{ "type": "Feature", "properties": { "Incident number": 80090049, "Date": "1\/9\/2008", "Time": "08:02 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "5000 W CAPITAL DR", "Location": [ 43.090017, -87.975951 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.975951246727064, 43.090017246727093 ] } },
{ "type": "Feature", "properties": { "Incident number": 80090149, "Date": "1\/9\/2008", "Time": "02:49 PM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "5703 N 76TH ST", "Location": [ 43.121583, -88.006130 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.006130164752534, 43.121583167638086 ] } },
{ "type": "Feature", "properties": { "Incident number": 80090211, "Date": "1\/9\/2008", "Time": "09:50 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4908 N 62ND ST", "Location": [ 43.107107, -87.988681 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 2, "e_clusterK7": 4, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.98868086716395, 43.107106965438824 ] } },
{ "type": "Feature", "properties": { "Incident number": 80080191, "Date": "1\/8\/2008", "Time": "07:35 PM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "8701 W FOND DU LAC AV", "Location": [ 43.123831, -88.019596 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.019595678088052, 43.123831364053196 ] } },
{ "type": "Feature", "properties": { "Incident number": 80070226, "Date": "1\/7\/2008", "Time": "07:31 PM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "5557 N 64TH ST", "Location": [ 43.118883, -87.991120 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.991120306514972, 43.118883168856094 ] } },
{ "type": "Feature", "properties": { "Incident number": 80070254, "Date": "1\/7\/2008", "Time": "09:37 PM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "8701 W FOND DU LAC AV", "Location": [ 43.123831, -88.019596 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.019595678088052, 43.123831364053196 ] } },
{ "type": "Feature", "properties": { "Incident number": 80050119, "Date": "1\/5\/2008", "Time": "12:30 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "5500 W FOND DU LAC AV", "Location": [ 43.094634, -87.982152 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.982152256708559, 43.094633845143903 ] } },
{ "type": "Feature", "properties": { "Incident number": 80050179, "Date": "1\/5\/2008", "Time": "09:03 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "7518 W HOPE AV", "Location": [ 43.093651, -88.005792 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.005792178860872, 43.093651211681312 ] } },
{ "type": "Feature", "properties": { "Incident number": 80040170, "Date": "1\/4\/2008", "Time": "06:25 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "8340 W APPLETON AV", "Location": [ 43.104513, -88.015556 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.015556277396513, 43.104512596095603 ] } },
{ "type": "Feature", "properties": { "Incident number": 80040178, "Date": "1\/4\/2008", "Time": "08:10 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "6100 W CONGRESS ST", "Location": [ 43.097367, -87.988162 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.988162454836541, 43.097367371744369 ] } },
{ "type": "Feature", "properties": { "Incident number": 80030137, "Date": "1\/3\/2008", "Time": "05:58 PM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "5737 N 76TH ST", "Location": [ 43.122312, -88.006131 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.006131139217302, 43.122312167638064 ] } },
{ "type": "Feature", "properties": { "Incident number": 80030182, "Date": "1\/3\/2008", "Time": "09:28 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "5027 W MARION ST", "Location": [ 43.095203, -87.976084 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.976084213651674, 43.095203099613599 ] } },
{ "type": "Feature", "properties": { "Incident number": 80010061, "Date": "1\/1\/2008", "Time": "04:44 AM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "5556 N 76TH ST", "Location": [ 43.118543, -88.005870 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.005870444853301, 43.118542991316822 ] } },
{ "type": "Feature", "properties": { "Incident number": 80290157, "Date": "1\/29\/2008", "Time": "07:03 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "1614 E NORTH AV", "Location": [ 43.060182, -87.889902 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.889902197472452, 43.060181529863044 ] } },
{ "type": "Feature", "properties": { "Incident number": 80290183, "Date": "1\/29\/2008", "Time": "09:23 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "2475 N FRATNEY ST", "Location": [ 43.063686, -87.901682 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.90168157703836, 43.063685832361926 ] } },
{ "type": "Feature", "properties": { "Incident number": 80280077, "Date": "1\/28\/2008", "Time": "10:20 AM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3484 N MURRAY AV", "Location": [ 43.081469, -87.885156 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.885155867996048, 43.081468994171622 ] } },
{ "type": "Feature", "properties": { "Incident number": 80280161, "Date": "1\/28\/2008", "Time": "06:05 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "924 E MEINECKE AV", "Location": [ 43.062052, -87.899554 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.899553723007685, 43.062051518754551 ] } },
{ "type": "Feature", "properties": { "Incident number": 80270008, "Date": "1\/27\/2008", "Time": "03:00 AM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "1304 E ALBION ST", "Location": [ 43.050856, -87.895803 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.895802703183151, 43.050855865691325 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260140, "Date": "1\/26\/2008", "Time": "07:03 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3177 N HUMBOLDT BL", "Location": [ 43.076395, -87.897788 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.897787624790567, 43.076394838190318 ] } },
{ "type": "Feature", "properties": { "Incident number": 80110208, "Date": "1\/11\/2008", "Time": "09:37 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "900 E OGDEN AV", "Location": [ 43.048211, -87.900882 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.900882204433046, 43.048211061888999 ] } },
{ "type": "Feature", "properties": { "Incident number": 80080169, "Date": "1\/8\/2008", "Time": "05:16 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "1331 N ASTOR ST", "Location": [ 43.047640, -87.899750 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.899749624790587, 43.047639586733226 ] } },
{ "type": "Feature", "properties": { "Incident number": 80060177, "Date": "1\/6\/2008", "Time": "05:40 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "2119 N SUMMIT AV", "Location": [ 43.057560, -87.884556 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.884556226643014, 43.057559942841365 ] } },
{ "type": "Feature", "properties": { "Incident number": 80050020, "Date": "1\/5\/2008", "Time": "12:42 AM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "1672 N WATER ST", "Location": [ 43.052489, -87.905225 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.905225223164294, 43.052489398598311 ] } },
{ "type": "Feature", "properties": { "Incident number": 80050116, "Date": "1\/5\/2008", "Time": "04:45 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "544 E OGDEN AV #800", "Location": [ 43.048240, -87.905423 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.905422509048961, 43.048239988583809 ] } },
{ "type": "Feature", "properties": { "Incident number": 80030016, "Date": "1\/3\/2008", "Time": "02:08 AM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "2244 N PROSPECT AV", "Location": [ 43.059716, -87.884129 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.884129301806368, 43.059715838450117 ] } },
{ "type": "Feature", "properties": { "Incident number": 80030019, "Date": "1\/3\/2008", "Time": "04:14 AM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "1714 N FRANKLIN PL", "Location": [ 43.053337, -87.896804 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.896803900744644, 43.053336502914192 ] } },
{ "type": "Feature", "properties": { "Incident number": 80040010, "Date": "1\/3\/2008", "Time": "11:57 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "1513 N WARREN AV", "Location": [ 43.050055, -87.896789 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.89678908969826, 43.050054602219063 ] } },
{ "type": "Feature", "properties": { "Incident number": 80300109, "Date": "1\/30\/2008", "Time": "10:00 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "3225 W WISCONSIN AV #304", "Location": [ 43.038670, -87.954403 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.9544035, 43.03867048788188 ] } },
{ "type": "Feature", "properties": { "Incident number": 80300141, "Date": "1\/30\/2008", "Time": "09:51 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2114 W MICHIGAN ST", "Location": [ 43.037521, -87.939873 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939873, 43.03752147879262 ] } },
{ "type": "Feature", "properties": { "Incident number": 80290025, "Date": "1\/29\/2008", "Time": "05:00 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "1254 N 35TH ST", "Location": [ 43.046815, -87.957619 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.957619025948276, 43.046815295506718 ] } },
{ "type": "Feature", "properties": { "Incident number": 80290044, "Date": "1\/29\/2008", "Time": "08:29 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "3017 W HIGHLAND BL", "Location": [ 43.044446, -87.952301 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.95230102553522, 43.044445542847491 ] } },
{ "type": "Feature", "properties": { "Incident number": 80250155, "Date": "1\/25\/2008", "Time": "07:50 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "275 W WISCONSIN AV", "Location": [ 43.038766, -87.914173 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.91417294463038, 43.038765525102527 ] } },
{ "type": "Feature", "properties": { "Incident number": 80220042, "Date": "1\/22\/2008", "Time": "10:31 AM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "510 E WISCONSIN AV", "Location": [ 43.038850, -87.904804 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.904803808355922, 43.038850471579245 ] } },
{ "type": "Feature", "properties": { "Incident number": 80210111, "Date": "1\/21\/2008", "Time": "02:41 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "280 N 35TH ST", "Location": [ 43.033542, -87.957678 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.957678488935159, 43.03354248940586 ] } },
{ "type": "Feature", "properties": { "Incident number": 80210123, "Date": "1\/21\/2008", "Time": "02:41 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "3417 W MT VERNON AV", "Location": [ 43.033681, -87.957104 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.957103919095161, 43.03368054674263 ] } },
{ "type": "Feature", "properties": { "Incident number": 80210001, "Date": "1\/20\/2008", "Time": "09:14 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "907 N 26TH ST", "Location": [ 43.041843, -87.946369 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.946368588146882, 43.041843 ] } },
{ "type": "Feature", "properties": { "Incident number": 80210002, "Date": "1\/20\/2008", "Time": "09:10 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "1240 W WELLS ST", "Location": [ 43.040284, -87.928321 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.9283215, 43.040284476051312 ] } },
{ "type": "Feature", "properties": { "Incident number": 80180111, "Date": "1\/18\/2008", "Time": "02:39 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2522 W STATE ST", "Location": [ 43.043267, -87.945611 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.9456105, 43.043267460470744 ] } },
{ "type": "Feature", "properties": { "Incident number": 80180002, "Date": "1\/17\/2008", "Time": "10:42 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "1921 W GALENA ST", "Location": [ 43.051337, -87.937232 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.937231919095154, 43.051337488458813 ] } },
{ "type": "Feature", "properties": { "Incident number": 80140190, "Date": "1\/14\/2008", "Time": "08:42 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2717 W CLYBOURN ST", "Location": [ 43.036104, -87.948252 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.948251832361947, 43.036104470136941 ] } },
{ "type": "Feature", "properties": { "Incident number": 80100054, "Date": "1\/10\/2008", "Time": "08:36 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "3324 W JUNEAU AV", "Location": [ 43.045922, -87.955950 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.955950357897166, 43.045921507646042 ] } },
{ "type": "Feature", "properties": { "Incident number": 80080052, "Date": "1\/8\/2008", "Time": "07:43 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "749 N 16TH ST", "Location": [ 43.039630, -87.932979 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.932979095937142, 43.039629996104871 ] } },
{ "type": "Feature", "properties": { "Incident number": 80080162, "Date": "1\/8\/2008", "Time": "05:39 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "930 N 27TH ST", "Location": [ 43.042428, -87.947655 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.947654875209409, 43.042428 ] } },
{ "type": "Feature", "properties": { "Incident number": 80070026, "Date": "1\/7\/2008", "Time": "09:55 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "1202 W HIGHLAND AV", "Location": [ 43.044472, -87.927493 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.927492944630387, 43.044471511541182 ] } },
{ "type": "Feature", "properties": { "Incident number": 80070186, "Date": "1\/7\/2008", "Time": "04:38 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "200 E WISCONSIN AV", "Location": [ 43.038664, -87.908733 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.908732863725547, 43.038663504327843 ] } },
{ "type": "Feature", "properties": { "Incident number": 80070214, "Date": "1\/7\/2008", "Time": "07:05 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2501 W STATE ST", "Location": [ 43.043160, -87.945000 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.945000187350772, 43.04315981264925 ] } },
{ "type": "Feature", "properties": { "Incident number": 80060017, "Date": "1\/6\/2008", "Time": "11:55 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "3200 W PARK HILL AV", "Location": [ 43.032669, -87.954153 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.95415317383393, 43.032669173833924 ] } },
{ "type": "Feature", "properties": { "Incident number": 80060020, "Date": "1\/6\/2008", "Time": "12:05 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2725 W WISCONSIN AV", "Location": [ 43.038629, -87.948580 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.948580499999977, 43.038629488458817 ] } },
{ "type": "Feature", "properties": { "Incident number": 80060054, "Date": "1\/6\/2008", "Time": "02:30 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2725 W WISCONSIN AV", "Location": [ 43.038629, -87.948580 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.948580499999977, 43.038629488458817 ] } },
{ "type": "Feature", "properties": { "Incident number": 80050092, "Date": "1\/5\/2008", "Time": "12:04 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "700 W STATE ST", "Location": [ 43.043007, -87.920883 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.920882800998328, 43.043007494373157 ] } },
{ "type": "Feature", "properties": { "Incident number": 80040069, "Date": "1\/4\/2008", "Time": "10:45 AM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "200 E WISCONSIN AV", "Location": [ 43.038664, -87.908733 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.908732863725547, 43.038663504327843 ] } },
{ "type": "Feature", "properties": { "Incident number": 80030018, "Date": "1\/3\/2008", "Time": "03:23 AM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "1660 N PROSPECT AV", "Location": [ 43.051887, -87.891599 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.891599298315271, 43.05188708601208 ] } },
{ "type": "Feature", "properties": { "Incident number": 80010074, "Date": "1\/1\/2008", "Time": "09:35 AM", "Police District": 1, "Offense 1": "KIDNAPING", "Offense 2": "ROBBERY", "Address": "1100 N WATER ST", "Location": [ 43.044723, -87.910819 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.910819340848008, 43.044723196599513 ] } },
{ "type": "Feature", "properties": { "Incident number": 80010172, "Date": "1\/1\/2008", "Time": "07:40 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "1230 W HIGHLAND AV", "Location": [ 43.044461, -87.928142 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.928141919095154, 43.044461474897467 ] } },
{ "type": "Feature", "properties": { "Incident number": 80250082, "Date": "1\/25\/2008", "Time": "11:52 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "7609 W CAPITOL DR", "Location": [ 43.089832, -88.007940 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.00794, 43.08983154674263 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260025, "Date": "1\/25\/2008", "Time": "11:37 PM", "Police District": 7, "Offense 1": "KIDNAPING", "Offense 2": "BURGLARY\/BREAKING AND ENTERING", "Offense 3": "ROBBERY", "Address": "3442 N 98TH ST", "Location": [ 43.081442, -88.035475 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.035475360782698, 43.081442025535239 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260025, "Date": "1\/25\/2008", "Time": "11:37 PM", "Police District": 7, "Offense 1": "KIDNAPING", "Offense 2": "ROBBERY", "Offense 3": "BURGLARY\/BREAKING AND ENTERING", "Address": "3442 N 98TH ST", "Location": [ 43.081442, -88.035475 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.035475360782698, 43.081442025535239 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260025, "Date": "1\/25\/2008", "Time": "11:37 PM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": "BURGLARY\/BREAKING AND ENTERING", "Address": "3442 N 98TH ST", "Location": [ 43.081442, -88.035475 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.035475360782698, 43.081442025535239 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260030, "Date": "1\/25\/2008", "Time": "11:43 PM", "Police District": 7, "Offense 1": "KIDNAPING", "Offense 2": "ROBBERY", "Address": "3907 N 84TH ST", "Location": [ 43.088166, -88.017590 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.017589610363871, 43.088165916180976 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260030, "Date": "1\/25\/2008", "Time": "11:43 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "3907 N 84TH ST", "Location": [ 43.088166, -88.017590 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.017589610363871, 43.088165916180976 ] } },
{ "type": "Feature", "properties": { "Incident number": 80210125, "Date": "1\/21\/2008", "Time": "04:59 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "2921 N 76TH ST", "Location": [ 43.072165, -88.007519 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 0, "e_clusterK5": 3, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.007518632003951, 43.072164974464776 ] } },
{ "type": "Feature", "properties": { "Incident number": 80200016, "Date": "1\/20\/2008", "Time": "02:24 AM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "5442 N LOVERS LANE RD", "Location": [ 43.116541, -88.055556 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.055555652690302, 43.116540501001758 ] } },
{ "type": "Feature", "properties": { "Incident number": 80180039, "Date": "1\/18\/2008", "Time": "08:45 AM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "10380 W SILVER SPRING DR", "Location": [ 43.119517, -88.041743 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.04174267485142, 43.119517471579243 ] } },
{ "type": "Feature", "properties": { "Incident number": 80110161, "Date": "1\/11\/2008", "Time": "02:05 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "8528 W LISBON AV", "Location": [ 43.082033, -88.019753 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.019753344422725, 43.082032797131852 ] } },
{ "type": "Feature", "properties": { "Incident number": 80070136, "Date": "1\/7\/2008", "Time": "08:53 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4553 N 85TH ST", "Location": [ 43.100059, -88.018795 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.018795475734194, 43.100059346673099 ] } },
{ "type": "Feature", "properties": { "Incident number": 80030147, "Date": "1\/3\/2008", "Time": "07:25 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "3761 N 76TH ST", "Location": [ 43.085534, -88.007437 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.007437451948817, 43.085533770225361 ] } },
{ "type": "Feature", "properties": { "Incident number": 80020007, "Date": "1\/1\/2008", "Time": "11:21 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4025 N 91ST ST", "Location": [ 43.090407, -88.026390 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.026389599255353, 43.090407 ] } },
{ "type": "Feature", "properties": { "Incident number": 80310067, "Date": "1\/31\/2008", "Time": "05:21 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "1009 E GARFIELD AV", "Location": [ 43.058907, -87.898552 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.898552464449864, 43.058907047468978 ] } },
{ "type": "Feature", "properties": { "Incident number": 80300093, "Date": "1\/30\/2008", "Time": "03:31 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3295 N MARTIN L KING JR DR", "Location": [ 43.078513, -87.915973 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.915972858070049, 43.0785127934965 ] } },
{ "type": "Feature", "properties": { "Incident number": 80280158, "Date": "1\/28\/2008", "Time": "09:45 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3241 N 3RD ST", "Location": [ 43.077277, -87.913912 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.913911643112456, 43.077276838190329 ] } },
{ "type": "Feature", "properties": { "Incident number": 80240072, "Date": "1\/26\/2008", "Time": "10:15 AM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "1545 W HOPKINS ST", "Location": [ 43.071576, -87.932179 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 4, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.932179159126491, 43.071576234428719 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260153, "Date": "1\/26\/2008", "Time": "09:09 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "274 E KEEFE AV", "Location": [ 43.082086, -87.907712 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.907711971550583, 43.08208551875456 ] } },
{ "type": "Feature", "properties": { "Incident number": 80270001, "Date": "1\/26\/2008", "Time": "10:27 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3133 N 9TH ST", "Location": [ 43.075584, -87.922511 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.922510624790576, 43.075583696087477 ] } },
{ "type": "Feature", "properties": { "Incident number": 80250112, "Date": "1\/25\/2008", "Time": "03:34 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "1981 W FINN PL", "Location": [ 43.083300, -87.936709 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.936708549587422, 43.08329976162328 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260022, "Date": "1\/25\/2008", "Time": "03:34 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3718-A N 19TH PL", "Location": [ 43.085219, -87.935606 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.935606404639756, 43.085219018321865 ] } },
{ "type": "Feature", "properties": { "Incident number": 80230088, "Date": "1\/24\/2008", "Time": "10:00 AM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "2228 N MARTIN L KING JR DR", "Location": [ 43.059471, -87.914061 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.914061143178998, 43.059470713848562 ] } },
{ "type": "Feature", "properties": { "Incident number": 80250005, "Date": "1\/24\/2008", "Time": "10:45 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "216 E TOWNSEND ST", "Location": [ 43.080272, -87.908823 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.908823, 43.080271500432694 ] } },
{ "type": "Feature", "properties": { "Incident number": 80210113, "Date": "1\/21\/2008", "Time": "04:05 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3540 N 20TH ST", "Location": [ 43.083252, -87.937172 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.937172342460826, 43.083252 ] } },
{ "type": "Feature", "properties": { "Incident number": 80200034, "Date": "1\/20\/2008", "Time": "03:37 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3725 N TEUTONIA AV", "Location": [ 43.085218, -87.936504 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.936503614230347, 43.085218075768957 ] } },
{ "type": "Feature", "properties": { "Incident number": 80200119, "Date": "1\/20\/2008", "Time": "03:46 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "2470 N MARTIN L KING JR DR", "Location": [ 43.063633, -87.914015 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.914015426279846, 43.063632555369615 ] } },
{ "type": "Feature", "properties": { "Incident number": 80200001, "Date": "1\/19\/2008", "Time": "09:58 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3718 N 19TH PL", "Location": [ 43.085219, -87.935606 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.935606404639756, 43.085219018321865 ] } },
{ "type": "Feature", "properties": { "Incident number": 80180023, "Date": "1\/18\/2008", "Time": "11:00 AM", "Police District": 5, "Offense 1": "KIDNAPING", "Offense 2": "ROBBERY", "Address": "3847 N 14TH ST", "Location": [ 43.087168, -87.928388 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.92838762479056, 43.087167922009343 ] } },
{ "type": "Feature", "properties": { "Incident number": 80180148, "Date": "1\/18\/2008", "Time": "07:03 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3031 N 10TH ST", "Location": [ 43.073838, -87.923959 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.92395858814686, 43.073838167638065 ] } },
{ "type": "Feature", "properties": { "Incident number": 80170113, "Date": "1\/17\/2008", "Time": "06:00 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3122 N 24TH ST", "Location": [ 43.075577, -87.942241 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 9, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.94224050919604, 43.075576809159479 ] } },
{ "type": "Feature", "properties": { "Incident number": 80160097, "Date": "1\/16\/2008", "Time": "01:11 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "2211 N HUMBOLDT AV", "Location": [ 43.052682, -87.898149 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.898148687245438, 43.052682267308931 ] } },
{ "type": "Feature", "properties": { "Incident number": 80160177, "Date": "1\/16\/2008", "Time": "06:24 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3905 N 22ND ST", "Location": [ 43.088045, -87.939578 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.939578047878342, 43.088044971739038 ] } },
{ "type": "Feature", "properties": { "Incident number": 80150014, "Date": "1\/15\/2008", "Time": "01:04 AM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "112 W LOCUST ST", "Location": [ 43.071234, -87.911291 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.91129081256021, 43.071234222828977 ] } },
{ "type": "Feature", "properties": { "Incident number": 80150003, "Date": "1\/14\/2008", "Time": "10:05 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "2421 N 6TH ST", "Location": [ 43.062661, -87.918512 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.918511617577209, 43.062661005828375 ] } },
{ "type": "Feature", "properties": { "Incident number": 80130035, "Date": "1\/13\/2008", "Time": "12:48 AM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "915 W ATKINSON AV", "Location": [ 43.083584, -87.922643 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.922642959634018, 43.083583629176665 ] } },
{ "type": "Feature", "properties": { "Incident number": 80130201, "Date": "1\/13\/2008", "Time": "10:19 PM", "Police District": 5, "Offense 1": "KIDNAPING", "Offense 2": "ROBBERY", "Address": "3025 N 12TH ST", "Location": [ 43.073624, -87.926745 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.926745236956094, 43.07362427357365 ] } },
{ "type": "Feature", "properties": { "Incident number": 80120073, "Date": "1\/12\/2008", "Time": "10:33 AM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3921 N 17TH ST", "Location": [ 43.088247, -87.932110 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.932110120895445, 43.088247366639735 ] } },
{ "type": "Feature", "properties": { "Incident number": 80130011, "Date": "1\/12\/2008", "Time": "09:06 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3460 N HOLTON ST", "Location": [ 43.081559, -87.904993 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.904992926279846, 43.081558575076464 ] } },
{ "type": "Feature", "properties": { "Incident number": 80100040, "Date": "1\/10\/2008", "Time": "12:50 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3373 N HOLTON ST", "Location": [ 43.079971, -87.905147 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.90514739773208, 43.079970531498596 ] } },
{ "type": "Feature", "properties": { "Incident number": 80090208, "Date": "1\/9\/2008", "Time": "09:20 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3461 N 16TH ST", "Location": [ 43.081479, -87.931009 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 0, "e_clusterK5": 1, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 2, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.931008573720149, 43.081479450458772 ] } },
{ "type": "Feature", "properties": { "Incident number": 80070235, "Date": "1\/7\/2008", "Time": "07:51 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3419 N 14TH ST", "Location": [ 43.080597, -87.928549 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.928548566506791, 43.080597450458782 ] } },
{ "type": "Feature", "properties": { "Incident number": 80070241, "Date": "1\/7\/2008", "Time": "07:53 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "1817 W KEEFE AV", "Location": [ 43.081711, -87.933625 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.933624826863209, 43.081711219835384 ] } },
{ "type": "Feature", "properties": { "Incident number": 80060055, "Date": "1\/6\/2008", "Time": "03:56 AM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3716 N MARTIN L KING JR DR", "Location": [ 43.084864, -87.920104 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.920104172596723, 43.084863984317096 ] } },
{ "type": "Feature", "properties": { "Incident number": 80060154, "Date": "1\/6\/2008", "Time": "03:38 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "1605 W CONCORDIA AV #LWRFR", "Location": [ 43.078975, -87.931274 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 2, "e_clusterK10": 9, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.931273667638052, 43.078974517889172 ] } },
{ "type": "Feature", "properties": { "Incident number": 80060199, "Date": "1\/6\/2008", "Time": "10:10 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3321 N 12TH ST", "Location": [ 43.079454, -87.926120 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.926119624790587, 43.079454115182635 ] } },
{ "type": "Feature", "properties": { "Incident number": 80050166, "Date": "1\/5\/2008", "Time": "07:32 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "2701 N MARTIN L KING JR DR", "Location": [ 43.067664, -87.914072 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.914071610363862, 43.067664 ] } },
{ "type": "Feature", "properties": { "Incident number": 80030123, "Date": "1\/3\/2008", "Time": "03:33 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "2201 W MELVINA ST", "Location": [ 43.087845, -87.939601 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.939600741137085, 43.087845258750356 ] } },
{ "type": "Feature", "properties": { "Incident number": 80020135, "Date": "1\/2\/2008", "Time": "03:28 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "821 E CAPITOL DR", "Location": [ 43.089095, -87.900252 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.900251952247771, 43.089094521207393 ] } },
{ "type": "Feature", "properties": { "Incident number": 80030002, "Date": "1\/2\/2008", "Time": "09:53 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3933 N 19TH PL", "Location": [ 43.088542, -87.935721 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.935720592042003, 43.088541935887811 ] } },
{ "type": "Feature", "properties": { "Incident number": 80010054, "Date": "1\/1\/2008", "Time": "06:38 AM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3751 N TEUTONIA AV", "Location": [ 43.085718, -87.936771 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.936771320849402, 43.085717727999352 ] } },
{ "type": "Feature", "properties": { "Incident number": 80010130, "Date": "1\/1\/2008", "Time": "05:44 AM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "2256 N 5TH ST", "Location": [ 43.059786, -87.917018 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.917018071255626, 43.059785522462178 ] } },
{ "type": "Feature", "properties": { "Incident number": 80010170, "Date": "1\/1\/2008", "Time": "06:50 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "528 E CONCORDIA AV", "Location": [ 43.078411, -87.904152 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.904151832361947, 43.078410533181284 ] } },
{ "type": "Feature", "properties": { "Incident number": 80010180, "Date": "1\/1\/2008", "Time": "07:23 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3548 N MARTIN L KING JR DR", "Location": [ 43.082615, -87.918771 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.91877137904963, 43.082615064042244 ] } },
{ "type": "Feature", "properties": { "Incident number": 80310176, "Date": "1\/31\/2008", "Time": "06:37 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "5009 W HAMPTON AV", "Location": [ 43.104578, -87.975882 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.975882, 43.104578481245454 ] } },
{ "type": "Feature", "properties": { "Incident number": 80320002, "Date": "1\/31\/2008", "Time": "09:36 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "3618 W GLENDALE AV", "Location": [ 43.100790, -87.958511 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.958510985818023, 43.100790260444271 ] } },
{ "type": "Feature", "properties": { "Incident number": 80300010, "Date": "1\/30\/2008", "Time": "12:13 AM", "Police District": 7, "Offense 1": "ROBBERY", "Offense 2": "KIDNAPING", "Address": "3065 N 44TH ST", "Location": [ 43.074774, -87.968690 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.968690080933499, 43.07477386372554 ] } },
{ "type": "Feature", "properties": { "Incident number": 80290002, "Date": "1\/29\/2008", "Time": "01:35 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "2837 N 49TH ST", "Location": [ 43.070499, -87.974888 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.9748880953602, 43.070499335276139 ] } },
{ "type": "Feature", "properties": { "Incident number": 80280099, "Date": "1\/28\/2008", "Time": "02:07 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "3908 W FOND DU LAC AV", "Location": [ 43.079239, -87.962377 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 9, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.962376878531472, 43.079238509495219 ] } },
{ "type": "Feature", "properties": { "Incident number": 80280148, "Date": "1\/28\/2008", "Time": "07:00 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "2900 N 24TH ST", "Location": [ 43.071588, -87.942315 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 9, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.942315386317915, 43.071588 ] } },
{ "type": "Feature", "properties": { "Incident number": 80250010, "Date": "1\/25\/2008", "Time": "12:03 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "3100 N 41ST ST", "Location": [ 43.075271, -87.964353 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.964353295584615, 43.075271484087828 ] } },
{ "type": "Feature", "properties": { "Incident number": 80250021, "Date": "1\/25\/2008", "Time": "12:41 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "3628 W TOWNSEND ST", "Location": [ 43.081176, -87.958781 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 4, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.958781415135121, 43.081176401832636 ] } },
{ "type": "Feature", "properties": { "Incident number": 80250174, "Date": "1\/25\/2008", "Time": "10:12 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4076 N 42ND ST", "Location": [ 43.091486, -87.965235 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.965235379104556, 43.091485910352596 ] } },
{ "type": "Feature", "properties": { "Incident number": 80230020, "Date": "1\/23\/2008", "Time": "04:39 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4118 W CAPITOL DR", "Location": [ 43.089923, -87.964830 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.96483, 43.08992346047075 ] } },
{ "type": "Feature", "properties": { "Incident number": 80200107, "Date": "1\/20\/2008", "Time": "02:09 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4118 W CAPITOL DR", "Location": [ 43.089923, -87.964830 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.96483, 43.08992346047075 ] } },
{ "type": "Feature", "properties": { "Incident number": 80180003, "Date": "1\/17\/2008", "Time": "10:22 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "3760 N 52ND ST", "Location": [ 43.085727, -87.978336 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.97833585356932, 43.085726664723865 ] } },
{ "type": "Feature", "properties": { "Incident number": 80160200, "Date": "1\/16\/2008", "Time": "10:17 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4200 W FIEBRANTZ AV", "Location": [ 43.091690, -87.965355 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.965354570787454, 43.091690410508463 ] } },
{ "type": "Feature", "properties": { "Incident number": 80140007, "Date": "1\/14\/2008", "Time": "12:19 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "3121 N 40TH ST", "Location": [ 43.075613, -87.963302 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.963301819759138, 43.075613480713642 ] } },
{ "type": "Feature", "properties": { "Incident number": 80120150, "Date": "1\/12\/2008", "Time": "07:43 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "5808 W HAMPTON AV", "Location": [ 43.104787, -87.985431 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 6, "g_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.985431, 43.104786525967924 ] } },
{ "type": "Feature", "properties": { "Incident number": 80100220, "Date": "1\/10\/2008", "Time": "08:52 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4350 W CENTER ST", "Location": [ 43.068003, -87.968218 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.968218384678892, 43.068003218720428 ] } },
{ "type": "Feature", "properties": { "Incident number": 80090193, "Date": "1\/9\/2008", "Time": "07:35 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "5033 W CAPITOL DR", "Location": [ 43.089762, -87.976603 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.976603251544972, 43.089761753398953 ] } },
{ "type": "Feature", "properties": { "Incident number": 80080148, "Date": "1\/8\/2008", "Time": "04:14 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4650 W HADLEY ST", "Location": [ 43.069799, -87.971770 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.971770029925722, 43.069798796725159 ] } },
{ "type": "Feature", "properties": { "Incident number": 80070257, "Date": "1\/7\/2008", "Time": "08:33 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "2480 W HADLEY ST", "Location": [ 43.069727, -87.944602 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 9, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.944602080904843, 43.069727460470752 ] } },
{ "type": "Feature", "properties": { "Incident number": 80080015, "Date": "1\/7\/2008", "Time": "11:32 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "2900 N 24TH ST", "Location": [ 43.071588, -87.942315 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 9, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.942315386317915, 43.071588 ] } },
{ "type": "Feature", "properties": { "Incident number": 80050109, "Date": "1\/5\/2008", "Time": "12:44 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "3626 W FOND DU LAC AV", "Location": [ 43.076929, -87.959440 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 4, "e_clusterK6": 4, "g_clusterK6": 0, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 5, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 9, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.959440458480188, 43.076929451583958 ] } },
{ "type": "Feature", "properties": { "Incident number": 80040132, "Date": "1\/4\/2008", "Time": "03:36 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4444 W CAPITOL DR", "Location": [ 43.089931, -87.969722 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.969722139188647, 43.089931486005973 ] } },
{ "type": "Feature", "properties": { "Incident number": 80010175, "Date": "1\/1\/2008", "Time": "06:40 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4620 W CENTER ST", "Location": [ 43.067985, -87.972061 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.972061332361946, 43.067985463788979 ] } },
{ "type": "Feature", "properties": { "Incident number": 80280183, "Date": "1\/28\/2008", "Time": "09:15 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "716 S 31ST ST", "Location": [ 43.023357, -87.952525 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 5, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 7, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.952525430175001, 43.023357 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260151, "Date": "1\/26\/2008", "Time": "10:27 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "2101 W PIERCE ST", "Location": [ 43.024116, -87.939524 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 7, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939523663178804, 43.024115836821224 ] } },
{ "type": "Feature", "properties": { "Incident number": 80250129, "Date": "1\/25\/2008", "Time": "05:35 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "3169 S 29TH ST", "Location": [ 42.986980, -87.950658 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.950658040971547, 42.986979502914181 ] } },
{ "type": "Feature", "properties": { "Incident number": 80250168, "Date": "1\/25\/2008", "Time": "10:37 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "2616 W ORCHARD ST", "Location": [ 43.016062, -87.946646 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.946645924612099, 43.016062338552075 ] } },
{ "type": "Feature", "properties": { "Incident number": 80220102, "Date": "1\/22\/2008", "Time": "03:46 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "4230 W OKLAHOMA AV", "Location": [ 42.988391, -87.967440 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.967440335276123, 42.988391453257378 ] } },
{ "type": "Feature", "properties": { "Incident number": 80200122, "Date": "1\/20\/2008", "Time": "06:59 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "2073 S LAYTON BL", "Location": [ 43.006923, -87.948089 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 8, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.94808910257359, 43.006923335276134 ] } },
{ "type": "Feature", "properties": { "Incident number": 80200131, "Date": "1\/20\/2008", "Time": "09:11 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "2213 S 25TH ST", "Location": [ 43.004647, -87.945178 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 8, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.94517760257358, 43.00464658673323 ] } },
{ "type": "Feature", "properties": { "Incident number": 80210005, "Date": "1\/20\/2008", "Time": "10:06 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "2604 W GRANT ST", "Location": [ 43.004960, -87.946662 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 8, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.946661614345672, 43.004959772802621 ] } },
{ "type": "Feature", "properties": { "Incident number": 80100182, "Date": "1\/10\/2008", "Time": "06:32 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "2079 S MUSKEGO AV", "Location": [ 43.006886, -87.942164 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.942163528622302, 43.006885543164607 ] } },
{ "type": "Feature", "properties": { "Incident number": 80060066, "Date": "1\/6\/2008", "Time": "08:17 AM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "1213 S 30TH ST", "Location": [ 43.018614, -87.951508 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 7, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.95150760978693, 43.018613664723894 ] } },
{ "type": "Feature", "properties": { "Incident number": 80050003, "Date": "1\/4\/2008", "Time": "11:22 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "2544 S 28TH ST", "Location": [ 42.998480, -87.949284 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.949283937388358, 42.998479857897166 ] } },
{ "type": "Feature", "properties": { "Incident number": 80020164, "Date": "1\/2\/2008", "Time": "06:30 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "2930 W NATIONAL AV", "Location": [ 43.022034, -87.951305 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 7, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.951304760199662, 43.022034427722161 ] } },
{ "type": "Feature", "properties": { "Incident number": 80300133, "Date": "1\/30\/2008", "Time": "09:01 PM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "8008 W BROWN DEER RD", "Location": [ 43.177973, -88.009481 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.00948143020365, 43.177973464942809 ] } },
{ "type": "Feature", "properties": { "Incident number": 80270018, "Date": "1\/27\/2008", "Time": "03:47 AM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "6250 W PORT AV", "Location": [ 43.158433, -87.988334 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.988333699549941, 43.15843301194522 ] } },
{ "type": "Feature", "properties": { "Incident number": 80270007, "Date": "1\/26\/2008", "Time": "10:06 PM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "7259 N 76TH ST", "Location": [ 43.150178, -88.005459 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.0054591031505, 43.150177927837753 ] } },
{ "type": "Feature", "properties": { "Incident number": 80160029, "Date": "1\/16\/2008", "Time": "07:19 AM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "6218 W CARMEN AV", "Location": [ 43.123065, -87.988596 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.988595539872634, 43.123065288830922 ] } },
{ "type": "Feature", "properties": { "Incident number": 80160049, "Date": "1\/16\/2008", "Time": "08:43 AM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "6100 W FLORIST AV", "Location": [ 43.126703, -87.987209 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.98720896866493, 43.126702577772207 ] } },
{ "type": "Feature", "properties": { "Incident number": 80070001, "Date": "1\/6\/2008", "Time": "09:58 PM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "8100 W BROWN DEER RD", "Location": [ 43.177965, -88.011104 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.011103667638054, 43.177965461047656 ] } },
{ "type": "Feature", "properties": { "Incident number": 80020022, "Date": "1\/2\/2008", "Time": "02:16 AM", "Police District": 4, "Offense 1": "ROBBERY", "Address": "8015 N 76TH ST", "Location": [ 43.163650, -88.004821 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.004821183074384, 43.163649670552253 ] } },
{ "type": "Feature", "properties": { "Incident number": 80310151, "Date": "1\/31\/2008", "Time": "04:45 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2610 N 56TH ST", "Location": [ 43.066467, -87.983322 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.983322393531267, 43.066466968636405 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260075, "Date": "1\/26\/2008", "Time": "01:40 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "6232 W CHAMBERS ST", "Location": [ 43.073628, -87.990321 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.99032091692429, 43.073628225873648 ] } },
{ "type": "Feature", "properties": { "Incident number": 80230145, "Date": "1\/23\/2008", "Time": "05:59 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "4726 W VLIET ST", "Location": [ 43.048856, -87.973353 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.973352580904844, 43.048855507646067 ] } },
{ "type": "Feature", "properties": { "Incident number": 80190148, "Date": "1\/19\/2008", "Time": "08:41 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "5914 W APPLETON AV", "Location": [ 43.070097, -87.986663 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.986663382999694, 43.070096702752593 ] } },
{ "type": "Feature", "properties": { "Incident number": 80190168, "Date": "1\/19\/2008", "Time": "10:02 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "7520 W STEVENSON ST", "Location": [ 43.032176, -88.006860 ], "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 0, "g_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 6, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.00685983236194, 43.0321755004327 ] } },
{ "type": "Feature", "properties": { "Incident number": 80180030, "Date": "1\/18\/2008", "Time": "06:52 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "5301 W WISCONSIN AV", "Location": [ 43.038668, -87.979983 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.979982530592608, 43.038668177230853 ] } },
{ "type": "Feature", "properties": { "Incident number": 80160159, "Date": "1\/16\/2008", "Time": "04:59 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "7101 W LISBON AV", "Location": [ 43.074744, -88.000166 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 0, "e_clusterK5": 3, "g_clusterK5": 0, "e_clusterK6": 5, "g_clusterK6": 4, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -88.000166124098087, 43.074744226441489 ] } },
{ "type": "Feature", "properties": { "Incident number": 80150183, "Date": "1\/15\/2008", "Time": "08:07 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "4131 W MARTIN DR", "Location": [ 43.045895, -87.966462 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.966462069392293, 43.045894542847492 ] } },
{ "type": "Feature", "properties": { "Incident number": 80120161, "Date": "1\/12\/2008", "Time": "08:52 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "5921 W NORTH AV", "Location": [ 43.060636, -87.986665 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.986664854937459, 43.060635595172002 ] } },
{ "type": "Feature", "properties": { "Incident number": 80130004, "Date": "1\/12\/2008", "Time": "08:36 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "5220 W NORTH AV", "Location": [ 43.060699, -87.979333 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.9793335, 43.060699486005966 ] } },
{ "type": "Feature", "properties": { "Incident number": 80100163, "Date": "1\/10\/2008", "Time": "05:42 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "5220 W NORTH AV", "Location": [ 43.060699, -87.979333 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.9793335, 43.060699486005966 ] } },
{ "type": "Feature", "properties": { "Incident number": 80080165, "Date": "1\/8\/2008", "Time": "05:05 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "5819 W CENTER ST", "Location": [ 43.067957, -87.985536 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.985535882411284, 43.067956860591046 ] } },
{ "type": "Feature", "properties": { "Incident number": 80070072, "Date": "1\/7\/2008", "Time": "04:00 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "3071 N 60TH ST", "Location": [ 43.074834, -87.987390 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.987389538707617, 43.074833863023642 ] } },
{ "type": "Feature", "properties": { "Incident number": 80060009, "Date": "1\/6\/2008", "Time": "11:15 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "613 S 65TH ST", "Location": [ 43.025608, -87.993710 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 6, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.993709540971551, 43.025607754371293 ] } },
{ "type": "Feature", "properties": { "Incident number": 80040043, "Date": "1\/4\/2008", "Time": "10:00 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "5220 W NORTH AV", "Location": [ 43.060699, -87.979333 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.9793335, 43.060699486005966 ] } },
{ "type": "Feature", "properties": { "Incident number": 80040174, "Date": "1\/4\/2008", "Time": "07:27 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "1538 N HAWLEY RD", "Location": [ 43.051075, -87.982655 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.982654991344333, 43.051074905072468 ] } },
{ "type": "Feature", "properties": { "Incident number": 80030128, "Date": "1\/3\/2008", "Time": "05:23 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "5428 W NORTH AV", "Location": [ 43.060711, -87.981372 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.981372167638057, 43.060711493219316 ] } },
{ "type": "Feature", "properties": { "Incident number": 80030143, "Date": "1\/3\/2008", "Time": "07:22 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "6535 W MAIN ST", "Location": [ 43.025941, -87.994602 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 6, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.994602, 43.025940503462458 ] } },
{ "type": "Feature", "properties": { "Incident number": 80020171, "Date": "1\/2\/2008", "Time": "06:01 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "3336 N 58TH ST", "Location": [ 43.080263, -87.985764 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.985763944601729, 43.080263465722197 ] } },
{ "type": "Feature", "properties": { "Incident number": 80310175, "Date": "1\/31\/2008", "Time": "07:09 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "5811 W OKLAHOMA AV", "Location": [ 42.988331, -87.986541 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.986540551070462, 42.988331476773389 ] } },
{ "type": "Feature", "properties": { "Incident number": 80280133, "Date": "1\/28\/2008", "Time": "04:02 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "6645 W OKLAHOMA AV", "Location": [ 42.988266, -87.996534 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.99653382514856, 42.988265510098884 ] } },
{ "type": "Feature", "properties": { "Incident number": 80180005, "Date": "1\/17\/2008", "Time": "11:26 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "3232 S 27TH ST", "Location": [ 42.986062, -87.948133 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.948133451815067, 42.986062477378972 ] } },
{ "type": "Feature", "properties": { "Incident number": 80140032, "Date": "1\/14\/2008", "Time": "09:03 AM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "2505 S 44TH ST", "Location": [ 42.998653, -87.968528 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 8, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.968528040394631, 42.998652723007702 ] } },
{ "type": "Feature", "properties": { "Incident number": 80110005, "Date": "1\/10\/2008", "Time": "10:58 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "5912 W OKLAHOMA AV", "Location": [ 42.988511, -87.987361 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.987361499999977, 42.98851146047074 ] } },
{ "type": "Feature", "properties": { "Incident number": 80080090, "Date": "1\/8\/2008", "Time": "09:11 AM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "3737 S 27TH ST", "Location": [ 42.976662, -87.948597 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.948597348719446, 42.976661651280537 ] } },
{ "type": "Feature", "properties": { "Incident number": 80070188, "Date": "1\/7\/2008", "Time": "04:17 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "5811 W OKLAHOMA AV", "Location": [ 42.988331, -87.986541 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.986540551070462, 42.988331476773389 ] } },
{ "type": "Feature", "properties": { "Incident number": 80020060, "Date": "1\/2\/2008", "Time": "10:55 AM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "3200 S 27TH ST", "Location": [ 42.986386, -87.948143 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.948143426279856, 42.986385502914203 ] } },
{ "type": "Feature", "properties": { "Incident number": 80310011, "Date": "1\/30\/2008", "Time": "10:55 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "1601 W WINDLAKE AV", "Location": [ 42.999907, -87.933483 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.933483486284089, 42.999907137159177 ] } },
{ "type": "Feature", "properties": { "Incident number": 80290093, "Date": "1\/29\/2008", "Time": "10:15 AM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "1680 S PEARL ST", "Location": [ 43.012702, -87.936030 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.93602994350519, 43.012702467107182 ] } },
{ "type": "Feature", "properties": { "Incident number": 80290143, "Date": "1\/29\/2008", "Time": "04:10 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "750 S CESAR E CHAVEZ DR", "Location": [ 43.023605, -87.932980 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.932980408959651, 43.023605415554016 ] } },
{ "type": "Feature", "properties": { "Incident number": 80280006, "Date": "1\/28\/2008", "Time": "12:04 AM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "2114 S 13TH ST", "Location": [ 43.006076, -87.928314 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.928314477350298, 43.006075575076466 ] } },
{ "type": "Feature", "properties": { "Incident number": 80280181, "Date": "1\/28\/2008", "Time": "09:16 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "1430 S 11TH ST", "Location": [ 43.016254, -87.925334 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.925334462346669, 43.016254491257428 ] } },
{ "type": "Feature", "properties": { "Incident number": 80280186, "Date": "1\/28\/2008", "Time": "09:12 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "1226 S 19TH ST", "Location": [ 43.018380, -87.936755 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.936755440706577, 43.018379664723881 ] } },
{ "type": "Feature", "properties": { "Incident number": 80290006, "Date": "1\/28\/2008", "Time": "10:57 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "2038 S 6TH ST", "Location": [ 43.007426, -87.918633 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.91863346292358, 43.007426465722205 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260031, "Date": "1\/26\/2008", "Time": "01:14 AM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "201 W WALKER ST", "Location": [ 43.022128, -87.913113 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.913113076605669, 43.022128487881886 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260034, "Date": "1\/26\/2008", "Time": "03:14 AM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "2178 S 18TH ST", "Location": [ 43.004861, -87.935387 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.935386506780659, 43.004860658895495 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260128, "Date": "1\/26\/2008", "Time": "06:45 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "2200 S 10TH ST", "Location": [ 43.004549, -87.924618 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.924617995463578, 43.004549409544524 ] } },
{ "type": "Feature", "properties": { "Incident number": 80250161, "Date": "1\/25\/2008", "Time": "08:55 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "1208 W ORCHARD ST", "Location": [ 43.016039, -87.927211 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.927210974464757, 43.016039453257378 ] } },
{ "type": "Feature", "properties": { "Incident number": 80230160, "Date": "1\/23\/2008", "Time": "08:14 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "1217 W SCOTT ST", "Location": [ 43.019025, -87.927242 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.927241583819026, 43.019024502885536 ] } },
{ "type": "Feature", "properties": { "Incident number": 80220015, "Date": "1\/22\/2008", "Time": "06:20 AM", "Police District": 2, "Offense 1": "KIDNAPING", "Offense 2": "ROBBERY", "Offense 3": "BURGLARY\/BREAKING AND ENTERING", "Address": "415A W PIERCE ST", "Location": [ 43.024114, -87.915673 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.915673343369292, 43.024114207150362 ] } },
{ "type": "Feature", "properties": { "Incident number": 80190167, "Date": "1\/19\/2008", "Time": "09:26 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "1931 S 9TH ST", "Location": [ 43.009471, -87.922828 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.922828029863055, 43.009471341104501 ] } },
{ "type": "Feature", "properties": { "Incident number": 80170024, "Date": "1\/17\/2008", "Time": "03:24 AM", "Police District": 2, "Offense 1": "MURDER\/NONNEGLIGENT MANSLAUGHTER", "Offense 2": "ROBBERY", "Address": "2155 S 17TH ST", "Location": [ 43.005329, -87.934442 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.93444155539828, 43.005329276992313 ] } },
{ "type": "Feature", "properties": { "Incident number": 80170024, "Date": "1\/17\/2008", "Time": "03:24 AM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "2155 S 17TH ST", "Location": [ 43.005329, -87.934442 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.93444155539828, 43.005329276992313 ] } },
{ "type": "Feature", "properties": { "Incident number": 80170073, "Date": "1\/17\/2008", "Time": "10:15 AM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "1700 S 16TH ST", "Location": [ 43.012218, -87.932997 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.932996555693947, 43.012217824714405 ] } },
{ "type": "Feature", "properties": { "Incident number": 80170201, "Date": "1\/17\/2008", "Time": "08:33 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "1229 W WASHINGTON ST", "Location": [ 43.020091, -87.927713 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.92771302553524, 43.020090546742608 ] } },
{ "type": "Feature", "properties": { "Incident number": 80160190, "Date": "1\/16\/2008", "Time": "08:06 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "2023 W SCOTT ST", "Location": [ 43.019020, -87.938883 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.938883167638053, 43.019019503462459 ] } },
{ "type": "Feature", "properties": { "Incident number": 80130025, "Date": "1\/13\/2008", "Time": "12:05 AM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "1301 W ORCHARD ST", "Location": [ 43.015935, -87.928022 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.928021652802144, 43.015934847197883 ] } },
{ "type": "Feature", "properties": { "Incident number": 80130159, "Date": "1\/13\/2008", "Time": "03:50 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "1577 S PEARL ST", "Location": [ 43.014460, -87.934300 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.93430035847409, 43.014460367764904 ] } },
{ "type": "Feature", "properties": { "Incident number": 80100015, "Date": "1\/10\/2008", "Time": "01:32 AM", "Police District": 2, "Offense 1": "ROBBERY", "Offense 2": "BURGLARY\/BREAKING AND ENTERING", "Address": "1428-A S 9TH ST", "Location": [ 43.016319, -87.922534 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.922534382422768, 43.016319 ] } },
{ "type": "Feature", "properties": { "Incident number": 80100204, "Date": "1\/10\/2008", "Time": "08:43 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "1815 S 8TH ST", "Location": [ 43.010617, -87.921390 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.921390310577621, 43.010617243407012 ] } },
{ "type": "Feature", "properties": { "Incident number": 80090142, "Date": "1\/9\/2008", "Time": "04:20 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "1711 S 11TH ST", "Location": [ 43.012050, -87.925585 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.92558495779663, 43.012050312532452 ] } },
{ "type": "Feature", "properties": { "Incident number": 80090007, "Date": "1\/8\/2008", "Time": "08:23 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "1601 S CESAR E CHAVEZ DR", "Location": [ 43.013914, -87.933091 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.933091254685749, 43.01391356577318 ] } },
{ "type": "Feature", "properties": { "Incident number": 80070215, "Date": "1\/7\/2008", "Time": "05:07 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "1401 W GREENFIELD AV", "Location": [ 43.017005, -87.929474 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.92947366763805, 43.017005495672187 ] } },
{ "type": "Feature", "properties": { "Incident number": 80060036, "Date": "1\/6\/2008", "Time": "02:05 AM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "1136 W LAPHAM BL", "Location": [ 43.014300, -87.925974 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.925974467333063, 43.014300150531035 ] } },
{ "type": "Feature", "properties": { "Incident number": 80050011, "Date": "1\/5\/2008", "Time": "12:28 AM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "2541 S 13TH ST", "Location": [ 42.998238, -87.928620 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.928620048184911, 42.998237947544574 ] } },
{ "type": "Feature", "properties": { "Incident number": 80030186, "Date": "1\/3\/2008", "Time": "09:09 PM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "1207 S CESAR E CHAVEZ DR", "Location": [ 43.018862, -87.933108 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.933108078019288, 43.018861610046741 ] } },
{ "type": "Feature", "properties": { "Incident number": 80020013, "Date": "1\/2\/2008", "Time": "12:01 AM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "1035 S CESAR E CHAVEZ DR", "Location": [ 43.020333, -87.933092 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.933091577038383, 43.020333 ] } },
{ "type": "Feature", "properties": { "Incident number": 80030005, "Date": "1\/2\/2008", "Time": "09:03 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "2541 S 13TH ST", "Location": [ 42.998238, -87.928620 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.928620048184911, 42.998237947544574 ] } },
{ "type": "Feature", "properties": { "Incident number": 80310182, "Date": "1\/31\/2008", "Time": "07:14 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "3515 S 13TH ST", "Location": [ 42.980698, -87.929018 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.929018380746598, 42.98069815360757 ] } },
{ "type": "Feature", "properties": { "Incident number": 80170033, "Date": "1\/17\/2008", "Time": "03:11 AM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "2245-B S 18TH ST", "Location": [ 43.003591, -87.935527 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.935527486005981, 43.003590946159584 ] } },
{ "type": "Feature", "properties": { "Incident number": 80110014, "Date": "1\/11\/2008", "Time": "12:01 AM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "3402 S 16TH ST", "Location": [ 42.982776, -87.933795 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.933794937388356, 42.982775717179301 ] } },
{ "type": "Feature", "properties": { "Incident number": 80100152, "Date": "1\/10\/2008", "Time": "03:57 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "3500 S 13TH ST", "Location": [ 42.980732, -87.928926 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.928926477350288, 42.980732497085832 ] } },
{ "type": "Feature", "properties": { "Incident number": 80310071, "Date": "1\/31\/2008", "Time": "11:27 AM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "2701 S KINNICKINNIC AV", "Location": [ 42.995567, -87.896074 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.896074240665698, 42.995567244763343 ] } },
{ "type": "Feature", "properties": { "Incident number": 80290101, "Date": "1\/29\/2008", "Time": "01:57 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "110 W HOLT AV", "Location": [ 42.982453, -87.909872 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.909871919095153, 42.982453483264678 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260043, "Date": "1\/26\/2008", "Time": "10:30 AM", "Police District": 6, "Offense 1": "ROBBERY", "Address": "2500 S 8 ST", "Location": [ 42.999075, -87.921214 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.92121391185313, 42.999074580904853 ] } },
{ "type": "Feature", "properties": { "Incident number": 80240107, "Date": "1\/24\/2008", "Time": "04:23 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "3131 S 13TH ST", "Location": [ 42.987339, -87.928871 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.928871073720146, 42.987338696087477 ] } },
{ "type": "Feature", "properties": { "Incident number": 80190017, "Date": "1\/19\/2008", "Time": "12:56 AM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "3057 S 8TH ST", "Location": [ 42.988870, -87.921528 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.921527964365879, 42.988869618096828 ] } },
{ "type": "Feature", "properties": { "Incident number": 80190114, "Date": "1\/19\/2008", "Time": "03:24 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "623 E OTJEN ST", "Location": [ 42.998171, -87.901744 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.901743510675814, 42.998171093513911 ] } },
{ "type": "Feature", "properties": { "Incident number": 80090082, "Date": "1\/9\/2008", "Time": "05:41 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "2646 S 10TH ST", "Location": [ 42.996598, -87.924875 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.924874962923582, 42.99659849125743 ] } },
{ "type": "Feature", "properties": { "Incident number": 80060044, "Date": "1\/6\/2008", "Time": "02:28 AM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "500 W HARRISON AV", "Location": [ 42.997677, -87.917096 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.917095629462068, 42.997677129462083 ] } },
{ "type": "Feature", "properties": { "Incident number": 80040176, "Date": "1\/4\/2008", "Time": "08:18 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "2305 S HOWELL AV", "Location": [ 43.002781, -87.904803 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.904803384311521, 43.00278134513615 ] } },
{ "type": "Feature", "properties": { "Incident number": 80010192, "Date": "1\/1\/2008", "Time": "09:11 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "3006 S 9TH ST", "Location": [ 42.989965, -87.922602 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 8, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.922601843247932, 42.98996460078061 ] } },
{ "type": "Feature", "properties": { "Incident number": 80310196, "Date": "1\/31\/2008", "Time": "09:55 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "1803 N 23RD ST", "Location": [ 43.053796, -87.941431 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.941430595360217, 43.053795502914198 ] } },
{ "type": "Feature", "properties": { "Incident number": 80320004, "Date": "1\/31\/2008", "Time": "10:34 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "2155 N LINDSAY ST", "Location": [ 43.058504, -87.924631 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.924630628516013, 43.058504253084955 ] } },
{ "type": "Feature", "properties": { "Incident number": 80300017, "Date": "1\/30\/2008", "Time": "02:11 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2449 N 50TH ST", "Location": [ 43.063587, -87.976268 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.97626762479058, 43.063587 ] } },
{ "type": "Feature", "properties": { "Incident number": 80270117, "Date": "1\/27\/2008", "Time": "07:23 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2624 W LISBON AV", "Location": [ 43.053481, -87.947211 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.947210708436742, 43.053481402186954 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260129, "Date": "1\/26\/2008", "Time": "09:25 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "1522 W FOND DU LAC AV", "Location": [ 43.055798, -87.932157 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 5, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 4, "g_clusterK9": 7, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.932157151797696, 43.055797566766564 ] } },
{ "type": "Feature", "properties": { "Incident number": 80260007, "Date": "1\/25\/2008", "Time": "11:34 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "1814 N 23RD ST", "Location": [ 43.054046, -87.941356 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.941356389636141, 43.054046497085807 ] } },
{ "type": "Feature", "properties": { "Incident number": 80240131, "Date": "1\/24\/2008", "Time": "07:08 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "4018 W LISBON AV", "Location": [ 43.056012, -87.964147 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.964147311385688, 43.056011649200642 ] } },
{ "type": "Feature", "properties": { "Incident number": 80230139, "Date": "1\/23\/2008", "Time": "06:35 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "2813 N 8TH ST", "Location": [ 43.069815, -87.921462 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.921461606468711, 43.069815335276139 ] } },
{ "type": "Feature", "properties": { "Incident number": 80170090, "Date": "1\/17\/2008", "Time": "11:39 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "4000 W LISBON AV", "Location": [ 43.055773, -87.963593 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.96359261165729, 43.055772942415686 ] } },
{ "type": "Feature", "properties": { "Incident number": 80170185, "Date": "1\/17\/2008", "Time": "07:00 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "1520 W GALENA ST", "Location": [ 43.050065, -87.927774 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.927773652020818, 43.050065471252985 ] } },
{ "type": "Feature", "properties": { "Incident number": 80160091, "Date": "1\/16\/2008", "Time": "11:01 AM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "2839 N 35TH ST", "Location": [ 43.070625, -87.957429 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 4, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.957428613682083, 43.070625335276134 ] } },
{ "type": "Feature", "properties": { "Incident number": 80160104, "Date": "1\/16\/2008", "Time": "01:57 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2501 W BROWN ST", "Location": [ 43.056282, -87.945162 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.945162204019866, 43.056281795980141 ] } },
{ "type": "Feature", "properties": { "Incident number": 80150107, "Date": "1\/15\/2008", "Time": "01:25 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "2748 N 24TH ST", "Location": [ 43.068995, -87.942376 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 9, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.942375919066492, 43.068995413266784 ] } },
{ "type": "Feature", "properties": { "Incident number": 80150169, "Date": "1\/15\/2008", "Time": "08:14 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "1355 N 35TH ST", "Location": [ 43.048431, -87.957719 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.957718847995665, 43.048430789996388 ] } },
{ "type": "Feature", "properties": { "Incident number": 80130019, "Date": "1\/13\/2008", "Time": "01:50 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2000 W NORTH AV", "Location": [ 43.060531, -87.937830 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.937830136274457, 43.060530518754561 ] } },
{ "type": "Feature", "properties": { "Incident number": 80130180, "Date": "1\/13\/2008", "Time": "06:08 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "2200 W CENTER ST", "Location": [ 43.067923, -87.939991 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 9, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.939990586588053, 43.067923320981933 ] } },
{ "type": "Feature", "properties": { "Incident number": 80130020, "Date": "1\/12\/2008", "Time": "11:17 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2624 W LISBON AV", "Location": [ 43.053481, -87.947211 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.947210708436742, 43.053481402186954 ] } },
{ "type": "Feature", "properties": { "Incident number": 80090180, "Date": "1\/9\/2008", "Time": "06:25 PM", "Police District": 1, "Offense 1": "ROBBERY", "Address": "1156 W WALNUT ST", "Location": [ 43.052784, -87.926682 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.926681918011909, 43.052784199377001 ] } },
{ "type": "Feature", "properties": { "Incident number": 80080020, "Date": "1\/8\/2008", "Time": "08:10 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2422 N SHERMAN BL", "Location": [ 43.063001, -87.967406 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.967405915171369, 43.06300141326679 ] } },
{ "type": "Feature", "properties": { "Incident number": 80080046, "Date": "1\/8\/2008", "Time": "09:48 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2627 W LISBON AV", "Location": [ 43.053167, -87.946595 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.946594534248064, 43.053167437273991 ] } },
{ "type": "Feature", "properties": { "Incident number": 80080178, "Date": "1\/8\/2008", "Time": "06:25 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2525 W MEDFORD AV", "Location": [ 43.063968, -87.945247 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 4, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.945247310891958, 43.063967500204612 ] } },
{ "type": "Feature", "properties": { "Incident number": 80080201, "Date": "1\/8\/2008", "Time": "05:57 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2152 N 41ST ST", "Location": [ 43.058618, -87.964603 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 4, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.96460291185312, 43.058618245628708 ] } },
{ "type": "Feature", "properties": { "Incident number": 80070017, "Date": "1\/7\/2008", "Time": "03:00 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2500 W LISBON AV", "Location": [ 43.053305, -87.945201 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.945201456840209, 43.053305406661082 ] } },
{ "type": "Feature", "properties": { "Incident number": 80060185, "Date": "1\/6\/2008", "Time": "07:54 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "1038 W HADLEY ST", "Location": [ 43.069496, -87.925072 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.92507233236195, 43.069496489324209 ] } },
{ "type": "Feature", "properties": { "Incident number": 80050035, "Date": "1\/5\/2008", "Time": "11:07 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2032 N 35TH ST", "Location": [ 43.057116, -87.957545 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.957544922384699, 43.057116 ] } },
{ "type": "Feature", "properties": { "Incident number": 80040066, "Date": "1\/4\/2008", "Time": "01:50 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2469 N 34TH ST", "Location": [ 43.063947, -87.956309 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 4, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.956308632003953, 43.063946863725526 ] } },
{ "type": "Feature", "properties": { "Incident number": 80020080, "Date": "1\/2\/2008", "Time": "12:09 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2543 W FOND DU LAC AV", "Location": [ 43.065814, -87.945520 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 4, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.94552032150726, 43.065813620543004 ] } },
{ "type": "Feature", "properties": { "Incident number": 80020195, "Date": "1\/2\/2008", "Time": "10:27 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2350 N 35TH ST", "Location": [ 43.061501, -87.957463 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 4, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.957463311510423, 43.061500990168199 ] } },
{ "type": "Feature", "properties": { "Incident number": 80010023, "Date": "1\/1\/2008", "Time": "07:45 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "5100 W LISBON AV", "Location": [ 43.063000, -87.977533 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.97753291699577, 43.062999966941348 ] } },
{ "type": "Feature", "properties": { "Incident number": 80010033, "Date": "1\/1\/2008", "Time": "05:02 AM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "2416 W CENTER ST", "Location": [ 43.067911, -87.943051 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 9, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.943050555369609, 43.067911493219327 ] } },
{ "type": "Feature", "properties": { "Incident number": 80010039, "Date": "1\/1\/2008", "Time": "08:15 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2624 W LISBON AV", "Location": [ 43.053481, -87.947211 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.947210708436742, 43.053481402186954 ] } },
{ "type": "Feature", "properties": { "Incident number": 80010164, "Date": "1\/1\/2008", "Time": "06:29 PM", "Police District": 3, "Offense 1": "ROBBERY", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Address": "3033 W LISBON AV", "Location": [ 43.053999, -87.952106 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.952105838334546, 43.053998648883521 ] } },
{ "type": "Feature", "properties": { "Incident number": 90010045, "Date": "1\/1\/2009", "Time": "05:03 AM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "2632 N BOOTH ST", "Location": [ 43.066394, -87.904076 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 7, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.904075900744644, 43.066394245628722 ] } },
{ "type": "Feature", "properties": { "Incident number": 90010089, "Date": "1\/1\/2009", "Time": "12:32 PM", "Police District": 5, "Offense 1": "ROBBERY", "Address": "3242 N 12TH ST", "Location": [ 43.077455, -87.926145 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.926145393531272, 43.077455245628727 ] } },
{ "type": "Feature", "properties": { "Incident number": 90010106, "Date": "1\/1\/2009", "Time": "04:50 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "4475 N HOPKINS ST", "Location": [ 43.098707, -87.957545 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.957544817675398, 43.098706519562604 ] } },
{ "type": "Feature", "properties": { "Incident number": 90010159, "Date": "1\/1\/2009", "Time": "09:11 PM", "Police District": 7, "Offense 1": "ROBBERY", "Address": "3808 N 37TH ST", "Location": [ 43.086203, -87.959555 ], "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.959554886317918, 43.086203245628717 ] } },
{ "type": "Feature", "properties": { "Incident number": 90010148, "Date": "1\/1\/2009", "Time": "07:12 PM", "Police District": 2, "Offense 1": "ROBBERY", "Address": "2555 S 5TH PL", "Location": [ 42.997960, -87.917979 ], "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.917978544289767, 42.997959922009365 ] } },
{ "type": "Feature", "properties": { "Incident number": 90010050, "Date": "1\/1\/2009", "Time": "04:52 AM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2419 N 28TH ST", "Location": [ 43.062903, -87.948730 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 4, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.948729573720144, 43.06290333527614 ] } },
{ "type": "Feature", "properties": { "Incident number": 90020004, "Date": "1\/1\/2009", "Time": "11:03 PM", "Police District": 3, "Offense 1": "ROBBERY", "Address": "2263 N 40TH ST", "Location": [ 43.060090, -87.963503 ], "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 0, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 4, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.96350255492321, 43.060090447655675 ] } }
]
}
| marquettecomputationalsocialscience/clusteredcrimemaps | individual_work/marielle/KMeans/datamound/data_2008-robbery_jan.js | JavaScript | mit | 192,800 |
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: [
'Gruntfile.js',
'assets/js/*.js',
'assets/js/plugins/*.js',
'!assets/js/scripts.min.js'
]
},
uglify: {
dist: {
files: {
'assets/js/scripts.min.js': [
'assets/js/plugins/*.js',
'assets/js/_*.js'
]
}
}
},
imagemin: {
dist: {
options: {
optimizationLevel: 7,
progressive: true
},
files: [{
expand: true,
cwd: 'images/',
src: '{,*/}*.{png,jpg,jpeg}',
dest: 'images/'
}]
}
},
svgmin: {
dist: {
files: [{
expand: true,
cwd: 'images/',
src: '{,*/}*.svg',
dest: 'images/'
}]
}
},
watch: {
js: {
files: [
'<%= jshint.all %>'
],
tasks: ['uglify']
}
},
clean: {
dist: [
'assets/js/scripts.min.js'
]
}
});
// Load tasks
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-svgmin');
// Register tasks
grunt.registerTask('default', [
'clean',
'imagemin',
'svgmin'
]);
grunt.registerTask('dev', [
'watch'
]);
}; | requestly/public | Gruntfile.js | JavaScript | mit | 1,581 |
import Button from './Button';
/**
* The `LinkButton` component defines a `Button` which links to a route.
*
* ### Props
*
* All of the props accepted by `Button`, plus:
*
* - `active` Whether or not the page that this button links to is currently
* active.
* - `href` The URL to link to. If the current URL `m.route()` matches this,
* the `active` prop will automatically be set to true.
*/
export default class LinkButton extends Button {
static initProps(props) {
props.active = this.isActive(props);
props.config = props.config || m.route;
}
view() {
const vdom = super.view();
vdom.tag = 'a';
return vdom;
}
/**
* Determine whether a component with the given props is 'active'.
*
* @param {Object} props
* @return {Boolean}
*/
static isActive(props) {
return typeof props.active !== 'undefined'
? props.active
: m.route() === props.href;
}
}
| datitisev/core | js/src/common/components/LinkButton.js | JavaScript | mit | 932 |
module.exports = function throwIfNonUnexpectedError(err) {
if (err && err.message === 'aggregate error') {
for (var i = 0 ; i < err.length ; i += 1) {
throwIfNonUnexpectedError(err[i]);
}
} else if (!err || !err._isUnexpected) {
throw err;
}
};
| darrindickey/chc-select | node_modules/unexpected/lib/throwIfNonUnexpectedError.js | JavaScript | mit | 293 |
'use strict';
exports.__esModule = true;
exports.configure = configure;
var _aureliaViewManager = require('aurelia-view-manager');
var _datatable = require('./datatable');
var _columnsFilter = require('./columns-filter');
var _convertManager = require('./convert-manager');
function configure(aurelia) {
aurelia.plugin('aurelia-pager');
aurelia.container.get(_aureliaViewManager.Config).configureNamespace('spoonx/datatable', {
location: './{{framework}}/{{view}}.html'
});
aurelia.globalResources('./datatable');
} | SpoonX/aurelia-datatable | dist/native-modules/aurelia-datatable.js | JavaScript | mit | 535 |
file:/home/charlike/dev/glob-fs/fixtures/a/d9.js | tunnckoCore/glob-fs | benchmark/playing/b/d9.js | JavaScript | mit | 48 |
const DrawCard = require('../../drawcard.js');
class Alayaya extends DrawCard {
setupCardAbilities() {
this.reaction({
when: {
afterChallenge: event => (
event.challenge.winner === this.controller &&
this.isParticipating() &&
event.challenge.loser.gold >= 1)
},
handler: context => {
let otherPlayer = context.event.challenge.loser;
this.game.transferGold({ from: otherPlayer, to: this.controller, amount: 1 });
this.game.addMessage('{0} uses {1} to move 1 gold from {2}\'s gold pool to their own', this.controller, this, otherPlayer);
}
});
}
}
Alayaya.code = '05013';
module.exports = Alayaya;
| DukeTax/throneteki | server/game/cards/05-LoCR/Alayaya.js | JavaScript | mit | 796 |
"use strict";
const conversions = require("webidl-conversions");
const utils = require("./utils.js");
const HTMLElement = require("./HTMLElement.js");
const impl = utils.implSymbol;
function HTMLTextAreaElement() {
throw new TypeError("Illegal constructor");
}
Object.setPrototypeOf(HTMLTextAreaElement.prototype, HTMLElement.interface.prototype);
Object.setPrototypeOf(HTMLTextAreaElement, HTMLElement.interface);
HTMLTextAreaElement.prototype.select = function select() {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
return this[impl].select();
};
HTMLTextAreaElement.prototype.setRangeText = function setRangeText(replacement) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 1) {
throw new TypeError(
"Failed to execute 'setRangeText' on 'HTMLTextAreaElement': 1 argument required, but only " +
arguments.length +
" present."
);
}
const args = [];
for (let i = 0; i < arguments.length && i < 4; ++i) {
args[i] = arguments[i];
}
args[0] = conversions["DOMString"](args[0], {
context: "Failed to execute 'setRangeText' on 'HTMLTextAreaElement': parameter 1"
});
return this[impl].setRangeText(...args);
};
HTMLTextAreaElement.prototype.setSelectionRange = function setSelectionRange(start, end) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 2) {
throw new TypeError(
"Failed to execute 'setSelectionRange' on 'HTMLTextAreaElement': 2 arguments required, but only " +
arguments.length +
" present."
);
}
const args = [];
for (let i = 0; i < arguments.length && i < 3; ++i) {
args[i] = arguments[i];
}
args[0] = conversions["unsigned long"](args[0], {
context: "Failed to execute 'setSelectionRange' on 'HTMLTextAreaElement': parameter 1"
});
args[1] = conversions["unsigned long"](args[1], {
context: "Failed to execute 'setSelectionRange' on 'HTMLTextAreaElement': parameter 2"
});
if (args[2] !== undefined) {
args[2] = conversions["DOMString"](args[2], {
context: "Failed to execute 'setSelectionRange' on 'HTMLTextAreaElement': parameter 3"
});
}
return this[impl].setSelectionRange(...args);
};
Object.defineProperty(HTMLTextAreaElement.prototype, "autocomplete", {
get() {
const value = this.getAttribute("autocomplete");
return value === null ? "" : value;
},
set(V) {
V = conversions["DOMString"](V, {
context: "Failed to set the 'autocomplete' property on 'HTMLTextAreaElement': The provided value"
});
this.setAttribute("autocomplete", V);
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "autofocus", {
get() {
return this.hasAttribute("autofocus");
},
set(V) {
V = conversions["boolean"](V, {
context: "Failed to set the 'autofocus' property on 'HTMLTextAreaElement': The provided value"
});
if (V) {
this.setAttribute("autofocus", "");
} else {
this.removeAttribute("autofocus");
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "cols", {
get() {
return this[impl].cols;
},
set(V) {
V = conversions["unsigned long"](V, {
context: "Failed to set the 'cols' property on 'HTMLTextAreaElement': The provided value"
});
this[impl].cols = V;
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "dirName", {
get() {
const value = this.getAttribute("dirName");
return value === null ? "" : value;
},
set(V) {
V = conversions["DOMString"](V, {
context: "Failed to set the 'dirName' property on 'HTMLTextAreaElement': The provided value"
});
this.setAttribute("dirName", V);
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "disabled", {
get() {
return this.hasAttribute("disabled");
},
set(V) {
V = conversions["boolean"](V, {
context: "Failed to set the 'disabled' property on 'HTMLTextAreaElement': The provided value"
});
if (V) {
this.setAttribute("disabled", "");
} else {
this.removeAttribute("disabled");
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "form", {
get() {
return utils.tryWrapperForImpl(this[impl].form);
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "inputMode", {
get() {
const value = this.getAttribute("inputMode");
return value === null ? "" : value;
},
set(V) {
V = conversions["DOMString"](V, {
context: "Failed to set the 'inputMode' property on 'HTMLTextAreaElement': The provided value"
});
this.setAttribute("inputMode", V);
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "maxLength", {
get() {
const value = parseInt(this.getAttribute("maxLength"));
return isNaN(value) || value < -2147483648 || value > 2147483647 ? 0 : value;
},
set(V) {
V = conversions["long"](V, {
context: "Failed to set the 'maxLength' property on 'HTMLTextAreaElement': The provided value"
});
this.setAttribute("maxLength", String(V));
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "minLength", {
get() {
const value = parseInt(this.getAttribute("minLength"));
return isNaN(value) || value < -2147483648 || value > 2147483647 ? 0 : value;
},
set(V) {
V = conversions["long"](V, {
context: "Failed to set the 'minLength' property on 'HTMLTextAreaElement': The provided value"
});
this.setAttribute("minLength", String(V));
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "name", {
get() {
const value = this.getAttribute("name");
return value === null ? "" : value;
},
set(V) {
V = conversions["DOMString"](V, {
context: "Failed to set the 'name' property on 'HTMLTextAreaElement': The provided value"
});
this.setAttribute("name", V);
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "placeholder", {
get() {
const value = this.getAttribute("placeholder");
return value === null ? "" : value;
},
set(V) {
V = conversions["DOMString"](V, {
context: "Failed to set the 'placeholder' property on 'HTMLTextAreaElement': The provided value"
});
this.setAttribute("placeholder", V);
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "readOnly", {
get() {
return this.hasAttribute("readOnly");
},
set(V) {
V = conversions["boolean"](V, {
context: "Failed to set the 'readOnly' property on 'HTMLTextAreaElement': The provided value"
});
if (V) {
this.setAttribute("readOnly", "");
} else {
this.removeAttribute("readOnly");
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "required", {
get() {
return this.hasAttribute("required");
},
set(V) {
V = conversions["boolean"](V, {
context: "Failed to set the 'required' property on 'HTMLTextAreaElement': The provided value"
});
if (V) {
this.setAttribute("required", "");
} else {
this.removeAttribute("required");
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "rows", {
get() {
return this[impl].rows;
},
set(V) {
V = conversions["unsigned long"](V, {
context: "Failed to set the 'rows' property on 'HTMLTextAreaElement': The provided value"
});
this[impl].rows = V;
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "wrap", {
get() {
const value = this.getAttribute("wrap");
return value === null ? "" : value;
},
set(V) {
V = conversions["DOMString"](V, {
context: "Failed to set the 'wrap' property on 'HTMLTextAreaElement': The provided value"
});
this.setAttribute("wrap", V);
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "type", {
get() {
return this[impl].type;
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "defaultValue", {
get() {
return this[impl].defaultValue;
},
set(V) {
V = conversions["DOMString"](V, {
context: "Failed to set the 'defaultValue' property on 'HTMLTextAreaElement': The provided value"
});
this[impl].defaultValue = V;
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "value", {
get() {
return this[impl].value;
},
set(V) {
V = conversions["DOMString"](V, {
context: "Failed to set the 'value' property on 'HTMLTextAreaElement': The provided value",
treatNullAsEmptyString: true
});
this[impl].value = V;
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "textLength", {
get() {
return this[impl].textLength;
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "selectionStart", {
get() {
return this[impl].selectionStart;
},
set(V) {
if (V === null || V === undefined) {
V = null;
} else {
V = conversions["unsigned long"](V, {
context: "Failed to set the 'selectionStart' property on 'HTMLTextAreaElement': The provided value"
});
}
this[impl].selectionStart = V;
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "selectionEnd", {
get() {
return this[impl].selectionEnd;
},
set(V) {
if (V === null || V === undefined) {
V = null;
} else {
V = conversions["unsigned long"](V, {
context: "Failed to set the 'selectionEnd' property on 'HTMLTextAreaElement': The provided value"
});
}
this[impl].selectionEnd = V;
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, "selectionDirection", {
get() {
return this[impl].selectionDirection;
},
set(V) {
if (V === null || V === undefined) {
V = null;
} else {
V = conversions["DOMString"](V, {
context: "Failed to set the 'selectionDirection' property on 'HTMLTextAreaElement': The provided value"
});
}
this[impl].selectionDirection = V;
},
enumerable: true,
configurable: true
});
Object.defineProperty(HTMLTextAreaElement.prototype, Symbol.toStringTag, {
value: "HTMLTextAreaElement",
writable: false,
enumerable: false,
configurable: true
});
const iface = {
mixedInto: [],
is(obj) {
if (obj) {
if (obj[impl] instanceof Impl.implementation) {
return true;
}
for (let i = 0; i < module.exports.mixedInto.length; ++i) {
if (obj instanceof module.exports.mixedInto[i]) {
return true;
}
}
}
return false;
},
isImpl(obj) {
if (obj) {
if (obj instanceof Impl.implementation) {
return true;
}
const wrapper = utils.wrapperForImpl(obj);
for (let i = 0; i < module.exports.mixedInto.length; ++i) {
if (wrapper instanceof module.exports.mixedInto[i]) {
return true;
}
}
}
return false;
},
convert(obj, { context = "The provided value" } = {}) {
if (module.exports.is(obj)) {
return utils.implForWrapper(obj);
}
throw new TypeError(`${context} is not of type 'HTMLTextAreaElement'.`);
},
create(constructorArgs, privateData) {
let obj = Object.create(HTMLTextAreaElement.prototype);
this.setup(obj, constructorArgs, privateData);
return obj;
},
createImpl(constructorArgs, privateData) {
let obj = Object.create(HTMLTextAreaElement.prototype);
this.setup(obj, constructorArgs, privateData);
return utils.implForWrapper(obj);
},
_internalSetup(obj) {
HTMLElement._internalSetup(obj);
},
setup(obj, constructorArgs, privateData) {
if (!privateData) privateData = {};
privateData.wrapper = obj;
this._internalSetup(obj);
Object.defineProperty(obj, impl, {
value: new Impl.implementation(constructorArgs, privateData),
writable: false,
enumerable: false,
configurable: true
});
obj[impl][utils.wrapperSymbol] = obj;
},
interface: HTMLTextAreaElement,
expose: {
Window: { HTMLTextAreaElement: HTMLTextAreaElement }
}
};
module.exports = iface;
const Impl = require("../nodes/HTMLTextAreaElement-impl.js");
| danshapiro-optimizely/full_stack_redux | voting-client/node_modules/jsdom/lib/jsdom/living/generated/HTMLTextAreaElement.js | JavaScript | mit | 12,969 |
$.fn.observationFieldsForm = function(options) {
$(this).each(function() {
var that = this
$('.observation_field_chooser', this).chooser({
collectionUrl: '/observation_fields.json',
resourceUrl: '/observation_fields/{{id}}.json',
afterSelect: function(item) {
$('.observation_field_chooser', that).parents('.ui-chooser:first').next('.button').click()
$('.observation_field_chooser', that).chooser('clear')
}
})
$('.addfieldbutton', this).hide()
$('#createfieldbutton', this).click(ObservationFields.newObservationFieldButtonHandler)
ObservationFields.fieldify({focus: false})
})
}
$.fn.newObservationField = function(markup) {
var currentField = $('.observation_field_chooser', this).chooser('selected')
if (!currentField || typeof(currentField) == 'undefined') {
alert('Please choose a field type')
return
}
if ($('#observation_field_'+currentField.recordId, this).length > 0) {
alert('You already have a field for that type')
return
}
$('.observation_fields', this).append(markup)
ObservationFields.fieldify({observationField: currentField})
}
var ObservationFields = {
newObservationFieldButtonHandler: function() {
var url = $(this).attr('href'),
dialog = $('<div class="dialog"><span class="loading status">Loading...</span></div>')
$(document.body).append(dialog)
$(dialog).dialog({
modal:true,
title: I18n.t('new_observation_field')
})
$(dialog).load(url, "format=js", function() {
$('form', dialog).submit(function() {
$.ajax({
type: "post",
url: $(this).attr('action'),
data: $(this).serialize(),
dataType: 'json'
})
.done(function(data, textStatus, req) {
$(dialog).dialog('close')
$('.observation_field_chooser').chooser('selectItem', data)
})
.fail(function (xhr, ajaxOptions, thrownError){
var json = $.parseJSON(xhr.responseText)
if (json && json.errors && json.errors.length > 0) {
alert(json.errors.join(''))
} else {
alert(I18n.t('doh_something_went_wrong'))
}
})
return false
})
$(this).centerDialog()
})
return false
},
fieldify: function(options) {
options = options || {}
options.focus = typeof(options.focus) == 'undefined' ? true : options.focus
$('.observation_field').not('.fieldified').each(function() {
var lastName = $(this).siblings('.fieldified:last').find('input').attr('name')
if (lastName) {
var matches = lastName.match(/observation_field_values_attributes\]\[(\d*)\]/)
if (matches) {
var index = parseInt(matches[1]) + 1
} else {
var index = 0
}
} else {
var index = 0
}
$(this).addClass('fieldified')
var input = $('.ofv_input input.text', this)
var currentField = options.observationField || $.parseJSON($(input).attr('data-json'))
if (!currentField) return
currentField.recordId = currentField.recordId || currentField.id
$(this).attr('id', 'observation_field_'+currentField.recordId)
$(this).attr('data-observation-field-id', currentField.recordId)
$('.labeldesc label', this).html(currentField.name)
$('.description', this).html(currentField.description)
$('.observation_field_id', this).val(currentField.recordId)
$('input', this).each(function() {
var newName = $(this).attr('name')
.replace(
/observation_field_values_attributes\]\[(\d*)\]/,
'observation_field_values_attributes]['+index+']')
$(this).attr('name', newName)
})
if (currentField.allowed_values && currentField.allowed_values != '') {
var allowed_values = currentField.allowed_values.split('|')
var select = $('<select></select>')
for (var i=0; i < allowed_values.length; i++) {
select.append($('<option>'+allowed_values[i]+'</option>'))
}
select.change(function() { input.val($(this).val()) })
$(input).hide()
$(input).after(select)
select.val(input.val()).change()
if (options.focus) { select.focus() }
} else if (currentField.datatype == 'numeric') {
var newInput = input.clone()
newInput.attr('type', 'number')
newInput.attr('step', 'any')
input.after(newInput)
input.remove()
if (options.focus) { newInput.focus() }
} else if (currentField.datatype == 'date') {
$(input).iNatDatepicker({constrainInput: true})
if (options.focus) { input.focus() }
} else if (currentField.datatype == 'time') {
$(input).timepicker({})
if (options.focus) { input.focus() }
} else if (currentField.datatype == 'taxon') {
var newInput = input.clone()
newInput.attr('name', 'taxon_name')
input.after(newInput)
input.hide()
$(newInput).removeClass('ofv_value_field')
var taxon = input.data( "taxon" );
if( taxon ) {
newInput.val( taxon.leading_name );
}
$(newInput).taxonAutocomplete({
taxon_id_el: input
});
if( options.focus ) {
newInput.focus( );
}
} else if (options.focus) {
input.focus()
}
})
},
showObservationFieldsDialog: function(options) {
options = options || {}
var url = options.url || '/observations/'+window.observation.id+'/fields',
title = options.title || I18n.t('observation_fields'),
originalInput = options.originalInput
var dialog = $('#obsfielddialog')
if (dialog.length == 0) {
dialog = $('<div id="obsfielddialog"></div>').addClass('dialog').html('<div class="loading status">Loading...</div>')
}
$('.qtip.ui-tooltip').qtip('hide');
dialog.load(url, function() {
var diag = this
$(this).observationFieldsForm()
$(this).centerDialog()
$('form:has(input[required])', this).submit(checkFormForRequiredFields)
if (originalInput) {
var form = $('form', this)
$(form).submit(function() {
var ajaxOptions = {
url: $(form).attr('action'),
type: $(form).attr('method'),
data: $(form).serialize(),
dataType: 'json'
}
$.ajax(ajaxOptions).done(function() {
$.rails.fire($(originalInput), 'ajax:success')
$(diag).dialog('close')
}).fail(function() {
alert('Failed to add to project')
})
return false
})
}
})
dialog.dialog({
modal: true,
title: title,
width: 600,
maxHeight: $(window).height() * 0.8
})
}
}
// the following stuff doesn't have too much to do with observation fields, but it's at least tangentially related
$(document).ready(function() {
$(document).on('ajax:success', '#project_menu .addlink, .project_invitation .acceptlink, #projectschooser .addlink', function(e, json, status) {
var observationId = (json && json.observation_id) || $(this).data('observation-id') || window.observation.id
if (json && json.project && json.project.project_observation_fields && json.project.project_observation_fields.length > 0) {
if (json.observation.observation_field_values && json.observation.observation_field_values.length > 0) {
var ofvs = json.observation.observation_field_values,
pofs = json.project.project_observation_fields,
ofv_of_ids = $.map(ofvs, function(ofv) { return ofv.observation_field_id }),
pof_of_ids = $.map(pofs, function(pof) { return pof.observation_field_id }),
intersection = $.map(ofv_of_ids, function(a) { return $.inArray(a, pof_of_ids) < 0 ? null : a })
if (intersection.length >= pof_of_ids.length) { return true }
}
ObservationFields.showObservationFieldsDialog({
url: '/observations/'+observationId+'/fields?project_id='+json.project_id,
title: 'Project observation fields for ' + json.project.title,
originalInput: this
})
}
})
$(document).on('ajax:error', '#project_menu .addlink, .project_invitation .acceptlink, #projectschooser .addlink', function(e, xhr, error, status) {
var json = $.parseJSON(xhr.responseText),
projectId = json.project_observation.project_id || $(this).data('project-id'),
observationId = json.project_observation.observation_id || $(this).data('observation-id') || window.observation.id
if (json.error.match(/observation field/)) {
ObservationFields.showObservationFieldsDialog({
url: '/observations/'+observationId+'/fields?project_id='+projectId,
title: 'Project observation fields',
originalInput: this
})
} else if (json.error.match(/must belong to a member/)) {
showJoinProjectDialog(projectId, {originalInput: this})
} else {
alert(json.error)
}
})
$(document).on('ajax:error', '#project_menu .removelink, .project_invitation .removelink, #projectschooser .removelink', function(e, xhr, error, status) {
alert(xhr.responseText)
})
})
| lucas-ez/inaturalist | app/assets/javascripts/observations/observation_fields.js | JavaScript | mit | 9,266 |
exports.createSession = function(req, res, newUser) {
return req.session.regenerate(function() {
req.session.user = newUser;
// res.redirect('/');
});
};
exports.isLoggedIn = function(req, res) {
// return req.session ? !!req.session.user : false;
console.log(!!req.user);
return req.user ? !!req.user : false;
};
exports.checkUser = function(req, res, next){
if (!exports.isLoggedIn(req)){
res.redirect('/login');
} else {
next();
}
}; | TCL735/job-spotter | server/lib/utility.js | JavaScript | mit | 476 |
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
function returnValueSquare(x,y,z)
{
WScript.Echo("value:"+ x + " index:" + y + " Object:" + z);
return x*x;
}
function returnIndexSquare(x,y,z)
{
WScript.Echo("value:"+ x + " index:" + y + " Object:" + z);
return y*y;
}
function returnRandom(x,y,z)
{
WScript.Echo("value:"+ x + " index:" + y + " Object:" + z);
return x*y;
}
Array.prototype[6] = 20;
var x = [1,2,3,4,5];
var y = x.map(returnValueSquare,this);
WScript.Echo(y);
x = [10,20,30,40,50];
y = x.map(returnIndexSquare, this);
WScript.Echo(y);
x = [10,20,30,40,50];
y = x.map(returnRandom, this);
WScript.Echo(y);
x = {0: "abc", 1: "def", 2: "xyz"}
x.length = 3;
y = Array.prototype.map.call(x, returnValueSquare,this);
WScript.Echo(y);
y = Array.prototype.map.call(x, returnIndexSquare,this);
WScript.Echo(y);
y = Array.prototype.map.call(x, returnRandom, this);
WScript.Echo(y);
x = [10,20,30,40,50];
x[8] = 10;
y = x.map(returnValueSquare, this);
WScript.Echo(y);
| arunetm/ChakraCore_0114 | test/es5/array_map.js | JavaScript | mit | 1,381 |
const gulp = require('gulp');
const util = require('gulp-util');
const zip = require('gulp-zip');
const release = require('gulp-github-release');
const folders = require('gulp-folders');
const nwBuilder = require('gulp-nw-builder');
const fs = require('fs');
const changelog = require('conventional-changelog');
const execSync = require('child_process').execSync;
const del = require('del');
const vinylPaths = require('vinyl-paths');
const getPaths = require('./_common').getPaths;
const currentTag = require('./_common').currentTag;
const binaryPath = () => getPaths().bin.build + '/OpenChallenge';
gulp.task('clean:binaries', () => {
const paths = getPaths();
return gulp.src([paths.bin.build, paths.bin.release])
.pipe(vinylPaths(del))
.on('error', util.log);
});
gulp.task('package:binaries', ['generate:binaries'], folders(binaryPath(), (folder) => {
return gulp.src(`${binaryPath()}/${folder}/**/*`)
.pipe(zip(`${folder}.zip`))
.pipe(gulp.dest(getPaths().bin.release));
}));
gulp.task('upload:binaries', ['package:binaries'], () => {
return gulp.src(`${getPaths().bin.release}/*.zip`)
.pipe(release({
repo: 'openchallenge',
owner: 'seiyria',
tag: currentTag(),
manifest: require('../package.json')
}));
});
gulp.task('generate:binaries', ['clean:binaries', 'copy:nw'], () => {
execSync('npm install --prefix ./dist/ express');
const paths = getPaths();
return gulp.src(`${paths.dist}/**/*`)
.pipe(nwBuilder({
version: 'v0.12.2',
platforms: ['osx64', 'win64', 'linux64'],
appName: 'OpenChallenge',
appVersion: currentTag(),
buildDir: paths.bin.build,
cacheDir: paths.bin.cache,
macIcns: './favicon.icns',
winIco: './favicon.ico'
}));
});
gulp.task('generate:changelog', () => {
return changelog({
releaseCount: 0,
preset: 'angular'
})
.pipe(fs.createWriteStream('CHANGELOG.md'));
}); | seiyria/openchallenge | gulp/binaries.js | JavaScript | mit | 1,935 |
(function () {
'use strict';
angular
.module('app.layout')
.controller('SidebarController', SidebarController);
SidebarController.$inject = ['routerHelper', '$scope', '$rootScope'];
/* @ngInject */
function SidebarController (routerHelper, $scope, $rootScope) {
var vm = this;
vm.hideSidebar = hideSidebar;
init();
///////////////
function init () {
// generate sidebar nav menus
vm.navs = _getNavMenus();
// tell others we have sidebar
$rootScope.hasSidebar = true;
$scope.$on('$destroy', function () {
$rootScope.hasSidebar = false;
});
}
function hideSidebar () {
$rootScope.showSidebar = false;
}
function _getNavMenus () {
var navs = [];
var allStates = routerHelper.getStates();
allStates.forEach(function (state) {
if (state.sidebar) {
var nav = state.sidebar;
nav.link = state.name;
navs.push(nav);
}
});
return navs;
}
}
})();
| hitesh97/generator-aio-angular | app/templates/client/source/app/layout/sidebar.controller.js | JavaScript | mit | 1,216 |
// ==UserScript==
// @name Sticky vote buttons
// @namespace http://stackexchange.com/users/4337810/
// @version 1.0
// @description Makes the vote buttons next to posts sticky whilst scrolling on that post
// @author ᔕᖺᘎᕊ (http://stackexchange.com/users/4337810/)
// @match *://*.stackexchange.com/*
// @match *://*.stackoverflow.com/*
// @match *://*.superuser.com/*
// @match *://*.serverfault.com/*
// @match *://*.askubuntu.com/*
// @match *://*.stackapps.com/*
// @match *://*.mathoverflow.net/*
// @require https://cdn.rawgit.com/EnzoMartin/Sticky-Element/master/jquery.stickyelement.js
// @grant none
// ==/UserScript==
$(document).ready(function() {
$(window).scroll(function(){
$(".votecell").each(function(){
var offset = 0;
if($(".topbar").css("position") == "fixed"){
offset = 34;
}
var vote = $(this).find(".vote");
if($(this).offset().top - $(window).scrollTop() + offset <= 0){
if($(this).offset().top + $(this).height() + offset - $(window).scrollTop() - vote.height() > 0){
vote.css({position:"fixed", left:$(this).offset().left, top:0 + offset});
}else{
vote.css({position:"relative", left:0, top:$(this).height()-vote.height()});
}
}else{
vote.css({position:"relative", left:0, top:0});
}
});
});
});
| shu8/Stack-Overflow-Optional-Features | Stand-alone-scripts/stickyVoteButtons.user.js | JavaScript | mit | 1,377 |
/**
* @author mrdoob / http://mrdoob.com/
* @author alteredq / http://alteredqualia.com/
* @author paulirish / http://paulirish.com/
*/
THREE.FirstPersonControls = function ( object, domElement ) {
if ( domElement === undefined ) {
console.warn( 'THREE.FirstPersonControls: The second parameter "domElement" is now mandatory.' );
domElement = document;
}
this.object = object;
this.domElement = domElement;
// API
this.enabled = true;
this.movementSpeed = 1.0;
this.lookSpeed = 0.005;
this.lookVertical = true;
this.autoForward = false;
this.activeLook = true;
this.heightSpeed = false;
this.heightCoef = 1.0;
this.heightMin = 0.0;
this.heightMax = 1.0;
this.constrainVertical = false;
this.verticalMin = 0;
this.verticalMax = Math.PI;
this.mouseDragOn = false;
// internals
this.autoSpeedFactor = 0.0;
this.mouseX = 0;
this.mouseY = 0;
this.moveForward = false;
this.moveBackward = false;
this.moveLeft = false;
this.moveRight = false;
this.viewHalfX = 0;
this.viewHalfY = 0;
// private variables
var lat = 0;
var lon = 0;
var lookDirection = new THREE.Vector3();
var spherical = new THREE.Spherical();
var target = new THREE.Vector3();
//
if ( this.domElement !== document ) {
this.domElement.setAttribute( 'tabindex', - 1 );
}
//
this.handleResize = function () {
if ( this.domElement === document ) {
this.viewHalfX = window.innerWidth / 2;
this.viewHalfY = window.innerHeight / 2;
} else {
this.viewHalfX = this.domElement.offsetWidth / 2;
this.viewHalfY = this.domElement.offsetHeight / 2;
}
};
this.onMouseDown = function ( event ) {
if ( this.domElement !== document ) {
this.domElement.focus();
}
event.preventDefault();
event.stopPropagation();
if ( this.activeLook ) {
switch ( event.button ) {
case 0: this.moveForward = true; break;
case 2: this.moveBackward = true; break;
}
}
this.mouseDragOn = true;
};
this.onMouseUp = function ( event ) {
event.preventDefault();
event.stopPropagation();
if ( this.activeLook ) {
switch ( event.button ) {
case 0: this.moveForward = false; break;
case 2: this.moveBackward = false; break;
}
}
this.mouseDragOn = false;
};
this.onMouseMove = function ( event ) {
if ( this.domElement === document ) {
this.mouseX = event.pageX - this.viewHalfX;
this.mouseY = event.pageY - this.viewHalfY;
} else {
this.mouseX = event.pageX - this.domElement.offsetLeft - this.viewHalfX;
this.mouseY = event.pageY - this.domElement.offsetTop - this.viewHalfY;
}
};
this.onKeyDown = function ( event ) {
//event.preventDefault();
switch ( event.keyCode ) {
case 38: /*up*/
case 87: /*W*/ this.moveForward = true; break;
case 37: /*left*/
case 65: /*A*/ this.moveLeft = true; break;
case 40: /*down*/
case 83: /*S*/ this.moveBackward = true; break;
case 39: /*right*/
case 68: /*D*/ this.moveRight = true; break;
case 82: /*R*/ this.moveUp = true; break;
case 70: /*F*/ this.moveDown = true; break;
}
};
this.onKeyUp = function ( event ) {
switch ( event.keyCode ) {
case 38: /*up*/
case 87: /*W*/ this.moveForward = false; break;
case 37: /*left*/
case 65: /*A*/ this.moveLeft = false; break;
case 40: /*down*/
case 83: /*S*/ this.moveBackward = false; break;
case 39: /*right*/
case 68: /*D*/ this.moveRight = false; break;
case 82: /*R*/ this.moveUp = false; break;
case 70: /*F*/ this.moveDown = false; break;
}
};
this.lookAt = function ( x, y, z ) {
if ( x.isVector3 ) {
target.copy( x );
} else {
target.set( x, y, z );
}
this.object.lookAt( target );
setOrientation( this );
return this;
};
this.update = function () {
var targetPosition = new THREE.Vector3();
return function update( delta ) {
if ( this.enabled === false ) return;
if ( this.heightSpeed ) {
var y = THREE.Math.clamp( this.object.position.y, this.heightMin, this.heightMax );
var heightDelta = y - this.heightMin;
this.autoSpeedFactor = delta * ( heightDelta * this.heightCoef );
} else {
this.autoSpeedFactor = 0.0;
}
var actualMoveSpeed = delta * this.movementSpeed;
if ( this.moveForward || ( this.autoForward && ! this.moveBackward ) ) this.object.translateZ( - ( actualMoveSpeed + this.autoSpeedFactor ) );
if ( this.moveBackward ) this.object.translateZ( actualMoveSpeed );
if ( this.moveLeft ) this.object.translateX( - actualMoveSpeed );
if ( this.moveRight ) this.object.translateX( actualMoveSpeed );
if ( this.moveUp ) this.object.translateY( actualMoveSpeed );
if ( this.moveDown ) this.object.translateY( - actualMoveSpeed );
var actualLookSpeed = delta * this.lookSpeed;
if ( ! this.activeLook ) {
actualLookSpeed = 0;
}
var verticalLookRatio = 1;
if ( this.constrainVertical ) {
verticalLookRatio = Math.PI / ( this.verticalMax - this.verticalMin );
}
lon -= this.mouseX * actualLookSpeed;
if ( this.lookVertical ) lat -= this.mouseY * actualLookSpeed * verticalLookRatio;
lat = Math.max( - 85, Math.min( 85, lat ) );
var phi = THREE.Math.degToRad( 90 - lat );
var theta = THREE.Math.degToRad( lon );
if ( this.constrainVertical ) {
phi = THREE.Math.mapLinear( phi, 0, Math.PI, this.verticalMin, this.verticalMax );
}
var position = this.object.position;
targetPosition.setFromSphericalCoords( 1, phi, theta ).add( position );
this.object.lookAt( targetPosition );
};
}();
function contextmenu( event ) {
event.preventDefault();
}
this.dispose = function () {
this.domElement.removeEventListener( 'contextmenu', contextmenu, false );
this.domElement.removeEventListener( 'mousedown', _onMouseDown, false );
this.domElement.removeEventListener( 'mousemove', _onMouseMove, false );
this.domElement.removeEventListener( 'mouseup', _onMouseUp, false );
window.removeEventListener( 'keydown', _onKeyDown, false );
window.removeEventListener( 'keyup', _onKeyUp, false );
};
var _onMouseMove = bind( this, this.onMouseMove );
var _onMouseDown = bind( this, this.onMouseDown );
var _onMouseUp = bind( this, this.onMouseUp );
var _onKeyDown = bind( this, this.onKeyDown );
var _onKeyUp = bind( this, this.onKeyUp );
this.domElement.addEventListener( 'contextmenu', contextmenu, false );
this.domElement.addEventListener( 'mousemove', _onMouseMove, false );
this.domElement.addEventListener( 'mousedown', _onMouseDown, false );
this.domElement.addEventListener( 'mouseup', _onMouseUp, false );
window.addEventListener( 'keydown', _onKeyDown, false );
window.addEventListener( 'keyup', _onKeyUp, false );
function bind( scope, fn ) {
return function () {
fn.apply( scope, arguments );
};
}
function setOrientation( controls ) {
var quaternion = controls.object.quaternion;
lookDirection.set( 0, 0, - 1 ).applyQuaternion( quaternion );
spherical.setFromVector3( lookDirection );
lat = 90 - THREE.Math.radToDeg( spherical.phi );
lon = THREE.Math.radToDeg( spherical.theta );
}
this.handleResize();
setOrientation( this );
};
| SpinVR/three.js | examples/js/controls/FirstPersonControls.js | JavaScript | mit | 7,190 |
"use strict";
/**
* Copyright 2017 Google Inc.
*
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
var util_1 = require("./util/util");
/**
* Abstraction around FirebaseApp's token fetching capabilities.
*/
var AuthTokenProvider = /** @class */ (function () {
/**
* @param {!FirebaseApp} app_
*/
function AuthTokenProvider(app_) {
this.app_ = app_;
}
/**
* @param {boolean} forceRefresh
* @return {!Promise<FirebaseAuthTokenData>}
*/
AuthTokenProvider.prototype.getToken = function (forceRefresh) {
return this.app_['INTERNAL']['getToken'](forceRefresh).then(null,
// .catch
function (error) {
// TODO: Need to figure out all the cases this is raised and whether
// this makes sense.
if (error && error.code === 'auth/token-not-initialized') {
util_1.log('Got auth/token-not-initialized error. Treating as null token.');
return null;
}
else {
return Promise.reject(error);
}
});
};
AuthTokenProvider.prototype.addTokenChangeListener = function (listener) {
// TODO: We might want to wrap the listener and call it with no args to
// avoid a leaky abstraction, but that makes removing the listener harder.
this.app_['INTERNAL']['addAuthTokenListener'](listener);
};
AuthTokenProvider.prototype.removeTokenChangeListener = function (listener) {
this.app_['INTERNAL']['removeAuthTokenListener'](listener);
};
AuthTokenProvider.prototype.notifyForInvalidToken = function () {
var errorMessage = 'Provided authentication credentials for the app named "' +
this.app_.name +
'" are invalid. This usually indicates your app was not ' +
'initialized correctly. ';
if ('credential' in this.app_.options) {
errorMessage +=
'Make sure the "credential" property provided to initializeApp() ' +
'is authorized to access the specified "databaseURL" and is from the correct ' +
'project.';
}
else if ('serviceAccount' in this.app_.options) {
errorMessage +=
'Make sure the "serviceAccount" property provided to initializeApp() ' +
'is authorized to access the specified "databaseURL" and is from the correct ' +
'project.';
}
else {
errorMessage +=
'Make sure the "apiKey" and "databaseURL" properties provided to ' +
'initializeApp() match the values provided for your app at ' +
'https://console.firebase.google.com/.';
}
util_1.warn(errorMessage);
};
return AuthTokenProvider;
}());
exports.AuthTokenProvider = AuthTokenProvider;
//# sourceMappingURL=AuthTokenProvider.js.map
| aggiedefenders/aggiedefenders.github.io | node_modules/@firebase/database/dist/cjs/src/core/AuthTokenProvider.js | JavaScript | mit | 3,512 |
import modules from 'ui/modules';
import angular from 'angular';
function Storage(store) {
let self = this;
self.store = store;
self.get = function (key) {
try {
return JSON.parse(self.store.getItem(key));
} catch (e) {
return null;
}
};
self.set = function (key, value) {
try {
return self.store.setItem(key, angular.toJson(value));
} catch (e) {
return false;
}
};
self.remove = function (key) {
return self.store.removeItem(key);
};
self.clear = function () {
return self.store.clear();
};
}
let createService = function (type) {
return function ($window) {
return new Storage($window[type]);
};
};
modules.get('kibana/storage')
.service('localStorage', createService('localStorage'))
.service('sessionStorage', createService('sessionStorage'));
| phupn1510/ELK | kibana/kibana/src/ui/public/storage/storage.js | JavaScript | mit | 844 |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var plugin_1 = require('./plugin');
/**
* @name Camera
* @description
* Take a photo or capture video.
*
* Requires {@link module:driftyco/ionic-native} and the Cordova plugin: `cordova-plugin-camera`. For more info, please see the [Cordova Camera Plugin Docs](https://github.com/apache/cordova-plugin-camera).
*
* @usage
* ```typescript
* import { Camera } from 'ionic-native';
*
*
* Camera.getPicture(options).then((imageData) => {
* // imageData is either a base64 encoded string or a file URI
* // If it's base64:
* let base64Image = 'data:image/jpeg;base64,' + imageData;
* }, (err) => {
* // Handle error
* });
* ```
* @interfaces
* CameraOptions
* CameraPopoverOptions
*/
var Camera = (function () {
function Camera() {
}
/**
* Take a picture or video, or load one from the library.
* @param {CameraOptions?} options optional. Options that you want to pass to the camera. Encoding type, quality, etc. Platform-specific quirks are described in the [Cordova plugin docs](https://github.com/apache/cordova-plugin-camera#cameraoptions-errata-).
* @returns {Promise<any>} Returns a Promise that resolves with Base64 encoding of the image data, or the image file URI, depending on cameraOptions, otherwise rejects with an error.
*/
Camera.getPicture = function (options) { return; };
/**
* Remove intermediate image files that are kept in temporary storage after calling camera.getPicture.
* Applies only when the value of Camera.sourceType equals Camera.PictureSourceType.CAMERA and the Camera.destinationType equals Camera.DestinationType.FILE_URI.
* @returns {Promise<any>}
*/
Camera.cleanup = function () { return; };
;
/**
* @private
* @enum {number}
*/
Camera.DestinationType = {
/** Return base64 encoded string. DATA_URL can be very memory intensive and cause app crashes or out of memory errors. Use FILE_URI or NATIVE_URI if possible */
DATA_URL: 0,
/** Return file uri (content://media/external/images/media/2 for Android) */
FILE_URI: 1,
/** Return native uri (eg. asset-library://... for iOS) */
NATIVE_URI: 2
};
/**
* @private
* @enum {number}
*/
Camera.EncodingType = {
/** Return JPEG encoded image */
JPEG: 0,
/** Return PNG encoded image */
PNG: 1
};
/**
* @private
* @enum {number}
*/
Camera.MediaType = {
/** Allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType */
PICTURE: 0,
/** Allow selection of video only, ONLY RETURNS URL */
VIDEO: 1,
/** Allow selection from all media types */
ALLMEDIA: 2
};
/**
* @private
* @enum {number}
*/
Camera.PictureSourceType = {
/** Choose image from picture library (same as SAVEDPHOTOALBUM for Android) */
PHOTOLIBRARY: 0,
/** Take picture from camera */
CAMERA: 1,
/** Choose image from picture library (same as PHOTOLIBRARY for Android) */
SAVEDPHOTOALBUM: 2
};
/**
* @private
* Matches iOS UIPopoverArrowDirection constants to specify arrow location on popover.
* @enum {number}
*/
Camera.PopoverArrowDirection = {
ARROW_UP: 1,
ARROW_DOWN: 2,
ARROW_LEFT: 4,
ARROW_RIGHT: 8,
ARROW_ANY: 15
};
/**
* @private
* @enum {number}
*/
Camera.Direction = {
/** Use the back-facing camera */
BACK: 0,
/** Use the front-facing camera */
FRONT: 1
};
__decorate([
plugin_1.Cordova({
callbackOrder: 'reverse'
})
], Camera, "getPicture", null);
__decorate([
plugin_1.Cordova({
platforms: ['iOS']
})
], Camera, "cleanup", null);
Camera = __decorate([
plugin_1.Plugin({
pluginName: 'Camera',
plugin: 'cordova-plugin-camera',
pluginRef: 'navigator.camera',
repo: 'https://github.com/apache/cordova-plugin-camera',
platforms: ['Android', 'BlackBerry', 'Browser', 'Firefox', 'FireOS', 'iOS', 'Windows', 'Windows Phone 8', 'Ubuntu']
})
], Camera);
return Camera;
}());
exports.Camera = Camera;
//# sourceMappingURL=camera.js.map | Spect-AR/Spect-AR | node_modules/node_modules/ionic-native/dist/es5/plugins/camera.js | JavaScript | mit | 4,969 |
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
'use strict';
function ThriftConst(def) {
this.name = def.id.name;
this.valueDefinition = def.value;
this.defined = false;
this.value = null;
this.surface = null;
}
ThriftConst.prototype.models = 'value';
ThriftConst.prototype.link = function link(model) {
if (!this.defined) {
this.defined = true;
this.value = model.resolveValue(this.valueDefinition);
this.surface = this.value;
model.consts[this.name] = this.value;
// Alias if first character is not lower-case
if (!/^[a-z]/.test(this.name)) {
model[this.name] = this.value;
}
}
return this;
};
module.exports.ThriftConst = ThriftConst;
| uber/thriftrw | const.js | JavaScript | mit | 1,818 |
define(
"dojox/widget/nls/he/FilePicker", ({
name: "שם",
path: "נתיב",
size: "גודל (בבתים)"
})
);
| hariomkumarmth/champaranexpress | wp-content/plugins/dojo/dojox/widget/nls/he/FilePicker.js.uncompressed.js | JavaScript | gpl-2.0 | 123 |
/**********************************************************************************
*
* This file is part of e-venement.
*
* e-venement is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License.
*
* e-venement is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with e-venement; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Copyright (c) 2006-2016 Baptiste SIMON <baptiste.simon AT e-glop.net>
* Copyright (c) 2006-2016 Libre Informatique [http://www.libre-informatique.fr/]
*
***********************************************************************************/
if ( LI === undefined )
var LI = {};
$(document).ready(function () {
var connector = new EveConnector('https://localhost:8164', function () {
// *T* here we are after the websocket first connection is established
getAvailableUsbDevices().then(getAvailableSerialDevices).then(function(){
if ( LI.activeEPT )
configureEPT();
});
connector.onError = function () {
$('#li_transaction_museum .print [name=direct], #li_transaction_manifestations .print [name=direct]')
.remove();
$('#li_transaction_museum .print').prop('title', null);
};
});
// AVAILABLE DEVICES ******************
function getAvailableDevices(type)
{
if (['usb', 'serial'].indexOf(type) === -1)
return Promise.reject('Wrong device type: ' + type);
// Get all the configured devices ids
connector.log('info', 'Configured ' + type + ' devices: ', LI[type]);
if (LI[type] === undefined)
return;
var devices = [];
['printers', 'displays', 'epts'].forEach(function(family){
if (LI[type][family] !== undefined)
for (var name in LI[type][family])
devices.push(LI[type][family][name][0]);
});
return connector.areDevicesAvailable({type: type, params: devices}).then(function(data){
// data contains the list of the available devices
connector.log('info', 'Available ' + type + ' devices:', data.params);
// Check if we have an available USB printer device and store it in LI.activeDirectPrinter global variable
var foundPrinter = false;
if ( type === "usb" && LI.usb.printers !== undefined ) {
foundPrinter = data.params.some(function(device){
for ( var name in LI.usb.printers )
if ( LI.usb.printers[name][0].vid === device.vid && LI.usb.printers[name][0].pid === device.pid ) {
LI.activeDirectPrinter = {type: type, params: device}; // global var
connector.log('info', 'LI.activeDirectPrinter:', LI.activeDirectPrinter);
return true;
}
return false;
});
}
foundPrinter && configureDirectPrint();
// Check if we have an available SERIAL display device and store it in LI.activeDisplay global variable
LI.activeDisplay = false; // global var
if ( type === "serial" && LI.serial.displays !== undefined ) {
data.params.some(function(device){
for ( var name in LI.serial.displays )
if ( device.pnpId.includes(LI.serial.displays[name][0].pnpId) ) {
LI.activeDisplay = {type: type, params: device};
connector.log('info', 'LI.activeDisplay:', LI.activeDisplay);
return true;
}
return false;
});
}
if (LI.activeDisplay) {
configureDisplay();
displayTotals();
}
// Check if we have an available serial EPT device and store it in LI.activeEPT global variable
LI.activeEPT = false; // global var
if ( type === "serial" && LI.serial.epts !== undefined ) {
data.params.some(function(device){
for ( var name in LI.serial.epts )
if ( device.pnpId.includes(LI.serial.epts[name][0].pnpId) ) {
LI.activeEPT = {type: type, params: device}; // global var
connector.log('info', 'LI.activeEPT:', LI.activeEPT);
return true;
}
return false;
});
}
}).catch(function(error){
connector.log('error', error);
});
}; // END getAvailableDevices()
function getAvailableUsbDevices()
{
return getAvailableDevices('usb');
};
function getAvailableSerialDevices()
{
return getAvailableDevices('serial');
};
// LCD DISPLAY ******************
var lastDisplay = {date: Date.now(), lines: []};
var displayTotalsTimeoutId;
// configure the form for handling LCD display (if there is an available LCD display)
function configureDisplay()
{
if ( LI.activeDisplay === undefined )
return;
// Refresh Display when totals change
$('#li_transaction_field_payments_list .topay .pit').on("changeData", displayTotals);
$('#li_transaction_field_payments_list .change .pit').on("changeData", displayTotals);
// Display totals when page (or tab) is selected
document.addEventListener("visibilitychange", function(evt){
visible = !this.hidden;
if ( visible )
displayTotals(500, true);
else
displayDefaultMsg();
});
// Display default message when leaving the page (or tab closed...)
$(window).on("beforeunload", function(){
$('#li_transaction_field_payments_list .topay .pit').unbind("changeData", displayTotals);
$('#li_transaction_field_payments_list .change .pit').unbind("changeData", displayTotals);
displayDefaultMsg(true);
});
};
// outputs totals on LCD display
function displayTotals(delay, force) {
var Display = LIDisplay(LI.activeDisplay, connector);
if (!Display)
return;
var total = $('#li_transaction_field_payments_list .topay .pit').data('value');
total = LI.format_currency(total, false).replace('€', 'E');
var total_label = $('.displays .display-total').text().trim();
var total_spaces = ' '.repeat(Display.width - total.length - total_label.length);
var left = $('#li_transaction_field_payments_list .change .pit').data('value');
left = LI.format_currency(left, false).replace('€', 'E');
var left_label = $('.displays .display-left').text().trim();
var left_spaces = ' '.repeat(Display.width - left.length - left_label.length);
var lines = [
total_label + total_spaces + total,
left_label + left_spaces + left
];
clearTimeout(displayTotalsTimeoutId);
if ( !force && lines.join('||') === lastDisplay.lines.join('||') ) {
return;
}
var now = Date.now();
if ( delay === undefined )
delay = (now - lastDisplay.date < 500) ? 500 : 0;
displayTotalsTimeoutId = setTimeout(function(){
lastDisplay.date = now;
lastDisplay.lines = lines;
Display.write(lines);
}, delay);
};
// outputs default message on USB display
function displayDefaultMsg(force) {
var Display = LIDisplay(LI.activeDisplay, connector);
if (!Display)
return;
var msg = $('.displays .display-default').text();
msg = msg || "...";
var lines = [msg, ''];
clearTimeout(displayTotalsTimeoutId);
if ( lines.join('||') === lastDisplay.lines.join('||') ) {
return;
}
var now = Date.now();
var delay = (now - lastDisplay.date < 500) ? 500 : 0;
if ( force ) {
lastDisplay.date = now;
lastDisplay.lines = lines;
Display.write(lines);
}
else displayTotalsTimeoutId = setTimeout(function(){
lastDisplay.date = now;
lastDisplay.lines = lines;
Display.write(lines);
}, delay);
};
// DIRECT PRINTING ******************
// configure the form for direct printing (if there is an available direct printer)
function configureDirectPrint()
{
if ( LI.activeDirectPrinter === undefined )
return;
var usbParams = LI.activeDirectPrinter.params;
var dp_title = $('#li_transaction_field_close .print .direct-printing-info').length > 0 ?
$('#li_transaction_field_close .print .direct-printing-info').text() :
( LI.directPrintTitle ? LI.directPrintTitle : "Direct Print" );
$('#li_transaction_museum .print, #li_transaction_manifestations .print')
.each(function () {
$(this)
.append($('<input type="hidden" />').prop('name', 'direct').val(JSON.stringify(usbParams)))
.prop('title', dp_title);
})
.attr('onsubmit', null)
.unbind('submit')
.submit(function () {
// *T* here we are when the print form is submitted
connector.log('info', 'Submitting direct print form...');
LI.printTickets(this, false, directPrint);
return false;
});
// Partial print
$('form.print.partial-print')
.append($('<input type="hidden" />').prop('name', 'direct').val(JSON.stringify(usbParams)))
.prop('title', dp_title)
.unbind('submit')
.submit(directPrint);
};
function directPrint(event) {
var form = event.target;
if (LI.activeDirectPrinter === undefined) {
LI.alert('Direct printer is undefined', 'error');
return false;
}
$.ajax({
method: $(form).prop('method'),
url: $(form).prop('action'),
data: $(form).serialize(),
error: function (error) {
console.error('directPrint ajax error', error);
},
success: function (data) {
// *T* here we are when we have got the base64 data representing tickets ready to be printed
if (!data) {
connector.log('info', 'Empty data, nothing to send');
return;
}
// send data to the printer through the connector then reads the printer answer
connector.log('info', 'Sending data...');
connector.log('info', data);
var Printer = LIPrinter(LI.activeDirectPrinter, connector);
if (!Printer) {
LI.alert('Direct printer not configured', 'error');
return;
}
var logData = {
transaction_id: LI.transactionId,
duplicate: $(form).find('[name=duplicate]').prop('checked'),
printer: JSON.stringify(LI.activeDirectPrinter)
};
Printer.print(data).then(function(res){
connector.log('info', 'Print OK', res);
LI.alert('Print OK');
logData.error = false;
logData.status = res.statuses.join(' | ');
logData.raw_status = res.raw_status;
}).catch(function (err) {
connector.log('error', 'Print error:', err);
for ( var i in err.statuses ) LI.alert(err.statuses[i], 'error');
logData.error = true;
logData.status = err.statuses.join(' | ');
logData.raw_status = err.raw_status;
}).then(function(){
// log direct print result in DB
$.ajax({
type: "GET",
url: LI.directPrintLogUrl,
data: {directPrint: logData},
dataType: 'json',
success: function () {
connector.log('info', 'directPrintLog success', LI.closePrintWindow);
typeof LI.closePrintWindow === "function" && LI.closePrintWindow();
},
error: function (err) {
console.error(err);
}
});
});
}
});
return false;
};
// ELECTRONIC PAYMENT TERMINAL ******************
// configure the form for EPT handling (if there is an available EPT)
function configureEPT() {
if ( LI.activeEPT === undefined )
return;
$('#li_transaction_field_payment_new button[data-ept=1]').click(startEPT);
$('.cancel-ept-transaction').click(cancelEPT);
}
// toggle between the payment form and the EPT screen
function toggleEPTtransaction()
{
$('#li_transaction_field_payment_new form').toggle();
$('#li_transaction_field_simplified .payments button[name="simplified[payment_method_id]"], #li_transaction_field_simplified .payments input').toggle()
$('#ept-transaction').toggle();
$('#ept-transaction-simplified').toggle();
}
function getCentsAmount(value) {
value = value + '';
var amount = value.replace(",", ".").trim();
if( /^(\-|\+)?[0-9]+(\.[0-9]+)?$/.test(amount) )
return Math.round(amount * 100);
return 'Not a number';
};
// Initiate a transaction with the EPT
function startEPT(event) {
var EPT = LIEPT(LI.activeEPT, connector);
if ( !EPT )
return true; // submits the payment form
var value = $('#transaction_payment_new_value').val().trim();
if ( value === '' )
value = LI.parseFloat($('#li_transaction_field_payments_list tfoot .change .sf_admin_list_td_list_value.pit').html());
var amount = getCentsAmount(value);
if ( isNaN(amount) || amount <= 0 ) {
alert('Wrong amount'); // TODO: translate this
return false;
}
var transaction_id = $("#transaction_close_id").val().trim();
if ( ! transaction_id ) {
alert('Transaction ID not found'); // TODO: translate this
return false;
}
// replace new payment form by EPT transaction message
toggleEPTtransaction();
// Find out if we need to wait for the EPT transaction end
var wait = ( LI.ept_wait_transaction_end !== undefined ) ? LI.ept_wait_transaction_end : false;
// Send the amount to the EPT
EPT.sendAmount(amount, {wait: wait}).then(function(res){
connector.log('info', res);
var errorMessage = $('.js-i18n[data-source="ept_failure"]').data('target');
if ( res.status === 'accepted' || res.status === 'handled')
$('#li_transaction_field_payment_new form').submit();
// TODO: check integrity (pos, amount, currency) and read priv and rep fields
else {
alert(errorMessage);
}
toggleEPTtransaction();
}).catch(function(err){
connector.log('error', err);
alert(errorMessage);
toggleEPTtransaction();
});
// prevent new payment form submit
return false;
}
function cancelEPT() {
// replace EPT transaction message by new payment form
toggleEPTtransaction();
}
});
| Fabrice-li/e-venement | web/js/tck-touchscreen-websockets.js | JavaScript | gpl-2.0 | 14,636 |
import PlanRequiredRoute from "../plan-required";
import Notify from 'ember-notify';
export default PlanRequiredRoute.extend({
model: function(params) {
var _this = this;
return this.store.find('entry', params.entry_id).then(function(entry) {
// Force a reload if the meta data is out of date
var meta = _this.store.metadataFor("entry");
if (meta.current_entry !== entry.get('entryDate')) {
return entry.reload();
} else {
return entry;
}
}, function(data) {
if (data.status === 404) {
// Set the meta data
var meta = data.responseJSON.meta;
_this.store.metaForType("entry", meta);
// Build the dummy record, for use in the new form
var entry = _this.store.createRecord('entry', {
entryDate: params.entry_id
});
return entry;
} else {
Notify.error(data.responseText, {closeAfter: 5000});
}
});
},
setupController: function(controller, model) {
this._super(controller, model);
var meta = this.store.metadataFor("entry");
controller.setProperties({
nextEntry: meta.next_entry,
randomEntry: meta.random_entry,
prevEntry: meta.prev_entry,
entryDatePretty: moment(model.get('entryDate')).format("MMMM Do, YYYY")
});
}
});
| closerlee/dayjot-root | ember/app/routes/entries/show.js | JavaScript | gpl-2.0 | 1,331 |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'flash', 'de', {
access: 'Skriptzugriff',
accessAlways: 'Immer',
accessNever: 'Nie',
accessSameDomain: 'Gleiche Domain',
alignAbsBottom: 'Abs Unten',
alignAbsMiddle: 'Abs Mitte',
alignBaseline: 'Basislinie',
alignTextTop: 'Text oben',
bgcolor: 'Hintergrundfarbe',
chkFull: 'Vollbildmodus erlauben',
chkLoop: 'Endlosschleife',
chkMenu: 'Flash-Menü aktivieren',
chkPlay: 'Automatisch Abspielen',
flashvars: 'Variablen für Flash',
hSpace: 'Horizontal-Abstand',
properties: 'Flash-Eigenschaften',
propertiesTab: 'Eigenschaften',
quality: 'Qualität',
qualityAutoHigh: 'Auto Hoch',
qualityAutoLow: 'Auto Niedrig',
qualityBest: 'Beste',
qualityHigh: 'Hoch',
qualityLow: 'Niedrig',
qualityMedium: 'Mittel',
scale: 'Skalierung',
scaleAll: 'Alles anzeigen',
scaleFit: 'Passgenau',
scaleNoBorder: 'Ohne Rand',
title: 'Flash-Eigenschaften',
vSpace: 'Vertikal-Abstand',
validateHSpace: 'HSpace muss eine Zahl sein.',
validateSrc: 'URL darf nicht leer sein.',
validateVSpace: 'VSpace muss eine Zahl sein.',
windowMode: 'Fenstermodus',
windowModeOpaque: 'Deckend',
windowModeTransparent: 'Transparent',
windowModeWindow: 'Fenster'
} );
| SeeyaSia/www | web/libraries/ckeditor/plugins/flash/lang/de.js | JavaScript | gpl-2.0 | 1,330 |
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2012 kindsoft.net
*
* @author Roddy <luolonghao@gmail.com>
* @website http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
* @version 4.1.4 (2012-11-11)
*
* 调试前必读:务必将DEBUG设成true,否则,死的很惨! added by zentao team.
*******************************************************************************/
(function (window, undefined) {
if (window.KindEditor) {
return;
}
if (!window.console) {
window.console = {};
}
if (!console.log) {
console.log = function () {};
}
var _VERSION = '4.1.4',
_ua = navigator.userAgent.toLowerCase(),
_IE = _ua.indexOf('msie') > -1 && _ua.indexOf('opera') == -1,
_GECKO = _ua.indexOf('gecko') > -1 && _ua.indexOf('khtml') == -1,
_WEBKIT = _ua.indexOf('applewebkit') > -1,
_OPERA = _ua.indexOf('opera') > -1,
_MOBILE = _ua.indexOf('mobile') > -1,
_IOS = /ipad|iphone|ipod/.test(_ua),
_QUIRKS = document.compatMode != 'CSS1Compat',
_matches = /(?:msie|firefox|webkit|opera)[\/:\s](\d+)/.exec(_ua),
_V = _matches ? _matches[1] : '0',
_TIME = new Date().getTime();
function _isArray(val) {
if (!val) {
return false;
}
return Object.prototype.toString.call(val) === '[object Array]';
}
function _isFunction(val) {
if (!val) {
return false;
}
return Object.prototype.toString.call(val) === '[object Function]';
}
function _inArray(val, arr) {
for (var i = 0, len = arr.length; i < len; i++) {
if (val === arr[i]) {
return i;
}
}
return -1;
}
function _each(obj, fn) {
if (_isArray(obj)) {
for (var i = 0, len = obj.length; i < len; i++) {
if (fn.call(obj[i], i, obj[i]) === false) {
break;
}
}
} else {
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
if (fn.call(obj[key], key, obj[key]) === false) {
break;
}
}
}
}
}
function _trim(str) {
return str.replace(/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g, '');
}
function _inString(val, str, delimiter) {
delimiter = delimiter === undefined ? ',' : delimiter;
return (delimiter + str + delimiter).indexOf(delimiter + val + delimiter) >= 0;
}
function _addUnit(val, unit) {
unit = unit || 'px';
return val && /^\d+$/.test(val) ? val + unit : val;
}
function _removeUnit(val) {
var match;
return val && (match = /(\d+)/.exec(val)) ? parseInt(match[1], 10) : 0;
}
function _escape(val) {
return val.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
}
function _unescape(val) {
return val.replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/&/g, '&');
}
function _toCamel(str) {
var arr = str.split('-');
str = '';
_each(arr, function(key, val) {
str += (key > 0) ? val.charAt(0).toUpperCase() + val.substr(1) : val;
});
return str;
}
function _toHex(val) {
function hex(d) {
var s = parseInt(d, 10).toString(16).toUpperCase();
return s.length > 1 ? s : '0' + s;
}
return val.replace(/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/ig,
function($0, $1, $2, $3) {
return '#' + hex($1) + hex($2) + hex($3);
}
);
}
function _toMap(val, delimiter) {
delimiter = delimiter === undefined ? ',' : delimiter;
var map = {}, arr = _isArray(val) ? val : val.split(delimiter), match;
_each(arr, function(key, val) {
if ((match = /^(\d+)\.\.(\d+)$/.exec(val))) {
for (var i = parseInt(match[1], 10); i <= parseInt(match[2], 10); i++) {
map[i.toString()] = true;
}
} else {
map[val] = true;
}
});
return map;
}
function _toArray(obj, offset) {
return Array.prototype.slice.call(obj, offset || 0);
}
function _undef(val, defaultVal) {
return val === undefined ? defaultVal : val;
}
function _invalidUrl(url) {
return !url || /[<>"]/.test(url);
}
function _addParam(url, param) {
return url.indexOf('?') >= 0 ? url + '&' + param : url + '?' + param;
}
function _extend(child, parent, proto) {
if (!proto) {
proto = parent;
parent = null;
}
var childProto;
if (parent) {
var fn = function () {};
fn.prototype = parent.prototype;
childProto = new fn();
_each(proto, function(key, val) {
childProto[key] = val;
});
} else {
childProto = proto;
}
childProto.constructor = child;
child.prototype = childProto;
child.parent = parent ? parent.prototype : null;
}
function _json(text) {
var match;
if ((match = /\{[\s\S]*\}|\[[\s\S]*\]/.exec(text))) {
text = match[0];
}
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
cx.lastIndex = 0;
if (cx.test(text)) {
text = text.replace(cx, function (a) {
return '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
});
}
if (/^[\],:{}\s]*$/.
test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
return eval('(' + text + ')');
}
throw 'JSON parse error';
}
var _round = Math.round;
var K = {
DEBUG : false,
VERSION : _VERSION,
IE : _IE,
GECKO : _GECKO,
WEBKIT : _WEBKIT,
OPERA : _OPERA,
V : _V,
TIME : _TIME,
each : _each,
isArray : _isArray,
isFunction : _isFunction,
inArray : _inArray,
inString : _inString,
trim : _trim,
addUnit : _addUnit,
removeUnit : _removeUnit,
escape : _escape,
unescape : _unescape,
toCamel : _toCamel,
toHex : _toHex,
toMap : _toMap,
toArray : _toArray,
undef : _undef,
invalidUrl : _invalidUrl,
addParam : _addParam,
extend : _extend,
json : _json
};
var _INLINE_TAG_MAP = _toMap('a,abbr,acronym,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,img,input,ins,kbd,label,map,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'),
_BLOCK_TAG_MAP = _toMap('address,applet,blockquote,body,center,dd,dir,div,dl,dt,fieldset,form,frameset,h1,h2,h3,h4,h5,h6,head,hr,html,iframe,ins,isindex,li,map,menu,meta,noframes,noscript,object,ol,p,pre,script,style,table,tbody,td,tfoot,th,thead,title,tr,ul'),
_SINGLE_TAG_MAP = _toMap('area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed'),
_STYLE_TAG_MAP = _toMap('b,basefont,big,del,em,font,i,s,small,span,strike,strong,sub,sup,u'),
_CONTROL_TAG_MAP = _toMap('img,table,input,textarea,button'),
_PRE_TAG_MAP = _toMap('pre,style,script'),
_NOSPLIT_TAG_MAP = _toMap('html,head,body,td,tr,table,ol,ul,li'),
_AUTOCLOSE_TAG_MAP = _toMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'),
_FILL_ATTR_MAP = _toMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'),
_VALUE_TAG_MAP = _toMap('input,button,textarea,select');
function _getBasePath() {
var els = document.getElementsByTagName('script'), src;
for (var i = 0, len = els.length; i < len; i++) {
src = els[i].src || '';
if (/kindeditor[\w\-\.]*\.js/.test(src)) {
return src.substring(0, src.lastIndexOf('/') + 1);
}
}
return '';
}
K.basePath = _getBasePath();
K.options = {
designMode : true,
fullscreenMode : false,
filterMode : true,
wellFormatMode : true,
shadowMode : true,
loadStyleMode : true,
basePath : K.basePath,
themesPath : K.basePath + 'themes/',
langPath : K.basePath + 'lang/',
pluginsPath : K.basePath + 'plugins/',
themeType : 'default',
langType : 'zh_CN',
urlType : '',
newlineTag : 'p',
resizeType : 2,
syncType : 'form',
pasteType : 2,
dialogAlignType : 'page',
useContextmenu : true,
fullscreenShortcut : false,
bodyClass : 'ke-content',
indentChar : '',
cssPath : '',
cssData : '',
minWidth : 650,
minHeight : 100,
minChangeSize : 50,
items : [
'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
'anchor', 'link', 'unlink', '|', 'about'
],
noDisableItems : ['source', 'fullscreen'],
colorTable : [
['#E53333', '#E56600', '#FF9900', '#64451D', '#DFC5A4', '#FFE500'],
['#009900', '#006600', '#99BB00', '#B8D100', '#60D978', '#00D5FF'],
['#337FE5', '#003399', '#4C33E5', '#9933E5', '#CC33E5', '#EE33EE'],
['#FFFFFF', '#CCCCCC', '#999999', '#666666', '#333333', '#000000']
],
fontSizeTable : ['9px', '10px', '12px', '14px', '16px', '18px', '24px', '32px'],
htmlTags : {
font : ['id', 'class', 'color', 'size', 'face', '.background-color'],
span : [
'id', 'class', '.color', '.background-color', '.font-size', '.font-family', '.background',
'.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.line-height'
],
div : [
'id', 'class', 'align', '.border', '.margin', '.padding', '.text-align', '.color',
'.background-color', '.font-size', '.font-family', '.font-weight', '.background',
'.font-style', '.text-decoration', '.vertical-align', '.margin-left'
],
table: [
'id', 'class', 'border', 'cellspacing', 'cellpadding', 'width', 'height', 'align', 'bordercolor',
'.padding', '.margin', '.border', 'bgcolor', '.text-align', '.color', '.background-color',
'.font-size', '.font-family', '.font-weight', '.font-style', '.text-decoration', '.background',
'.width', '.height', '.border-collapse'
],
'td,th': [
'id', 'class', 'align', 'valign', 'width', 'height', 'colspan', 'rowspan', 'bgcolor',
'.text-align', '.color', '.background-color', '.font-size', '.font-family', '.font-weight',
'.font-style', '.text-decoration', '.vertical-align', '.background', '.border'
],
a : ['id', 'class', 'href', 'target', 'name'],
embed : ['id', 'class', 'src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'],
img : ['id', 'class', 'src', 'width', 'height', 'border', 'alt', 'title', 'align', '.width', '.height', '.border'],
'p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : [
'id', 'class', 'align', '.text-align', '.color', '.background-color', '.font-size', '.font-family', '.background',
'.font-weight', '.font-style', '.text-decoration', '.vertical-align', '.text-indent', '.margin-left'
],
pre : ['id', 'class'],
hr : ['id', 'class', '.page-break-after'],
'br,tbody,tr,strong,b,sub,sup,em,i,u,strike,s,del' : ['id', 'class'],
iframe : ['id', 'class', 'src', 'frameborder', 'width', 'height', '.width', '.height']
},
layout : '<div class="container"><div class="toolbar"></div><div class="edit"></div><div class="statusbar"></div></div>'
};
var _useCapture = false;
var _INPUT_KEY_MAP = _toMap('8,9,13,32,46,48..57,59,61,65..90,106,109..111,188,190..192,219..222');
var _CURSORMOVE_KEY_MAP = _toMap('33..40');
var _CHANGE_KEY_MAP = {};
_each(_INPUT_KEY_MAP, function(key, val) {
_CHANGE_KEY_MAP[key] = val;
});
_each(_CURSORMOVE_KEY_MAP, function(key, val) {
_CHANGE_KEY_MAP[key] = val;
});
function _bindEvent(el, type, fn) {
if (el.addEventListener){
el.addEventListener(type, fn, _useCapture);
} else if (el.attachEvent){
el.attachEvent('on' + type, fn);
}
}
function _unbindEvent(el, type, fn) {
if (el.removeEventListener){
el.removeEventListener(type, fn, _useCapture);
} else if (el.detachEvent){
el.detachEvent('on' + type, fn);
}
}
var _EVENT_PROPS = ('altKey,attrChange,attrName,bubbles,button,cancelable,charCode,clientX,clientY,ctrlKey,currentTarget,' +
'data,detail,eventPhase,fromElement,handler,keyCode,metaKey,newValue,offsetX,offsetY,originalTarget,pageX,' +
'pageY,prevValue,relatedNode,relatedTarget,screenX,screenY,shiftKey,srcElement,target,toElement,view,wheelDelta,which').split(',');
function KEvent(el, event) {
this.init(el, event);
}
_extend(KEvent, {
init : function(el, event) {
var self = this, doc = el.ownerDocument || el.document || el;
self.event = event;
_each(_EVENT_PROPS, function(key, val) {
self[val] = event[val];
});
if (!self.target) {
self.target = self.srcElement || doc;
}
if (self.target.nodeType === 3) {
self.target = self.target.parentNode;
}
if (!self.relatedTarget && self.fromElement) {
self.relatedTarget = self.fromElement === self.target ? self.toElement : self.fromElement;
}
if (self.pageX == null && self.clientX != null) {
var d = doc.documentElement, body = doc.body;
self.pageX = self.clientX + (d && d.scrollLeft || body && body.scrollLeft || 0) - (d && d.clientLeft || body && body.clientLeft || 0);
self.pageY = self.clientY + (d && d.scrollTop || body && body.scrollTop || 0) - (d && d.clientTop || body && body.clientTop || 0);
}
if (!self.which && ((self.charCode || self.charCode === 0) ? self.charCode : self.keyCode)) {
self.which = self.charCode || self.keyCode;
}
if (!self.metaKey && self.ctrlKey) {
self.metaKey = self.ctrlKey;
}
if (!self.which && self.button !== undefined) {
self.which = (self.button & 1 ? 1 : (self.button & 2 ? 3 : (self.button & 4 ? 2 : 0)));
}
switch (self.which) {
case 186 :
self.which = 59;
break;
case 187 :
case 107 :
case 43 :
self.which = 61;
break;
case 189 :
case 45 :
self.which = 109;
break;
case 42 :
self.which = 106;
break;
case 47 :
self.which = 111;
break;
case 78 :
self.which = 110;
break;
}
if (self.which >= 96 && self.which <= 105) {
self.which -= 48;
}
},
preventDefault : function() {
var ev = this.event;
if (ev.preventDefault) {
ev.preventDefault();
}
ev.returnValue = false;
},
stopPropagation : function() {
var ev = this.event;
if (ev.stopPropagation) {
ev.stopPropagation();
}
ev.cancelBubble = true;
},
stop : function() {
this.preventDefault();
this.stopPropagation();
}
});
var _eventExpendo = 'kindeditor_' + _TIME, _eventId = 0, _eventData = {};
function _getId(el) {
return el[_eventExpendo] || null;
}
function _setId(el) {
el[_eventExpendo] = ++_eventId;
return _eventId;
}
function _removeId(el) {
try {
delete el[_eventExpendo];
} catch(e) {
if (el.removeAttribute) {
el.removeAttribute(_eventExpendo);
}
}
}
function _bind(el, type, fn) {
if (type.indexOf(',') >= 0) {
_each(type.split(','), function() {
_bind(el, this, fn);
});
return;
}
var id = _getId(el);
if (!id) {
id = _setId(el);
}
if (_eventData[id] === undefined) {
_eventData[id] = {};
}
var events = _eventData[id][type];
if (events && events.length > 0) {
_unbindEvent(el, type, events[0]);
} else {
_eventData[id][type] = [];
_eventData[id].el = el;
}
events = _eventData[id][type];
if (events.length === 0) {
events[0] = function(e) {
var kevent = e ? new KEvent(el, e) : undefined;
_each(events, function(i, event) {
if (i > 0 && event) {
event.call(el, kevent);
}
});
};
}
if (_inArray(fn, events) < 0) {
events.push(fn);
}
_bindEvent(el, type, events[0]);
}
function _unbind(el, type, fn) {
if (type && type.indexOf(',') >= 0) {
_each(type.split(','), function() {
_unbind(el, this, fn);
});
return;
}
var id = _getId(el);
if (!id) {
return;
}
if (type === undefined) {
if (id in _eventData) {
_each(_eventData[id], function(key, events) {
if (key != 'el' && events.length > 0) {
_unbindEvent(el, key, events[0]);
}
});
delete _eventData[id];
_removeId(el);
}
return;
}
if (!_eventData[id]) {
return;
}
var events = _eventData[id][type];
if (events && events.length > 0) {
if (fn === undefined) {
_unbindEvent(el, type, events[0]);
delete _eventData[id][type];
} else {
_each(events, function(i, event) {
if (i > 0 && event === fn) {
events.splice(i, 1);
}
});
if (events.length == 1) {
_unbindEvent(el, type, events[0]);
delete _eventData[id][type];
}
}
var count = 0;
_each(_eventData[id], function() {
count++;
});
if (count < 2) {
delete _eventData[id];
_removeId(el);
}
}
}
function _fire(el, type) {
if (type.indexOf(',') >= 0) {
_each(type.split(','), function() {
_fire(el, this);
});
return;
}
var id = _getId(el);
if (!id) {
return;
}
var events = _eventData[id][type];
if (_eventData[id] && events && events.length > 0) {
events[0]();
}
}
function _ctrl(el, key, fn) {
var self = this;
key = /^\d{2,}$/.test(key) ? key : key.toUpperCase().charCodeAt(0);
_bind(el, 'keydown', function(e) {
if (e.ctrlKey && e.which == key && !e.shiftKey && !e.altKey) {
fn.call(el);
e.stop();
}
});
}
function _ready(fn) {
var loaded = false;
function readyFunc() {
if (!loaded) {
loaded = true;
fn(KindEditor);
}
}
function ieReadyFunc() {
if (!loaded) {
try {
document.documentElement.doScroll('left');
} catch(e) {
setTimeout(ieReadyFunc, 100);
return;
}
readyFunc();
}
}
function ieReadyStateFunc() {
if (document.readyState === 'complete') {
readyFunc();
}
}
if (document.addEventListener) {
_bind(document, 'DOMContentLoaded', readyFunc);
} else if (document.attachEvent) {
_bind(document, 'readystatechange', ieReadyStateFunc);
var toplevel = false;
try {
toplevel = window.frameElement == null;
} catch(e) {}
if (document.documentElement.doScroll && toplevel) {
ieReadyFunc();
}
}
_bind(window, 'load', readyFunc);
}
if (_IE) {
window.attachEvent('onunload', function() {
_each(_eventData, function(key, events) {
if (events.el) {
_unbind(events.el);
}
});
});
}
K.ctrl = _ctrl;
K.ready = _ready;
function _getCssList(css) {
var list = {},
reg = /\s*([\w\-]+)\s*:([^;]*)(;|$)/g,
match;
while ((match = reg.exec(css))) {
var key = _trim(match[1].toLowerCase()),
val = _trim(_toHex(match[2]));
list[key] = val;
}
return list;
}
function _getAttrList(tag) {
var list = {},
reg = /\s+(?:([\w\-:]+)|(?:([\w\-:]+)=([^\s"'<>]+))|(?:([\w\-:"]+)="([^"]*)")|(?:([\w\-:"]+)='([^']*)'))(?=(?:\s|\/|>)+)/g,
match;
while ((match = reg.exec(tag))) {
var key = (match[1] || match[2] || match[4] || match[6]).toLowerCase(),
val = (match[2] ? match[3] : (match[4] ? match[5] : match[7])) || '';
list[key] = val;
}
return list;
}
function _addClassToTag(tag, className) {
if (/\s+class\s*=/.test(tag)) {
tag = tag.replace(/(\s+class=["']?)([^"']*)(["']?[\s>])/, function($0, $1, $2, $3) {
if ((' ' + $2 + ' ').indexOf(' ' + className + ' ') < 0) {
return $2 === '' ? $1 + className + $3 : $1 + $2 + ' ' + className + $3;
} else {
return $0;
}
});
} else {
tag = tag.substr(0, tag.length - 1) + ' class="' + className + '">';
}
return tag;
}
function _formatCss(css) {
var str = '';
_each(_getCssList(css), function(key, val) {
str += key + ':' + val + ';';
});
return str;
}
function _formatUrl(url, mode, host, pathname) {
mode = _undef(mode, '').toLowerCase();
if (url.substr(0, 5) != 'data:') {
url = url.replace(/([^:])\/\//g, '$1/');
}
if (_inArray(mode, ['absolute', 'relative', 'domain']) < 0) {
return url;
}
host = host || location.protocol + '//' + location.host;
if (pathname === undefined) {
var m = location.pathname.match(/^(\/.*)\//);
pathname = m ? m[1] : '';
}
var match;
if ((match = /^(\w+:\/\/[^\/]*)/.exec(url))) {
if (match[1] !== host) {
return url;
}
} else if (/^\w+:/.test(url)) {
return url;
}
function getRealPath(path) {
var parts = path.split('/'), paths = [];
for (var i = 0, len = parts.length; i < len; i++) {
var part = parts[i];
if (part == '..') {
if (paths.length > 0) {
paths.pop();
}
} else if (part !== '' && part != '.') {
paths.push(part);
}
}
return '/' + paths.join('/');
}
if (/^\//.test(url)) {
url = host + getRealPath(url.substr(1));
} else if (!/^\w+:\/\//.test(url)) {
url = host + getRealPath(pathname + '/' + url);
}
function getRelativePath(path, depth) {
if (url.substr(0, path.length) === path) {
var arr = [];
for (var i = 0; i < depth; i++) {
arr.push('..');
}
var prefix = '.';
if (arr.length > 0) {
prefix += '/' + arr.join('/');
}
if (pathname == '/') {
prefix += '/';
}
return prefix + url.substr(path.length);
} else {
if ((match = /^(.*)\//.exec(path))) {
return getRelativePath(match[1], ++depth);
}
}
}
if (mode === 'relative') {
url = getRelativePath(host + pathname, 0).substr(2);
} else if (mode === 'absolute') {
if (url.substr(0, host.length) === host) {
url = url.substr(host.length);
}
}
return url;
}
function _formatHtml(html, htmlTags, urlType, wellFormatted, indentChar) {
urlType = urlType || '';
wellFormatted = _undef(wellFormatted, false);
indentChar = _undef(indentChar, '\t');
var fontSizeList = 'xx-small,x-small,small,medium,large,x-large,xx-large'.split(',');
html = html.replace(/(<(?:pre|pre\s[^>]*)>)([\s\S]*?)(<\/pre>)/ig, function($0, $1, $2, $3) {
return $1 + $2.replace(/<(?:br|br\s[^>]*)>/ig, '\n') + $3;
});
html = html.replace(/<(?:br|br\s[^>]*)\s*\/?>\s*<\/p>/ig, '</p>');
html = html.replace(/(<(?:p|p\s[^>]*)>)\s*(<\/p>)/ig, '$1<br />$2');
html = html.replace(/\u200B/g, '');
html = html.replace(/\u00A9/g, '©');
var htmlTagMap = {};
if (htmlTags) {
_each(htmlTags, function(key, val) {
var arr = key.split(',');
for (var i = 0, len = arr.length; i < len; i++) {
htmlTagMap[arr[i]] = _toMap(val);
}
});
if (!htmlTagMap.script) {
html = html.replace(/(<(?:script|script\s[^>]*)>)([\s\S]*?)(<\/script>)/ig, '');
}
if (!htmlTagMap.style) {
html = html.replace(/(<(?:style|style\s[^>]*)>)([\s\S]*?)(<\/style>)/ig, '');
}
}
var re = /([ \t\n\r]*)<(\/)?([\w\-:]+)((?:\s+|(?:\s+[\w\-:]+)|(?:\s+[\w\-:]+=[^\s"'<>]+)|(?:\s+[\w\-:"]+="[^"]*")|(?:\s+[\w\-:"]+='[^']*'))*)(\/)?>([ \t\n\r]*)/g;
var tagStack = [];
html = html.replace(re, function($0, $1, $2, $3, $4, $5, $6) {
var full = $0,
startNewline = $1 || '',
startSlash = $2 || '',
tagName = $3.toLowerCase(),
attr = $4 || '',
endSlash = $5 ? ' ' + $5 : '',
endNewline = $6 || '';
if (htmlTags && !htmlTagMap[tagName]) {
return '';
}
if (endSlash === '' && _SINGLE_TAG_MAP[tagName]) {
endSlash = ' /';
}
if (_INLINE_TAG_MAP[tagName]) {
if (startNewline) {
startNewline = ' ';
}
if (endNewline) {
endNewline = ' ';
}
}
if (_PRE_TAG_MAP[tagName]) {
if (startSlash) {
endNewline = '\n';
} else {
startNewline = '\n';
}
}
if (wellFormatted && tagName == 'br') {
endNewline = '\n';
}
if (_BLOCK_TAG_MAP[tagName] && !_PRE_TAG_MAP[tagName]) {
if (wellFormatted) {
if (startSlash && tagStack.length > 0 && tagStack[tagStack.length - 1] === tagName) {
tagStack.pop();
} else {
tagStack.push(tagName);
}
startNewline = '';
endNewline = '';
for (var i = 0, len = startSlash ? tagStack.length : tagStack.length - 1; i < len; i++) {
startNewline += indentChar;
if (!startSlash) {
endNewline += indentChar;
}
}
if (endSlash) {
tagStack.pop();
} else if (!startSlash) {
endNewline += indentChar;
}
} else {
startNewline = endNewline = '';
}
}
if (attr !== '') {
var attrMap = _getAttrList(full);
if (tagName === 'font') {
var fontStyleMap = {}, fontStyle = '';
_each(attrMap, function(key, val) {
if (key === 'color') {
fontStyleMap.color = val;
delete attrMap[key];
}
if (key === 'size') {
fontStyleMap['font-size'] = fontSizeList[parseInt(val, 10) - 1] || '';
delete attrMap[key];
}
if (key === 'face') {
fontStyleMap['font-family'] = val;
delete attrMap[key];
}
if (key === 'style') {
fontStyle = val;
}
});
if (fontStyle && !/;$/.test(fontStyle)) {
fontStyle += ';';
}
_each(fontStyleMap, function(key, val) {
if (val === '') {
return;
}
if (/\s/.test(val)) {
val = "'" + val + "'";
}
fontStyle += key + ':' + val + ';';
});
attrMap.style = fontStyle;
}
_each(attrMap, function(key, val) {
if (_FILL_ATTR_MAP[key]) {
attrMap[key] = key;
}
if (_inArray(key, ['src', 'href']) >= 0) {
attrMap[key] = _formatUrl(val, urlType);
}
if (htmlTags && key !== 'style' && !htmlTagMap[tagName]['*'] && !htmlTagMap[tagName][key] ||
tagName === 'body' && key === 'contenteditable' ||
/^kindeditor_\d+$/.test(key)) {
delete attrMap[key];
}
if (key === 'style' && val !== '') {
var styleMap = _getCssList(val);
_each(styleMap, function(k, v) {
if (htmlTags && !htmlTagMap[tagName].style && !htmlTagMap[tagName]['.' + k]) {
delete styleMap[k];
}
});
var style = '';
_each(styleMap, function(k, v) {
style += k + ':' + v + ';';
});
attrMap.style = style;
}
});
attr = '';
_each(attrMap, function(key, val) {
if (key === 'style' && val === '') {
return;
}
val = val.replace(/"/g, '"');
attr += ' ' + key + '="' + val + '"';
});
}
if (tagName === 'font') {
tagName = 'span';
}
return startNewline + '<' + startSlash + tagName + attr + endSlash + '>' + endNewline;
});
html = html.replace(/(<(?:pre|pre\s[^>]*)>)([\s\S]*?)(<\/pre>)/ig, function($0, $1, $2, $3) {
return $1 + $2.replace(/\n/g, '<span id="__kindeditor_pre_newline__">\n') + $3;
});
html = html.replace(/\n\s*\n/g, '\n');
html = html.replace(/<span id="__kindeditor_pre_newline__">\n/g, '\n');
html = html.replace(/></g, '>\n<');
return _trim(html);
}
function _clearMsWord(html, htmlTags) {
html = html.replace(/<meta[\s\S]*?>/ig, '')
.replace(/<![\s\S]*?>/ig, '')
.replace(/<style[^>]*>[\s\S]*?<\/style>/ig, '')
.replace(/<script[^>]*>[\s\S]*?<\/script>/ig, '')
.replace(/<w:[^>]+>[\s\S]*?<\/w:[^>]+>/ig, '')
.replace(/<o:[^>]+>[\s\S]*?<\/o:[^>]+>/ig, '')
.replace(/<xml>[\s\S]*?<\/xml>/ig, '')
.replace(/<(?:table|td)[^>]*>/ig, function(full) {
return full.replace(/border-bottom:([#\w\s]+)/ig, 'border:$1');
});
return _formatHtml(html, htmlTags);
}
function _mediaType(src) {
if (/\.(rm|rmvb)(\?|$)/i.test(src)) {
return 'audio/x-pn-realaudio-plugin';
}
if (/\.(swf|flv)(\?|$)/i.test(src)) {
return 'application/x-shockwave-flash';
}
return 'video/x-ms-asf-plugin';
}
function _mediaClass(type) {
if (/realaudio/i.test(type)) {
return 'ke-rm';
}
if (/flash/i.test(type)) {
return 'ke-flash';
}
return 'ke-media';
}
function _mediaAttrs(srcTag) {
return _getAttrList(unescape(srcTag));
}
function _mediaEmbed(attrs) {
var html = '<embed ';
_each(attrs, function(key, val) {
html += key + '="' + val + '" ';
});
html += '/>';
return html;
}
function _mediaImg(blankPath, attrs) {
var width = attrs.width,
height = attrs.height,
type = attrs.type || _mediaType(attrs.src),
srcTag = _mediaEmbed(attrs),
style = '';
if (width > 0) {
style += 'width:' + width + 'px;';
}
if (height > 0) {
style += 'height:' + height + 'px;';
}
var html = '<img class="' + _mediaClass(type) + '" src="' + blankPath + '" ';
if (style !== '') {
html += 'style="' + style + '" ';
}
html += 'data-ke-tag="' + escape(srcTag) + '" alt="" />';
return html;
}
function _tmpl(str, data) {
var fn = new Function("obj",
"var p=[],print=function(){p.push.apply(p,arguments);};" +
"with(obj){p.push('" +
str.replace(/[\r\t\n]/g, " ")
.split("<%").join("\t")
.replace(/((^|%>)[^\t]*)'/g, "$1\r")
.replace(/\t=(.*?)%>/g, "',$1,'")
.split("\t").join("');")
.split("%>").join("p.push('")
.split("\r").join("\\'") + "');}return p.join('');");
return data ? fn(data) : fn;
}
K.formatUrl = _formatUrl;
K.formatHtml = _formatHtml;
K.getCssList = _getCssList;
K.getAttrList = _getAttrList;
K.mediaType = _mediaType;
K.mediaAttrs = _mediaAttrs;
K.mediaEmbed = _mediaEmbed;
K.mediaImg = _mediaImg;
K.clearMsWord = _clearMsWord;
K.tmpl = _tmpl;
function _contains(nodeA, nodeB) {
if (nodeA.nodeType == 9 && nodeB.nodeType != 9) {
return true;
}
while ((nodeB = nodeB.parentNode)) {
if (nodeB == nodeA) {
return true;
}
}
return false;
}
var _getSetAttrDiv = document.createElement('div');
_getSetAttrDiv.setAttribute('className', 't');
var _GET_SET_ATTRIBUTE = _getSetAttrDiv.className !== 't';
function _getAttr(el, key) {
key = key.toLowerCase();
var val = null;
if (!_GET_SET_ATTRIBUTE && el.nodeName.toLowerCase() != 'script') {
var div = el.ownerDocument.createElement('div');
div.appendChild(el.cloneNode(false));
var list = _getAttrList(_unescape(div.innerHTML));
if (key in list) {
val = list[key];
}
} else {
try {
val = el.getAttribute(key, 2);
} catch(e) {
val = el.getAttribute(key, 1);
}
}
if (key === 'style' && val !== null) {
val = _formatCss(val);
}
return val;
}
function _queryAll(expr, root) {
var exprList = expr.split(',');
if (exprList.length > 1) {
var mergedResults = [];
_each(exprList, function() {
_each(_queryAll(this, root), function() {
if (_inArray(this, mergedResults) < 0) {
mergedResults.push(this);
}
});
});
return mergedResults;
}
root = root || document;
function escape(str) {
if (typeof str != 'string') {
return str;
}
return str.replace(/([^\w\-])/g, '\\$1');
}
function stripslashes(str) {
return str.replace(/\\/g, '');
}
function cmpTag(tagA, tagB) {
return tagA === '*' || tagA.toLowerCase() === escape(tagB.toLowerCase());
}
function byId(id, tag, root) {
var arr = [],
doc = root.ownerDocument || root,
el = doc.getElementById(stripslashes(id));
if (el) {
if (cmpTag(tag, el.nodeName) && _contains(root, el)) {
arr.push(el);
}
}
return arr;
}
function byClass(className, tag, root) {
var doc = root.ownerDocument || root, arr = [], els, i, len, el;
if (root.getElementsByClassName) {
els = root.getElementsByClassName(stripslashes(className));
for (i = 0, len = els.length; i < len; i++) {
el = els[i];
if (cmpTag(tag, el.nodeName)) {
arr.push(el);
}
}
} else if (doc.querySelectorAll) {
els = doc.querySelectorAll((root.nodeName !== '#document' ? root.nodeName + ' ' : '') + tag + '.' + className);
for (i = 0, len = els.length; i < len; i++) {
el = els[i];
if (_contains(root, el)) {
arr.push(el);
}
}
} else {
els = root.getElementsByTagName(tag);
className = ' ' + className + ' ';
for (i = 0, len = els.length; i < len; i++) {
el = els[i];
if (el.nodeType == 1) {
var cls = el.className;
if (cls && (' ' + cls + ' ').indexOf(className) > -1) {
arr.push(el);
}
}
}
}
return arr;
}
function byName(name, tag, root) {
var arr = [], doc = root.ownerDocument || root,
els = doc.getElementsByName(stripslashes(name)), el;
for (var i = 0, len = els.length; i < len; i++) {
el = els[i];
if (cmpTag(tag, el.nodeName) && _contains(root, el)) {
if (el.getAttributeNode('name')) {
arr.push(el);
}
}
}
return arr;
}
function byAttr(key, val, tag, root) {
var arr = [], els = root.getElementsByTagName(tag), el;
for (var i = 0, len = els.length; i < len; i++) {
el = els[i];
if (el.nodeType == 1) {
if (val === null) {
if (_getAttr(el, key) !== null) {
arr.push(el);
}
} else {
if (val === escape(_getAttr(el, key))) {
arr.push(el);
}
}
}
}
return arr;
}
function select(expr, root) {
var arr = [], matches;
matches = /^((?:\\.|[^.#\s\[<>])+)/.exec(expr);
var tag = matches ? matches[1] : '*';
if ((matches = /#((?:[\w\-]|\\.)+)$/.exec(expr))) {
arr = byId(matches[1], tag, root);
} else if ((matches = /\.((?:[\w\-]|\\.)+)$/.exec(expr))) {
arr = byClass(matches[1], tag, root);
} else if ((matches = /\[((?:[\w\-]|\\.)+)\]/.exec(expr))) {
arr = byAttr(matches[1].toLowerCase(), null, tag, root);
} else if ((matches = /\[((?:[\w\-]|\\.)+)\s*=\s*['"]?((?:\\.|[^'"]+)+)['"]?\]/.exec(expr))) {
var key = matches[1].toLowerCase(), val = matches[2];
if (key === 'id') {
arr = byId(val, tag, root);
} else if (key === 'class') {
arr = byClass(val, tag, root);
} else if (key === 'name') {
arr = byName(val, tag, root);
} else {
arr = byAttr(key, val, tag, root);
}
} else {
var els = root.getElementsByTagName(tag), el;
for (var i = 0, len = els.length; i < len; i++) {
el = els[i];
if (el.nodeType == 1) {
arr.push(el);
}
}
}
return arr;
}
var parts = [], arr, re = /((?:\\.|[^\s>])+|[\s>])/g;
while ((arr = re.exec(expr))) {
if (arr[1] !== ' ') {
parts.push(arr[1]);
}
}
var results = [];
if (parts.length == 1) {
return select(parts[0], root);
}
var isChild = false, part, els, subResults, val, v, i, j, k, length, len, l;
for (i = 0, lenth = parts.length; i < lenth; i++) {
part = parts[i];
if (part === '>') {
isChild = true;
continue;
}
if (i > 0) {
els = [];
for (j = 0, len = results.length; j < len; j++) {
val = results[j];
subResults = select(part, val);
for (k = 0, l = subResults.length; k < l; k++) {
v = subResults[k];
if (isChild) {
if (val === v.parentNode) {
els.push(v);
}
} else {
els.push(v);
}
}
}
results = els;
} else {
results = select(part, root);
}
if (results.length === 0) {
return [];
}
}
return results;
}
function _query(expr, root) {
var arr = _queryAll(expr, root);
return arr.length > 0 ? arr[0] : null;
}
K.query = _query;
K.queryAll = _queryAll;
function _get(val) {
return K(val)[0];
}
function _getDoc(node) {
if (!node) {
return document;
}
return node.ownerDocument || node.document || node;
}
function _getWin(node) {
if (!node) {
return window;
}
var doc = _getDoc(node);
return doc.parentWindow || doc.defaultView;
}
function _setHtml(el, html) {
if (el.nodeType != 1) {
return;
}
var doc = _getDoc(el);
try {
el.innerHTML = '<img id="__kindeditor_temp_tag__" width="0" height="0" style="display:none;" />' + html;
var temp = doc.getElementById('__kindeditor_temp_tag__');
temp.parentNode.removeChild(temp);
} catch(e) {
K(el).empty();
K('@' + html, doc).each(function() {
el.appendChild(this);
});
}
}
function _hasClass(el, cls) {
return _inString(cls, el.className, ' ');
}
function _setAttr(el, key, val) {
if (_IE && _V < 8 && key.toLowerCase() == 'class') {
key = 'className';
}
el.setAttribute(key, '' + val);
}
function _removeAttr(el, key) {
if (_IE && _V < 8 && key.toLowerCase() == 'class') {
key = 'className';
}
_setAttr(el, key, '');
el.removeAttribute(key);
}
function _getNodeName(node) {
if (!node || !node.nodeName) {
return '';
}
return node.nodeName.toLowerCase();
}
function _computedCss(el, key) {
var self = this, win = _getWin(el), camelKey = _toCamel(key), val = '';
if (win.getComputedStyle) {
var style = win.getComputedStyle(el, null);
val = style[camelKey] || style.getPropertyValue(key) || el.style[camelKey];
} else if (el.currentStyle) {
val = el.currentStyle[camelKey] || el.style[camelKey];
}
return val;
}
function _hasVal(node) {
return !!_VALUE_TAG_MAP[_getNodeName(node)];
}
function _docElement(doc) {
doc = doc || document;
return _QUIRKS ? doc.body : doc.documentElement;
}
function _docHeight(doc) {
var el = _docElement(doc);
return Math.max(el.scrollHeight, el.clientHeight);
}
function _docWidth(doc) {
var el = _docElement(doc);
return Math.max(el.scrollWidth, el.clientWidth);
}
function _getScrollPos(doc) {
doc = doc || document;
var x, y;
if (_IE || _OPERA) {
x = _docElement(doc).scrollLeft;
y = _docElement(doc).scrollTop;
} else {
x = _getWin(doc).scrollX;
y = _getWin(doc).scrollY;
}
return {x : x, y : y};
}
function KNode(node) {
this.init(node);
}
_extend(KNode, {
init : function(node) {
var self = this;
node = _isArray(node) ? node : [node];
var length = 0;
for (var i = 0, len = node.length; i < len; i++) {
if (node[i]) {
self[i] = node[i].constructor === KNode ? node[i][0] : node[i];
length++;
}
}
self.length = length;
self.doc = _getDoc(self[0]);
self.name = _getNodeName(self[0]);
self.type = self.length > 0 ? self[0].nodeType : null;
self.win = _getWin(self[0]);
},
each : function(fn) {
var self = this;
for (var i = 0; i < self.length; i++) {
if (fn.call(self[i], i, self[i]) === false) {
return self;
}
}
return self;
},
bind : function(type, fn) {
this.each(function() {
_bind(this, type, fn);
});
return this;
},
unbind : function(type, fn) {
this.each(function() {
_unbind(this, type, fn);
});
return this;
},
fire : function(type) {
if (this.length < 1) {
return this;
}
_fire(this[0], type);
return this;
},
hasAttr : function(key) {
if (this.length < 1) {
return false;
}
return !!_getAttr(this[0], key);
},
attr : function(key, val) {
var self = this;
if (key === undefined) {
return _getAttrList(self.outer());
}
if (typeof key === 'object') {
_each(key, function(k, v) {
self.attr(k, v);
});
return self;
}
if (val === undefined) {
val = self.length < 1 ? null : _getAttr(self[0], key);
return val === null ? '' : val;
}
self.each(function() {
_setAttr(this, key, val);
});
return self;
},
removeAttr : function(key) {
this.each(function() {
_removeAttr(this, key);
});
return this;
},
get : function(i) {
if (this.length < 1) {
return null;
}
return this[i || 0];
},
eq : function(i) {
if (this.length < 1) {
return null;
}
return this[i] ? new KNode(this[i]) : null;
},
hasClass : function(cls) {
if (this.length < 1) {
return false;
}
return _hasClass(this[0], cls);
},
addClass : function(cls) {
this.each(function() {
if (!_hasClass(this, cls)) {
this.className = _trim(this.className + ' ' + cls);
}
});
return this;
},
removeClass : function(cls) {
this.each(function() {
if (_hasClass(this, cls)) {
this.className = _trim(this.className.replace(new RegExp('(^|\\s)' + cls + '(\\s|$)'), ' '));
}
});
return this;
},
html : function(val) {
var self = this;
if (val === undefined) {
if (self.length < 1 || self.type != 1) {
return '';
}
return _formatHtml(self[0].innerHTML);
}
self.each(function() {
_setHtml(this, val);
});
return self;
},
text : function() {
var self = this;
if (self.length < 1) {
return '';
}
return _IE ? self[0].innerText : self[0].textContent;
},
hasVal : function() {
if (this.length < 1) {
return false;
}
return _hasVal(this[0]);
},
val : function(val) {
var self = this;
if (val === undefined) {
if (self.length < 1) {
return '';
}
return self.hasVal() ? self[0].value : self.attr('value');
} else {
self.each(function() {
if (_hasVal(this)) {
this.value = val;
} else {
_setAttr(this, 'value' , val);
}
});
return self;
}
},
css : function(key, val) {
var self = this;
if (key === undefined) {
return _getCssList(self.attr('style'));
}
if (typeof key === 'object') {
_each(key, function(k, v) {
self.css(k, v);
});
return self;
}
if (val === undefined) {
if (self.length < 1) {
return '';
}
return self[0].style[_toCamel(key)] || _computedCss(self[0], key) || '';
}
self.each(function() {
this.style[_toCamel(key)] = val;
});
return self;
},
width : function(val) {
var self = this;
if (val === undefined) {
if (self.length < 1) {
return 0;
}
return self[0].offsetWidth;
}
return self.css('width', _addUnit(val));
},
height : function(val) {
var self = this;
if (val === undefined) {
if (self.length < 1) {
return 0;
}
return self[0].offsetHeight;
}
return self.css('height', _addUnit(val));
},
opacity : function(val) {
this.each(function() {
if (this.style.opacity === undefined) {
this.style.filter = val == 1 ? '' : 'alpha(opacity=' + (val * 100) + ')';
} else {
this.style.opacity = val == 1 ? '' : val;
}
});
return this;
},
data : function(key, val) {
var self = this;
key = 'kindeditor_data_' + key;
if (val === undefined) {
if (self.length < 1) {
return null;
}
return self[0][key];
}
this.each(function() {
this[key] = val;
});
return self;
},
pos : function() {
var self = this, node = self[0], x = 0, y = 0;
if (node) {
if (node.getBoundingClientRect) {
var box = node.getBoundingClientRect(),
pos = _getScrollPos(self.doc);
x = box.left + pos.x;
y = box.top + pos.y;
} else {
while (node) {
x += node.offsetLeft;
y += node.offsetTop;
node = node.offsetParent;
}
}
}
return {x : _round(x), y : _round(y)};
},
clone : function(bool) {
if (this.length < 1) {
return new KNode([]);
}
return new KNode(this[0].cloneNode(bool));
},
append : function(expr) {
this.each(function() {
if (this.appendChild) {
this.appendChild(_get(expr));
}
});
return this;
},
appendTo : function(expr) {
this.each(function() {
_get(expr).appendChild(this);
});
return this;
},
before : function(expr) {
this.each(function() {
this.parentNode.insertBefore(_get(expr), this);
});
return this;
},
after : function(expr) {
this.each(function() {
if (this.nextSibling) {
this.parentNode.insertBefore(_get(expr), this.nextSibling);
} else {
this.parentNode.appendChild(_get(expr));
}
});
return this;
},
replaceWith : function(expr) {
var nodes = [];
this.each(function(i, node) {
_unbind(node);
var newNode = _get(expr);
node.parentNode.replaceChild(newNode, node);
nodes.push(newNode);
});
return K(nodes);
},
empty : function() {
var self = this;
self.each(function(i, node) {
var child = node.firstChild;
while (child) {
if (!node.parentNode) {
return;
}
var next = child.nextSibling;
child.parentNode.removeChild(child);
child = next;
}
});
return self;
},
remove : function(keepChilds) {
var self = this;
self.each(function(i, node) {
if (!node.parentNode) {
return;
}
_unbind(node);
if (keepChilds) {
var child = node.firstChild;
while (child) {
var next = child.nextSibling;
node.parentNode.insertBefore(child, node);
child = next;
}
}
node.parentNode.removeChild(node);
delete self[i];
});
self.length = 0;
return self;
},
show : function(val) {
var self = this;
if (val === undefined) {
val = self._originDisplay || '';
}
if (self.css('display') != 'none') {
return self;
}
return self.css('display', val);
},
hide : function() {
var self = this;
if (self.length < 1) {
return self;
}
self._originDisplay = self[0].style.display;
return self.css('display', 'none');
},
outer : function() {
var self = this;
if (self.length < 1) {
return '';
}
var div = self.doc.createElement('div'), html;
div.appendChild(self[0].cloneNode(true));
html = _formatHtml(div.innerHTML);
div = null;
return html;
},
isSingle : function() {
return !!_SINGLE_TAG_MAP[this.name];
},
isInline : function() {
return !!_INLINE_TAG_MAP[this.name];
},
isBlock : function() {
return !!_BLOCK_TAG_MAP[this.name];
},
isStyle : function() {
return !!_STYLE_TAG_MAP[this.name];
},
isControl : function() {
return !!_CONTROL_TAG_MAP[this.name];
},
contains : function(otherNode) {
if (this.length < 1) {
return false;
}
return _contains(this[0], _get(otherNode));
},
parent : function() {
if (this.length < 1) {
return null;
}
var node = this[0].parentNode;
return node ? new KNode(node) : null;
},
children : function() {
if (this.length < 1) {
return new KNode([]);
}
var list = [], child = this[0].firstChild;
while (child) {
if (child.nodeType != 3 || _trim(child.nodeValue) !== '') {
list.push(child);
}
child = child.nextSibling;
}
return new KNode(list);
},
first : function() {
var list = this.children();
return list.length > 0 ? list.eq(0) : null;
},
last : function() {
var list = this.children();
return list.length > 0 ? list.eq(list.length - 1) : null;
},
index : function() {
if (this.length < 1) {
return -1;
}
var i = -1, sibling = this[0];
while (sibling) {
i++;
sibling = sibling.previousSibling;
}
return i;
},
prev : function() {
if (this.length < 1) {
return null;
}
var node = this[0].previousSibling;
return node ? new KNode(node) : null;
},
next : function() {
if (this.length < 1) {
return null;
}
var node = this[0].nextSibling;
return node ? new KNode(node) : null;
},
scan : function(fn, order) {
if (this.length < 1) {
return;
}
order = (order === undefined) ? true : order;
function walk(node) {
var n = order ? node.firstChild : node.lastChild;
while (n) {
var next = order ? n.nextSibling : n.previousSibling;
if (fn(n) === false) {
return false;
}
if (walk(n) === false) {
return false;
}
n = next;
}
}
walk(this[0]);
return this;
}
});
_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, type) {
KNode.prototype[type] = function(fn) {
return fn ? this.bind(type, fn) : this.fire(type);
};
});
var _K = K;
K = function(expr, root) {
if (expr === undefined || expr === null) {
return;
}
function newNode(node) {
if (!node[0]) {
node = [];
}
return new KNode(node);
}
if (typeof expr === 'string') {
if (root) {
root = _get(root);
}
var length = expr.length;
if (expr.charAt(0) === '@') {
expr = expr.substr(1);
}
if (expr.length !== length || /<.+>/.test(expr)) {
var doc = root ? root.ownerDocument || root : document,
div = doc.createElement('div'), list = [];
div.innerHTML = '<img id="__kindeditor_temp_tag__" width="0" height="0" style="display:none;" />' + expr;
for (var i = 0, len = div.childNodes.length; i < len; i++) {
var child = div.childNodes[i];
if (child.id == '__kindeditor_temp_tag__') {
continue;
}
list.push(child);
}
return newNode(list);
}
return newNode(_queryAll(expr, root));
}
if (expr && expr.constructor === KNode) {
return expr;
}
if (expr.toArray) {
expr = expr.toArray();
}
if (_isArray(expr)) {
return newNode(expr);
}
return newNode(_toArray(arguments));
};
_each(_K, function(key, val) {
K[key] = val;
});
K.NodeClass = KNode;
window.KindEditor = K;
var _START_TO_START = 0,
_START_TO_END = 1,
_END_TO_END = 2,
_END_TO_START = 3,
_BOOKMARK_ID = 0;
function _updateCollapsed(range) {
range.collapsed = (range.startContainer === range.endContainer && range.startOffset === range.endOffset);
return range;
}
function _copyAndDelete(range, isCopy, isDelete) {
var doc = range.doc, nodeList = [];
function splitTextNode(node, startOffset, endOffset) {
var length = node.nodeValue.length, centerNode;
if (isCopy) {
var cloneNode = node.cloneNode(true);
if (startOffset > 0) {
centerNode = cloneNode.splitText(startOffset);
} else {
centerNode = cloneNode;
}
if (endOffset < length) {
centerNode.splitText(endOffset - startOffset);
}
}
if (isDelete) {
var center = node;
if (startOffset > 0) {
center = node.splitText(startOffset);
range.setStart(node, startOffset);
}
if (endOffset < length) {
var right = center.splitText(endOffset - startOffset);
range.setEnd(right, 0);
}
nodeList.push(center);
}
return centerNode;
}
function removeNodes() {
if (isDelete) {
range.up().collapse(true);
}
for (var i = 0, len = nodeList.length; i < len; i++) {
var node = nodeList[i];
if (node.parentNode) {
node.parentNode.removeChild(node);
}
}
}
var copyRange = range.cloneRange().down();
var start = -1, incStart = -1, incEnd = -1, end = -1,
ancestor = range.commonAncestor(), frag = doc.createDocumentFragment();
if (ancestor.nodeType == 3) {
var textNode = splitTextNode(ancestor, range.startOffset, range.endOffset);
if (isCopy) {
frag.appendChild(textNode);
}
removeNodes();
return isCopy ? frag : range;
}
function extractNodes(parent, frag) {
var node = parent.firstChild, nextNode;
while (node) {
var testRange = new KRange(doc).selectNode(node);
start = testRange.compareBoundaryPoints(_START_TO_END, range);
if (start >= 0 && incStart <= 0) {
incStart = testRange.compareBoundaryPoints(_START_TO_START, range);
}
if (incStart >= 0 && incEnd <= 0) {
incEnd = testRange.compareBoundaryPoints(_END_TO_END, range);
}
if (incEnd >= 0 && end <= 0) {
end = testRange.compareBoundaryPoints(_END_TO_START, range);
}
if (end >= 0) {
return false;
}
nextNode = node.nextSibling;
if (start > 0) {
if (node.nodeType == 1) {
if (incStart >= 0 && incEnd <= 0) {
if (isCopy) {
frag.appendChild(node.cloneNode(true));
}
if (isDelete) {
nodeList.push(node);
}
} else {
var childFlag;
if (isCopy) {
childFlag = node.cloneNode(false);
frag.appendChild(childFlag);
}
if (extractNodes(node, childFlag) === false) {
return false;
}
}
} else if (node.nodeType == 3) {
var textNode;
if (node == copyRange.startContainer) {
textNode = splitTextNode(node, copyRange.startOffset, node.nodeValue.length);
} else if (node == copyRange.endContainer) {
textNode = splitTextNode(node, 0, copyRange.endOffset);
} else {
textNode = splitTextNode(node, 0, node.nodeValue.length);
}
if (isCopy) {
try {
frag.appendChild(textNode);
} catch(e) {}
}
}
}
node = nextNode;
}
}
extractNodes(ancestor, frag);
if (isDelete) {
range.up().collapse(true);
}
for (var i = 0, len = nodeList.length; i < len; i++) {
var node = nodeList[i];
if (node.parentNode) {
node.parentNode.removeChild(node);
}
}
return isCopy ? frag : range;
}
function _moveToElementText(range, el) {
var node = el;
while (node) {
var knode = K(node);
if (knode.name == 'marquee' || knode.name == 'select') {
return;
}
node = node.parentNode;
}
try {
range.moveToElementText(el);
} catch(e) {}
}
function _getStartEnd(rng, isStart) {
var doc = rng.parentElement().ownerDocument,
pointRange = rng.duplicate();
pointRange.collapse(isStart);
var parent = pointRange.parentElement(),
nodes = parent.childNodes;
if (nodes.length === 0) {
return {node: parent.parentNode, offset: K(parent).index()};
}
var startNode = doc, startPos = 0, cmp = -1;
var testRange = rng.duplicate();
_moveToElementText(testRange, parent);
for (var i = 0, len = nodes.length; i < len; i++) {
var node = nodes[i];
cmp = testRange.compareEndPoints('StartToStart', pointRange);
if (cmp === 0) {
return {node: node.parentNode, offset: i};
}
if (node.nodeType == 1) {
var nodeRange = rng.duplicate(), dummy, knode = K(node), newNode = node;
if (knode.isControl()) {
dummy = doc.createElement('span');
knode.after(dummy);
newNode = dummy;
startPos += knode.text().replace(/\r\n|\n|\r/g, '').length;
}
_moveToElementText(nodeRange, newNode);
testRange.setEndPoint('StartToEnd', nodeRange);
if (cmp > 0) {
startPos += nodeRange.text.replace(/\r\n|\n|\r/g, '').length;
} else {
startPos = 0;
}
if (dummy) {
K(dummy).remove();
}
} else if (node.nodeType == 3) {
testRange.moveStart('character', node.nodeValue.length);
startPos += node.nodeValue.length;
}
if (cmp < 0) {
startNode = node;
}
}
if (cmp < 0 && startNode.nodeType == 1) {
return {node: parent, offset: K(parent.lastChild).index() + 1};
}
if (cmp > 0) {
while (startNode.nextSibling && startNode.nodeType == 1) {
startNode = startNode.nextSibling;
}
}
testRange = rng.duplicate();
_moveToElementText(testRange, parent);
testRange.setEndPoint('StartToEnd', pointRange);
startPos -= testRange.text.replace(/\r\n|\n|\r/g, '').length;
if (cmp > 0 && startNode.nodeType == 3) {
var prevNode = startNode.previousSibling;
while (prevNode && prevNode.nodeType == 3) {
startPos -= prevNode.nodeValue.length;
prevNode = prevNode.previousSibling;
}
}
return {node: startNode, offset: startPos};
}
function _getEndRange(node, offset) {
var doc = node.ownerDocument || node,
range = doc.body.createTextRange();
if (doc == node) {
range.collapse(true);
return range;
}
if (node.nodeType == 1 && node.childNodes.length > 0) {
var children = node.childNodes, isStart, child;
if (offset === 0) {
child = children[0];
isStart = true;
} else {
child = children[offset - 1];
isStart = false;
}
if (!child) {
return range;
}
if (K(child).name === 'head') {
if (offset === 1) {
isStart = true;
}
if (offset === 2) {
isStart = false;
}
range.collapse(isStart);
return range;
}
if (child.nodeType == 1) {
var kchild = K(child), span;
if (kchild.isControl()) {
span = doc.createElement('span');
if (isStart) {
kchild.before(span);
} else {
kchild.after(span);
}
child = span;
}
_moveToElementText(range, child);
range.collapse(isStart);
if (span) {
K(span).remove();
}
return range;
}
node = child;
offset = isStart ? 0 : child.nodeValue.length;
}
var dummy = doc.createElement('span');
K(node).before(dummy);
_moveToElementText(range, dummy);
range.moveStart('character', offset);
K(dummy).remove();
return range;
}
function _toRange(rng) {
var doc, range;
function tr2td(start) {
if (K(start.node).name == 'tr') {
start.node = start.node.cells[start.offset];
start.offset = 0;
}
}
if (_IE) {
if (rng.item) {
doc = _getDoc(rng.item(0));
range = new KRange(doc);
range.selectNode(rng.item(0));
return range;
}
doc = rng.parentElement().ownerDocument;
var start = _getStartEnd(rng, true),
end = _getStartEnd(rng, false);
tr2td(start);
tr2td(end);
range = new KRange(doc);
range.setStart(start.node, start.offset);
range.setEnd(end.node, end.offset);
return range;
}
var startContainer = rng.startContainer;
doc = startContainer.ownerDocument || startContainer;
range = new KRange(doc);
range.setStart(startContainer, rng.startOffset);
range.setEnd(rng.endContainer, rng.endOffset);
return range;
}
function KRange(doc) {
this.init(doc);
}
_extend(KRange, {
init : function(doc) {
var self = this;
self.startContainer = doc;
self.startOffset = 0;
self.endContainer = doc;
self.endOffset = 0;
self.collapsed = true;
self.doc = doc;
},
commonAncestor : function() {
function getParents(node) {
var parents = [];
while (node) {
parents.push(node);
node = node.parentNode;
}
return parents;
}
var parentsA = getParents(this.startContainer),
parentsB = getParents(this.endContainer),
i = 0, lenA = parentsA.length, lenB = parentsB.length, parentA, parentB;
while (++i) {
parentA = parentsA[lenA - i];
parentB = parentsB[lenB - i];
if (!parentA || !parentB || parentA !== parentB) {
break;
}
}
return parentsA[lenA - i + 1];
},
setStart : function(node, offset) {
var self = this, doc = self.doc;
self.startContainer = node;
self.startOffset = offset;
if (self.endContainer === doc) {
self.endContainer = node;
self.endOffset = offset;
}
return _updateCollapsed(this);
},
setEnd : function(node, offset) {
var self = this, doc = self.doc;
self.endContainer = node;
self.endOffset = offset;
if (self.startContainer === doc) {
self.startContainer = node;
self.startOffset = offset;
}
return _updateCollapsed(this);
},
setStartBefore : function(node) {
return this.setStart(node.parentNode || this.doc, K(node).index());
},
setStartAfter : function(node) {
return this.setStart(node.parentNode || this.doc, K(node).index() + 1);
},
setEndBefore : function(node) {
return this.setEnd(node.parentNode || this.doc, K(node).index());
},
setEndAfter : function(node) {
return this.setEnd(node.parentNode || this.doc, K(node).index() + 1);
},
selectNode : function(node) {
return this.setStartBefore(node).setEndAfter(node);
},
selectNodeContents : function(node) {
var knode = K(node);
if (knode.type == 3 || knode.isSingle()) {
return this.selectNode(node);
}
var children = knode.children();
if (children.length > 0) {
return this.setStartBefore(children[0]).setEndAfter(children[children.length - 1]);
}
return this.setStart(node, 0).setEnd(node, 0);
},
collapse : function(toStart) {
if (toStart) {
return this.setEnd(this.startContainer, this.startOffset);
}
return this.setStart(this.endContainer, this.endOffset);
},
compareBoundaryPoints : function(how, range) {
var rangeA = this.get(), rangeB = range.get();
if (_IE) {
var arr = {};
arr[_START_TO_START] = 'StartToStart';
arr[_START_TO_END] = 'EndToStart';
arr[_END_TO_END] = 'EndToEnd';
arr[_END_TO_START] = 'StartToEnd';
var cmp = rangeA.compareEndPoints(arr[how], rangeB);
if (cmp !== 0) {
return cmp;
}
var nodeA, nodeB, nodeC, posA, posB;
if (how === _START_TO_START || how === _END_TO_START) {
nodeA = this.startContainer;
posA = this.startOffset;
}
if (how === _START_TO_END || how === _END_TO_END) {
nodeA = this.endContainer;
posA = this.endOffset;
}
if (how === _START_TO_START || how === _START_TO_END) {
nodeB = range.startContainer;
posB = range.startOffset;
}
if (how === _END_TO_END || how === _END_TO_START) {
nodeB = range.endContainer;
posB = range.endOffset;
}
if (nodeA === nodeB) {
var diff = posA - posB;
return diff > 0 ? 1 : (diff < 0 ? -1 : 0);
}
nodeC = nodeB;
while (nodeC && nodeC.parentNode !== nodeA) {
nodeC = nodeC.parentNode;
}
if (nodeC) {
return K(nodeC).index() >= posA ? -1 : 1;
}
nodeC = nodeA;
while (nodeC && nodeC.parentNode !== nodeB) {
nodeC = nodeC.parentNode;
}
if (nodeC) {
return K(nodeC).index() >= posB ? 1 : -1;
}
nodeC = K(nodeB).next();
if (nodeC && nodeC.contains(nodeA)) {
return 1;
}
nodeC = K(nodeA).next();
if (nodeC && nodeC.contains(nodeB)) {
return -1;
}
} else {
return rangeA.compareBoundaryPoints(how, rangeB);
}
},
cloneRange : function() {
return new KRange(this.doc).setStart(this.startContainer, this.startOffset).setEnd(this.endContainer, this.endOffset);
},
toString : function() {
var rng = this.get(), str = _IE ? rng.text : rng.toString();
return str.replace(/\r\n|\n|\r/g, '');
},
cloneContents : function() {
return _copyAndDelete(this, true, false);
},
deleteContents : function() {
return _copyAndDelete(this, false, true);
},
extractContents : function() {
return _copyAndDelete(this, true, true);
},
insertNode : function(node) {
var self = this,
sc = self.startContainer, so = self.startOffset,
ec = self.endContainer, eo = self.endOffset,
firstChild, lastChild, c, nodeCount = 1;
if (node.nodeName.toLowerCase() === '#document-fragment') {
firstChild = node.firstChild;
lastChild = node.lastChild;
nodeCount = node.childNodes.length;
}
if (sc.nodeType == 1) {
c = sc.childNodes[so];
if (c) {
sc.insertBefore(node, c);
if (sc === ec) {
eo += nodeCount;
}
} else {
sc.appendChild(node);
}
} else if (sc.nodeType == 3) {
if (so === 0) {
sc.parentNode.insertBefore(node, sc);
if (sc.parentNode === ec) {
eo += nodeCount;
}
} else if (so >= sc.nodeValue.length) {
if (sc.nextSibling) {
sc.parentNode.insertBefore(node, sc.nextSibling);
} else {
sc.parentNode.appendChild(node);
}
} else {
if (so > 0) {
c = sc.splitText(so);
} else {
c = sc;
}
sc.parentNode.insertBefore(node, c);
if (sc === ec) {
ec = c;
eo -= so;
}
}
}
if (firstChild) {
self.setStartBefore(firstChild).setEndAfter(lastChild);
} else {
self.selectNode(node);
}
if (self.compareBoundaryPoints(_END_TO_END, self.cloneRange().setEnd(ec, eo)) >= 1) {
return self;
}
return self.setEnd(ec, eo);
},
surroundContents : function(node) {
node.appendChild(this.extractContents());
return this.insertNode(node).selectNode(node);
},
isControl : function() {
var self = this,
sc = self.startContainer, so = self.startOffset,
ec = self.endContainer, eo = self.endOffset, rng;
return sc.nodeType == 1 && sc === ec && so + 1 === eo && K(sc.childNodes[so]).isControl();
},
get : function(hasControlRange) {
var self = this, doc = self.doc, node, rng;
if (!_IE) {
rng = doc.createRange();
try {
rng.setStart(self.startContainer, self.startOffset);
rng.setEnd(self.endContainer, self.endOffset);
} catch (e) {}
return rng;
}
if (hasControlRange && self.isControl()) {
rng = doc.body.createControlRange();
rng.addElement(self.startContainer.childNodes[self.startOffset]);
return rng;
}
var range = self.cloneRange().down();
rng = doc.body.createTextRange();
rng.setEndPoint('StartToStart', _getEndRange(range.startContainer, range.startOffset));
rng.setEndPoint('EndToStart', _getEndRange(range.endContainer, range.endOffset));
return rng;
},
html : function() {
return K(this.cloneContents()).outer();
},
down : function() {
var self = this;
function downPos(node, pos, isStart) {
if (node.nodeType != 1) {
return;
}
var children = K(node).children();
if (children.length === 0) {
return;
}
var left, right, child, offset;
if (pos > 0) {
left = children.eq(pos - 1);
}
if (pos < children.length) {
right = children.eq(pos);
}
if (left && left.type == 3) {
child = left[0];
offset = child.nodeValue.length;
}
if (right && right.type == 3) {
child = right[0];
offset = 0;
}
if (!child) {
return;
}
if (isStart) {
self.setStart(child, offset);
} else {
self.setEnd(child, offset);
}
}
downPos(self.startContainer, self.startOffset, true);
downPos(self.endContainer, self.endOffset, false);
return self;
},
up : function() {
var self = this;
function upPos(node, pos, isStart) {
if (node.nodeType != 3) {
return;
}
if (pos === 0) {
if (isStart) {
self.setStartBefore(node);
} else {
self.setEndBefore(node);
}
} else if (pos == node.nodeValue.length) {
if (isStart) {
self.setStartAfter(node);
} else {
self.setEndAfter(node);
}
}
}
upPos(self.startContainer, self.startOffset, true);
upPos(self.endContainer, self.endOffset, false);
return self;
},
enlarge : function(toBlock) {
var self = this;
self.up();
function enlargePos(node, pos, isStart) {
var knode = K(node), parent;
if (knode.type == 3 || _NOSPLIT_TAG_MAP[knode.name] || !toBlock && knode.isBlock()) {
return;
}
if (pos === 0) {
while (!knode.prev()) {
parent = knode.parent();
if (!parent || _NOSPLIT_TAG_MAP[parent.name] || !toBlock && parent.isBlock()) {
break;
}
knode = parent;
}
if (isStart) {
self.setStartBefore(knode[0]);
} else {
self.setEndBefore(knode[0]);
}
} else if (pos == knode.children().length) {
while (!knode.next()) {
parent = knode.parent();
if (!parent || _NOSPLIT_TAG_MAP[parent.name] || !toBlock && parent.isBlock()) {
break;
}
knode = parent;
}
if (isStart) {
self.setStartAfter(knode[0]);
} else {
self.setEndAfter(knode[0]);
}
}
}
enlargePos(self.startContainer, self.startOffset, true);
enlargePos(self.endContainer, self.endOffset, false);
return self;
},
shrink : function() {
var self = this, child, collapsed = self.collapsed;
while (self.startContainer.nodeType == 1 && (child = self.startContainer.childNodes[self.startOffset]) && child.nodeType == 1 && !K(child).isSingle()) {
self.setStart(child, 0);
}
if (collapsed) {
return self.collapse(collapsed);
}
while (self.endContainer.nodeType == 1 && self.endOffset > 0 && (child = self.endContainer.childNodes[self.endOffset - 1]) && child.nodeType == 1 && !K(child).isSingle()) {
self.setEnd(child, child.childNodes.length);
}
return self;
},
createBookmark : function(serialize) {
var self = this, doc = self.doc, endNode,
startNode = K('<span style="display:none;"></span>', doc)[0];
startNode.id = '__kindeditor_bookmark_start_' + (_BOOKMARK_ID++) + '__';
if (!self.collapsed) {
endNode = startNode.cloneNode(true);
endNode.id = '__kindeditor_bookmark_end_' + (_BOOKMARK_ID++) + '__';
}
if (endNode) {
self.cloneRange().collapse(false).insertNode(endNode).setEndBefore(endNode);
}
self.insertNode(startNode).setStartAfter(startNode);
return {
start : serialize ? '#' + startNode.id : startNode,
end : endNode ? (serialize ? '#' + endNode.id : endNode) : null
};
},
moveToBookmark : function(bookmark) {
var self = this, doc = self.doc,
start = K(bookmark.start, doc), end = bookmark.end ? K(bookmark.end, doc) : null;
if (!start || start.length < 1) {
return self;
}
self.setStartBefore(start[0]);
start.remove();
if (end && end.length > 0) {
self.setEndBefore(end[0]);
end.remove();
} else {
self.collapse(true);
}
return self;
},
dump : function() {
console.log('--------------------');
console.log(this.startContainer.nodeType == 3 ? this.startContainer.nodeValue : this.startContainer, this.startOffset);
console.log(this.endContainer.nodeType == 3 ? this.endContainer.nodeValue : this.endContainer, this.endOffset);
}
});
function _range(mixed) {
if (!mixed.nodeName) {
return mixed.constructor === KRange ? mixed : _toRange(mixed);
}
return new KRange(mixed);
}
K.RangeClass = KRange;
K.range = _range;
K.START_TO_START = _START_TO_START;
K.START_TO_END = _START_TO_END;
K.END_TO_END = _END_TO_END;
K.END_TO_START = _END_TO_START;
function _nativeCommand(doc, key, val) {
try {
doc.execCommand(key, false, val);
} catch(e) {}
}
function _nativeCommandValue(doc, key) {
var val = '';
try {
val = doc.queryCommandValue(key);
} catch (e) {}
if (typeof val !== 'string') {
val = '';
}
return val;
}
function _getSel(doc) {
var win = _getWin(doc);
return doc.selection || win.getSelection();
}
function _getRng(doc) {
var sel = _getSel(doc), rng;
try {
if (sel.rangeCount > 0) {
rng = sel.getRangeAt(0);
} else {
rng = sel.createRange();
}
} catch(e) {}
if (_IE && (!rng || (!rng.item && rng.parentElement().ownerDocument !== doc))) {
return null;
}
return rng;
}
function _singleKeyMap(map) {
var newMap = {}, arr, v;
_each(map, function(key, val) {
arr = key.split(',');
for (var i = 0, len = arr.length; i < len; i++) {
v = arr[i];
newMap[v] = val;
}
});
return newMap;
}
function _hasAttrOrCss(knode, map) {
return _hasAttrOrCssByKey(knode, map, '*') || _hasAttrOrCssByKey(knode, map);
}
function _hasAttrOrCssByKey(knode, map, mapKey) {
mapKey = mapKey || knode.name;
if (knode.type !== 1) {
return false;
}
var newMap = _singleKeyMap(map);
if (!newMap[mapKey]) {
return false;
}
var arr = newMap[mapKey].split(',');
for (var i = 0, len = arr.length; i < len; i++) {
var key = arr[i];
if (key === '*') {
return true;
}
var match = /^(\.?)([^=]+)(?:=([^=]*))?$/.exec(key);
var method = match[1] ? 'css' : 'attr';
key = match[2];
var val = match[3] || '';
if (val === '' && knode[method](key) !== '') {
return true;
}
if (val !== '' && knode[method](key) === val) {
return true;
}
}
return false;
}
function _removeAttrOrCss(knode, map) {
if (knode.type != 1) {
return;
}
_removeAttrOrCssByKey(knode, map, '*');
_removeAttrOrCssByKey(knode, map);
}
function _removeAttrOrCssByKey(knode, map, mapKey) {
mapKey = mapKey || knode.name;
if (knode.type !== 1) {
return;
}
var newMap = _singleKeyMap(map);
if (!newMap[mapKey]) {
return;
}
var arr = newMap[mapKey].split(','), allFlag = false;
for (var i = 0, len = arr.length; i < len; i++) {
var key = arr[i];
if (key === '*') {
allFlag = true;
break;
}
var match = /^(\.?)([^=]+)(?:=([^=]*))?$/.exec(key);
key = match[2];
if (match[1]) {
key = _toCamel(key);
if (knode[0].style[key]) {
knode[0].style[key] = '';
}
} else {
knode.removeAttr(key);
}
}
if (allFlag) {
knode.remove(true);
}
}
function _getInnerNode(knode) {
var inner = knode;
while (inner.first()) {
inner = inner.first();
}
return inner;
}
function _isEmptyNode(knode) {
return knode.type == 1 && knode.html().replace(/<[^>]+>/g, '') === '';
}
function _mergeWrapper(a, b) {
a = a.clone(true);
var lastA = _getInnerNode(a), childA = a, merged = false;
while (b) {
while (childA) {
if (childA.name === b.name) {
_mergeAttrs(childA, b.attr(), b.css());
merged = true;
}
childA = childA.first();
}
if (!merged) {
lastA.append(b.clone(false));
}
merged = false;
b = b.first();
}
return a;
}
function _wrapNode(knode, wrapper) {
wrapper = wrapper.clone(true);
if (knode.type == 3) {
_getInnerNode(wrapper).append(knode.clone(false));
knode.replaceWith(wrapper);
return wrapper;
}
var nodeWrapper = knode, child;
while ((child = knode.first()) && child.children().length == 1) {
knode = child;
}
child = knode.first();
var frag = knode.doc.createDocumentFragment();
while (child) {
frag.appendChild(child[0]);
child = child.next();
}
wrapper = _mergeWrapper(nodeWrapper, wrapper);
if (frag.firstChild) {
_getInnerNode(wrapper).append(frag);
}
nodeWrapper.replaceWith(wrapper);
return wrapper;
}
function _mergeAttrs(knode, attrs, styles) {
_each(attrs, function(key, val) {
if (key !== 'style') {
knode.attr(key, val);
}
});
_each(styles, function(key, val) {
knode.css(key, val);
});
}
function _inPreElement(knode) {
while (knode && knode.name != 'body') {
if (_PRE_TAG_MAP[knode.name] || knode.name == 'div' && knode.hasClass('ke-script')) {
return true;
}
knode = knode.parent();
}
return false;
}
function KCmd(range) {
this.init(range);
}
_extend(KCmd, {
init : function(range) {
var self = this, doc = range.doc;
self.doc = doc;
self.win = _getWin(doc);
self.sel = _getSel(doc);
self.range = range;
},
selection : function(forceReset) {
var self = this, doc = self.doc, rng = _getRng(doc);
self.sel = _getSel(doc);
if (rng) {
self.range = _range(rng);
if (K(self.range.startContainer).name == 'html') {
self.range.selectNodeContents(doc.body).collapse(false);
}
return self;
}
if (forceReset) {
self.range.selectNodeContents(doc.body).collapse(false);
}
return self;
},
select : function(hasDummy) {
hasDummy = _undef(hasDummy, true);
var self = this, sel = self.sel, range = self.range.cloneRange().shrink(),
sc = range.startContainer, so = range.startOffset,
ec = range.endContainer, eo = range.endOffset,
doc = _getDoc(sc), win = self.win, rng, hasU200b = false;
if (hasDummy && sc.nodeType == 1 && range.collapsed) {
if (_IE) {
var dummy = K('<span> </span>', doc);
range.insertNode(dummy[0]);
rng = doc.body.createTextRange();
try {
rng.moveToElementText(dummy[0]);
} catch(ex) {}
rng.collapse(false);
rng.select();
dummy.remove();
win.focus();
return self;
}
if (_WEBKIT) {
var children = sc.childNodes;
if (K(sc).isInline() || so > 0 && K(children[so - 1]).isInline() || children[so] && K(children[so]).isInline()) {
range.insertNode(doc.createTextNode('\u200B'));
hasU200b = true;
}
}
}
if (_IE) {
try {
rng = range.get(true);
rng.select();
} catch(e) {}
} else {
if (hasU200b) {
range.collapse(false);
}
rng = range.get(true);
//sel.removeAllRanges();
//sel.addRange(rng);
}
win.focus();
return self;
},
wrap : function(val) {
var self = this, doc = self.doc, range = self.range, wrapper;
wrapper = K(val, doc);
if (range.collapsed) {
range.shrink();
range.insertNode(wrapper[0]).selectNodeContents(wrapper[0]);
return self;
}
if (wrapper.isBlock()) {
var copyWrapper = wrapper.clone(true), child = copyWrapper;
while (child.first()) {
child = child.first();
}
child.append(range.extractContents());
range.insertNode(copyWrapper[0]).selectNode(copyWrapper[0]);
return self;
}
range.enlarge();
var bookmark = range.createBookmark(), ancestor = range.commonAncestor(), isStart = false;
K(ancestor).scan(function(node) {
if (!isStart && node == bookmark.start) {
isStart = true;
return;
}
if (isStart) {
if (node == bookmark.end) {
return false;
}
var knode = K(node);
if (_inPreElement(knode)) {
return;
}
if (knode.type == 3 && _trim(node.nodeValue).length > 0) {
var parent;
while ((parent = knode.parent()) && parent.isStyle() && parent.children().length == 1) {
knode = parent;
}
_wrapNode(knode, wrapper);
}
}
});
range.moveToBookmark(bookmark);
return self;
},
split : function(isStart, map) {
var range = this.range, doc = range.doc;
var tempRange = range.cloneRange().collapse(isStart);
var node = tempRange.startContainer, pos = tempRange.startOffset,
parent = node.nodeType == 3 ? node.parentNode : node,
needSplit = false, knode;
while (parent && parent.parentNode) {
knode = K(parent);
if (map) {
if (!knode.isStyle()) {
break;
}
if (!_hasAttrOrCss(knode, map)) {
break;
}
} else {
if (_NOSPLIT_TAG_MAP[knode.name]) {
break;
}
}
needSplit = true;
parent = parent.parentNode;
}
if (needSplit) {
var dummy = doc.createElement('span');
range.cloneRange().collapse(!isStart).insertNode(dummy);
if (isStart) {
tempRange.setStartBefore(parent.firstChild).setEnd(node, pos);
} else {
tempRange.setStart(node, pos).setEndAfter(parent.lastChild);
}
var frag = tempRange.extractContents(),
first = frag.firstChild, last = frag.lastChild;
if (isStart) {
tempRange.insertNode(frag);
range.setStartAfter(last).setEndBefore(dummy);
} else {
parent.appendChild(frag);
range.setStartBefore(dummy).setEndBefore(first);
}
var dummyParent = dummy.parentNode;
if (dummyParent == range.endContainer) {
var prev = K(dummy).prev(), next = K(dummy).next();
if (prev && next && prev.type == 3 && next.type == 3) {
range.setEnd(prev[0], prev[0].nodeValue.length);
} else if (!isStart) {
range.setEnd(range.endContainer, range.endOffset - 1);
}
}
dummyParent.removeChild(dummy);
}
return this;
},
remove : function(map) {
var self = this, doc = self.doc, range = self.range;
range.enlarge();
if (range.startOffset === 0) {
var ksc = K(range.startContainer), parent;
while ((parent = ksc.parent()) && parent.isStyle() && parent.children().length == 1) {
ksc = parent;
}
range.setStart(ksc[0], 0);
ksc = K(range.startContainer);
if (ksc.isBlock()) {
_removeAttrOrCss(ksc, map);
}
var kscp = ksc.parent();
if (kscp && kscp.isBlock()) {
_removeAttrOrCss(kscp, map);
}
}
var sc, so;
if (range.collapsed) {
self.split(true, map);
sc = range.startContainer;
so = range.startOffset;
if (so > 0) {
var sb = K(sc.childNodes[so - 1]);
if (sb && _isEmptyNode(sb)) {
sb.remove();
range.setStart(sc, so - 1);
}
}
var sa = K(sc.childNodes[so]);
if (sa && _isEmptyNode(sa)) {
sa.remove();
}
if (_isEmptyNode(sc)) {
range.startBefore(sc);
sc.remove();
}
range.collapse(true);
return self;
}
self.split(true, map);
self.split(false, map);
var startDummy = doc.createElement('span'), endDummy = doc.createElement('span');
range.cloneRange().collapse(false).insertNode(endDummy);
range.cloneRange().collapse(true).insertNode(startDummy);
var nodeList = [], cmpStart = false;
K(range.commonAncestor()).scan(function(node) {
if (!cmpStart && node == startDummy) {
cmpStart = true;
return;
}
if (node == endDummy) {
return false;
}
if (cmpStart) {
nodeList.push(node);
}
});
K(startDummy).remove();
K(endDummy).remove();
sc = range.startContainer;
so = range.startOffset;
var ec = range.endContainer, eo = range.endOffset;
if (so > 0) {
var startBefore = K(sc.childNodes[so - 1]);
if (startBefore && _isEmptyNode(startBefore)) {
startBefore.remove();
range.setStart(sc, so - 1);
if (sc == ec) {
range.setEnd(ec, eo - 1);
}
}
var startAfter = K(sc.childNodes[so]);
if (startAfter && _isEmptyNode(startAfter)) {
startAfter.remove();
if (sc == ec) {
range.setEnd(ec, eo - 1);
}
}
}
var endAfter = K(ec.childNodes[range.endOffset]);
if (endAfter && _isEmptyNode(endAfter)) {
endAfter.remove();
}
var bookmark = range.createBookmark(true);
_each(nodeList, function(i, node) {
_removeAttrOrCss(K(node), map);
});
range.moveToBookmark(bookmark);
return self;
},
commonNode : function(map) {
var range = this.range;
var ec = range.endContainer, eo = range.endOffset,
node = (ec.nodeType == 3 || eo === 0) ? ec : ec.childNodes[eo - 1];
function find(node) {
var child = node, parent = node;
while (parent) {
if (_hasAttrOrCss(K(parent), map)) {
return K(parent);
}
parent = parent.parentNode;
}
while (child && (child = child.lastChild)) {
if (_hasAttrOrCss(K(child), map)) {
return K(child);
}
}
return null;
}
var cNode = find(node);
if (cNode) {
return cNode;
}
if (node.nodeType == 1 || (ec.nodeType == 3 && eo === 0)) {
var prev = K(node).prev();
if (prev) {
return find(prev);
}
}
return null;
},
commonAncestor : function(tagName) {
var range = this.range,
sc = range.startContainer, so = range.startOffset,
ec = range.endContainer, eo = range.endOffset,
startNode = (sc.nodeType == 3 || so === 0) ? sc : sc.childNodes[so - 1],
endNode = (ec.nodeType == 3 || eo === 0) ? ec : ec.childNodes[eo - 1];
function find(node) {
while (node) {
if (node.nodeType == 1) {
if (node.tagName.toLowerCase() === tagName) {
return node;
}
}
node = node.parentNode;
}
return null;
}
var start = find(startNode), end = find(endNode);
if (start && end && start === end) {
return K(start);
}
return null;
},
state : function(key) {
var self = this, doc = self.doc, bool = false;
try {
bool = doc.queryCommandState(key);
} catch (e) {}
return bool;
},
val : function(key) {
var self = this, doc = self.doc, range = self.range;
function lc(val) {
return val.toLowerCase();
}
key = lc(key);
var val = '', knode;
if (key === 'fontfamily' || key === 'fontname') {
val = _nativeCommandValue(doc, 'fontname');
val = val.replace(/['"]/g, '');
return lc(val);
}
if (key === 'formatblock') {
val = _nativeCommandValue(doc, key);
if (val === '') {
knode = self.commonNode({'h1,h2,h3,h4,h5,h6,p,div,pre,address' : '*'});
if (knode) {
val = knode.name;
}
}
if (val === 'Normal') {
val = 'p';
}
return lc(val);
}
if (key === 'fontsize') {
knode = self.commonNode({'*' : '.font-size'});
if (knode) {
val = knode.css('font-size');
}
return lc(val);
}
if (key === 'forecolor') {
knode = self.commonNode({'*' : '.color'});
if (knode) {
val = knode.css('color');
}
val = _toHex(val);
if (val === '') {
val = 'default';
}
return lc(val);
}
if (key === 'hilitecolor') {
knode = self.commonNode({'*' : '.background-color'});
if (knode) {
val = knode.css('background-color');
}
val = _toHex(val);
if (val === '') {
val = 'default';
}
return lc(val);
}
return val;
},
toggle : function(wrapper, map) {
var self = this;
if (self.commonNode(map)) {
self.remove(map);
} else {
self.wrap(wrapper);
}
return self.select();
},
bold : function() {
return this.toggle('<strong></strong>', {
span : '.font-weight=bold',
strong : '*',
b : '*'
});
},
italic : function() {
return this.toggle('<em></em>', {
span : '.font-style=italic',
em : '*',
i : '*'
});
},
underline : function() {
return this.toggle('<u></u>', {
span : '.text-decoration=underline',
u : '*'
});
},
strikethrough : function() {
return this.toggle('<s></s>', {
span : '.text-decoration=line-through',
s : '*'
});
},
forecolor : function(val) {
return this.toggle('<span style="color:' + val + ';"></span>', {
span : '.color=' + val,
font : 'color'
});
},
hilitecolor : function(val) {
return this.toggle('<span style="background-color:' + val + ';"></span>', {
span : '.background-color=' + val
});
},
fontsize : function(val) {
return this.toggle('<span style="font-size:' + val + ';"></span>', {
span : '.font-size=' + val,
font : 'size'
});
},
fontname : function(val) {
return this.fontfamily(val);
},
fontfamily : function(val) {
return this.toggle('<span style="font-family:' + val + ';"></span>', {
span : '.font-family=' + val,
font : 'face'
});
},
removeformat : function() {
var map = {
'*' : '.font-weight,.font-style,.text-decoration,.color,.background-color,.font-size,.font-family,.text-indent'
},
tags = _STYLE_TAG_MAP;
_each(tags, function(key, val) {
map[key] = '*';
});
this.remove(map);
return this.select();
},
inserthtml : function(val, quickMode) {
var self = this, range = self.range;
if (val === '') {
return self;
}
function pasteHtml(range, val) {
val = '<img id="__kindeditor_temp_tag__" width="0" height="0" style="display:none;" />' + val;
var rng = range.get();
if (rng.item) {
rng.item(0).outerHTML = val;
} else {
rng.pasteHTML(val);
}
var temp = range.doc.getElementById('__kindeditor_temp_tag__');
temp.parentNode.removeChild(temp);
var newRange = _toRange(rng);
range.setEnd(newRange.endContainer, newRange.endOffset);
range.collapse(false);
self.select(false);
}
function insertHtml(range, val) {
var doc = range.doc,
frag = doc.createDocumentFragment();
K('@' + val, doc).each(function() {
frag.appendChild(this);
});
range.deleteContents();
range.insertNode(frag);
range.collapse(false);
self.select(false);
}
if (_IE && quickMode) {
try {
pasteHtml(range, val);
} catch(e) {
insertHtml(range, val);
}
return self;
}
insertHtml(range, val);
return self;
},
hr : function() {
return this.inserthtml('<hr />');
},
print : function() {
this.win.print();
return this;
},
insertimage : function(url, title, width, height, border, align) {
title = _undef(title, '');
border = _undef(border, 0);
var html = '<img src="' + _escape(url) + '" data-ke-src="' + _escape(url) + '" ';
if (width) {
html += 'width="' + _escape(width) + '" ';
}
if (height) {
html += 'height="' + _escape(height) + '" ';
}
if (title) {
html += 'title="' + _escape(title) + '" ';
}
if (align) {
html += 'align="' + _escape(align) + '" ';
}
html += 'alt="' + _escape(title) + '" ';
html += '/>';
return this.inserthtml(html);
},
createlink : function(url, type) {
var self = this, doc = self.doc, range = self.range;
self.select();
var a = self.commonNode({ a : '*' });
if (a && !range.isControl()) {
range.selectNode(a.get());
self.select();
}
var html = '<a href="' + _escape(url) + '" data-ke-src="' + _escape(url) + '" ';
if (type) {
html += ' target="' + _escape(type) + '"';
}
if (range.collapsed) {
html += '>' + _escape(url) + '</a>';
return self.inserthtml(html);
}
if (range.isControl()) {
var node = K(range.startContainer.childNodes[range.startOffset]);
html += '></a>';
node.after(K(html, doc));
node.next().append(node);
range.selectNode(node[0]);
return self.select();
}
_nativeCommand(doc, 'createlink', '__kindeditor_temp_url__');
K('a[href="__kindeditor_temp_url__"]', doc).each(function() {
K(this).attr('href', url).attr('data-ke-src', url);
if (type) {
K(this).attr('target', type);
} else {
K(this).removeAttr('target');
}
});
return self;
},
unlink : function() {
var self = this, doc = self.doc, range = self.range;
self.select();
if (range.collapsed) {
var a = self.commonNode({ a : '*' });
if (a) {
range.selectNode(a.get());
self.select();
}
_nativeCommand(doc, 'unlink', null);
if (_WEBKIT && K(range.startContainer).name === 'img') {
var parent = K(range.startContainer).parent();
if (parent.name === 'a') {
parent.remove(true);
}
}
} else {
_nativeCommand(doc, 'unlink', null);
}
return self;
}
});
_each(('formatblock,selectall,justifyleft,justifycenter,justifyright,justifyfull,insertorderedlist,' +
'insertunorderedlist,indent,outdent,subscript,superscript').split(','), function(i, name) {
KCmd.prototype[name] = function(val) {
var self = this;
self.select();
_nativeCommand(self.doc, name, val);
if (!_IE || _inArray(name, 'formatblock,selectall,insertorderedlist,insertunorderedlist'.split(',')) >= 0) {
self.selection();
}
return self;
};
});
_each('cut,copy,paste'.split(','), function(i, name) {
KCmd.prototype[name] = function() {
var self = this;
if (!self.doc.queryCommandSupported(name)) {
throw 'not supported';
}
self.select();
_nativeCommand(self.doc, name, null);
return self;
};
});
function _cmd(mixed) {
if (mixed.nodeName) {
var doc = _getDoc(mixed);
mixed = _range(doc).selectNodeContents(doc.body).collapse(false);
}
return new KCmd(mixed);
}
K.CmdClass = KCmd;
K.cmd = _cmd;
function _drag(options) {
var moveEl = options.moveEl,
moveFn = options.moveFn,
clickEl = options.clickEl || moveEl,
beforeDrag = options.beforeDrag,
iframeFix = options.iframeFix === undefined ? true : options.iframeFix;
var docs = [document];
if (iframeFix) {
K('iframe').each(function() {
var src = _formatUrl(this.src || '', 'absolute');
if (/^https?:\/\//.test(src)) {
return;
}
var doc;
try {
doc = _iframeDoc(this);
} catch(e) {}
if (doc) {
var pos = K(this).pos();
K(doc).data('pos-x', pos.x);
K(doc).data('pos-y', pos.y);
docs.push(doc);
}
});
}
clickEl.mousedown(function(e) {
e.stopPropagation();
var self = clickEl.get(),
x = _removeUnit(moveEl.css('left')),
y = _removeUnit(moveEl.css('top')),
width = moveEl.width(),
height = moveEl.height(),
pageX = e.pageX,
pageY = e.pageY;
if (beforeDrag) {
beforeDrag();
}
function moveListener(e) {
e.preventDefault();
var kdoc = K(_getDoc(e.target));
var diffX = _round((kdoc.data('pos-x') || 0) + e.pageX - pageX);
var diffY = _round((kdoc.data('pos-y') || 0) + e.pageY - pageY);
moveFn.call(clickEl, x, y, width, height, diffX, diffY);
}
function selectListener(e) {
e.preventDefault();
}
function upListener(e) {
e.preventDefault();
K(docs).unbind('mousemove', moveListener)
.unbind('mouseup', upListener)
.unbind('selectstart', selectListener);
if (self.releaseCapture) {
self.releaseCapture();
}
}
K(docs).mousemove(moveListener)
.mouseup(upListener)
.bind('selectstart', selectListener);
if (self.setCapture) {
self.setCapture();
}
});
}
function KWidget(options) {
this.init(options);
}
_extend(KWidget, {
init : function(options) {
var self = this;
self.name = options.name || '';
self.doc = options.doc || document;
self.win = _getWin(self.doc);
self.x = _addUnit(options.x);
self.y = _addUnit(options.y);
self.z = options.z;
self.width = _addUnit(options.width);
self.height = _addUnit(options.height);
self.div = K('<div style="display:block;"></div>');
self.options = options;
self._alignEl = options.alignEl;
if (self.width) {
self.div.css('width', self.width);
}
if (self.height) {
self.div.css('height', self.height);
}
if (self.z) {
self.div.css({
position : 'absolute',
left : self.x,
top : self.y,
'z-index' : self.z
});
}
if (self.z && (self.x === undefined || self.y === undefined)) {
self.autoPos(self.width, self.height);
}
if (options.cls) {
self.div.addClass(options.cls);
}
if (options.shadowMode) {
self.div.addClass('ke-shadow');
}
if (options.css) {
self.div.css(options.css);
}
if (options.src) {
K(options.src).replaceWith(self.div);
} else {
K(self.doc.body).append(self.div);
}
if (options.html) {
self.div.html(options.html);
}
if (options.autoScroll) {
if (_IE && _V < 7 || _QUIRKS) {
var scrollPos = _getScrollPos();
K(self.win).bind('scroll', function(e) {
var pos = _getScrollPos(),
diffX = pos.x - scrollPos.x,
diffY = pos.y - scrollPos.y;
self.pos(_removeUnit(self.x) + diffX, _removeUnit(self.y) + diffY, false);
});
} else {
self.div.css('position', 'fixed');
}
}
},
pos : function(x, y, updateProp) {
var self = this;
updateProp = _undef(updateProp, true);
if (x !== null) {
x = x < 0 ? 0 : _addUnit(x);
self.div.css('left', x);
if (updateProp) {
self.x = x;
}
}
if (y !== null) {
y = y < 0 ? 0 : _addUnit(y);
self.div.css('top', y);
if (updateProp) {
self.y = y;
}
}
return self;
},
autoPos : function(width, height) {
var self = this,
w = _removeUnit(width) || 0,
h = _removeUnit(height) || 0,
scrollPos = _getScrollPos();
if (self._alignEl) {
var knode = K(self._alignEl),
pos = knode.pos(),
diffX = _round(knode[0].clientWidth / 2 - w / 2),
diffY = _round(knode[0].clientHeight / 2 - h / 2);
x = diffX < 0 ? pos.x : pos.x + diffX;
y = diffY < 0 ? pos.y : pos.y + diffY;
} else {
var docEl = _docElement(self.doc);
x = _round(scrollPos.x + (docEl.clientWidth - w) / 2);
y = _round(scrollPos.y + (docEl.clientHeight - h) / 2);
}
if (!(_IE && _V < 7 || _QUIRKS)) {
x -= scrollPos.x;
y -= scrollPos.y;
}
return self.pos(x, y);
},
remove : function() {
var self = this;
if (_IE && _V < 7 || _QUIRKS) {
K(self.win).unbind('scroll');
}
self.div.remove();
_each(self, function(i) {
self[i] = null;
});
return this;
},
show : function() {
this.div.show();
return this;
},
hide : function() {
this.div.hide();
return this;
},
draggable : function(options) {
var self = this;
options = options || {};
options.moveEl = self.div;
options.moveFn = function(x, y, width, height, diffX, diffY) {
if ((x = x + diffX) < 0) {
x = 0;
}
if ((y = y + diffY) < 0) {
y = 0;
}
self.pos(x, y);
};
_drag(options);
return self;
}
});
function _widget(options) {
return new KWidget(options);
}
K.WidgetClass = KWidget;
K.widget = _widget;
function _iframeDoc(iframe) {
iframe = _get(iframe);
return iframe.contentDocument || iframe.contentWindow.document;
}
var html, _direction = '';
if ((html = document.getElementsByTagName('html'))) {
_direction = html[0].dir;
}
function _getInitHtml(themesPath, bodyClass, cssPath, cssData) {
var arr = [
(_direction === '' ? '<html>' : '<html dir="' + _direction + '">'),
'<head><meta charset="utf-8" /><title></title>',
'<style>',
'html {margin:0;padding:0;}',
'body {margin:0;padding:5px;}',
'body, td {font:12px/1.5 "sans serif",tahoma,verdana,helvetica;}',
'body, p, div {word-wrap: break-word;}',
'p {margin:0px;}',
'table {border-collapse:collapse;}',
'img {border:0;}',
'noscript {display:none;}',
'table.ke-zeroborder td {border:1px dotted #AAA;}',
'img.ke-flash {',
' border:1px solid #AAA;',
' background-image:url(' + themesPath + 'common/flash.gif);',
' background-position:center center;',
' background-repeat:no-repeat;',
' width:100px;',
' height:100px;',
'}',
'img.ke-rm {',
' border:1px solid #AAA;',
' background-image:url(' + themesPath + 'common/rm.gif);',
' background-position:center center;',
' background-repeat:no-repeat;',
' width:100px;',
' height:100px;',
'}',
'img.ke-media {',
' border:1px solid #AAA;',
' background-image:url(' + themesPath + 'common/media.gif);',
' background-position:center center;',
' background-repeat:no-repeat;',
' width:100px;',
' height:100px;',
'}',
'img.ke-anchor {',
' border:1px dashed #666;',
' width:16px;',
' height:16px;',
'}',
'.ke-script, .ke-noscript {',
' display:none;',
' font-size:0;',
' width:0;',
' height:0;',
'}',
'.ke-pagebreak {',
' border:1px dotted #AAA;',
' font-size:0;',
' height:2px;',
'}',
'</style>'
];
if (!_isArray(cssPath)) {
cssPath = [cssPath];
}
_each(cssPath, function(i, path) {
if (path) {
arr.push('<link href="' + path + '" rel="stylesheet" />');
}
});
if (cssData) {
arr.push('<style>' + cssData + '</style>');
}
arr.push('</head><body ' + (bodyClass ? 'class="' + bodyClass + '"' : '') + '></body></html>');
return arr.join('\n');
}
function _elementVal(knode, val) {
if (knode.hasVal()) {
if (val === undefined) {
var html = knode.val();
html = html.replace(/(<(?:p|p\s[^>]*)>) *(<\/p>)/ig, '');
return html;
}
return knode.val(val);
}
return knode.html(val);
}
function KEdit(options) {
this.init(options);
}
_extend(KEdit, KWidget, {
init : function(options) {
var self = this;
KEdit.parent.init.call(self, options);
self.srcElement = K(options.srcElement);
self.div.addClass('ke-edit');
self.designMode = _undef(options.designMode, true);
self.beforeGetHtml = options.beforeGetHtml;
self.beforeSetHtml = options.beforeSetHtml;
self.afterSetHtml = options.afterSetHtml;
var themesPath = _undef(options.themesPath, ''),
bodyClass = options.bodyClass,
cssPath = options.cssPath,
cssData = options.cssData,
isDocumentDomain = location.host.replace(/:\d+/, '') !== document.domain,
srcScript = ('document.open();' +
(isDocumentDomain ? 'document.domain="' + document.domain + '";' : '') +
'document.close();'),
iframeSrc = _IE ? ' src="javascript:void(function(){' + encodeURIComponent(srcScript) + '}())"' : '';
self.iframe = K('<iframe class="ke-edit-iframe" hidefocus="true" frameborder="0"' + iframeSrc + '></iframe>').css('width', '100%');
self.textarea = K('<textarea class="ke-edit-textarea" hidefocus="true"></textarea>').css('width', '100%');
if (self.width) {
self.setWidth(self.width);
}
if (self.height) {
self.setHeight(self.height);
}
if (self.designMode) {
self.textarea.hide();
} else {
self.iframe.hide();
}
function ready() {
var doc = _iframeDoc(self.iframe);
doc.open();
if (isDocumentDomain) {
doc.domain = document.domain;
}
doc.write(_getInitHtml(themesPath, bodyClass, cssPath, cssData));
doc.close();
self.win = self.iframe[0].contentWindow;
self.doc = doc;
var cmd = _cmd(doc);
self.afterChange(function(e) {
cmd.selection();
});
if (_WEBKIT) {
K(doc).click(function(e) {
if (K(e.target).name === 'img') {
cmd.selection(true);
cmd.range.selectNode(e.target);
cmd.select();
}
});
}
if (_IE) {
K(doc).keydown(function(e) {
if (e.which == 8) {
cmd.selection();
var rng = cmd.range;
if (rng.isControl()) {
rng.collapse(true);
K(rng.startContainer.childNodes[rng.startOffset]).remove();
e.preventDefault();
}
}
});
}
self.cmd = cmd;
self.html(_elementVal(self.srcElement));
if (_IE) {
doc.body.disabled = true;
doc.body.contentEditable = true;
doc.body.removeAttribute('disabled');
} else {
doc.designMode = 'on';
}
if (options.afterCreate) {
options.afterCreate.call(self);
}
}
if (isDocumentDomain) {
self.iframe.bind('load', function(e) {
self.iframe.unbind('load');
if (_IE) {
ready();
} else {
setTimeout(ready, 0);
}
});
}
self.div.append(self.iframe);
self.div.append(self.textarea);
self.srcElement.hide();
!isDocumentDomain && ready();
},
setWidth : function(val) {
this.div.css('width', _addUnit(val));
return this;
},
setHeight : function(val) {
var self = this;
val = _addUnit(val);
self.div.css('height', val);
self.iframe.css('height', val);
if ((_IE && _V < 8) || _QUIRKS) {
val = _addUnit(_removeUnit(val) - 2);
}
self.textarea.css('height', val);
return self;
},
remove : function() {
var self = this, doc = self.doc;
K(doc.body).unbind();
K(doc).unbind();
K(self.win).unbind();
_elementVal(self.srcElement, self.html());
self.srcElement.show();
doc.write('');
self.iframe.unbind();
self.textarea.unbind();
KEdit.parent.remove.call(self);
},
html : function(val, isFull) {
var self = this, doc = self.doc;
if (self.designMode) {
var body = doc.body;
if (val === undefined) {
if (isFull) {
val = '<!doctype html><html>' + body.parentNode.innerHTML + '</html>';
} else {
val = body.innerHTML;
}
if (self.beforeGetHtml) {
val = self.beforeGetHtml(val);
}
if (_GECKO && val == '<br />') {
val = '';
}
return val;
}
if (self.beforeSetHtml) {
val = self.beforeSetHtml(val);
}
K(body).html(val);
if (self.afterSetHtml) {
self.afterSetHtml();
}
return self;
}
if (val === undefined) {
return self.textarea.val();
}
self.textarea.val(val);
return self;
},
design : function(bool) {
var self = this, val;
if (bool === undefined ? !self.designMode : bool) {
if (!self.designMode) {
val = self.html();
self.designMode = true;
self.html(val);
self.textarea.hide();
self.iframe.show();
}
} else {
if (self.designMode) {
val = self.html();
self.designMode = false;
self.html(val);
self.iframe.hide();
self.textarea.show();
}
}
return self.focus();
},
focus : function() {
var self = this;
self.designMode ? self.win.focus() : self.textarea[0].focus();
return self;
},
blur : function() {
var self = this;
if (_IE) {
var input = K('<input type="text" style="float:left;width:0;height:0;padding:0;margin:0;border:0;" value="" />', self.div);
self.div.append(input);
input[0].focus();
input.remove();
} else {
self.designMode ? self.win.blur() : self.textarea[0].blur();
}
return self;
},
afterChange : function(fn) {
var self = this, doc = self.doc, body = doc.body;
K(doc).keyup(function(e) {
if (!e.ctrlKey && !e.altKey && _CHANGE_KEY_MAP[e.which]) {
fn(e);
}
});
K(doc).mouseup(fn).contextmenu(fn);
K(self.win).blur(fn);
function timeoutHandler(e) {
setTimeout(function() {
fn(e);
}, 1);
}
K(body).bind('paste', timeoutHandler);
K(body).bind('cut', timeoutHandler);
return self;
}
});
function _edit(options) {
return new KEdit(options);
}
K.EditClass = KEdit;
K.edit = _edit;
K.iframeDoc = _iframeDoc;
function _selectToolbar(name, fn) {
var self = this,
knode = self.get(name);
if (knode) {
if (knode.hasClass('ke-disabled')) {
return;
}
fn(knode);
}
}
function KToolbar(options) {
this.init(options);
}
_extend(KToolbar, KWidget, {
init : function(options) {
var self = this;
KToolbar.parent.init.call(self, options);
self.disableMode = _undef(options.disableMode, false);
self.noDisableItemMap = _toMap(_undef(options.noDisableItems, []));
self._itemMap = {};
self.div.addClass('ke-toolbar').bind('contextmenu,mousedown,mousemove', function(e) {
e.preventDefault();
}).attr('unselectable', 'on');
function find(target) {
var knode = K(target);
if (knode.hasClass('ke-outline')) {
return knode;
}
if (knode.hasClass('ke-toolbar-icon')) {
return knode.parent();
}
}
function hover(e, method) {
var knode = find(e.target);
if (knode) {
if (knode.hasClass('ke-disabled')) {
return;
}
if (knode.hasClass('ke-selected')) {
return;
}
knode[method]('ke-on');
}
}
self.div.mouseover(function(e) {
hover(e, 'addClass');
})
.mouseout(function(e) {
hover(e, 'removeClass');
})
.click(function(e) {
var knode = find(e.target);
if (knode) {
if (knode.hasClass('ke-disabled')) {
return;
}
self.options.click.call(this, e, knode.attr('data-name'));
}
});
},
get : function(name) {
if (this._itemMap[name]) {
return this._itemMap[name];
}
return (this._itemMap[name] = K('span.ke-icon-' + name, this.div).parent());
},
select : function(name) {
_selectToolbar.call(this, name, function(knode) {
knode.addClass('ke-selected');
});
return self;
},
unselect : function(name) {
_selectToolbar.call(this, name, function(knode) {
knode.removeClass('ke-selected').removeClass('ke-on');
});
return self;
},
enable : function(name) {
var self = this,
knode = name.get ? name : self.get(name);
if (knode) {
knode.removeClass('ke-disabled');
knode.opacity(1);
}
return self;
},
disable : function(name) {
var self = this,
knode = name.get ? name : self.get(name);
if (knode) {
knode.removeClass('ke-selected').addClass('ke-disabled');
knode.opacity(0.5);
}
return self;
},
disableAll : function(bool, noDisableItems) {
var self = this, map = self.noDisableItemMap, item;
if (noDisableItems) {
map = _toMap(noDisableItems);
}
if (bool === undefined ? !self.disableMode : bool) {
K('span.ke-outline', self.div).each(function() {
var knode = K(this),
name = knode[0].getAttribute('data-name', 2);
if (!map[name]) {
self.disable(knode);
}
});
self.disableMode = true;
} else {
K('span.ke-outline', self.div).each(function() {
var knode = K(this),
name = knode[0].getAttribute('data-name', 2);
if (!map[name]) {
self.enable(knode);
}
});
self.disableMode = false;
}
return self;
}
});
function _toolbar(options) {
return new KToolbar(options);
}
K.ToolbarClass = KToolbar;
K.toolbar = _toolbar;
function KMenu(options) {
this.init(options);
}
_extend(KMenu, KWidget, {
init : function(options) {
var self = this;
options.z = options.z || 811213;
KMenu.parent.init.call(self, options);
self.centerLineMode = _undef(options.centerLineMode, true);
self.div.addClass('ke-menu').bind('click,mousedown', function(e){
e.stopPropagation();
}).attr('unselectable', 'on');
},
addItem : function(item) {
var self = this;
if (item.title === '-') {
self.div.append(K('<div class="ke-menu-separator"></div>'));
return;
}
var itemDiv = K('<div class="ke-menu-item" unselectable="on"></div>'),
leftDiv = K('<div class="ke-inline-block ke-menu-item-left"></div>'),
rightDiv = K('<div class="ke-inline-block ke-menu-item-right"></div>'),
height = _addUnit(item.height),
iconClass = _undef(item.iconClass, '');
self.div.append(itemDiv);
if (height) {
itemDiv.css('height', height);
rightDiv.css('line-height', height);
}
var centerDiv;
if (self.centerLineMode) {
centerDiv = K('<div class="ke-inline-block ke-menu-item-center"></div>');
if (height) {
centerDiv.css('height', height);
}
}
itemDiv.mouseover(function(e) {
K(this).addClass('ke-menu-item-on');
if (centerDiv) {
centerDiv.addClass('ke-menu-item-center-on');
}
})
.mouseout(function(e) {
K(this).removeClass('ke-menu-item-on');
if (centerDiv) {
centerDiv.removeClass('ke-menu-item-center-on');
}
})
.click(function(e) {
item.click.call(K(this));
e.stopPropagation();
})
.append(leftDiv);
if (centerDiv) {
itemDiv.append(centerDiv);
}
itemDiv.append(rightDiv);
if (item.checked) {
iconClass = 'ke-icon-checked';
}
if (iconClass !== '') {
leftDiv.html('<span class="ke-inline-block ke-toolbar-icon ke-toolbar-icon-url ' + iconClass + '"></span>');
}
rightDiv.html(item.title);
return self;
},
remove : function() {
var self = this;
if (self.options.beforeRemove) {
self.options.beforeRemove.call(self);
}
K('.ke-menu-item', self.div[0]).unbind();
KMenu.parent.remove.call(self);
return self;
}
});
function _menu(options) {
return new KMenu(options);
}
K.MenuClass = KMenu;
K.menu = _menu;
function KColorPicker(options) {
this.init(options);
}
_extend(KColorPicker, KWidget, {
init : function(options) {
var self = this;
options.z = options.z || 811213;
KColorPicker.parent.init.call(self, options);
var colors = options.colors || [
['#E53333', '#E56600', '#FF9900', '#64451D', '#DFC5A4', '#FFE500'],
['#009900', '#006600', '#99BB00', '#B8D100', '#60D978', '#00D5FF'],
['#337FE5', '#003399', '#4C33E5', '#9933E5', '#CC33E5', '#EE33EE'],
['#FFFFFF', '#CCCCCC', '#999999', '#666666', '#333333', '#000000']
];
self.selectedColor = (options.selectedColor || '').toLowerCase();
self._cells = [];
self.div.addClass('ke-colorpicker').bind('click,mousedown', function(e){
e.stopPropagation();
}).attr('unselectable', 'on');
var table = self.doc.createElement('table');
self.div.append(table);
table.className = 'ke-colorpicker-table';
table.cellPadding = 0;
table.cellSpacing = 0;
table.border = 0;
var row = table.insertRow(0), cell = row.insertCell(0);
cell.colSpan = colors[0].length;
self._addAttr(cell, '', 'ke-colorpicker-cell-top');
for (var i = 0; i < colors.length; i++) {
row = table.insertRow(i + 1);
for (var j = 0; j < colors[i].length; j++) {
cell = row.insertCell(j);
self._addAttr(cell, colors[i][j], 'ke-colorpicker-cell');
}
}
},
_addAttr : function(cell, color, cls) {
var self = this;
cell = K(cell).addClass(cls);
if (self.selectedColor === color.toLowerCase()) {
cell.addClass('ke-colorpicker-cell-selected');
}
cell.attr('title', color || self.options.noColor);
cell.mouseover(function(e) {
K(this).addClass('ke-colorpicker-cell-on');
});
cell.mouseout(function(e) {
K(this).removeClass('ke-colorpicker-cell-on');
});
cell.click(function(e) {
e.stop();
self.options.click.call(K(this), color);
});
if (color) {
cell.append(K('<div class="ke-colorpicker-cell-color" unselectable="on"></div>').css('background-color', color));
} else {
cell.html(self.options.noColor);
}
K(cell).attr('unselectable', 'on');
self._cells.push(cell);
},
remove : function() {
var self = this;
_each(self._cells, function() {
this.unbind();
});
KColorPicker.parent.remove.call(self);
return self;
}
});
function _colorpicker(options) {
return new KColorPicker(options);
}
K.ColorPickerClass = KColorPicker;
K.colorpicker = _colorpicker;
function KUploadButton(options) {
this.init(options);
}
_extend(KUploadButton, {
init : function(options) {
var self = this,
button = K(options.button),
fieldName = options.fieldName || 'file',
url = options.url || '',
title = button.val(),
extraParams = options.extraParams || {},
cls = button[0].className || '',
target = options.target || 'kindeditor_upload_iframe_' + new Date().getTime();
options.afterError = options.afterError || function(str) {
alert(str);
};
var hiddenElements = [];
for(var k in extraParams){
hiddenElements.push('<input type="hidden" name="' + k + '" value="' + extraParams[k] + '" />');
}
var html = [
'<div class="ke-inline-block ' + cls + '">',
(options.target ? '' : '<iframe name="' + target + '" style="display:none;"></iframe>'),
(options.form ? '<div class="ke-upload-area">' : '<form class="ke-upload-area ke-form" method="post" enctype="multipart/form-data" target="' + target + '" action="' + url + '">'),
'<span class="ke-button-common">',
hiddenElements.join(''),
'<input type="button" class="ke-button-common ke-button" value="' + title + '" />',
'</span>',
'<input type="file" class="ke-upload-file" name="' + fieldName + '" tabindex="-1" />',
(options.form ? '</div>' : '</form>'),
'</div>'].join('');
var div = K(html, button.doc);
button.hide();
button.before(div);
self.div = div;
self.button = button;
self.iframe = options.target ? K('iframe[name="' + target + '"]') : K('iframe', div);
self.form = options.form ? K(options.form) : K('form', div);
var width = options.width || K('.ke-button-common', div).width();
self.fileBox = K('.ke-upload-file', div).width(width);
self.options = options;
},
submit : function() {
var self = this,
iframe = self.iframe;
iframe.bind('load', function() {
iframe.unbind();
var tempForm = document.createElement('form');
self.fileBox.before(tempForm);
K(tempForm).append(self.fileBox);
tempForm.reset();
K(tempForm).remove(true);
var doc = K.iframeDoc(iframe),
pre = doc.getElementsByTagName('pre')[0],
str = '', data;
if (pre) {
str = pre.innerHTML;
} else {
str = doc.body.innerHTML;
}
iframe[0].src = 'javascript:false';
try {
data = K.json(str);
} catch (e) {
self.options.afterError.call(self, '<!doctype html><html>' + doc.body.parentNode.innerHTML + '</html>');
}
if (data) {
self.options.afterUpload.call(self, data);
}
});
self.form[0].submit();
return self;
},
remove : function() {
var self = this;
if (self.fileBox) {
self.fileBox.unbind();
}
self.iframe.remove();
self.div.remove();
self.button.show();
return self;
}
});
function _uploadbutton(options) {
return new KUploadButton(options);
}
K.UploadButtonClass = KUploadButton;
K.uploadbutton = _uploadbutton;
function _createButton(arg) {
arg = arg || {};
var name = arg.name || '',
span = K('<span class="ke-button-common ke-button-outer" title="' + name + '"></span>'),
btn = K('<input class="ke-button-common ke-button" type="button" value="' + name + '" />');
if (arg.click) {
btn.click(arg.click);
}
span.append(btn);
return span;
}
function KDialog(options) {
this.init(options);
}
_extend(KDialog, KWidget, {
init : function(options) {
var self = this;
var shadowMode = _undef(options.shadowMode, true);
options.z = options.z || 811213;
options.shadowMode = false;
options.autoScroll = _undef(options.autoScroll, true);
KDialog.parent.init.call(self, options);
var title = options.title,
body = K(options.body, self.doc),
previewBtn = options.previewBtn,
yesBtn = options.yesBtn,
noBtn = options.noBtn,
closeBtn = options.closeBtn,
showMask = _undef(options.showMask, true);
self.div.addClass('ke-dialog').bind('click,mousedown', function(e){
e.stopPropagation();
});
var contentDiv = K('<div class="ke-dialog-content"></div>').appendTo(self.div);
if (_IE && _V < 7) {
self.iframeMask = K('<iframe src="about:blank" class="ke-dialog-shadow"></iframe>').appendTo(self.div);
} else if (shadowMode) {
K('<div class="ke-dialog-shadow"></div>').appendTo(self.div);
}
var headerDiv = K('<div class="ke-dialog-header"></div>');
contentDiv.append(headerDiv);
headerDiv.html(title);
self.closeIcon = K('<span class="ke-dialog-icon-close" title="' + closeBtn.name + '"></span>').click(closeBtn.click);
headerDiv.append(self.closeIcon);
self.draggable({
clickEl : headerDiv,
beforeDrag : options.beforeDrag
});
var bodyDiv = K('<div class="ke-dialog-body"></div>');
contentDiv.append(bodyDiv);
bodyDiv.append(body);
var footerDiv = K('<div class="ke-dialog-footer"></div>');
if (previewBtn || yesBtn || noBtn) {
contentDiv.append(footerDiv);
}
_each([
{ btn : previewBtn, name : 'preview' },
{ btn : yesBtn, name : 'yes' },
{ btn : noBtn, name : 'no' }
], function() {
if (this.btn) {
var button = _createButton(this.btn);
button.addClass('ke-dialog-' + this.name);
footerDiv.append(button);
}
});
if (self.height) {
bodyDiv.height(_removeUnit(self.height) - headerDiv.height() - footerDiv.height());
}
self.div.width(self.div.width());
self.div.height(self.div.height());
self.mask = null;
if (showMask) {
var docEl = _docElement(self.doc),
docWidth = Math.max(docEl.scrollWidth, docEl.clientWidth),
docHeight = Math.max(docEl.scrollHeight, docEl.clientHeight);
self.mask = _widget({
x : 0,
y : 0,
z : self.z - 1,
cls : 'ke-dialog-mask',
width : docWidth,
height : docHeight
});
}
self.autoPos(self.div.width(), self.div.height());
self.footerDiv = footerDiv;
self.bodyDiv = bodyDiv;
self.headerDiv = headerDiv;
self.isLoading = false;
},
setMaskIndex : function(z) {
var self = this;
self.mask.div.css('z-index', z);
},
showLoading : function(msg) {
msg = _undef(msg, '');
var self = this, body = self.bodyDiv;
self.loading = K('<div class="ke-dialog-loading"><div class="ke-inline-block ke-dialog-loading-content" style="margin-top:' + Math.round(body.height() / 3) + 'px;">' + msg + '</div></div>')
.width(body.width()).height(body.height())
.css('top', self.headerDiv.height() + 'px');
body.css('visibility', 'hidden').after(self.loading);
self.isLoading = true;
return self;
},
hideLoading : function() {
this.loading && this.loading.remove();
this.bodyDiv.css('visibility', 'visible');
this.isLoading = false;
return this;
},
remove : function() {
var self = this;
if (self.options.beforeRemove) {
self.options.beforeRemove.call(self);
}
self.mask && self.mask.remove();
self.iframeMask && self.iframeMask.remove();
self.closeIcon.unbind();
K('input', self.div).unbind();
K('button', self.div).unbind();
self.footerDiv.unbind();
self.bodyDiv.unbind();
self.headerDiv.unbind();
K('iframe', self.div).each(function() {
K(this).remove();
});
KDialog.parent.remove.call(self);
return self;
}
});
function _dialog(options) {
return new KDialog(options);
}
K.DialogClass = KDialog;
K.dialog = _dialog;
function _tabs(options) {
var self = _widget(options),
remove = self.remove,
afterSelect = options.afterSelect,
div = self.div,
liList = [];
div.addClass('ke-tabs')
.bind('contextmenu,mousedown,mousemove', function(e) {
e.preventDefault();
});
var ul = K('<ul class="ke-tabs-ul ke-clearfix"></ul>');
div.append(ul);
self.add = function(tab) {
var li = K('<li class="ke-tabs-li">' + tab.title + '</li>');
li.data('tab', tab);
liList.push(li);
ul.append(li);
};
self.selectedIndex = 0;
self.select = function(index) {
self.selectedIndex = index;
_each(liList, function(i, li) {
li.unbind();
if (i === index) {
li.addClass('ke-tabs-li-selected');
K(li.data('tab').panel).show('');
} else {
li.removeClass('ke-tabs-li-selected').removeClass('ke-tabs-li-on')
.mouseover(function() {
K(this).addClass('ke-tabs-li-on');
})
.mouseout(function() {
K(this).removeClass('ke-tabs-li-on');
})
.click(function() {
self.select(i);
});
K(li.data('tab').panel).hide();
}
});
if (afterSelect) {
afterSelect.call(self, index);
}
};
self.remove = function() {
_each(liList, function() {
this.remove();
});
ul.remove();
remove.call(self);
};
return self;
}
K.tabs = _tabs;
function _loadScript(url, fn) {
var head = document.getElementsByTagName('head')[0] || (_QUIRKS ? document.body : document.documentElement),
script = document.createElement('script');
head.appendChild(script);
script.src = url;
script.charset = 'utf-8';
script.onload = script.onreadystatechange = function() {
if (!this.readyState || this.readyState === 'loaded') {
if (fn) {
fn();
}
script.onload = script.onreadystatechange = null;
head.removeChild(script);
}
};
}
function _chopQuery(url) {
var index = url.indexOf('?');
return index > 0 ? url.substr(0, index) : url;
}
function _loadStyle(url) {
var head = document.getElementsByTagName('head')[0] || (_QUIRKS ? document.body : document.documentElement),
link = document.createElement('link'),
absoluteUrl = _chopQuery(_formatUrl(url, 'absolute'));
var links = K('link[rel="stylesheet"]', head);
for (var i = 0, len = links.length; i < len; i++) {
if (_chopQuery(_formatUrl(links[i].href, 'absolute')) === absoluteUrl) {
return;
}
}
head.appendChild(link);
link.href = url;
link.rel = 'stylesheet';
}
function _ajax(url, fn, method, param, dataType) {
method = method || 'GET';
dataType = dataType || 'json';
var xhr = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
xhr.open(method, url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
if (fn) {
var data = _trim(xhr.responseText);
if (dataType == 'json') {
data = _json(data);
}
fn(data);
}
}
};
if (method == 'POST') {
var params = [];
_each(param, function(key, val) {
params.push(encodeURIComponent(key) + '=' + encodeURIComponent(val));
});
try {
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
} catch (e) {}
xhr.send(params.join('&'));
} else {
xhr.send(null);
}
}
K.loadScript = _loadScript;
K.loadStyle = _loadStyle;
K.ajax = _ajax;
var _plugins = {};
function _plugin(name, fn) {
if (name === undefined) {
return _plugins;
}
if (!fn) {
return _plugins[name];
}
_plugins[name] = fn;
}
var _language = {};
function _parseLangKey(key) {
var match, ns = 'core';
if ((match = /^(\w+)\.(\w+)$/.exec(key))) {
ns = match[1];
key = match[2];
}
return { ns : ns, key : key };
}
function _lang(mixed, langType) {
langType = langType === undefined ? K.options.langType : langType;
if (typeof mixed === 'string') {
if (!_language[langType]) {
return 'no language';
}
var pos = mixed.length - 1;
if (mixed.substr(pos) === '.') {
return _language[langType][mixed.substr(0, pos)];
}
var obj = _parseLangKey(mixed);
return _language[langType][obj.ns][obj.key];
}
_each(mixed, function(key, val) {
var obj = _parseLangKey(key);
if (!_language[langType]) {
_language[langType] = {};
}
if (!_language[langType][obj.ns]) {
_language[langType][obj.ns] = {};
}
_language[langType][obj.ns][obj.key] = val;
});
}
function _getImageFromRange(range, fn) {
if (range.collapsed) {
return;
}
range = range.cloneRange().up();
var sc = range.startContainer, so = range.startOffset;
if (!_WEBKIT && !range.isControl()) {
return;
}
var img = K(sc.childNodes[so]);
if (!img || img.name != 'img') {
return;
}
if (fn(img)) {
return img;
}
}
function _bindContextmenuEvent() {
var self = this, doc = self.edit.doc;
K(doc).contextmenu(function(e) {
if (self.menu) {
self.hideMenu();
}
if (!self.useContextmenu) {
e.preventDefault();
return;
}
if (self._contextmenus.length === 0) {
return;
}
var maxWidth = 0, items = [];
_each(self._contextmenus, function() {
if (this.title == '-') {
items.push(this);
return;
}
if (this.cond && this.cond()) {
items.push(this);
if (this.width && this.width > maxWidth) {
maxWidth = this.width;
}
}
});
while (items.length > 0 && items[0].title == '-') {
items.shift();
}
while (items.length > 0 && items[items.length - 1].title == '-') {
items.pop();
}
var prevItem = null;
_each(items, function(i) {
if (this.title == '-' && prevItem.title == '-') {
delete items[i];
}
prevItem = this;
});
if (items.length > 0) {
e.preventDefault();
var pos = K(self.edit.iframe).pos(),
menu = _menu({
x : pos.x + e.clientX,
y : pos.y + e.clientY,
width : maxWidth,
css : { visibility: 'hidden' },
shadowMode : self.shadowMode
});
_each(items, function() {
if (this.title) {
menu.addItem(this);
}
});
var docEl = _docElement(menu.doc),
menuHeight = menu.div.height();
if (e.clientY + menuHeight >= docEl.clientHeight - 100) {
menu.pos(menu.x, _removeUnit(menu.y) - menuHeight);
}
menu.div.css('visibility', 'visible');
self.menu = menu;
}
});
}
function _bindNewlineEvent() {
var self = this, doc = self.edit.doc, newlineTag = self.newlineTag;
if (_IE && newlineTag !== 'br') {
return;
}
if (_GECKO && _V < 3 && newlineTag !== 'p') {
return;
}
if (_OPERA && _V < 9) {
return;
}
var brSkipTagMap = _toMap('h1,h2,h3,h4,h5,h6,pre,li'),
pSkipTagMap = _toMap('p,h1,h2,h3,h4,h5,h6,pre,li,blockquote');
function getAncestorTagName(range) {
var ancestor = K(range.commonAncestor());
while (ancestor) {
if (ancestor.type == 1 && !ancestor.isStyle()) {
break;
}
ancestor = ancestor.parent();
}
return ancestor.name;
}
K(doc).keydown(function(e) {
if (e.which != 13 || e.shiftKey || e.ctrlKey || e.altKey) {
return;
}
self.cmd.selection();
var tagName = getAncestorTagName(self.cmd.range);
if (tagName == 'marquee' || tagName == 'select') {
return;
}
if (newlineTag === 'br' && !brSkipTagMap[tagName]) {
e.preventDefault();
self.insertHtml('<br />' + (_IE && _V < 9 ? '' : '\u200B'));
return;
}
if (!pSkipTagMap[tagName]) {
_nativeCommand(doc, 'formatblock', '<p>');
}
});
K(doc).keyup(function(e) {
if (e.which != 13 || e.shiftKey || e.ctrlKey || e.altKey) {
return;
}
if (newlineTag == 'br') {
return;
}
if (_GECKO) {
var root = self.cmd.commonAncestor('p');
var a = self.cmd.commonAncestor('a');
if (a.text() == '') {
a.remove(true);
self.cmd.range.selectNodeContents(root[0]).collapse(true);
self.cmd.select();
}
return;
}
self.cmd.selection();
var tagName = getAncestorTagName(self.cmd.range);
if (tagName == 'marquee' || tagName == 'select') {
return;
}
if (!pSkipTagMap[tagName]) {
_nativeCommand(doc, 'formatblock', '<p>');
}
var div = self.cmd.commonAncestor('div');
if (div) {
var p = K('<p></p>'),
child = div[0].firstChild;
while (child) {
var next = child.nextSibling;
p.append(child);
child = next;
}
div.before(p);
div.remove();
self.cmd.range.selectNodeContents(p[0]);
self.cmd.select();
}
});
}
function _bindTabEvent() {
var self = this, doc = self.edit.doc;
K(doc).keydown(function(e) {
if (e.which == 9) {
e.preventDefault();
if (self.afterTab) {
self.afterTab.call(self, e);
return;
}
var cmd = self.cmd, range = cmd.range;
range.shrink();
if (range.collapsed && range.startContainer.nodeType == 1) {
range.insertNode(K('@ ', doc)[0]);
cmd.select();
}
self.insertHtml(' ');
}
});
}
function _bindFocusEvent() {
var self = this;
K(self.edit.textarea[0], self.edit.win).focus(function(e) {
if (self.afterFocus) {
self.afterFocus.call(self, e);
}
}).blur(function(e) {
if (self.afterBlur) {
self.afterBlur.call(self, e);
}
});
}
function _removeBookmarkTag(html) {
return _trim(html.replace(/<span [^>]*id="?__kindeditor_bookmark_\w+_\d+__"?[^>]*><\/span>/ig, ''));
}
function _removeTempTag(html) {
return html.replace(/<div[^>]+class="?__kindeditor_paste__"?[^>]*>[\s\S]*?<\/div>/ig, '');
}
function _addBookmarkToStack(stack, bookmark) {
if (stack.length === 0) {
stack.push(bookmark);
return;
}
var prev = stack[stack.length - 1];
if (_removeBookmarkTag(bookmark.html) !== _removeBookmarkTag(prev.html)) {
stack.push(bookmark);
}
}
function _undoToRedo(fromStack, toStack) {
var self = this, edit = self.edit,
body = edit.doc.body,
range, bookmark;
if (fromStack.length === 0) {
return self;
}
if (edit.designMode) {
range = self.cmd.range;
bookmark = range.createBookmark(true);
bookmark.html = body.innerHTML;
} else {
bookmark = {
html : body.innerHTML
};
}
_addBookmarkToStack(toStack, bookmark);
var prev = fromStack.pop();
if (_removeBookmarkTag(bookmark.html) === _removeBookmarkTag(prev.html) && fromStack.length > 0) {
prev = fromStack.pop();
}
if (edit.designMode) {
edit.html(prev.html);
if (prev.start) {
range.moveToBookmark(prev);
self.select();
}
} else {
K(body).html(_removeBookmarkTag(prev.html));
}
return self;
}
function KEditor(options) {
var self = this;
self.options = {};
function setOption(key, val) {
if (KEditor.prototype[key] === undefined) {
self[key] = val;
}
self.options[key] = val;
}
_each(options, function(key, val) {
setOption(key, options[key]);
});
_each(K.options, function(key, val) {
if (self[key] === undefined) {
setOption(key, val);
}
});
var se = K(self.srcElement || '<textarea/>');
if (!self.width) {
self.width = se[0].style.width || se.width();
}
if (!self.height) {
self.height = se[0].style.height || se.height();
}
setOption('width', _undef(self.width, self.minWidth));
setOption('height', _undef(self.height, self.minHeight));
setOption('width', _addUnit(self.width));
setOption('height', _addUnit(self.height));
if (_MOBILE && (!_IOS || _V < 534)) {
self.designMode = false;
}
self.srcElement = se;
self.initContent = '';
self.plugin = {};
self.isCreated = false;
self.isLoading = false;
self._handlers = {};
self._contextmenus = [];
self._undoStack = [];
self._redoStack = [];
self._calledPlugins = {};
self._firstAddBookmark = true;
self.menu = self.contextmenu = null;
self.dialogs = [];
}
KEditor.prototype = {
lang : function(mixed) {
return _lang(mixed, this.langType);
},
loadPlugin : function(name, fn) {
var self = this;
if (_plugins[name]) {
if (self._calledPlugins[name]) {
if (fn) {
fn.call(self);
}
return self;
}
_plugins[name].call(self, KindEditor);
if (fn) {
fn.call(self);
}
self._calledPlugins[name] = true;
return self;
}
if (self.isLoading) {
return self;
}
self.isLoading = true;
_loadScript(self.pluginsPath + name + '/' + name + '.js?ver=' + encodeURIComponent(K.DEBUG ? _TIME : _VERSION), function() {
self.isLoading = false;
if (_plugins[name]) {
self.loadPlugin(name, fn);
}
});
return self;
},
handler : function(key, fn) {
var self = this;
if (!self._handlers[key]) {
self._handlers[key] = [];
}
if (_isFunction(fn)) {
self._handlers[key].push(fn);
return self;
}
_each(self._handlers[key], function() {
fn = this.call(self, fn);
});
return fn;
},
clickToolbar : function(name, fn) {
var self = this, key = 'clickToolbar' + name;
if (fn === undefined) {
if (self._handlers[key]) {
return self.handler(key);
}
self.loadPlugin(name, function() {
self.handler(key);
});
return self;
}
return self.handler(key, fn);
},
updateState : function() {
var self = this;
_each(('justifyleft,justifycenter,justifyright,justifyfull,insertorderedlist,insertunorderedlist,' +
'subscript,superscript,bold,italic,underline,strikethrough').split(','), function(i, name) {
self.cmd.state(name) ? self.toolbar.select(name) : self.toolbar.unselect(name);
});
return self;
},
addContextmenu : function(item) {
this._contextmenus.push(item);
return this;
},
afterCreate : function(fn) {
return this.handler('afterCreate', fn);
},
beforeRemove : function(fn) {
return this.handler('beforeRemove', fn);
},
beforeGetHtml : function(fn) {
return this.handler('beforeGetHtml', fn);
},
beforeSetHtml : function(fn) {
return this.handler('beforeSetHtml', fn);
},
afterSetHtml : function(fn) {
return this.handler('afterSetHtml', fn);
},
create : function() {
var self = this, fullscreenMode = self.fullscreenMode;
if (self.isCreated) {
return self;
}
if (self.srcElement.data('kindeditor')) {
return self;
}
self.srcElement.data('kindeditor', 'true');
if (fullscreenMode) {
_docElement().style.overflow = 'hidden';
} else {
_docElement().style.overflow = '';
}
var width = fullscreenMode ? _docElement().clientWidth + 'px' : self.width,
height = fullscreenMode ? _docElement().clientHeight + 'px' : self.height;
if ((_IE && _V < 8) || _QUIRKS) {
height = _addUnit(_removeUnit(height) + 2);
}
var container = self.container = K(self.layout);
if (fullscreenMode) {
K(document.body).append(container);
} else {
self.srcElement.before(container);
}
var toolbarDiv = K('.toolbar', container),
editDiv = K('.edit', container),
statusbar = self.statusbar = K('.statusbar', container);
container.removeClass('container')
.addClass('ke-container ke-container-' + self.themeType).css('width', width);
if (fullscreenMode) {
container.css({
position : 'absolute',
left : 0,
top : 0,
'z-index' : 811211
});
if (!_GECKO) {
self._scrollPos = _getScrollPos();
}
window.scrollTo(0, 0);
K(document.body).css({
'height' : '1px',
'overflow' : 'hidden'
});
K(document.body.parentNode).css('overflow', 'hidden');
self._fullscreenExecuted = true;
} else {
if (self._fullscreenExecuted) {
K(document.body).css({
'height' : '',
'overflow' : ''
});
K(document.body.parentNode).css('overflow', '');
}
if (self._scrollPos) {
window.scrollTo(self._scrollPos.x, self._scrollPos.y);
}
}
var htmlList = [];
K.each(self.items, function(i, name) {
if (name == '|') {
htmlList.push('<span class="ke-inline-block ke-separator"></span>');
} else if (name == '/') {
htmlList.push('<div class="ke-hr"></div>');
} else {
htmlList.push('<span class="ke-outline" data-name="' + name + '" title="' + self.lang(name) + '" unselectable="on">');
htmlList.push('<span class="ke-toolbar-icon ke-toolbar-icon-url ke-icon-' + name + '" unselectable="on"></span></span>');
}
});
var toolbar = self.toolbar = _toolbar({
src : toolbarDiv,
html : htmlList.join(''),
noDisableItems : self.noDisableItems,
click : function(e, name) {
e.stop();
if (self.menu) {
var menuName = self.menu.name;
self.hideMenu();
if (menuName === name) {
return;
}
}
self.clickToolbar(name);
}
});
var editHeight = _removeUnit(height) - toolbar.div.height();
var edit = self.edit = _edit({
height : editHeight > 0 && _removeUnit(height) > self.minHeight ? editHeight : self.minHeight,
src : editDiv,
srcElement : self.srcElement,
designMode : self.designMode,
themesPath : self.themesPath,
bodyClass : self.bodyClass,
cssPath : self.cssPath,
cssData : self.cssData,
beforeGetHtml : function(html) {
html = self.beforeGetHtml(html);
return _formatHtml(html, self.filterMode ? self.htmlTags : null, self.urlType, self.wellFormatMode, self.indentChar);
},
beforeSetHtml : function(html) {
html = _formatHtml(html, self.filterMode ? self.htmlTags : null, '', false);
return self.beforeSetHtml(html);
},
afterSetHtml : function() {
self.edit = edit = this;
self.afterSetHtml();
},
afterCreate : function() {
self.edit = edit = this;
self.cmd = edit.cmd;
self._docMousedownFn = function(e) {
if (self.menu) {
self.hideMenu();
}
};
K(edit.doc, document).mousedown(self._docMousedownFn);
_bindContextmenuEvent.call(self);
_bindNewlineEvent.call(self);
_bindTabEvent.call(self);
_bindFocusEvent.call(self);
edit.afterChange(function(e) {
if (!edit.designMode) {
return;
}
self.updateState();
self.addBookmark();
if (self.options.afterChange) {
self.options.afterChange.call(self);
}
});
edit.textarea.keyup(function(e) {
if (!e.ctrlKey && !e.altKey && _INPUT_KEY_MAP[e.which]) {
if (self.options.afterChange) {
self.options.afterChange.call(self);
}
}
});
if (self.readonlyMode) {
self.readonly();
}
self.isCreated = true;
if (self.initContent === '') {
self.initContent = self.html();
}
self.afterCreate();
if (self.options.afterCreate) {
self.options.afterCreate.call(self);
}
}
});
statusbar.removeClass('statusbar').addClass('ke-statusbar')
.append('<span class="ke-inline-block ke-statusbar-center-icon"></span>')
.append('<span class="ke-inline-block ke-statusbar-right-icon"></span>');
K(window).unbind('resize');
function initResize() {
if (statusbar.height() === 0) {
setTimeout(initResize, 100);
return;
}
self.resize(width, height);
}
initResize();
function newResize(width, height, updateProp) {
updateProp = _undef(updateProp, true);
if (width && width >= self.minWidth) {
self.resize(width, null);
if (updateProp) {
self.width = _addUnit(width);
}
}
if (height && height >= self.minHeight) {
self.resize(null, height);
if (updateProp) {
self.height = _addUnit(height);
}
}
}
if (fullscreenMode) {
K(window).bind('resize', function(e) {
if (self.isCreated) {
newResize(_docElement().clientWidth, _docElement().clientHeight, false);
}
});
toolbar.select('fullscreen');
statusbar.first().css('visibility', 'hidden');
statusbar.last().css('visibility', 'hidden');
} else {
if (_GECKO) {
K(window).bind('scroll', function(e) {
self._scrollPos = _getScrollPos();
});
}
if (self.resizeType > 0) {
_drag({
moveEl : container,
clickEl : statusbar,
moveFn : function(x, y, width, height, diffX, diffY) {
height += diffY;
newResize(null, height);
}
});
} else {
statusbar.first().css('visibility', 'hidden');
}
if (self.resizeType === 2) {
_drag({
moveEl : container,
clickEl : statusbar.last(),
moveFn : function(x, y, width, height, diffX, diffY) {
width += diffX;
height += diffY;
newResize(width, height);
}
});
} else {
statusbar.last().css('visibility', 'hidden');
}
}
return self;
},
remove : function() {
var self = this;
if (!self.isCreated) {
return self;
}
self.beforeRemove();
self.srcElement.data('kindeditor', '');
if (self.menu) {
self.hideMenu();
}
_each(self.dialogs, function() {
self.hideDialog();
});
K(document).unbind('mousedown', self._docMousedownFn);
self.toolbar.remove();
self.edit.remove();
self.statusbar.last().unbind();
self.statusbar.unbind();
self.container.remove();
self.container = self.toolbar = self.edit = self.menu = null;
self.dialogs = [];
self.isCreated = false;
return self;
},
resize : function(width, height) {
var self = this;
if (width !== null) {
if (_removeUnit(width) > self.minWidth) {
self.container.css('width', _addUnit(width));
}
}
if (height !== null && self.toolbar.div && self.statusbar) {
height = _removeUnit(height) - self.toolbar.div.height() - self.statusbar.height();
if (height > 0 && _removeUnit(height) > self.minHeight) {
self.edit.setHeight(height);
}
}
return self;
},
select : function() {
this.isCreated && this.cmd.select();
return this;
},
html : function(val) {
var self = this;
if (val === undefined) {
return self.isCreated ? self.edit.html() : _elementVal(self.srcElement);
}
self.isCreated ? self.edit.html(val) : _elementVal(self.srcElement, val);
return self;
},
fullHtml : function() {
return this.isCreated ? this.edit.html(undefined, true) : '';
},
text : function(val) {
var self = this;
if (val === undefined) {
return _trim(self.html().replace(/<(?!img|embed).*?>/ig, '').replace(/ /ig, ' '));
} else {
return self.html(_escape(val));
}
},
isEmpty : function() {
return _trim(this.text().replace(/\r\n|\n|\r/, '')) === '';
},
isDirty : function() {
return _trim(this.initContent.replace(/\r\n|\n|\r|t/g, '')) !== _trim(this.html().replace(/\r\n|\n|\r|t/g, ''));
},
selectedHtml : function() {
return this.isCreated ? this.cmd.range.html() : '';
},
count : function(mode) {
var self = this;
mode = (mode || 'html').toLowerCase();
if (mode === 'html') {
return _removeBookmarkTag(_removeTempTag(self.html())).length;
}
if (mode === 'text') {
return self.text().replace(/<(?:img|embed).*?>/ig, 'K').replace(/\r\n|\n|\r/g, '').length;
}
return 0;
},
exec : function(key) {
key = key.toLowerCase();
var self = this, cmd = self.cmd,
changeFlag = _inArray(key, 'selectall,copy,paste,print'.split(',')) < 0;
if (changeFlag) {
self.addBookmark(false);
}
cmd[key].apply(cmd, _toArray(arguments, 1));
if (changeFlag) {
self.updateState();
self.addBookmark(false);
if (self.options.afterChange) {
self.options.afterChange.call(self);
}
}
return self;
},
insertHtml : function(val, quickMode) {
if (!this.isCreated) {
return this;
}
val = this.beforeSetHtml(val);
this.exec('inserthtml', val, quickMode);
return this;
},
appendHtml : function(val) {
this.html(this.html() + val);
if (this.isCreated) {
var cmd = this.cmd;
cmd.range.selectNodeContents(cmd.doc.body).collapse(false);
cmd.select();
}
return this;
},
sync : function() {
_elementVal(this.srcElement, this.html());
return this;
},
focus : function() {
this.isCreated ? this.edit.focus() : this.srcElement[0].focus();
return this;
},
blur : function() {
this.isCreated ? this.edit.blur() : this.srcElement[0].blur();
return this;
},
addBookmark : function(checkSize) {
checkSize = _undef(checkSize, true);
var self = this, edit = self.edit,
body = edit.doc.body,
html = _removeTempTag(body.innerHTML), bookmark;
if (checkSize && self._undoStack.length > 0) {
var prev = self._undoStack[self._undoStack.length - 1];
if (Math.abs(html.length - _removeBookmarkTag(prev.html).length) < self.minChangeSize) {
return self;
}
}
if (edit.designMode && !self._firstAddBookmark) {
var range = self.cmd.range;
bookmark = range.createBookmark(true);
bookmark.html = _removeTempTag(body.innerHTML);
range.moveToBookmark(bookmark);
} else {
bookmark = {
html : html
};
}
self._firstAddBookmark = false;
_addBookmarkToStack(self._undoStack, bookmark);
return self;
},
undo : function() {
return _undoToRedo.call(this, this._undoStack, this._redoStack);
},
redo : function() {
return _undoToRedo.call(this, this._redoStack, this._undoStack);
},
fullscreen : function(bool) {
this.fullscreenMode = (bool === undefined ? !this.fullscreenMode : bool);
return this.remove().create();
},
readonly : function(isReadonly) {
isReadonly = _undef(isReadonly, true);
var self = this, edit = self.edit, doc = edit.doc;
if (self.designMode) {
self.toolbar.disableAll(isReadonly, []);
} else {
_each(self.noDisableItems, function() {
self.toolbar[isReadonly ? 'disable' : 'enable'](this);
});
}
if (_IE) {
doc.body.contentEditable = !isReadonly;
} else {
doc.designMode = isReadonly ? 'off' : 'on';
}
edit.textarea[0].disabled = isReadonly;
},
createMenu : function(options) {
var self = this,
name = options.name,
knode = self.toolbar.get(name),
pos = knode.pos();
options.x = pos.x;
options.y = pos.y + knode.height();
options.shadowMode = _undef(options.shadowMode, self.shadowMode);
if (options.selectedColor !== undefined) {
options.cls = 'ke-colorpicker-' + self.themeType;
options.noColor = self.lang('noColor');
self.menu = _colorpicker(options);
} else {
options.cls = 'ke-menu-' + self.themeType;
options.centerLineMode = false;
self.menu = _menu(options);
}
return self.menu;
},
hideMenu : function() {
this.menu.remove();
this.menu = null;
return this;
},
hideContextmenu : function() {
this.contextmenu.remove();
this.contextmenu = null;
return this;
},
createDialog : function(options) {
var self = this, name = options.name;
options.shadowMode = _undef(options.shadowMode, self.shadowMode);
options.closeBtn = _undef(options.closeBtn, {
name : self.lang('close'),
click : function(e) {
self.hideDialog();
if (_IE && self.cmd) {
self.cmd.select();
}
}
});
options.noBtn = _undef(options.noBtn, {
name : self.lang(options.yesBtn ? 'no' : 'close'),
click : function(e) {
self.hideDialog();
if (_IE && self.cmd) {
self.cmd.select();
}
}
});
if (self.dialogAlignType != 'page') {
options.alignEl = self.container;
}
options.cls = 'ke-dialog-' + self.themeType;
if (self.dialogs.length > 0) {
var firstDialog = self.dialogs[0],
parentDialog = self.dialogs[self.dialogs.length - 1];
firstDialog.setMaskIndex(parentDialog.z + 2);
options.z = parentDialog.z + 3;
options.showMask = false;
}
var dialog = _dialog(options);
self.dialogs.push(dialog);
return dialog;
},
hideDialog : function() {
var self = this;
if (self.dialogs.length > 0) {
self.dialogs.pop().remove();
}
if (self.dialogs.length > 0) {
var firstDialog = self.dialogs[0],
parentDialog = self.dialogs[self.dialogs.length - 1];
firstDialog.setMaskIndex(parentDialog.z - 1);
}
return self;
},
errorDialog : function(html) {
var self = this;
var dialog = self.createDialog({
width : 750,
title : self.lang('uploadError'),
body : '<div style="padding:10px 20px;"><iframe frameborder="0" style="width:708px;height:400px;"></iframe></div>'
});
var iframe = K('iframe', dialog.div), doc = K.iframeDoc(iframe);
doc.open();
doc.write(html);
doc.close();
K(doc.body).css('background-color', '#FFF');
iframe[0].contentWindow.focus();
return self;
}
};
function _editor(options) {
return new KEditor(options);
}
_instances = [];
function _create(expr, options) {
options = options || {};
options.basePath = _undef(options.basePath, K.basePath);
options.themesPath = _undef(options.themesPath, options.basePath + 'themes/');
options.langPath = _undef(options.langPath, options.basePath + 'lang/');
options.pluginsPath = _undef(options.pluginsPath, options.basePath + 'plugins/');
if (_undef(options.loadStyleMode, K.options.loadStyleMode)) {
var themeType = _undef(options.themeType, K.options.themeType);
_loadStyle(options.themesPath + 'default/default.css');
_loadStyle(options.themesPath + themeType + '/' + themeType + '.css');
}
function create(editor) {
_each(_plugins, function(name, fn) {
fn.call(editor, KindEditor);
});
return editor.create();
}
var knode = K(expr);
if (!knode || knode.length === 0) {
return;
}
if (knode.length > 1) {
knode.each(function() {
_create(this, options);
});
return _instances[0];
}
options.srcElement = knode[0];
var editor = new KEditor(options);
_instances.push(editor);
if (_language[editor.langType]) {
return create(editor);
}
_loadScript(editor.langPath + editor.langType + '.js?ver=' + encodeURIComponent(K.DEBUG ? _TIME : _VERSION), function() {
create(editor);
});
return editor;
}
function _eachEditor(expr, fn) {
K(expr).each(function(i, el) {
K.each(_instances, function(j, editor) {
if (editor && editor.srcElement[0] == el) {
fn.call(editor, j, editor);
return false;
}
});
});
}
K.remove = function(expr) {
_eachEditor(expr, function(i) {
this.remove();
_instances.splice(i, 1);
});
};
K.sync = function(expr) {
_eachEditor(expr, function() {
this.sync();
});
};
if (_IE && _V < 7) {
_nativeCommand(document, 'BackgroundImageCache', true);
}
K.EditorClass = KEditor;
K.editor = _editor;
K.create = _create;
K.instances = _instances;
K.plugin = _plugin;
K.lang = _lang;
_plugin('core', function(K) {
var self = this,
shortcutKeys = {
undo : 'Z', redo : 'Y', bold : 'B', italic : 'I', underline : 'U', print : 'P', selectall : 'A'
};
self.afterSetHtml(function() {
if (self.options.afterChange) {
self.options.afterChange.call(self);
}
});
self.afterCreate(function() {
if (self.syncType != 'form') {
return;
}
var el = K(self.srcElement), hasForm = false;
while ((el = el.parent())) {
if (el.name == 'form') {
hasForm = true;
break;
}
}
if (hasForm) {
el.bind('submit', function(e) {
self.sync();
K(window).bind('unload', function() {
self.edit.textarea.remove();
});
});
var resetBtn = K('[type="reset"]', el);
resetBtn.click(function() {
self.html(self.initContent);
self.cmd.selection();
});
self.beforeRemove(function() {
el.unbind();
resetBtn.unbind();
});
}
});
self.clickToolbar('source', function() {
if (self.edit.designMode) {
self.toolbar.disableAll(true);
self.edit.design(false);
self.toolbar.select('source');
} else {
self.toolbar.disableAll(false);
self.edit.design(true);
self.toolbar.unselect('source');
}
self.designMode = self.edit.designMode;
});
self.afterCreate(function() {
if (!self.designMode) {
self.toolbar.disableAll(true).select('source');
}
});
self.clickToolbar('fullscreen', function() {
self.fullscreen();
});
if (self.fullscreenShortcut) {
var loaded = false;
self.afterCreate(function() {
K(self.edit.doc, self.edit.textarea).keyup(function(e) {
if (e.which == 27) {
setTimeout(function() {
self.fullscreen();
}, 0);
}
});
if (loaded) {
if (_IE && !self.designMode) {
return;
}
self.focus();
}
if (!loaded) {
loaded = true;
}
});
}
_each('undo,redo'.split(','), function(i, name) {
if (shortcutKeys[name]) {
self.afterCreate(function() {
_ctrl(this.edit.doc, shortcutKeys[name], function() {
self.clickToolbar(name);
});
});
}
self.clickToolbar(name, function() {
self[name]();
});
});
self.clickToolbar('formatblock', function() {
var blocks = self.lang('formatblock.formatBlock'),
heights = {
h1 : 28,
h2 : 24,
h3 : 18,
H4 : 14,
p : 12
},
curVal = self.cmd.val('formatblock'),
menu = self.createMenu({
name : 'formatblock',
width : self.langType == 'en' ? 200 : 150
});
_each(blocks, function(key, val) {
var style = 'font-size:' + heights[key] + 'px;';
if (key.charAt(0) === 'h') {
style += 'font-weight:bold;';
}
menu.addItem({
title : '<span style="' + style + '" unselectable="on">' + val + '</span>',
height : heights[key] + 12,
checked : (curVal === key || curVal === val),
click : function() {
self.select().exec('formatblock', '<' + key + '>').hideMenu();
}
});
});
});
self.clickToolbar('fontname', function() {
var curVal = self.cmd.val('fontname'),
menu = self.createMenu({
name : 'fontname',
width : 150
});
_each(self.lang('fontname.fontName'), function(key, val) {
menu.addItem({
title : '<span style="font-family: ' + key + ';" unselectable="on">' + val + '</span>',
checked : (curVal === key.toLowerCase() || curVal === val.toLowerCase()),
click : function() {
self.exec('fontname', key).hideMenu();
}
});
});
});
self.clickToolbar('fontsize', function() {
var curVal = self.cmd.val('fontsize'),
menu = self.createMenu({
name : 'fontsize',
width : 150
});
_each(self.fontSizeTable, function(i, val) {
menu.addItem({
title : '<span style="font-size:' + val + ';" unselectable="on">' + val + '</span>',
height : _removeUnit(val) + 12,
checked : curVal === val,
click : function() {
self.exec('fontsize', val).hideMenu();
}
});
});
});
_each('forecolor,hilitecolor'.split(','), function(i, name) {
self.clickToolbar(name, function() {
self.createMenu({
name : name,
selectedColor : self.cmd.val(name) || 'default',
colors : self.colorTable,
click : function(color) {
self.exec(name, color).hideMenu();
}
});
});
});
_each(('cut,copy,paste').split(','), function(i, name) {
self.clickToolbar(name, function() {
self.focus();
try {
self.exec(name, null);
} catch(e) {
alert(self.lang(name + 'Error'));
}
});
});
self.clickToolbar('about', function() {
var html = '<div style="margin:20px;">' +
'<div>KindEditor ' + _VERSION + '</div>' +
'<div>Copyright © <a href="http://www.kindsoft.net/" target="_blank">kindsoft.net</a> All rights reserved.</div>' +
'</div>';
self.createDialog({
name : 'about',
width : 300,
title : self.lang('about'),
body : html
});
});
self.plugin.getSelectedLink = function() {
return self.cmd.commonAncestor('a');
};
self.plugin.getSelectedImage = function() {
return _getImageFromRange(self.edit.cmd.range, function(img) {
return !/^ke-\w+$/i.test(img[0].className);
});
};
self.plugin.getSelectedFlash = function() {
return _getImageFromRange(self.edit.cmd.range, function(img) {
return img[0].className == 'ke-flash';
});
};
self.plugin.getSelectedMedia = function() {
return _getImageFromRange(self.edit.cmd.range, function(img) {
return img[0].className == 'ke-media' || img[0].className == 'ke-rm';
});
};
self.plugin.getSelectedAnchor = function() {
return _getImageFromRange(self.edit.cmd.range, function(img) {
return img[0].className == 'ke-anchor';
});
};
_each('link,image,flash,media,anchor'.split(','), function(i, name) {
var uName = name.charAt(0).toUpperCase() + name.substr(1);
_each('edit,delete'.split(','), function(j, val) {
self.addContextmenu({
title : self.lang(val + uName),
click : function() {
self.loadPlugin(name, function() {
self.plugin[name][val]();
self.hideMenu();
});
},
cond : self.plugin['getSelected' + uName],
width : 150,
iconClass : val == 'edit' ? 'ke-icon-' + name : undefined
});
});
self.addContextmenu({ title : '-' });
});
self.plugin.getSelectedTable = function() {
return self.cmd.commonAncestor('table');
};
self.plugin.getSelectedRow = function() {
return self.cmd.commonAncestor('tr');
};
self.plugin.getSelectedCell = function() {
return self.cmd.commonAncestor('td');
};
_each(('prop,cellprop,colinsertleft,colinsertright,rowinsertabove,rowinsertbelow,rowmerge,colmerge,' +
'rowsplit,colsplit,coldelete,rowdelete,insert,delete').split(','), function(i, val) {
var cond = _inArray(val, ['prop', 'delete']) < 0 ? self.plugin.getSelectedCell : self.plugin.getSelectedTable;
self.addContextmenu({
title : self.lang('table' + val),
click : function() {
self.loadPlugin('table', function() {
self.plugin.table[val]();
self.hideMenu();
});
},
cond : cond,
width : 170,
iconClass : 'ke-icon-table' + val
});
});
self.addContextmenu({ title : '-' });
_each(('selectall,justifyleft,justifycenter,justifyright,justifyfull,insertorderedlist,' +
'insertunorderedlist,indent,outdent,subscript,superscript,hr,print,' +
'bold,italic,underline,strikethrough,removeformat,unlink').split(','), function(i, name) {
if (shortcutKeys[name]) {
self.afterCreate(function() {
_ctrl(this.edit.doc, shortcutKeys[name], function() {
self.cmd.selection();
self.clickToolbar(name);
});
});
}
self.clickToolbar(name, function() {
self.focus().exec(name, null);
});
});
self.afterCreate(function() {
var doc = self.edit.doc, cmd, bookmark, div,
cls = '__kindeditor_paste__', pasting = false;
function movePastedData() {
cmd.range.moveToBookmark(bookmark);
cmd.select();
if (_WEBKIT) {
K('div.' + cls, div).each(function() {
K(this).after('<br />').remove(true);
});
K('span.Apple-style-span', div).remove(true);
K('span.Apple-tab-span', div).remove(true);
K('span[style]', div).each(function() {
if (K(this).css('white-space') == 'nowrap') {
K(this).remove(true);
}
});
K('meta', div).remove();
}
var html = div[0].innerHTML;
div.remove();
if (html === '') {
return;
}
if (self.pasteType === 2) {
if (/schemas-microsoft-com|worddocument|mso-\w+/i.test(html)) {
html = _clearMsWord(html, self.filterMode ? self.htmlTags : K.options.htmlTags);
} else {
html = _formatHtml(html, self.filterMode ? self.htmlTags : null);
html = self.beforeSetHtml(html);
}
}
if (self.pasteType === 1) {
html = html.replace(/<br[^>]*>/ig, '\n');
html = html.replace(/<\/p><p[^>]*>/ig, '\n');
html = html.replace(/<[^>]+>/g, '');
html = html.replace(/ /ig, ' ');
html = html.replace(/\n\s*\n/g, '\n');
html = html.replace(/ {2}/g, ' ');
if (self.newlineTag == 'p') {
if (/\n/.test(html)) {
html = html.replace(/^/, '<p>').replace(/$/, '</p>').replace(/\n/g, '</p><p>');
}
} else {
html = html.replace(/\n/g, '<br />$&');
}
}
self.insertHtml(html, true);
}
K(doc.body).bind('paste', function(e){
if (self.pasteType === 0) {
e.stop();
return;
}
if (pasting) {
return;
}
pasting = true;
K('div.' + cls, doc).remove();
cmd = self.cmd.selection();
bookmark = cmd.range.createBookmark();
div = K('<div class="' + cls + '"></div>', doc).css({
position : 'absolute',
width : '1px',
height : '1px',
overflow : 'hidden',
left : '-1981px',
top : K(bookmark.start).pos().y + 'px',
'white-space' : 'nowrap'
});
K(doc.body).append(div);
if (_IE) {
var rng = cmd.range.get(true);
rng.moveToElementText(div[0]);
rng.select();
rng.execCommand('paste');
e.preventDefault();
} else {
cmd.range.selectNodeContents(div[0]);
cmd.select();
}
setTimeout(function() {
movePastedData();
pasting = false;
}, 0);
});
});
self.beforeGetHtml(function(html) {
return html.replace(/(<(?:noscript|noscript\s[^>]*)>)([\s\S]*?)(<\/noscript>)/ig, function($0, $1, $2, $3) {
return $1 + _unescape($2).replace(/\s+/g, ' ') + $3;
})
.replace(/<img[^>]*class="?ke-(flash|rm|media)"?[^>]*>/ig, function(full) {
var imgAttrs = _getAttrList(full),
styles = _getCssList(imgAttrs.style || ''),
attrs = _mediaAttrs(imgAttrs['data-ke-tag']);
attrs.width = _undef(imgAttrs.width, _removeUnit(_undef(styles.width, '')));
attrs.height = _undef(imgAttrs.height, _removeUnit(_undef(styles.height, '')));
return _mediaEmbed(attrs);
})
.replace(/<img[^>]*class="?ke-anchor"?[^>]*>/ig, function(full) {
var imgAttrs = _getAttrList(full);
return '<a name="' + unescape(imgAttrs['data-ke-name']) + '"></a>';
})
.replace(/<div\s+[^>]*data-ke-script-attr="([^"]*)"[^>]*>([\s\S]*?)<\/div>/ig, function(full, attr, code) {
return '<script' + unescape(attr) + '>' + unescape(code) + '</script>';
})
.replace(/<div\s+[^>]*data-ke-noscript-attr="([^"]*)"[^>]*>([\s\S]*?)<\/div>/ig, function(full, attr, code) {
return '<noscript' + unescape(attr) + '>' + unescape(code) + '</noscript>';
})
.replace(/(<[^>]*)data-ke-src="([^"]*)"([^>]*>)/ig, function(full, start, src, end) {
full = full.replace(/(\s+(?:href|src)=")[^"]*(")/i, function($0, $1, $2) {
return $1 + _unescape(src) + $2;
});
full = full.replace(/\s+data-ke-src="[^"]*"/i, '');
return full;
})
.replace(/(<[^>]+\s)data-ke-(on\w+="[^"]*"[^>]*>)/ig, function(full, start, end) {
return start + end;
});
});
self.beforeSetHtml(function(html) {
return html.replace(/<embed[^>]*type="([^"]+)"[^>]*>(?:<\/embed>)?/ig, function(full) {
var attrs = _getAttrList(full);
attrs.src = _undef(attrs.src, '');
attrs.width = _undef(attrs.width, 0);
attrs.height = _undef(attrs.height, 0);
return _mediaImg(self.themesPath + 'common/blank.gif', attrs);
})
.replace(/<a[^>]*name="([^"]+)"[^>]*>(?:<\/a>)?/ig, function(full) {
var attrs = _getAttrList(full);
if (attrs.href !== undefined) {
return full;
}
return '<img class="ke-anchor" src="' + self.themesPath + 'common/anchor.gif" data-ke-name="' + escape(attrs.name) + '" />';
})
.replace(/<script([^>]*)>([\s\S]*?)<\/script>/ig, function(full, attr, code) {
return '<div class="ke-script" data-ke-script-attr="' + escape(attr) + '">' + escape(code) + '</div>';
})
.replace(/<noscript([^>]*)>([\s\S]*?)<\/noscript>/ig, function(full, attr, code) {
return '<div class="ke-noscript" data-ke-noscript-attr="' + escape(attr) + '">' + escape(code) + '</div>';
})
.replace(/(<[^>]*)(href|src)="([^"]*)"([^>]*>)/ig, function(full, start, key, src, end) {
if (full.match(/\sdata-ke-src="[^"]*"/i)) {
return full;
}
full = start + key + '="' + src + '"' + ' data-ke-src="' + _escape(src) + '"' + end;
return full;
})
.replace(/(<[^>]+\s)(on\w+="[^"]*"[^>]*>)/ig, function(full, start, end) {
return start + 'data-ke-' + end;
})
.replace(/<table[^>]*\s+border="0"[^>]*>/ig, function(full) {
if (full.indexOf('ke-zeroborder') >= 0) {
return full;
}
return _addClassToTag(full, 'ke-zeroborder');
});
});
});
})(window);
| chenlian2015/gagablog | zenTao/www/js/kindeditor/kindeditor.js | JavaScript | gpl-2.0 | 156,814 |
/**
* 'json' test suite
*
* Usage:
* nodeunit test.js
*
* Can limit the tests with the 'TEST_ONLY' environment variable: a
* space-separated lists of dir names to which to limit. E.g.:
* TEST_ONLY=hello-server nodeunit test.js
* Can also prefix with a '-' to *exclude* that test. E.g.: to run all but
* the 'irc' test:
* TEST_ONLY='-irc' nodeunit test.js
*/
var path = require('path');
var exec = require('child_process').exec;
var fs = require('fs');
var testCase = require('nodeunit').testCase;
var ansidiff = require('ansidiff');
var warn = console.warn;
//---- test cases
var data = {
//setUp: function (callback) {
// ...
//},
parseLookup: function (test) {
var parseLookup = require('../lib/json.js').parseLookup;
test.deepEqual(parseLookup('42'), [42]);
test.deepEqual(parseLookup('a'), ['a']);
test.deepEqual(parseLookup('a.b'), ['a', 'b']);
test.deepEqual(parseLookup('a.b.c'), ['a', 'b', 'c']);
test.deepEqual(parseLookup('[42]'), [42]);
test.deepEqual(parseLookup('["a"]'), ['a']);
test.deepEqual(parseLookup('["a"]'), ['a']);
test.deepEqual(parseLookup('b[42]'), ['b', 42]);
test.deepEqual(parseLookup('b["a"]'), ['b', 'a']);
test.deepEqual(parseLookup('b["a"]'), ['b', 'a']);
test.deepEqual(parseLookup('[42].b'), [42, 'b']);
test.deepEqual(parseLookup('["a"].b'), ['a', 'b']);
test.deepEqual(parseLookup('["a"].b'), ['a', 'b']);
test.deepEqual(parseLookup('["a-b"]'), ['a-b']);
test.deepEqual(parseLookup('["a-b"]'), ['a-b']);
test.deepEqual(parseLookup('["a.b"]'), ['a.b']);
test.deepEqual(parseLookup('["a.b"]'), ['a.b']);
test.deepEqual(parseLookup('["a[b"]'), ['a[b']);
test.deepEqual(parseLookup('["a[b"]'), ['a[b']);
test.deepEqual(parseLookup('["a]b"]'), ['a]b']);
test.deepEqual(parseLookup('["a]b"]'), ['a]b']);
/* BEGIN JSSTYLED */
test.deepEqual(parseLookup("['a\\'[b']"), ["a'[b"]);
test.deepEqual(parseLookup("['a\\'[b'].c"), ["a'[b", "c"]);
/* END JSSTYLED */
test.deepEqual(parseLookup('a/b', '/'), ['a', 'b']);
test.deepEqual(parseLookup('a.b/c', '/'), ['a.b', 'c']);
test.deepEqual(parseLookup('a.b/c[42]', '/'), ['a.b', 'c', 42]);
test.deepEqual(parseLookup('["a/b"]', '/'), ['a/b']);
test.done();
}
};
// Process includes and excludes from 'TEST_ONLY'.
var only = [],
excludes = [];
if (process.env.TEST_ONLY) {
warn('Note: Limiting "test.js" tests by $TEST_ONLY: "' +
process.env.TEST_ONLY + '"');
var tokens = process.env.TEST_ONLY.trim().split(/\s+/);
for (var i = 0; i < tokens.length; i++) {
if (tokens[i][0] === '-') {
excludes.push(tokens[i].slice(1));
} else {
only.push(tokens[i]);
}
}
}
// Add a test case for each dir with a 'test.sh' script.
var names = fs.readdirSync(__dirname);
for (var i = 0; i < names.length; ++i) {
var name = names[i];
if (only.length && only.indexOf(name) == -1) {
continue;
}
if (excludes.length && excludes.indexOf(name) != -1) {
continue;
}
var dir = path.join(__dirname, name);
if (fs.statSync(dir).isDirectory()) {
try {
fs.statSync(path.join(dir, 'cmd'));
} catch (e) {
continue;
}
if (data[name] !== undefined) {
throw ('error: test "' + name + '" already exists');
}
data[name] = (function (dir) {
return function (test) {
var numTests = 0;
var expectedExitCode = null;
try {
var p = path.join(dir, 'expected.exitCode');
if (fs.statSync(p)) {
expectedExitCode = Number(fs.readFileSync(p));
numTests += 1;
}
} catch (e) {}
var expectedStdout = null;
try {
var p = path.join(dir, 'expected.stdout');
if (fs.statSync(p)) {
expectedStdout = fs.readFileSync(p, 'utf8');
numTests += 1;
}
} catch (e) {}
var expectedStderr = null;
try {
var p = path.join(dir, 'expected.stderr');
if (fs.statSync(p)) {
expectedStderr = fs.readFileSync(p, 'utf8');
numTests += 1;
}
} catch (e) {}
test.expect(numTests);
exec('bash cmd', {
'cwd': dir
}, function (error, stdout, stderr) {
var errmsg = ('\n-- return value:\n' +
(error && error.code) + '\n-- expected stdout:\n' +
expectedStdout + '\n-- stdout:\n' + stdout +
'\n-- stdout diff:\n' +
ansidiff.chars(expectedStdout, stdout));
if (expectedStderr !== null) {
errmsg += '\n-- expected stderr:\n' + expectedStderr;
}
if (stderr !== null) {
errmsg += '\n-- stderr:\n' + stderr;
}
if (expectedStderr !== null) {
errmsg += '\n-- stderr diff:\n' +
ansidiff.chars(expectedStderr, stderr);
}
if (expectedExitCode !== null) {
test.equal(expectedExitCode, error && error.code || 0,
'\n\nunexpected exit code' + errmsg);
}
if (expectedStdout !== null) {
test.equal(stdout, expectedStdout,
'\n\nunexpected stdout' + errmsg);
}
if (expectedStderr !== null) {
test.equal(stderr, expectedStderr,
'\n\nunexpected stderr' + errmsg);
}
test.done();
});
}
})(dir);
}
}
exports['test'] = testCase(data);
| arundurvasula/seqcoverage | node_modules/json/test/test.js | JavaScript | gpl-2.0 | 6,355 |
var TRACE_LEVEL_NONE = new JsUnitTraceLevel(0, null);
var TRACE_LEVEL_WARNING = new JsUnitTraceLevel(1, "#FF0000");
var TRACE_LEVEL_INFO = new JsUnitTraceLevel(2, "#009966");
var TRACE_LEVEL_DEBUG = new JsUnitTraceLevel(3, "#0000FF");
function JsUnitTracer(testManager) {
this._testManager = testManager;
this._traceWindow = null;
this.popupWindowsBlocked = false;
}
JsUnitTracer.prototype.initialize = function() {
if (this._traceWindow != null && top.testManager.closeTraceWindowOnNewRun.checked)
this._traceWindow.close();
this._traceWindow = null;
}
JsUnitTracer.prototype.finalize = function() {
if (this._traceWindow != null) {
this._traceWindow.document.write('<\/body>\n<\/html>');
this._traceWindow.document.close();
}
}
JsUnitTracer.prototype.warn = function() {
this._trace(arguments[0], arguments[1], TRACE_LEVEL_WARNING);
}
JsUnitTracer.prototype.inform = function() {
this._trace(arguments[0], arguments[1], TRACE_LEVEL_INFO);
}
JsUnitTracer.prototype.debug = function() {
this._trace(arguments[0], arguments[1], TRACE_LEVEL_DEBUG);
}
JsUnitTracer.prototype._trace = function(message, value, traceLevel) {
if (!top.shouldSubmitResults() && this._getChosenTraceLevel().matches(traceLevel)) {
var traceString = message;
if (value)
traceString += ': ' + value;
var prefix = this._testManager.getTestFileName() + ":" +
this._testManager.getTestFunctionName() + " - ";
this._writeToTraceWindow(prefix, traceString, traceLevel);
}
}
JsUnitTracer.prototype._getChosenTraceLevel = function() {
var levelNumber = eval(top.testManager.traceLevel.value);
return traceLevelByLevelNumber(levelNumber);
}
JsUnitTracer.prototype._writeToTraceWindow = function(prefix, traceString, traceLevel) {
var htmlToAppend = '<p class="jsUnitDefault">' + prefix + '<font color="' + traceLevel.getColor() + '">' + traceString + '</font><\/p>\n';
this._getTraceWindow().document.write(htmlToAppend);
}
JsUnitTracer.prototype._getTraceWindow = function() {
if (this._traceWindow == null && !top.shouldSubmitResults() && !this.popupWindowsBlocked) {
this._traceWindow = window.open('', '', 'width=600, height=350,status=no,resizable=yes,scrollbars=yes');
if (!this._traceWindow)
this.popupWindowsBlocked = true;
else {
var resDoc = this._traceWindow.document;
resDoc.write('<html>\n<head>\n<link rel="stylesheet" href="css/jsUnitStyle.css">\n<title>Tracing - JsUnit<\/title>\n<head>\n<body>');
resDoc.write('<h2>Tracing - JsUnit<\/h2>\n');
resDoc.write('<p class="jsUnitDefault"><i>(Traces are color coded: ');
resDoc.write('<font color="' + TRACE_LEVEL_WARNING.getColor() + '">Warning</font> - ');
resDoc.write('<font color="' + TRACE_LEVEL_INFO.getColor() + '">Information</font> - ');
resDoc.write('<font color="' + TRACE_LEVEL_DEBUG.getColor() + '">Debug</font>');
resDoc.write(')</i></p>');
}
}
return this._traceWindow;
}
if (xbDEBUG.on) {
xbDebugTraceObject('window', 'JsUnitTracer');
}
function JsUnitTraceLevel(levelNumber, color) {
this._levelNumber = levelNumber;
this._color = color;
}
JsUnitTraceLevel.prototype.matches = function(anotherTraceLevel) {
return this._levelNumber >= anotherTraceLevel._levelNumber;
}
JsUnitTraceLevel.prototype.getColor = function() {
return this._color;
}
function traceLevelByLevelNumber(levelNumber) {
switch (levelNumber) {
case 0: return TRACE_LEVEL_NONE;
case 1: return TRACE_LEVEL_WARNING;
case 2: return TRACE_LEVEL_INFO;
case 3: return TRACE_LEVEL_DEBUG;
}
return null;
}
| SuriyaaKudoIsc/wikia-app-test | extensions/FCKeditor/fckeditor/_test/automated/_jsunit/app/jsUnitTracer.js | JavaScript | gpl-2.0 | 3,897 |
var n = 10000000;
function bar(f) { f(10); }
function foo(b) {
var result = 0;
var imUndefined;
var baz;
var set = function (x) { result = x; return (imUndefined, baz); }
baz = 40;
if (b) {
bar(set);
if (result != 10)
throw "Error: bad: " + result;
if (baz !== 40)
throw "Error: bad: " + baz;
if (imUndefined !== void 0)
throw "Error: bad value: " + imUndefined;
return 0;
}
return result;
}
noInline(bar);
noInline(foo);
for (var i = 0; i < n; i++) {
var result = foo(!(i % 100));
if (result != 0)
throw "Error: bad result: " + result;
}
| Debian/openjfx | modules/web/src/main/native/Source/JavaScriptCore/tests/stress/activation-sink-default-value.js | JavaScript | gpl-2.0 | 667 |
// AMD-ID "dojox/math/random/prng4"
define("dojox/math/random/prng4", ["dojo", "dojox"], function(dojo, dojox) {
dojo.getObject("math.random.prng4", true, dojox);
// Copyright (c) 2005 Tom Wu
// All Rights Reserved.
// See "LICENSE-BigInteger" for details.
// prng4.js - uses Arcfour as a PRNG
function Arcfour() {
this.i = 0;
this.j = 0;
this.S = new Array(256);
}
dojo.extend(Arcfour, {
init: function(key){
// summary:
// Initialize arcfour context
// key: int[]
// an array of ints, each from [0..255]
var i, j, t, S = this.S, len = key.length;
for(i = 0; i < 256; ++i){
S[i] = i;
}
j = 0;
for(i = 0; i < 256; ++i){
j = (j + S[i] + key[i % len]) & 255;
t = S[i];
S[i] = S[j];
S[j] = t;
}
this.i = 0;
this.j = 0;
},
next: function(){
var t, i, j, S = this.S;
this.i = i = (this.i + 1) & 255;
this.j = j = (this.j + S[i]) & 255;
t = S[i];
S[i] = S[j];
S[j] = t;
return S[(t + S[i]) & 255];
}
});
dojox.math.random.prng4 = function(){
return new Arcfour();
};
// Pool size must be a multiple of 4 and greater than 32.
// An array of bytes the size of the pool will be passed to init()
dojox.math.random.prng4.size = 256;
return dojox.math.random.prng4;
});
| hariomkumarmth/champaranexpress | wp-content/plugins/dojo/dojox/math/random/prng4.js.uncompressed.js | JavaScript | gpl-2.0 | 1,336 |
// **********************************************************************
//
// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
var Ice = require("../Ice/ModuleRegistry").Ice;
Ice.__M.require(module,
[
"../Ice/Class",
"../Ice/TimerUtil"
]);
var Timer = Ice.Timer;
//
// Promise State
//
var State = {Pending: 0, Success: 1, Failed: 2};
var resolveImp = function(self, listener)
{
var callback = self.__state === State.Success ? listener.onResponse : listener.onException;
try
{
if(typeof callback !== "function")
{
listener.promise.setState(self.__state, self._args);
}
else
{
var result = callback.apply(null, self._args);
//
// Callback can return a new promise.
//
if(result && typeof result.then == "function")
{
result.then(
function()
{
var args = arguments;
listener.promise.succeed.apply(listener.promise, args);
},
function()
{
var args = arguments;
listener.promise.fail.apply(listener.promise, args);
});
}
else
{
listener.promise.succeed(result);
}
}
}
catch(e)
{
listener.promise.fail.call(listener.promise, e);
}
};
var Promise = Ice.Class({
__init__: function()
{
this.__state = State.Pending;
this.__listeners = [];
},
then: function(onResponse, onException)
{
var promise = new Promise();
var self = this;
//
// Use setImmediate so the listeners are not resolved until the call stack is empty.
//
Timer.setImmediate(
function()
{
self.__listeners.push(
{
promise:promise,
onResponse:onResponse,
onException:onException
});
self.resolve();
});
return promise;
},
exception: function(onException)
{
return this.then(null, onException);
},
finally: function(cb)
{
var p = new Promise();
var self = this;
var finallyHandler = function(method)
{
return function()
{
var args = arguments;
try
{
var result = cb.apply(null, args);
if(result && typeof result.then == "function")
{
var handler = function(){ method.apply(p, args); };
result.then(handler).exception(handler);
}
else
{
method.apply(p, args);
}
}
catch(e)
{
method.apply(p, args);
}
};
};
Timer.setImmediate(
function(){
self.then(finallyHandler(p.succeed), finallyHandler(p.fail));
});
return p;
},
delay: function(ms)
{
var p = new Promise();
var self = this;
var delayHandler = function(promise, method)
{
return function()
{
var args = arguments;
Timer.setTimeout(
function()
{
method.apply(promise, args);
},
ms);
};
};
Timer.setImmediate(function()
{
self.then(delayHandler(p, p.succeed), delayHandler(p, p.fail));
});
return p;
},
resolve: function()
{
if(this.__state === State.Pending)
{
return;
}
var obj;
while((obj = this.__listeners.pop()))
{
//
// We use a separate function here to capture the listeners
// in the loop.
//
resolveImp(this, obj);
}
},
setState: function(state, args)
{
if(this.__state === State.Pending && state !== State.Pending)
{
this.__state = state;
this._args = args;
//
// Use setImmediate so the listeners are not resolved until the call stack is empty.
//
var self = this;
Timer.setImmediate(function(){ self.resolve(); });
}
},
succeed: function()
{
var args = arguments;
this.setState(State.Success, args);
return this;
},
fail: function()
{
var args = arguments;
this.setState(State.Failed, args);
return this;
},
succeeded: function()
{
return this.__state === State.Success;
},
failed: function()
{
return this.__state === State.Failed;
},
completed: function()
{
return this.__state !== State.Pending;
}
});
//
// Create a new promise object that is fulfilled when all the promise arguments
// are fulfilled or is rejected when one of the promises is rejected.
//
Promise.all = function()
{
// If only one argument is provided, check if the argument is an array
if(arguments.length === 1 && arguments[0] instanceof Array)
{
return Promise.all.apply(this, arguments[0]);
}
var promise = new Promise();
var promises = Array.prototype.slice.call(arguments);
var results = new Array(arguments.length);
var pending = promises.length;
if(pending === 0)
{
promise.succeed.apply(promise, results);
}
for(var i = 0; i < promises.length; ++i)
{
//
// Create an anonymous function to capture the loop index
//
/*jshint -W083 */
(function(j)
{
if(promises[j] && typeof promises[j].then == "function")
{
promises[j].then(
function()
{
results[j] = arguments;
pending--;
if(pending === 0)
{
promise.succeed.apply(promise, results);
}
},
function()
{
promise.fail.apply(promise, arguments);
});
}
else
{
results[j] = promises[j];
pending--;
if(pending === 0)
{
promise.succeed.apply(promise, results);
}
}
}(i));
/*jshint +W083 */
}
return promise;
};
Promise.try = function(onResponse)
{
return new Promise().succeed().then(onResponse);
};
Promise.delay = function(ms)
{
if(arguments.length > 1)
{
var p = new Promise();
var args = Array.prototype.slice.call(arguments);
ms = args.pop();
return p.succeed.apply(p, args).delay(ms);
}
else
{
return new Promise().succeed().delay(ms);
}
};
Ice.Promise = Promise;
module.exports.Ice = Ice;
| elijah513/ice | js/src/Ice/Promise.js | JavaScript | gpl-2.0 | 7,772 |
/*global waitsFor:true expect:true describe:true beforeEach:true it:true spyOn:true */
describe("Discourse.Utilities", function() {
describe("emailValid", function() {
it("allows upper case in first part of emails", function() {
expect(Discourse.Utilities.emailValid('Bob@example.com')).toBe(true);
});
it("allows upper case in domain of emails", function() {
expect(Discourse.Utilities.emailValid('bob@EXAMPLE.com')).toBe(true);
});
});
describe("validateFilesForUpload", function() {
it("returns false when file is undefined", function() {
expect(Discourse.Utilities.validateFilesForUpload(null)).toBe(false);
expect(Discourse.Utilities.validateFilesForUpload(undefined)).toBe(false);
});
it("returns false when file there is no file", function() {
expect(Discourse.Utilities.validateFilesForUpload([])).toBe(false);
});
it("supports only one file", function() {
spyOn(bootbox, 'alert');
spyOn(Em.String, 'i18n');
expect(Discourse.Utilities.validateFilesForUpload([1, 2])).toBe(false);
expect(bootbox.alert).toHaveBeenCalled();
expect(Em.String.i18n).toHaveBeenCalledWith('post.errors.upload_too_many_images');
});
it("supports only an image", function() {
var html = { type: "text/html" };
spyOn(bootbox, 'alert');
spyOn(Em.String, 'i18n');
expect(Discourse.Utilities.validateFilesForUpload([html])).toBe(false);
expect(bootbox.alert).toHaveBeenCalled();
expect(Em.String.i18n).toHaveBeenCalledWith('post.errors.only_images_are_supported');
});
it("prevents the upload of a too large image", function() {
var image = { type: "image/png", size: 10 * 1024 };
Discourse.SiteSettings.max_upload_size_kb = 5;
spyOn(bootbox, 'alert');
spyOn(Em.String, 'i18n');
expect(Discourse.Utilities.validateFilesForUpload([image])).toBe(false);
expect(bootbox.alert).toHaveBeenCalled();
expect(Em.String.i18n).toHaveBeenCalledWith('post.errors.upload_too_large', { max_size_kb: 5 });
});
it("works", function() {
var image = { type: "image/png", size: 10 * 1024 };
Discourse.SiteSettings.max_upload_size_kb = 15;
expect(Discourse.Utilities.validateFilesForUpload([image])).toBe(true);
});
});
});
| erlend-sh/discourse | spec/javascripts/components/utilities_spec.js | JavaScript | gpl-2.0 | 2,325 |
/**
* @file
* Address widget and GMap geocoder routines.
*/
/*global jQuery, Drupal, GClientGeocoder */
/**
* Provide a shared geocoder.
* Lazy initialize it so it's not resident until needed.
*/
Drupal.gmap.geocoder = function () {
var theGeocoder;
if (!theGeocoder) {
theGeocoder = new google.maps.Geocoder();
}
return theGeocoder;
};
Drupal.gmap.addHandler('gmap', function (elem) {
var obj = this;
obj.bind('geocode_pan', function (addr) {
Drupal.gmap.geocoder().geocode({'address': addr}, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
obj.vars.latitude = results[0].geometry.location.lat();
obj.vars.longitude = results[0].geometry.location.lng();
obj.change("move", -1);
}
else {
// Error condition?
}
});
});
obj.bind('geocode_panzoom', function (addr) {
Drupal.gmap.geocoder().geocode({'address': addr}, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var place = results[0];
obj.vars.latitude = results[0].geometry.location.lat();
obj.vars.longitude = results[0].geometry.location.lng();
// This is, of course, temporary.
switch (place.AddressDetails.Accuracy) {
case 1: // Country level
obj.vars.zoom = 4;
break;
case 2: // Region (state, province, prefecture, etc.) level
obj.vars.zoom = 6;
break;
case 3: // Sub-region (county, municipality, etc.) level
obj.vars.zoom = 8;
break;
case 4: // Town (city, village) level accuracy. (Since 2.59)
case 5: // Post code (zip code) level accuracy. (Since 2.59)
case 6: // Street level accuracy. (Since 2.59)
case 7: // Intersection level accuracy. (Since 2.59)
case 8: // Address level accuracy. (Since 2.59)
obj.vars.zoom = 12;
}
obj.change('move', -1);
}
});
});
obj.bind('preparemarker', function (marker) {
if (marker.address && (!marker.latitude || !marker.longitude)) {
Drupal.gmap.geocoder().geocode({'address': marker.address}, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
marker.latitude = results[0].geometry.lat();
marker.longitude = results[0].geometry.lng();
}
});
}
});
});
////////////////////////////////////////
// Address widget //
////////////////////////////////////////
Drupal.gmap.addHandler('address', function (elem) {
var obj = this;
// Respond to focus event.
jQuery(elem).focus(function () {
this.value = '';
});
// Respond to incoming movements.
// Clear the box when the coords change...
var binding = obj.bind("move", function () {
elem.value = 'Enter an address';
});
// Send out outgoing movements.
// This happens ASYNC!!!
jQuery(elem).change(function () {
if (elem.value.length > 0) {
Drupal.gmap.geocoder().geocode({'address': elem.value}, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
obj.vars.latitude = results[0].geometry.location.lat();
obj.vars.longitude = results[0].geometry.location.lng();
obj.change("move", binding);
}
else {
// Todo: Get translated value using settings.
elem.value = 'Geocoder error: Address not found';
}
});
}
else {
// Was empty. Ignore.
elem.value = 'Enter an address';
}
});
});
////////////////////////////////////////
// Locpick address handler (testing) //
////////////////////////////////////////
Drupal.gmap.addHandler('locpick_address', function (elem) {
var obj = this;
// Respond to focus event.
jQuery(elem).focus(function () {
this.value = '';
});
// Respond to incoming movements.
// Clear the box when the coords change...
var binding = obj.bind("locpickchange", function () {
elem.value = 'Enter an address';
});
// Send out outgoing movements.
// This happens ASYNC!!!
jQuery(elem).change(function () {
if (elem.value.length > 0) {
Drupal.gmap.geocoder().geocode({'address': elem.value}, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
obj.locpick_coord = results[0];
obj.change("locpickchange", binding);
}
else {
// Todo: Get translated value using settings.
elem.value = 'Geocoder error: Address not found';
}
});
}
else {
// Was empty. Ignore.
elem.value = 'Enter an address';
}
});
});
| BalloonIndustries/nufios | sites/all/modules/gmap/js/address.js | JavaScript | gpl-2.0 | 5,541 |
/*
* jsPlumb
*
* Title:jsPlumb 2.0.2
*
* Provides a way to visually connect elements on an HTML page, using SVG.
*
* This file contains the code for the Bezier connector type.
*
* Copyright (c) 2010 - 2015 jsPlumb (hello@jsplumbtoolkit.com)
*
* http://jsplumbtoolkit.com
* http://github.com/sporritt/jsplumb
*
* Dual licensed under the MIT and GPL2 licenses.
*/
;
(function () {
"use strict";
var root = this, _jp = root.jsPlumb, _ju = root.jsPlumbUtil;
var Bezier = function (params) {
params = params || {};
var _super = _jp.Connectors.AbstractConnector.apply(this, arguments),
majorAnchor = params.curviness || 150,
minorAnchor = 10;
this.type = "Bezier";
this.getCurviness = function () {
return majorAnchor;
};
this._findControlPoint = function (point, sourceAnchorPosition, targetAnchorPosition, sourceEndpoint, targetEndpoint, soo, too) {
// determine if the two anchors are perpendicular to each other in their orientation. we swap the control
// points around if so (code could be tightened up)
var perpendicular = soo[0] != too[0] || soo[1] == too[1],
p = [];
if (!perpendicular) {
if (soo[0] === 0) // X
p.push(sourceAnchorPosition[0] < targetAnchorPosition[0] ? point[0] + minorAnchor : point[0] - minorAnchor);
else p.push(point[0] - (majorAnchor * soo[0]));
if (soo[1] === 0) // Y
p.push(sourceAnchorPosition[1] < targetAnchorPosition[1] ? point[1] + minorAnchor : point[1] - minorAnchor);
else p.push(point[1] + (majorAnchor * too[1]));
}
else {
if (too[0] === 0) // X
p.push(targetAnchorPosition[0] < sourceAnchorPosition[0] ? point[0] + minorAnchor : point[0] - minorAnchor);
else p.push(point[0] + (majorAnchor * too[0]));
if (too[1] === 0) // Y
p.push(targetAnchorPosition[1] < sourceAnchorPosition[1] ? point[1] + minorAnchor : point[1] - minorAnchor);
else p.push(point[1] + (majorAnchor * soo[1]));
}
return p;
};
this._compute = function (paintInfo, p) {
var sp = p.sourcePos,
tp = p.targetPos,
_w = Math.abs(sp[0] - tp[0]),
_h = Math.abs(sp[1] - tp[1]),
_sx = sp[0] < tp[0] ? _w : 0,
_sy = sp[1] < tp[1] ? _h : 0,
_tx = sp[0] < tp[0] ? 0 : _w,
_ty = sp[1] < tp[1] ? 0 : _h,
_CP = this._findControlPoint([_sx, _sy], sp, tp, p.sourceEndpoint, p.targetEndpoint, paintInfo.so, paintInfo.to),
_CP2 = this._findControlPoint([_tx, _ty], tp, sp, p.targetEndpoint, p.sourceEndpoint, paintInfo.to, paintInfo.so);
_super.addSegment(this, "Bezier", {
x1: _sx, y1: _sy, x2: _tx, y2: _ty,
cp1x: _CP[0], cp1y: _CP[1], cp2x: _CP2[0], cp2y: _CP2[1]
});
};
};
_ju.extend(Bezier, _jp.Connectors.AbstractConnector);
_jp.registerConnectorType(Bezier, "Bezier");
}).call(this); | rhalff/jsPlumb | src/connectors-bezier.js | JavaScript | gpl-2.0 | 3,277 |
/**
* Librerías Javascript
*
* @package Roraima
* @author $Author$ <desarrollo@cidesa.com.ve>
* @version SVN: $Id$
*
* @copyright Copyright 2007, Cide S.A.
* @license http://opensource.org/licenses/gpl-2.0.php GPLv2
*/
//FUNCIONES JAVASCRIPT
var form = null;
var arreglo = null;
var inicio = true;
var noActualizarInputs = false;
function ActualizarInputs()
{
if(!noActualizarInputs){
form = $('sf_admin_edit_form');
arreglo = Array();
if(form) arreglo = $$('input[type=text]', 'select','textarea'); // -> only text inputs
var i = 0;
arreglo.each(function(e,index){
if(!e.disabled && !e.readOnly)
{
e.tabindex = index;
i++;
}
});
if(arreglo & inicio) {
try{arreglo.first().focus();}catch(e){}
inicio=false;
}
}
}
///////////////////////////////////////////////////
// Observar si se cargado la p�gina por completo //
///////////////////////////////////////////////////
Event.observe(window, 'load',
function() {
ActualizarInputs();
}
);
///////////////////////////////////////////////////
// Observando si se presiona enter para cmabiar
Event.observe(document, 'keypress', function(event)
{
if(event.keyCode == Event.KEY_RETURN && form) {
if(!noActualizarInputs){
var obj = Event.element(event);
var indice = parseInt(obj.tabindex);
/*arreglo.each(function(e,index){
if(e.name == obj.name) indice = index;
});
*/
var salir=false;
var i=1;
while(!salir)
{
try{
if(!arreglo[indice+i].disabled && !arreglo[indice+i].readOnly)
{
arreglo[indice+i].focus();
try{arreglo[indice+i].select();}catch(e){}
salir=true;
}else {
i++;
}
}catch(e){
if(arreglo[indice])
if(!arreglo[indice].disabled && !arreglo[indice].readOnly)
{
arreglo[indice].blur();
arreglo[indice].focus();
//try{arreglo[indice].select();}catch(e){}
}
salir=true;
}
}
obj.returnEvent = false;
return false;
/*
var indexSig = parseInt(obj.tabindex);
indexSig++;
objSig = $$('input[tabindex=' + indexSig + ']');
if(objSig) objSig.focus();
*/
}
}
return true
})
| cidesa/roraima | web/js/observe.js | JavaScript | gpl-2.0 | 2,544 |
/**
* 100% stacked area are multi-series area charts where categories are stacked (percentage
* values) on top of each other, with an additional category 'Others' that is used to sum
* up the various categories for each series to a perfect 100%.
*/
Ext.define('KitchenSink.view.charts.area.Stacked100', {
extend: 'Ext.Panel',
xtype: 'area-stacked-100',
controller: 'area-stacked-100',
// <example>
// Content between example tags is omitted from code preview.
bodyStyle: 'background: transparent !important',
layout: {
type: 'vbox',
pack: 'center'
},
otherContent: [{
type: 'Controller',
path: 'classic/samples/view/charts/area/Stacked100Controller.js'
}, {
type: 'Store',
path: 'classic/samples/store/Browsers.js'
}],
// </example>
width: 650,
tbar: [
'->',
{
text: 'Preview',
handler: 'onPreview'
}
],
items: [{
xtype: 'cartesian',
reference: 'chart',
width: '100%',
height: 500,
insetPadding: 40,
store: {
type: 'browsers'
},
legend: {
docked: 'bottom'
},
sprites: [{
type: 'text',
text: 'Area Charts - 100% Stacked Area',
fontSize: 22,
width: 100,
height: 30,
x: 40, // the sprite x position
y: 20 // the sprite y position
}, {
type: 'text',
text: 'Data: Browser Stats 2012',
fontSize: 10,
x: 12,
y: 420
}, {
type: 'text',
text: 'Source: http://www.w3schools.com/',
fontSize: 10,
x: 12,
y: 435
}],
axes: [{
type: 'numeric',
position: 'left',
fields: ['data1', 'data2', 'data3', 'data4', 'other' ],
grid: true,
minimum: 0,
maximum: 100,
renderer: 'onAxisLabelRender'
}, {
type: 'category',
position: 'bottom',
fields: 'month',
grid: true,
label: {
rotate: {
degrees: -45
}
}
}],
series: [{
type: 'area',
fullStack: true,
title: [ 'IE', 'Firefox', 'Chrome', 'Safari', 'Others' ],
xField: 'month',
yField: [ 'data1', 'data2', 'data3', 'data4', 'other' ],
style: {
opacity: 0.80
},
marker: {
opacity: 0,
scaling: 0.01,
fx: {
duration: 200,
easing: 'easeOut'
}
},
highlightCfg: {
opacity: 1,
scaling: 1.5
},
tooltip: {
trackMouse: true,
renderer: 'onSeriesTooltipRender'
}
}]
//<example>
}, {
style: 'margin-top: 10px;',
xtype: 'gridpanel',
columns : {
defaults: {
sortable: false,
menuDisabled: true,
renderer: 'onColumnRender'
},
items: [
{ text: 'Month', dataIndex: 'month', renderer: Ext.identityFn },
{ text: 'IE', dataIndex: 'data1' },
{ text: 'Firefox', dataIndex: 'data2' },
{ text: 'Chrome', dataIndex: 'data3' },
{ text: 'Safari', dataIndex: 'data4' },
{ text: 'Other', dataIndex: 'other' }
]
},
store: {
type: 'browsers'
},
width: '100%'
//</example>
}]
});
| gedOHub/GClientGUI | ext/examples/kitchensink/classic/samples/view/charts/area/Stacked100.js | JavaScript | gpl-3.0 | 3,841 |
var searchData=
[
['_7eqresourcestream',['~QResourceStream',['../classqsf_1_1QResourceStream.html#a5bea8c4481aec48f45d10c0b98e366a9',1,'qsf::QResourceStream']]],
['_7eqsfmlwidget',['~QSFMLWidget',['../classqsf_1_1QSFMLWidget.html#a4eae9c14ac6a8389edcd5949e154f337',1,'qsf::QSFMLWidget']]]
];
| KoczurekK/QSFML | docs/search/functions_b.js | JavaScript | gpl-3.0 | 296 |
/*
Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
//>>built
define("dojo/cldr/nls/en-au/gregorian",{"dateFormatItem-yMEd":"E, d/M/y","timeFormat-full":"h:mm:ss a zzzz","timeFormat-medium":"h:mm:ss a","dateFormatItem-MEd":"E, d/M","dateFormat-medium":"dd/MM/y","dateFormatItem-yMd":"d/M/y","dateFormat-full":"EEEE, d MMMM y","timeFormat-long":"h:mm:ss a z","timeFormat-short":"h:mm a","dateFormat-short":"d/MM/yy","dateFormat-long":"d MMMM y","dateFormatItem-MMMEd":"E, d MMM"});
| cryo3d/cryo3d | static/ThirdParty/dojo-release-1.9.3/dojo/cldr/nls/en-au/gregorian.js | JavaScript | gpl-3.0 | 633 |
/* ***** BEGIN LICENSE BLOCK *****
* Version: GPL 3.0
*
* The contents of this file are subject to the General Public License
* 3.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.gnu.org/licenses/gpl.html
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Author: Michel Verbraak (info@1st-setup.nl)
* Website: http://www.1st-setup.nl/
*
* This interface/service is used for TimeZone conversions to Exchange
*
* ***** BEGIN LICENSE BLOCK *****/
var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
var Cr = Components.results;
var components = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://calendar/modules/calProviderUtils.jsm");
Cu.import("resource://interfaces/xml2json/xml2json.js");
function mivExchangeTimeZone() {
this._timeZone = null;
this._indexDate = null;
this._standardBias = 0;
this._daylightBias = 0;
this.globalFunctions = Cc["@1st-setup.nl/global/functions;1"]
.getService(Ci.mivFunctions);
this._names = new Array();
this._hasDaylight = false;
}
var PREF_MAINPART = 'extensions.1st-setup.exchangecalendar.timezones.';
var mivExchangeTimeZoneGUID = "7621c4ee-d6fb-445a-80f3-4786d2ad5903";
mivExchangeTimeZone.prototype = {
// methods from nsISupport
/* void QueryInterface(
in nsIIDRef uuid,
[iid_is(uuid),retval] out nsQIResult result
); */
QueryInterface: XPCOMUtils.generateQI([Ci.mivExchangeTimeZone,
Ci.nsIClassInfo,
Ci.nsISupports]),
// Attributes from nsIClassInfo
classDescription: "Interface for Cal and Exchange TimeZones comparing.",
classID: components.ID("{"+mivExchangeTimeZoneGUID+"}"),
contractID: "@1st-setup.nl/exchange/timezone;1",
flags: Ci.nsIClassInfo.THREADSAFE,
implementationLanguage: Ci.nsIProgrammingLanguage.JAVASCRIPT,
// void getInterfaces(out PRUint32 count, [array, size_is(count), retval] out nsIIDPtr array);
getInterfaces: function _getInterfaces(count)
{
var ifaces = [Ci.mivExchangeTimeZone,
Ci.nsIClassInfo,
Ci.nsISupports];
count.value = ifaces.length;
return ifaces;
},
getHelperForLanguage: function _getHelperForLanguage(language) {
return null;
},
// Internal private.
dateTimeToStrExchange: function _dateTimeToStrExchange(aDate)
{
if (!aDate) return "1900-01-01T00:00:00";
var result = aDate.year+"-";
if (aDate.month < 10) result += "0";
result += aDate.month+"-";
if (aDate.day < 10) result += "0";
result += aDate.day+"T";
if (aDate.hour < 10) result += "0";
result += aDate.hour+":";
if (aDate.minute < 10) result += "0";
result += aDate.minute+":";
if (aDate.second < 10) result += "0";
result += aDate.second;
return result;
},
dateTimeToStrCal: function _dateTimeToStrCal(aDate)
{
if (!aDate) return "19000101T000000";
var result = aDate.year;
if (aDate.month < 10) result += "0";
result += aDate.month;
if (aDate.day < 10) result += "0";
result += aDate.day+"T";
if (aDate.hour < 10) result += "0";
result += aDate.hour;
if (aDate.minute < 10) result += "0";
result += aDate.minute;
if (aDate.second < 10) result += "0";
result += aDate.second;
return result;
},
// External methods
setExchangeTimezone: function _setExchangeTimezone(aValue, aDate)
{
if (aValue == null) {
this._hasDaylight = false;
return null;
}
if (!aDate) {
aDate = cal.now();
}
var indexDateStr = this.dateTimeToStrExchange(aDate);
var result = null;
this._id = xml2json.getAttribute(aValue, "Id", "??");
this._name = xml2json.getAttribute(aValue, "Name", "??");
//dump("Exchange timezone:"+this._id+"/"+this._name+"\n");
//dump("exchangezone:"+aValue+"\n");
// Se if we have <t:Transitions><t:AbsoluteDateTransition>
var absoluteDateTransitions = xml2json.XPath(aValue, "/t:Transitions/t:AbsoluteDateTransition");
var lastDate = "1900-01-01T00:00:00";
var transitionIndex = 0;
for each(var absoluteDateTransition in absoluteDateTransitions) {
var newDate = xml2json.getTagValue(absoluteDateTransition, "t:DateTime", lastDate);
if ((newDate >= lastDate) && (newDate <= indexDateStr)) {
lastDate = xml2json.getTagValue(absoluteDateTransition, "t:DateTime", lastDate);
transitionIndex = xml2json.getTagValue(absoluteDateTransition, "t:To", 0);
}
}
absoluteDateTransitions = null;
//dump("\nindexDateStr:"+indexDateStr+", lastDate:"+lastDate+", transitionIndex:"+transitionIndex+"\n\n");
// Now we are going to find the right transition.
var transitions = xml2json.XPath(aValue, "/t:TransitionsGroups/t:TransitionsGroup[@Id = '"+transitionIndex+"']/*");
// Get Standard and Daylight transitionId's
var standardTransition = null;
var daylightTransition = null;
for each(var transition in transitions) {
var tmpId = xml2json.getTagValue(transition, "t:To","");
if (tmpId.indexOf("-Standard") >= 0) {
standardTransition = transition;
}
else {
if (tmpId.indexOf("-Daylight") >= 0) {
daylightTransition = transition;
}
}
}
transitions = null;
const dayMap = { Sunday : "SU",
Saturday : "SA",
Monday : "MO",
Tuesday : "TU",
Wednesday : "WE",
Thursday: "TH",
Friday: "FR" };
this._standardBias = null;
if (standardTransition) {
var standardPeriods = xml2json.XPath(aValue, "/t:Periods/t:Period[@Name = 'Standard' and @Id='"+xml2json.getTagValue(standardTransition, "t:To","")+"']");
if (standardPeriods.length > 0) {
this._standardBias = this.globalFunctions.convertDurationToSeconds(xml2json.getAttribute(standardPeriods[0], "Bias"));
}
standardPeriods = null;
if (standardTransition.tagName == "RecurringDayTransition") {
this._standardRRule = "FREQ=YEARLY;BYDAY="+xml2json.getTagValue(standardTransition, "t:Occurrence", 1)+dayMap[xml2json.getTagValue(standardTransition, "t:DayOfWeek", "Sunday")]+";BYMONTH="+xml2json.getTagValue(standardTransition, "t:Month", 3);
}
else {
this._standardRRule = null;
}
//dump("this._standardBias:"+this._standardBias+"\n");
//dump("this._standardRRule:"+this._standardRRule+"\n");
}
this._daylightBias = null;
if (daylightTransition) {
var daylightPeriods = xml2json.XPath(aValue, "/t:Periods/t:Period[@Name = 'Daylight' and @Id='"+xml2json.getTagValue(daylightTransition, "t:To","")+"']");
if (daylightPeriods.length > 0) {
this._daylightBias = this.globalFunctions.convertDurationToSeconds(xml2json.getAttribute(daylightPeriods[0], "Bias"));
}
daylightPeriods = null;
this._daylightRRule = "FREQ=YEARLY;BYDAY="+xml2json.getTagValue(daylightTransition, "t:Occurrence", 1)+dayMap[xml2json.getTagValue(daylightTransition, "t:DayOfWeek", "Sunday")]+";BYMONTH="+xml2json.getTagValue(daylightTransition, "t:Month", 3);
//dump("this._daylightBias:"+this._daylightBias+"\n");
//dump("this._daylightRRule:"+this._daylightRRule+"\n");
this._hasDaylight = true;
}
else {
this._hasDaylight = false;
}
},
setCalTimezone: function _setCalTimezone(aValue, aDate)
{
if (aValue == null) {
this._hasDaylight = false;
return null;
}
if (!aDate) {
aDate = cal.now();
}
var indexDateStr = this.dateTimeToStrCal(aDate);
this._id = aValue.tzid;
var tmpNames = aValue.tzid.split("/");
this._names = new Array();
for each(var name in tmpNames) {
this._names.push(name);
}
//dump(" setCalTimezone: this._names:"+this._names+"\n");
//calculateBiasOffsets
var tzcomp = aValue.icalComponent;
if (!tzcomp) {
this._hasDaylight = false;
return;
}
var standardTimezone = null;
comp = tzcomp.getFirstSubcomponent("STANDARD");
while (comp) {
var daylightStart = comp.getFirstProperty("DTSTART").value;
if ((daylightStart) && (daylightStart <= indexDateStr)) {
standardTimezone = comp;
}
comp = tzcomp.getNextSubcomponent("STANDARD");
}
var daylightTimezone = null;
var comp = tzcomp.getFirstSubcomponent("DAYLIGHT");
while (comp) {
var daylightStart = comp.getFirstProperty("DTSTART").value;
if ((daylightStart) && (daylightStart <= indexDateStr)) {
daylightTimezone = comp;
}
comp = tzcomp.getNextSubcomponent("DAYLIGHT");
}
// Get TZOFFSETTO from standard time.
if (standardTimezone) {
var m = standardTimezone.getFirstProperty("TZOFFSETTO").value.match(/^([+-]?)(\d\d)(\d\d)$/);
this._standardBias = (m[2] * 3600) + (m[3]*60);
if (m[1] == '+') {
this._standardBias = -1 * this._standardBias;
}
if (standardTimezone.getFirstProperty("RRULE")) {
this._standardRRule = standardTimezone.getFirstProperty("RRULE").value;
}
else {
this._standardRRule = null;
}
//dump("this._standardRRule:"+this._standardRRule+"\n");
}
if (daylightTimezone) {
var m = daylightTimezone.getFirstProperty("TZOFFSETTO").value.match(/^([+-]?)(\d\d)(\d\d)$/);
this._daylightBias = (m[2] * 3600) + (m[3]*60);
if (m[1] == '+') {
this._daylightBias = -1 * this._daylightBias;
}
if (daylightTimezone.getFirstProperty("RRULE")) {
this._daylightRRule = daylightTimezone.getFirstProperty("RRULE").value;
}
else {
this._daylightRRule = null;
}
//dump("this._daylightRRule:"+this._daylightRRule+"\n");
this._hasDaylight = true;
}
else {
this._hasDaylight = false;
}
},
equal: function _equal(aTimeZone)
{
if (this.standardBias != aTimeZone.standardBias) { // Standard bias does not match
//dump(" -- Standard Bias values do not match. "+this.standardBias+" != "+aTimeZone.standardBias+"\n");
return false;
}
if (this.hasDaylight != aTimeZone.hasDaylight) { // daylight does not match.
//dump(" -- One has daylight other not.\n");
return false;
}
if ((this.hasDaylight) && (this.daylightBias != aTimeZone.daylightBias)) { // daylight bias does not match.
//dump(" -- Daylight Bias values do not match. "+this.daylightBias+" != "+aTimeZone.daylightBias+"\n");
return false;
}
if (this.standardRRule != aTimeZone.standardRRule) {
//dump(" -- standard RRUle values do not match. "+this.standardRRule+" != "+aTimeZone.standardRRule+"\n");
return false;
}
if ((this.hasDaylight) && (this.daylightRRule != aTimeZone.daylightRRule)) {
//dump(" -- Daylight RRUle values do not match. "+this.daylightRRule+" != "+aTimeZone.daylightRRule+"\n");
return false;
}
return true;
},
get hasDaylight()
{
return this._hasDaylight;
},
get standardRRule()
{
return this._standardRRule;
},
get daylightRRule()
{
return this._daylightRRule;
},
get id()
{
return this._id;
},
get name()
{
return this._name;
},
getNames: function _getNames(aCount)
{
aCount.value = this._names.length;
return this._names;
},
get standardBias()
{
return this._standardBias;
},
get daylightBias()
{
return this._daylightBias;
},
get timeZone()
{
return this._timeZone;
},
set timeZone(aValue)
{
this._timeZone = aValue;
if (aValue[telements]) {
//if (aValue instanceof Ci.mivIxml2jxon) {
this.setExchangeTimezone(aValue, this._indexDate);
}
if (aValue instanceof Ci.calITimezone) {
this.setCalTimezone(aValue, this._indexDate);
}
},
get indexDate()
{
return this._indexDate;
},
set indexDate(aValue)
{
this._indexDate = aValue;
if (this._timeZone) this.timeZone = this._timeZone;
},
}
function NSGetFactory(cid) {
try {
if (!NSGetFactory.mivExchangeTimeZone) {
// Load main script from lightning that we need.
NSGetFactory.mivExchangeTimeZone = XPCOMUtils.generateNSGetFactory([mivExchangeTimeZone]);
}
} catch(e) {
Components.utils.reportError(e);
dump(e);
throw e;
}
return NSGetFactory.mivExchangeTimeZone(cid);
}
| enozkan/exchangecalendar | interfaces/exchangeTimeZones/mivExchangeTimeZone.js | JavaScript | gpl-3.0 | 11,983 |
import ModalTrigger from 'ember-modal/components/modal-trigger';
export default ModalTrigger;
| fm2g11/MEAN_Starter_Kit | public/node_modules/ui-bootstrap/node_modules/ember-modal/app/components/modal-trigger.js | JavaScript | gpl-3.0 | 95 |
'use strict';
define(['angular-mocks'], function(angularMocks) {
describe('the adverse event service', function() {
var rootScope, q,
adverseEventService,
outcomeServiceMock = jasmine.createSpyObj('OutcomeService', ['queryItems', 'addItem', 'editItem', 'deleteItem']),
outcomeQueryDefer,
outcomeAddDefer,
outcomeEditDefer,
outcomeDeleteDefer;
beforeEach(function() {
module('trialverse.adverseEvent', function($provide) {
$provide.value('OutcomeService', outcomeServiceMock);
});
});
beforeEach(module('trialverse.adverseEvent'));
beforeEach(angularMocks.inject(function($q, $rootScope, AdverseEventService) {
q = $q;
rootScope = $rootScope;
adverseEventService = AdverseEventService;
outcomeQueryDefer = q.defer();
outcomeServiceMock.queryItems.and.returnValue(outcomeQueryDefer.promise);
outcomeAddDefer = q.defer();
outcomeServiceMock.addItem.and.returnValue(outcomeAddDefer.promise);
outcomeEditDefer = q.defer();
outcomeServiceMock.editItem.and.returnValue(outcomeEditDefer.promise);
outcomeDeleteDefer = q.defer();
outcomeServiceMock.deleteItem.and.returnValue(outcomeDeleteDefer.promise);
}));
describe('query adverse events', function() {
beforeEach(function() {
outcomeQueryDefer.resolve([{
id: 'item1'
}]);
});
it('should query the events', function(done) {
adverseEventService.queryItems().then(function(items) {
expect(items.length).toBe(1);
expect(outcomeServiceMock.queryItems).toHaveBeenCalled();
done();
});
rootScope.$digest();
});
});
describe('add adverse event', function() {
beforeEach(function(){
outcomeAddDefer.resolve({});
});
it('should add the advere event', function(done) {
adverseEventService.addItem({}).then(function() {
expect(outcomeServiceMock.addItem).toHaveBeenCalled();
done();
});
rootScope.$digest();
});
});
describe('edit adverse event', function() {
beforeEach(function(){
outcomeEditDefer.resolve({});
});
it('should edit the adverse event', function(done) {
adverseEventService.editItem({}).then(function() {
expect(outcomeServiceMock.editItem).toHaveBeenCalled();
done();
});
rootScope.$digest();
});
});
describe('delete adverse event', function() {
beforeEach(function(){
outcomeDeleteDefer.resolve({});
});
it('should delete the adverse event', function(done) {
adverseEventService.deleteItem({}).then(function() {
expect(outcomeServiceMock.deleteItem).toHaveBeenCalled();
done();
});
rootScope.$digest();
});
});
});
});
| ConnorStroomberg/addis-core | src/main/webapp/resources/app/js/adverseEvent/adverseEventServiceIntSpec.js | JavaScript | gpl-3.0 | 2,892 |
/*
Copyright (c) 2004-2008, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if(!dojo._hasResource["dijit._base.manager"]){
dojo._hasResource["dijit._base.manager"]=true;
dojo.provide("dijit._base.manager");
dojo.declare("dijit.WidgetSet",null,{constructor:function(){
this._hash={};
},add:function(_1){
if(this._hash[_1.id]){
throw new Error("Tried to register widget with id=="+_1.id+" but that id is already registered");
}
this._hash[_1.id]=_1;
},remove:function(id){
delete this._hash[id];
},forEach:function(_3){
for(var id in this._hash){
_3(this._hash[id]);
}
},filter:function(_5){
var _6=new dijit.WidgetSet();
this.forEach(function(_7){
if(_5(_7)){
_6.add(_7);
}
});
return _6;
},byId:function(id){
return this._hash[id];
},byClass:function(_9){
return this.filter(function(_a){
return _a.declaredClass==_9;
});
}});
dijit.registry=new dijit.WidgetSet();
dijit._widgetTypeCtr={};
dijit.getUniqueId=function(_b){
var id;
do{
id=_b+"_"+(_b in dijit._widgetTypeCtr?++dijit._widgetTypeCtr[_b]:dijit._widgetTypeCtr[_b]=0);
}while(dijit.byId(id));
return id;
};
if(dojo.isIE){
dojo.addOnWindowUnload(function(){
dijit.registry.forEach(function(_d){
_d.destroy();
});
});
}
dijit.byId=function(id){
return (dojo.isString(id))?dijit.registry.byId(id):id;
};
dijit.byNode=function(_f){
return dijit.registry.byId(_f.getAttribute("widgetId"));
};
dijit.getEnclosingWidget=function(_10){
while(_10){
if(_10.getAttribute&&_10.getAttribute("widgetId")){
return dijit.registry.byId(_10.getAttribute("widgetId"));
}
_10=_10.parentNode;
}
return null;
};
dijit._tabElements={area:true,button:true,input:true,object:true,select:true,textarea:true};
dijit._isElementShown=function(_11){
var _12=dojo.style(_11);
return (_12.visibility!="hidden")&&(_12.visibility!="collapsed")&&(_12.display!="none")&&(dojo.attr(_11,"type")!="hidden");
};
dijit.isTabNavigable=function(_13){
if(dojo.hasAttr(_13,"disabled")){
return false;
}
var _14=dojo.hasAttr(_13,"tabindex");
var _15=dojo.attr(_13,"tabindex");
if(_14&&_15>=0){
return true;
}
var _16=_13.nodeName.toLowerCase();
if(((_16=="a"&&dojo.hasAttr(_13,"href"))||dijit._tabElements[_16])&&(!_14||_15>=0)){
return true;
}
return false;
};
dijit._getTabNavigable=function(_17){
var _18,_19,_1a,_1b,_1c,_1d;
var _1e=function(_1f){
dojo.query("> *",_1f).forEach(function(_20){
var _21=dijit._isElementShown(_20);
if(_21&&dijit.isTabNavigable(_20)){
var _22=dojo.attr(_20,"tabindex");
if(!dojo.hasAttr(_20,"tabindex")||_22==0){
if(!_18){
_18=_20;
}
_19=_20;
}else{
if(_22>0){
if(!_1a||_22<_1b){
_1b=_22;
_1a=_20;
}
if(!_1c||_22>=_1d){
_1d=_22;
_1c=_20;
}
}
}
}
if(_21&&_20.nodeName.toUpperCase()!="SELECT"){
_1e(_20);
}
});
};
if(dijit._isElementShown(_17)){
_1e(_17);
}
return {first:_18,last:_19,lowest:_1a,highest:_1c};
};
dijit.getFirstInTabbingOrder=function(_23){
var _24=dijit._getTabNavigable(dojo.byId(_23));
return _24.lowest?_24.lowest:_24.first;
};
dijit.getLastInTabbingOrder=function(_25){
var _26=dijit._getTabNavigable(dojo.byId(_25));
return _26.last?_26.last:_26.highest;
};
dijit.defaultDuration=dojo.config["defaultDuration"]||200;
}
| sguazt/dcsj-sharegrid-portal | web/resources/scripts/dojo/dijit/_base/manager.js | JavaScript | gpl-3.0 | 3,207 |
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*
*/
/*
* Bootloader for Ajax.org Platform
*
* Include apf.js, then just go about it as you would with the
* packaged version. Adapt this file to include your preferred modules
*/
// #ifndef __PACKAGED
if (location.protocol != "file:") {
apf.console.warn("You are serving multiple files from a (local) "
+ "webserver - please consider\nusing the file:// protocol to "
+ "load your files, because that will make your\napplication "
+ "load several times faster.\n"
+ "On a webserver, we recommend using a release or debug build "
+ "of Ajax.org Platform.");
}
apf.$loader
.setGlobalDefaults({
BasePath: apf.basePath,
//AlwaysPreserveOrder: true,
AllowDuplicates : true
//UsePreloading : false
})
apf.$x = apf.$loader
.script(
"core/class.js",
"core/crypto/base64.js",
"core/crypto/md5.js",
"core/lib/util/abstractevent.js",
"core/lib/util/utilities.js",
"core/lib/util/color.js",
"core/lib/util/cookie.js",
"core/lib/util/style.js",
"core/lib/util/ecmaext.js",
"core/lib/util/flash.js",
"core/lib/util/hotkey.js",
"core/lib/util/iepngfix.js",
"core/lib/util/json.js",
"core/lib/util/nameserver.js",
"core/lib/util/plane.js",
"core/lib/util/popup.js",
"core/lib/util/silverlight.js",
"core/lib/util/syntax.js",
"core/lib/util/xml.js",
"core/lib/util/xmldiff.js",
"core/lib/util/zmanager.js",
"core/lib/util/visibilitymanager.js",
"core/lib/tween.js",
"core/lib/date.js",
"core/lib/data.js",
"core/lib/flow.js",
"core/lib/geolocation.js",
"core/lib/history.js",
"core/lib/html.js",
"core/lib/layout.js",
"core/lib/printer.js",
"core/lib/queue.js",
"core/lib/resize.js",
"core/lib/selection.js",
"core/lib/sort.js",
"core/lib/skins.js",
"core/lib/language.js",
"core/lib/xmldb.js",
"core/lib/teleport/http.js", // for simple HTTP transactions
"core/lib/teleport/iframe.js", // for IE secure environments
"core/lib/draw.js",
"core/browsers/gecko.js",
"core/browsers/ie.js",
"core/browsers/iphone.js",
"core/browsers/opera.js",
"core/browsers/webkit.js",
"core/browsers/non_ie.js",
"core/browsers/gears.js",
"core/markup/domparser.js"
)
.wait()
.script(
"core/window.js",
"core/lib/config.js",
"core/lib/draw/canvas.js",
"core/lib/draw/vml.js",
"core/lib/draw/chartdraw.js",
"core/lib/offline.js",
"core/lib/storage.js",
"core/lib/uirecorder.js",
"core/parsers/xpath.js",
//"parsers/jslt_2.0.js",
"core/parsers/livemarkup.js",
"core/parsers/js.js",
"core/parsers/url.js",
/*"markup/html5.js",
"core/markup/xforms.js",*/
"core/markup/xslt/xslt.js",
"core/markup/aml.js",
"core/markup/xhtml.js",
"core/markup/xsd.js"
)
.wait()
.script(
"core/lib/offline/transactions.js",
"core/lib/offline/models.js",
"core/lib/offline/state.js",
"core/lib/offline/queue.js",
"core/lib/offline/detector.js",
"core/lib/offline/application.js",
"core/lib/offline/gears.js",
"core/lib/storage/air.js",
"core/lib/storage/air.file.js",
"core/lib/storage/air.sql.js",
"core/lib/storage/flash.js",
"core/lib/storage/gears.js",
"core/lib/storage/html5.js",
"core/lib/storage/memory.js",
"core/lib/storage/cookie.js",
"core/lib/vector.js",
"core/markup/aml/node.js"
)
.wait()
.script(
"core/markup/aml/element.js"
)
.wait()
.script(
"core/markup/aml/characterdata.js",
"core/markup/aml/text.js",
"core/markup/aml/namednodemap.js",
"core/markup/aml/attr.js",
"core/markup/aml/cdatasection.js",
"core/markup/aml/comment.js",
"core/markup/aml/configuration.js",
"core/markup/aml/document.js",
"core/markup/aml/documentfragment.js",
"core/markup/aml/event.js",
"core/markup/aml/textrectangle.js",
"core/markup/aml/range.js",
"core/markup/aml/selection.js",
"core/markup/xhtml/element.js",
"core/markup/xsd/element.js",
"core/baseclasses/contenteditable.js",
"core/baseclasses/liveedit.js"
)
.wait()
.script(
"core/baseclasses/contenteditable/clipboard.js",
"core/baseclasses/contenteditable/commands.js",
"core/baseclasses/contenteditable/interactive.js",
"core/baseclasses/contenteditable/selectrect.js",
"core/baseclasses/contenteditable/visualselect.js",
"core/baseclasses/contenteditable/visualconnect.js",
"core/baseclasses/liveedit/richtext.js",
"core/markup/xhtml/ignore.js",
"core/markup/xhtml/option.js",
"core/markup/xhtml/body.js",
"core/markup/xhtml/html.js",
"core/markup/xhtml/skipchildren.js",
"core/markup/xhtml/input.js",
"core/markup/xinclude.js",
"core/markup/xinclude/include.js",
//"markup/xinclude/fallback.js",
"core/markup/xsd/enumeration.js",
"core/markup/xsd/fractiondigits.js",
"core/markup/xsd/length.js",
"core/markup/xsd/list.js",
"core/markup/xsd/maxexclusive.js",
"core/markup/xsd/maxinclusive.js",
"core/markup/xsd/maxlength.js",
"core/markup/xsd/maxscale.js",
"core/markup/xsd/minexclusive.js",
"core/markup/xsd/mininclusive.js",
"core/markup/xsd/minlength.js",
"core/markup/xsd/minscale.js",
"core/markup/xsd/pattern.js",
"core/markup/xsd/restriction.js",
"core/markup/xsd/schema.js",
"core/markup/xsd/simpletype.js",
"core/markup/xsd/totaldigits.js",
"core/markup/xsd/union.js",
"core/debug/debug.js",
"core/debug/debugwin.js",
//"debug/profiler.js",
"core/baseclasses/anchoring.js",
"core/baseclasses/dataaction.js"
)
.wait()
.script(
"core/markup/aml/processinginstruction.js",
"core/baseclasses/liveedit/anchor.js",
"core/baseclasses/liveedit/blockquote.js",
"core/baseclasses/liveedit/charmap.js",
"core/baseclasses/liveedit/clipboard.js",
"core/baseclasses/liveedit/code.js",
"core/baseclasses/liveedit/color.js",
"core/baseclasses/liveedit/datetime.js",
"core/baseclasses/liveedit/directions.js",
"core/baseclasses/liveedit/emotions.js",
"core/baseclasses/liveedit/fontbase.js",
"core/baseclasses/liveedit/fontstyle.js",
"core/baseclasses/liveedit/help.js",
"core/baseclasses/liveedit/hr.js",
"core/baseclasses/liveedit/image.js",
"core/baseclasses/liveedit/links.js",
"core/baseclasses/liveedit/list.js",
"core/baseclasses/liveedit/media.js",
"core/baseclasses/liveedit/printing.js",
//"core/baseclasses/liveedit/spell.js",
"core/baseclasses/liveedit/search.js",
"core/baseclasses/liveedit/subsup.js",
"core/baseclasses/liveedit/tables.js",
"core/baseclasses/liveedit/visualaid.js",
"core/baseclasses/guielement.js"
)
.wait()
.script(
"core/baseclasses/interactive.js",
"core/baseclasses/childvalue.js",
"core/baseclasses/cache.js",
"core/baseclasses/presentation.js"
)
.wait()
.script(
"core/baseclasses/databinding.js",
"core/baseclasses/databinding/standard.js",
"core/baseclasses/databinding/multiselect.js",
"core/baseclasses/validation.js",
"core/baseclasses/delayedrender.js",
"core/baseclasses/dragdrop.js",
"core/baseclasses/focussable.js",
"core/baseclasses/media.js",
"core/baseclasses/multicheck.js",
"core/baseclasses/multiselect.js",
"core/baseclasses/rename.js",
"core/baseclasses/teleport.js",
"core/baseclasses/transaction.js",
"core/baseclasses/virtualviewport.js",
//"baseclasses/xforms.js",
"core/baseclasses/basebutton.js",
"core/baseclasses/baselist.js",
"core/baseclasses/basetree.js",
"core/baseclasses/basesimple.js",
"core/baseclasses/basetab.js",
"core/baseclasses/basestatebuttons.js"
)
.wait()
.script(
"elements/accordion.js",
"elements/actions.js",
"elements/actionrule.js",
"elements/actiontracker.js",
"elements/application.js",
"elements/appsettings.js",
"elements/audio.js",
"elements/auth.js",
"elements/axis.js",
"elements/bar.js",
"elements/bindings.js",
"elements/bindingrule.js",
"elements/body.js",
"elements/browser.js",
"elements/button.js",
"elements/calendar.js",
"elements/calendarlist.js",
"elements/caldropdown.js",
"elements/chart.js",
"elements/checkbox.js",
"elements/collection.js",
"elements/comment.js",
//"colorpicker.js",
"elements/colorpicker2.js",
"elements/contextmenu.js",
"elements/datagrid.js",
"elements/defaults.js",
"elements/divider.js",
"elements/dropdown.js",
"elements/editor.js",
"elements/errorbox.js",
"elements/event.js",
"elements/filler.js",
"elements/flashplayer.js",
"elements/flowchart.js",
"elements/frame.js",
"elements/gallery.js",
"elements/graph.js",
"elements/hbox.js",
"elements/iconmap.js",
"elements/img.js",
"elements/item.js",
"elements/junction.js",
"elements/label.js",
"elements/list.js",
"elements/loader.js",
"elements/loadindicator.js",
"elements/map.js",
"elements/menu.js",
"elements/modalwindow.js",
"elements/model.js",
"elements/notifier.js",
"elements/page.js",
"elements/pager.js",
"elements/palette.js",
"elements/persist.js",
"elements/portal.js",
"elements/progressbar.js",
"elements/propedit.js",
"elements/radiobutton.js",
"elements/remote.js",
"elements/script.js",
"elements/scrollbar.js",
"elements/skin.js",
"elements/slider.js",
"elements/smartbinding.js",
"elements/source.js",
"elements/spinner.js",
"elements/splitter.js",
"elements/state.js",
"elements/state-group.js",
"elements/statusbar.js",
"elements/style.js",
"elements/tab.js",
"elements/table.js",
"elements/teleport.js",
"elements/template.js",
"elements/text.js",
"elements/textbox.js",
"elements/toc.js",
"elements/toolbar.js",
"elements/tree.js",
"elements/upload.js",
"elements/rpc.js", // RPC Baseclass (needs HTTP class)
"elements/method.js",
"elements/param.js",
"elements/video.js",
"elements/vectorflow.js",
"elements/webdav.js",
"elements/xmpp.js", // XMPP class providing the XMPP comm layer
/*
"elements/repeat.js",
"elements/submitform.js",*/
"elements/markupedit.js",
/*"elements/validation"*/
"elements/editor/src/ace/lib/core.js",
"elements/editor/src/ace/lib/oop.js",
"elements/editor/src/ace/lib/lang.js",
"elements/editor/src/ace/lib/event.js",
"elements/editor/src/ace/lib/dom.js",
"elements/editor/src/ace/mode/Text.js",
"elements/editor/src/ace/mode/TextHighlightRules.js",
"elements/editor/src/ace/mode/JavaScript.js",
"elements/editor/src/ace/mode/DocCommentHighlightRules.js",
"elements/editor/src/ace/mode/JavaScriptHighlightRules.js",
"elements/editor/src/ace/mode/Html.js",
"elements/editor/src/ace/mode/HtmlHighlightRules.js",
"elements/editor/src/ace/mode/Css.js",
"elements/editor/src/ace/mode/CssHighlightRules.js",
"elements/editor/src/ace/mode/Xml.js",
"elements/editor/src/ace/mode/XmlHighlightRules.js",
"elements/editor/src/ace/mode/MatchingBraceOutdent.js",
"elements/editor/src/ace/MEventEmitter.js",
"elements/editor/src/ace/Range.js",
"elements/editor/src/ace/Selection.js",
"elements/editor/src/ace/Search.js",
"elements/editor/src/ace/UndoManager.js",
"elements/editor/src/ace/Document.js",
"elements/editor/src/ace/Tokenizer.js",
"elements/editor/src/ace/BackgroundTokenizer.js",
"elements/editor/src/ace/layer/Cursor.js",
"elements/editor/src/ace/layer/Gutter.js",
"elements/editor/src/ace/layer/Text.js",
"elements/editor/src/ace/layer/Marker.js",
"elements/editor/src/ace/ScrollBar.js",
"elements/editor/src/ace/TextInput.js",
"elements/editor/src/ace/KeyBinding.js",
"elements/editor/src/ace/Editor.js",
"elements/editor/src/ace/VirtualRenderer.js",
"elements/editor/src/ace/conf/keybindings/default_mac.js",
"elements/editor/src/ace/conf/keybindings/default_win.js",
"elements/editor/src/debug/O3Socket.js",
"elements/editor/src/debug/ChromeDebugMessageStream.js",
"elements/editor/src/debug/DevToolsService.js",
"elements/editor/src/debug/DevToolsMessage.js",
"elements/editor/src/debug/V8DebuggerService.js",
"elements/editor/src/debug/Breakpoint.js",
"elements/editor/src/debug/V8Debugger.js",
"elements/editor/src/debug/V8Message.js",
"elements/editor/src/debug/MessageReader.js",
"elements/editor/src/debug/StandaloneV8DebuggerService.js",
"elements/editor/src/debug/WebSocketV8DebuggerService.js",
"elements/debughost.js",
"elements/dbg/v8debugger.js",
"elements/dbg/chromedebughost.js",
"elements/dbg/v8debughost.js",
"elements/debugger.js"
)
.wait()
.script(
"elements/codeeditor.js",
"elements/actiontracker/undodata.js",
"elements/actiontracker/xmlactions.js",
"elements/modalwindow/widget.js",
"elements/textbox/masking.js",
"elements/textbox/autocomplete.js",
"elements/audio/type_flash.js",
"elements/audio/type_native.js",
//RPC extensions (all need rpc.js)
"elements/rpc/xmlrpc.js", // XML-RPC
"elements/rpc/soap.js", // SOAP
"elements/rpc/jsonrpc.js", // JSON
//"elements/rpc/jphp.js", // JPHP
"elements/rpc/cgi.js", // CGI
"elements/rpc/rdb.js", // RDB-RPC
"elements/rpc/rest.js", // REST
"elements/rpc/yql.js", // YQL
"elements/upload/html4.js",
"elements/upload/html5.js",
"elements/upload/flash.js",
"elements/video/type_flv.js",
"elements/video/type_native.js",
"elements/video/type_qt.js",
"elements/video/type_silverlight.js",
"elements/video/type_vlc.js",
"elements/video/type_wmp.js",
"elements/xmpp/muc.js",
"elements/xmpp/rdb.js",
"elements/xmpp/roster.js",
"elements/bindingdndrule.js",
"elements/bindingloadrule.js",
"elements/bindingcolumnrule.js",
//"elements/bindingcolorrule.js",
"elements/bindingseriesrule.js",
"elements/bindingeachrule.js",
"processinginstructions/livemarkup.js"
).wait(function() {
if (apf.$required.length)
apf.$x.script.apply(apf.$x, apf.$required).wait(start);
else
start();
});
//Let's start APF
function start(){
if (apf.started)
return; //@todo ask @getify why this function is called twice
apf.start();
}
//Conditional compilation workaround... (can this be improved??)
if (document.all) {
var oldWinError = window.onerror, z;
window.onerror = z = function(m){
apf.console.error("Error caught from early startup. Might be a html parser syntax error (not your fault). " + m);
if (!arguments.caller)
return true;
}
}
apf.Init.addConditional(function(){
if (document.all && window.onerror == z) //Conditional compilation workaround... (can this be improved??)
window.onerror = oldWinError;
apf.dispatchEvent("domready");
}, null, ["body", "class"]);
apf.require = function(){
var dir = apf.getDirname(location.href), req = [];
for (var i = 0, l = arguments.length; i < l; i++)
req.push(apf.getAbsolutePath(dir, arguments[i]))
apf.$x.script.apply(apf.$loader, req).wait();
};
/*if(document.body)
apf.Init.run("body");
else*/
apf.addDomLoadEvent(function(){apf.Init.run('body');});
//A way to prevent parsing body
/*window.onerror = function(){
window.onerror = null;
return true;
}
document.documentElement.appendChild(document.createElement("body"));*/
//#endif
| exsilium/cloud9 | ppc/platform/loader2.js | JavaScript | gpl-3.0 | 18,651 |
// This file is part of Pa11y Webservice.
//
// Pa11y Webservice is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Pa11y Webservice is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Pa11y Webservice. If not, see <http://www.gnu.org/licenses/>.
'use strict';
const assert = require('proclaim');
describe('GET /tasks/results', function() {
describe('with no query', function() {
beforeEach(function(done) {
const request = {
method: 'GET',
endpoint: 'tasks/results'
};
this.navigate(request, done);
});
it('should send a 200 status', function() {
assert.strictEqual(this.last.status, 200);
});
it('should output a JSON representation of all results (in the last 30 days) sorted by date', async function() {
const body = this.last.body;
const results = await this.app.model.result.getAll({});
assert.isArray(body);
assert.strictEqual(body.length, 4);
assert.strictEqual(body[0].id, 'def000000000000000000001');
assert.isUndefined(body[0].results);
assert.strictEqual(body[1].id, 'def000000000000000000002');
assert.isUndefined(body[1].results);
assert.strictEqual(body[2].id, 'def000000000000000000003');
assert.isUndefined(body[2].results);
assert.strictEqual(body[3].id, 'def000000000000000000004');
assert.isUndefined(body[3].results);
assert.deepEqual(body, results);
});
});
describe('with date-range query', function() {
let query;
beforeEach(function(done) {
const request = {
method: 'GET',
endpoint: 'tasks/results',
query: {
from: '2013-01-02',
to: '2013-01-07'
}
};
query = request.query;
this.navigate(request, done);
});
it('should send a 200 status', function() {
assert.strictEqual(this.last.status, 200);
});
it('should output a JSON representation of all expected results sorted by date', async function() {
const body = this.last.body;
const results = await this.app.model.result.getAll(query);
assert.isArray(body);
assert.strictEqual(body.length, 2);
assert.strictEqual(body[0].id, 'def000000000000000000007');
assert.isUndefined(body[0].results);
assert.strictEqual(body[1].id, 'def000000000000000000006');
assert.isUndefined(body[1].results);
assert.deepEqual(body, results);
});
});
describe('with full details query', function() {
let query;
beforeEach(function(done) {
const request = {
method: 'GET',
endpoint: 'tasks/results',
query: {
full: true
}
};
query = request.query;
this.navigate(request, done);
});
it('should send a 200 status', function() {
assert.strictEqual(this.last.status, 200);
});
it('should output a JSON representation of all results (in the last 30 days) with full details sorted by date', async function() {
const body = this.last.body;
const results = await this.app.model.result.getAll(query);
assert.isArray(body);
assert.strictEqual(body.length, 4);
assert.strictEqual(body[0].id, 'def000000000000000000001');
assert.isArray(body[0].results);
assert.strictEqual(body[1].id, 'def000000000000000000002');
assert.isArray(body[1].results);
assert.strictEqual(body[2].id, 'def000000000000000000003');
assert.isArray(body[2].results);
assert.strictEqual(body[3].id, 'def000000000000000000004');
assert.isArray(body[3].results);
assert.deepEqual(body, results);
});
});
describe('with invalid query', function() {
beforeEach(function(done) {
const request = {
method: 'GET',
endpoint: 'tasks/results',
query: {
foo: 'bar'
}
};
this.navigate(request, done);
});
it('should send a 400 status', function() {
assert.strictEqual(this.last.status, 400);
});
});
});
| pa11y/webservice | test/integration/get-all-results.js | JavaScript | gpl-3.0 | 4,176 |
/*************************************************************************
* tranSMART - translational medicine data mart
*
* Copyright 2008-2012 Janssen Research & Development, LLC.
*
* This product includes software developed at Janssen Research & Development, LLC.
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
* as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later version, along with the following terms:
* 1. You may convey a work based on this program in accordance with section 5, provided that you retain the above notices.
* 2. You may convey verbatim copies of this program code as you receive it, in any medium, provided that you retain the above notices.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*
******************************************************************/
//**************Start of functions to set global subset ids**************
/**
* 1. If the global subset ids are null call runAllQueries to populate them.
* 2. Calls heatmapvalidate to get all relevant data for the high dimensional selection.
* @param divId
*/
function gatherHighDimensionalData(divId){
if(!variableDivEmpty(divId)
&& ((GLOBAL.CurrentSubsetIDs[1] == null) || (multipleSubsets() && GLOBAL.CurrentSubsetIDs[2]== null))){
runAllQueriesForSubsetId(function(){gatherHighDimensionalData(divId);}, divId);
return;
}
if(variableDivEmpty(divId)){
Ext.Msg.alert("No cohort selected!", "Please select a cohort first.");
return;
}
//genePatternReplacement();
//Send a request to generate the heatmapdata that we use to populate the dropdowns in the popup.
Ext.Ajax.request(
{
url : pageInfo.basePath+"/analysis/heatmapvalidate",
method : 'POST',
timeout: '1800000',
params : Ext.urlEncode(
{
result_instance_id1 : GLOBAL.CurrentSubsetIDs[1],
result_instance_id2 : GLOBAL.CurrentSubsetIDs[2],
analysis : GLOBAL.HeatmapType
}
),
success : function(result, request)
{
determineHighDimVariableType(result);
readCohortData(result,divId);
},
failure : function(result, request)
{
Ext.Msg.alert("Error", "Ajax call is failed.");
}
}
);
}
function gatherHighDimensionalDataSingleSubset(divId, currentSubsetId){
if((!variableDivEmpty(divId) && currentSubsetId== null)){
runQueryForSubsetidSingleSubset(function(sId){gatherHighDimensionalDataSingleSubset(divId, sId);}, divId);
return;
}
if(variableDivEmpty(divId)){
Ext.Msg.alert("No cohort selected!", "Please select a cohort first.");
return;
}
//genePatternReplacement();
//Send a request to generate the heatmapdata that we use to populate the dropdowns in the popup.
Ext.Ajax.request(
{
url : pageInfo.basePath+"/analysis/heatmapvalidate",
method : 'POST',
timeout: '1800000',
params : Ext.urlEncode(
{
result_instance_id1 : currentSubsetId,
result_instance_id2 : '',
analysis : GLOBAL.HeatmapType
}
),
success : function(result, request)
{
determineHighDimVariableType(result);
readCohortData(result,divId);
},
failure : function(result, request)
{
Ext.Msg.alert("Error", "Ajax call is failed.");
}
}
);
}
/**
* Determine if we are dealing with genotype or copy number
*/
function determineHighDimVariableType(result){
var mobj=result.responseText.evalJSON();
GLOBAL.HighDimDataType=mobj.markerType;
}
/**
* read the result from heatmapvalidate call.
* @param result
* @param completedFunction
*/
function readCohortData(result, divId)
{
//Get the JSON string we got from the server into a real JSON object.
var mobj=result.responseText.evalJSON();
//If we failed to retrieve any test from the heatmap server call, we alert the user here. Otherwise, show the popup.
if(mobj.NoData && mobj.NoData == "true")
{
Ext.Msg.alert("No Data!","No data found for the samples you selected!");
return;
}
//If we got data, store the JSON data globally.
GLOBAL.DefaultCohortInfo=mobj;
GLOBAL.CurrentAnalysisDivId=divId;
//Reset the pathway information.
GLOBAL.CurrentPathway = '';
GLOBAL.CurrentPathwayName = '';
if(GLOBAL.DefaultCohortInfo.defaultPlatforms[0]=='' || GLOBAL.DefaultCohortInfo.defaultPlatforms[0]==null){
Ext.Msg.alert("No High Dimensional Data!","Please select a high dimensional data node.");
return;
}
//render the pathway selection popup
showCompareStepPathwaySelection();
}
/**
* Check to see if a a selection has been made for the variable
* @param divId
* @returns {Boolean}
*/
function variableDivEmpty(divId){
var queryDiv=Ext.get(divId);
if(queryDiv.dom.childNodes.length>0){
return false;
}
return true;
}
function runAllQueriesForSubsetId(callback, divId)
{
// analysisPanel.body.update("<table border='1' width='100%' height='100%'><tr><td width='50%'><div id='analysisPanelSubset1'></div></td><td><div id='analysisPanelSubset2'></div></td></tr>");
var subset = 1;
if(isSubsetEmpty(1) && isSubsetEmpty(2))
{
Ext.Msg.alert('Subsets are empty', 'All subsets are empty. Please select subsets.');
return;
}
// setup the number of subsets that need running
var subsetstorun = 0;
for (var i = 1; i <= GLOBAL.NumOfSubsets; i++)
{
if( ! isSubsetEmpty(i) && GLOBAL.CurrentSubsetIDs[i] == null)
{
subsetstorun ++ ;
}
}
STATE.QueryRequestCounter = subsetstorun;
/* set the number of requests before callback is fired for runquery complete */
// iterate through all subsets calling the ones that need to be run
for (var i = 1; i <= GLOBAL.NumOfSubsets; i++)
{
if( ! isSubsetEmpty(i) && GLOBAL.CurrentSubsetIDs[i] == null)
{
runQueryForSubsetId(i, callback, divId);
} else if (!isSubsetEmpty(i) && GLOBAL.CurrentSubsetIDs[i] != null) {
// execute the callback if subset is not empty and has subset id
callback();
}
}
}
function runQueryForSubsetId(subset, callback, divId)
{
if(Ext.get('analysisPanelSubset1') == null)
{
// analysisPanel.body.update("<table border='1' width='100%' height='100%'><tr><td width='50%'><div id='analysisPanelSubset1'></div></td><td><div id='analysisPanelSubset2'></div></td></tr>");
}
/* if(isSubsetEmpty(subset))
{
callback();
return;
} */
var query = getCRCRequest(subset, "", divId);
// first subset
queryPanel.el.mask('Getting subset ' + subset + '...', 'x-mask-loading');
Ext.Ajax.request(
{
url : pageInfo.basePath + "/queryTool/runQueryFromDefinition",
method : 'POST',
xmlData : query,
// callback : callback,
success : function(result, request)
{
runQueryComplete(result, subset, callback);
}
,
failure : function(result, request)
{
runQueryComplete(result, subset, callback);
}
,
timeout : '600000'
}
);
if(GLOBAL.Debug)
{
resultsPanel.setBody("<div style='height:400px;width500px;overflow:auto;'>" + Ext.util.Format.htmlEncode(query) + "</div>");
}
}
function runQueryForSubsetidSingleSubset(callback, divId){
var query = getCRCRequestSingleSubset(divId);
Ext.Ajax.request(
{
url : pageInfo.basePath + "/queryTool/runQueryFromDefinition",
method : 'POST',
xmlData : query,
// callback : callback,
success : function(result, request)
{
runQueryComplete(result, null, callback);
}
,
failure : function(result, request)
{
Ext.Msg.alert("Error", "Ajax call is failed.")
}
,
timeout : '600000'
}
);
if(GLOBAL.Debug)
{
resultsPanel.setBody("<div style='height:400px;width500px;overflow:auto;'>" + Ext.util.Format.htmlEncode(query) + "</div>");
}
}
function getCRCRequest(subset, queryname, divId){
if(queryname=="" || queryname==undefined){
var d=new Date();
queryname=GLOBAL.Username+"'s Query at "+ d.toUTCString();
}
var query= '<ns4:query_definition xmlns:ns4="http://www.i2b2.org/xsd/cell/crc/psm/1.1/">\
<query_name>'+queryname+'</query_name>\
<specificity_scale>0</specificity_scale>';
var qcd=Ext.get(divId);
if(qcd.dom.childNodes.length>0)
{
query=query+getCRCRequestPanel(qcd.dom, 1);
}
for(var i=1;i<=GLOBAL.NumOfQueryCriteriaGroups;i++)
{
var qcd=Ext.get("queryCriteriaDiv"+subset+'_'+i.toString());
if(qcd.dom.childNodes.length>0)
{
query=query+getCRCRequestPanel(qcd.dom, i);
}
}
query=query+"</ns4:query_definition>";
return query;
}
function getCRCRequestSingleSubset(divId, queryname){
if(queryname=="" || queryname==undefined){
var d=new Date();
queryname=GLOBAL.Username+"'s Query at "+ d.toUTCString();
}
var query= '<ns4:query_definition xmlns:ns4="http://www.i2b2.org/xsd/cell/crc/psm/1.1/">\
<query_name>'+queryname+'</query_name>\
<specificity_scale>0</specificity_scale>';
var qcd=Ext.get(divId);
if(qcd.dom.childNodes.length>0)
{
query=query+getCRCRequestPanel(qcd.dom, 1);
}
query=query+"</ns4:query_definition>";
return query;
}
//**************End of functions to set global subset ids**************
function applyToForm(){
var divId = GLOBAL.CurrentAnalysisDivId;
var probesAgg = document.getElementById("probesAggregation");
var snpType = document.getElementById("SNPType");
var subsetCount = multipleSubsets()?2:1;
for(var idx = 1; idx<=subsetCount; idx++){
applySubsetToForm(divId, idx);
}
//Pull other values from javascript object.
window[divId+'pathway'] = GLOBAL.CurrentPathway;
window[divId+'pathwayName'] = GLOBAL.CurrentPathwayName;
window[divId+'probesAggregation'] = probesAgg.checked;
window[divId+'SNPType'] = snpType.value;
window[divId+'markerType'] = GLOBAL.HighDimDataType;
//Pull the actual values for these items so we can filter on them in a SQL query later. When we click on the items in the dropdowns these "Value" fields get a list of all items in both subsets.
window[divId+'samplesValues'] = GLOBAL.CurrentSamples;
window[divId+'tissuesValues'] = GLOBAL.CurrentTissues;
window[divId+'timepointsValues'] = GLOBAL.CurrentTimepoints;
window[divId+'gplValues'] = GLOBAL.CurrentGpls.toArray();
displayHighDimSelectionSummary(subsetCount, divId, probesAgg, snpType);
compareStepPathwaySelection.hide();
}
function applySubsetToForm(divId, idx){
//Pull the text value for the selections from the popup form.
window[divId+'samples'+idx] = Ext.get('sample'+idx).dom.value;
window[divId+'platforms'+idx] = Ext.get('platforms'+idx).dom.value;
window[divId+'gpls'+idx] = Ext.get('gpl'+idx).dom.value;
window[divId+'tissues'+idx] = Ext.get('tissue'+idx).dom.value;
window[divId+'timepoints'+idx] = Ext.get('timepoint'+idx).dom.value;
//Pull the actual GPL values.
window[divId+'gplsValue'+idx] = GLOBAL.CurrentGpls[idx-1];
//Pull other values from javascript object.
window[divId+'rbmPanels'+idx] = GLOBAL.CurrentRbmpanels[idx-1];
}
function displayHighDimSelectionSummary(subsetCount, divId, probesAgg, snpType){
var summaryString="";
for(var idx = 1; idx<=subsetCount; idx++){
summaryString=createSelectionSummaryString(divId, idx, summaryString);
}
var selectedSearchPathway =Ext.get('searchPathway').dom.value;
var innerHtml = summaryString+
'<br> <b>Pathway:</b> '+selectedSearchPathway+
'<br> <b>Marker Type:</b> '+GLOBAL.HighDimDataType;
if(GLOBAL.HighDimDataType==HIGH_DIMENSIONAL_DATA["mrna"].type)
{
if(isProbesAggregationSupported()){
innerHtml += '<br><b> Aggregate Probes:</b> '+ probesAgg.checked;
}
} else if(GLOBAL.HighDimDataType==HIGH_DIMENSIONAL_DATA["snp"].type){
if(isProbesAggregationSupported()){
innerHtml += '<br><b> Aggregate Probes:</b> '+ probesAgg.checked;
}
innerHtml += '<br><b> SNP Type:</b> '+ snpType.value;
}
var domObj = document.getElementById("display"+divId);
domObj.innerHTML=innerHtml;
}
function createSelectionSummaryString(divId, idx, summaryString){
var selectedPlatform =Ext.get('platforms'+idx).dom.value;
var selectedGpl =Ext.get('gpl'+idx).dom.value;
var selectedSample =Ext.get('sample'+idx).dom.value;
var selectedTissue =Ext.get('tissue'+idx).dom.value;
var selectedTimepoint =Ext.get('timepoint'+idx).dom.value;
summaryString += '<br> <b>Subset'+idx+'</b>'+
'<br> <b>Platform:</b> '+ selectedPlatform +
'<br> <b>GPL Platform:</b> '+selectedGpl+
'<br> <b>Sample:</b> '+selectedSample+
'<br> <b>Tissue:</b> '+selectedTissue+
'<br> <b>Timepoint:</b> '+selectedTimepoint+
'<br>';
return summaryString
}
function clearHighDimDataSelections(divId){
var subsetCount = multipleSubsets()?2:1;
for(var idx = 1; idx<=subsetCount; idx++){
window[divId+'timepoints'+idx] ="";
window[divId+'samples'+idx] ="";
window[divId+'rbmPanels'+idx] ="";
window[divId+'platforms'+idx] ="";
window[divId+'gpls'+idx] ="";
window[divId+'tissues'+idx] ="";
window[divId+'samplesValues'+idx] ="";
window[divId+'tissuesValues'+idx] ="";
window[divId+'timepointsValues'+idx]="";
}
window[divId+'pathway'] ="";
window[divId+'pathwayName'] ="";
window[divId+'probesAggregation'] ="";
window[divId+'SNPType'] ="";
window[divId+'markerType'] ="";
//invalidate the two global subsets
// GLOBAL.CurrentSubsetIDs[1] =null;
// GLOBAL.CurrentSubsetIDs[2] =null;
GLOBAL.CurrentPathway =null;
GLOBAL.CurrentPathwayName =null;
GLOBAL.HighDimDataType =null;
}
function clearSummaryDisplay(divId){
var domObj = document.getElementById("display"+divId);
if(domObj){
domObj.innerHTML="";
}
}
function multipleSubsets(){
var multipleSubsets=false;
if(Ext.get('multipleSubsets') && (getQuerySummary(2)!="")){
multipleSubsets = (Ext.get('multipleSubsets').dom.value=='true');
}
return multipleSubsets;
}
function toggleDataAssociationFields(extEle){
if((GLOBAL.Analysis=='Advanced')||multipleSubsets()){
//rbm panel, gpl, sample and tissue have display rules based on the selected platform
//Those rules have been applied by now in i2b2common.js->resetCohortInfoValues().
//The display property for those fields is not modified.
document.getElementById("labelsubset1").style.display="";
document.getElementById("labelsubset2").style.display="";
document.getElementById("divplatform2").style.display="";
document.getElementById("divtimepoint2").style.display="";
}else{
document.getElementById("labelsubset1").style.display="none";
document.getElementById("labelsubset2").style.display="none";
document.getElementById("divplatform2").style.display="none";
document.getElementById("divrbmpanel2").style.display="none";
document.getElementById("divgpl2").style.display="none";
document.getElementById("divsample2").style.display="none";
document.getElementById("divtissue2").style.display="none";
document.getElementById("divtimepoint2").style.display="none";
}
// toggle display of Probes aggregation checkbox
if (document.getElementById("divProbesAggregation") != null) {
document.getElementById("divProbesAggregation").style.display="none";
if(isProbesAggregationSupported()){
document.getElementById("divProbesAggregation").style.display="";
document.getElementById("divProbesAggregation").checked=false
}
}
//toggle display of SNP type dropdown
if (document.getElementById("divSNPType") != null) {
if (GLOBAL.Analysis == 'Advanced') {
document.getElementById("divSNPType").style.display = "none";
} else if (GLOBAL.Analysis == "dataAssociation") {
if (GLOBAL.HighDimDataType == HIGH_DIMENSIONAL_DATA["snp"].type)
document.getElementById("divSNPType").style.display = "";
else
document.getElementById("divSNPType").style.display = "none";
}
}
//display the appropriate submit button
if(GLOBAL.Analysis=="dataAssociation"){
document.getElementById("compareStepPathwaySelectionOKButton").style.display="none";
document.getElementById("dataAssociationApplyButton").style.display="";
}else if(GLOBAL.Analysis=='Advanced'){
document.getElementById("compareStepPathwaySelectionOKButton").style.display="";
document.getElementById("dataAssociationApplyButton").style.display="none";
}
}
function isProbesAggregationSupported(){
var probesAggregationSupported = false;
//The checkbox is displayd only for the dataAssociation tab.
if(GLOBAL.Analysis=="dataAssociation"){
var highDimDataTypeSupported=false;
if(["Gene Expression", "SNP"].indexOf(GLOBAL.HighDimDataType)>-1){
highDimDataTypeSupported=true;
}
var analysisSupported=true;
var currentAnalysis=(Ext.get("analysis")).dom.value;
if(["markerSelection", "pca"].indexOf(currentAnalysis)>-1){
analysisSupported=false;
}
if(highDimDataTypeSupported && analysisSupported){
probesAggregationSupported=true;
}
}
return probesAggregationSupported;
}
function loadHighDimensionalParameters(formParams)
{
//These will tell tranSMART what data types we need to retrieve.
var mrnaData = false
var snpData = false
//Gene expression filters.
var fullGEXSampleType = "";
var fullGEXTissueType = "";
var fullGEXTime = "";
var fullGEXGeneList = "";
var fullGEXGPL = "";
//SNP Filters.
var fullSNPSampleType = "";
var fullSNPTissueType = "";
var fullSNPTime = "";
var fullSNPGeneList = "";
var fullSNPGPL = "";
//Pull the individual filters from the window object.
var independentGeneList = window['divIndependentVariablepathway'];
var dependentGeneList = window['divDependentVariablepathway'];
var dependentPlatform = window['divDependentVariableplatforms1'];
var independentPlatform = window['divIndependentVariableplatforms1'];
var dependentType = window['divDependentVariablemarkerType'];
var independentType = window['divIndependentVariablemarkerType'];
var dependentTime = window['divDependentVariabletimepointsValues'];
var independentTime = window['divIndependentVariabletimepointsValues'];
var dependentSample = window['divDependentVariablesamplesValues'];
var independentSample = window['divIndependentVariablesamplesValues'];
var dependentTissue = window['divDependentVariabletissuesValues'];
var independentTissue = window['divIndependentVariabletissuesValues'];
var dependentGPL = window['divDependentVariablegplValues'];
var independentGPL = window['divIndependentVariablegplValues'];
if(dependentGPL) dependentGPL = dependentGPL[0];
if(independentGPL) independentGPL = independentGPL[0];
//If we are using High Dimensional data we need to create variables that represent genes from both independent and dependent selections (In the event they are both of a single high dimensional type).
//Check to see if the user selected GEX in the independent input.
if(independentType == "Gene Expression")
{
//Put the independent filters in the GEX variables.
fullGEXGeneList = String(independentGeneList);
fullGEXSampleType = String(independentSample);
fullGEXTissueType = String(independentTissue);
fullGEXTime = String(independentTime);
fullGEXGPL = String(independentGPL);
//This flag will tell us to write the GEX text file.
mrnaData = true;
//Fix the platform to be something the R script expects.
independentType = "MRNA";
}
if(dependentType == "Gene Expression")
{
//If the gene list already has items, add a comma.
if(fullGEXGeneList != "") fullGEXGeneList += ","
if(fullGEXSampleType != "") fullGEXSampleType += ","
if(fullGEXTissueType != "") fullGEXTissueType += ","
if(fullGEXTime != "") fullGEXTime += ","
if(fullGEXGPL != "") fullGEXGPL += ","
//Add the genes in the list to the full list of GEX genes.
fullGEXGeneList += String(dependentGeneList);
fullGEXSampleType += String(dependentSample);
fullGEXTissueType += String(dependentTissue);
fullGEXTime += String(dependentTime);
fullGEXGPL += String(dependentGPL);
//This flag will tell us to write the GEX text file.
mrnaData = true;
//Fix the platform to be something the R script expects.
dependentType = "MRNA";
}
//Check to see if the user selected SNP in the independent input.
if(independentType == "SNP")
{
//The genes entered into the search box were SNP genes.
fullSNPGeneList = String(independentGeneList);
fullSNPSampleType = String(independentSample);
fullSNPTissueType = String(independentTissue);
fullSNPTime = String(independentTime);
fullSNPGPL = String(independentGPL);
//This flag will tell us to write the SNP text file.
snpData = true;
}
if(dependentType == "SNP")
{
//If the gene list already has items, add a comma.
if(fullSNPGeneList != "") fullSNPGeneList += ","
if(fullSNPSampleType != "") fullSNPSampleType += ","
if(fullSNPTissueType != "") fullSNPTissueType += ","
if(fullSNPTime != "") fullSNPTime += ","
if(fullSNPGPL != "") fullSNPGPL += ","
//Add the genes in the list to the full list of SNP genes.
fullSNPGeneList += String(dependentGeneList)
fullSNPSampleType += String(dependentSample);
fullSNPTissueType += String(dependentTissue);
fullSNPTime += String(dependentTime);
fullSNPGPL += dependentGPL;
//This flag will tell us to write the SNP text file.
snpData = true;
}
if((fullGEXGeneList == "") && (independentType == "MRNA" || dependentType == "MRNA"))
{
Ext.Msg.alert("No Genes Selected", "Please specify Genes in the Gene/Pathway Search box.")
return false;
}
if((fullSNPGeneList == "") && (independentType == "SNP" || dependentType == "SNP"))
{
Ext.Msg.alert("No Genes Selected", "Please specify Genes in the Gene/Pathway Search box.")
return false;
}
//If we don't have a platform, fill in Clinical.
if(dependentPlatform == null || dependentPlatform == "") dependentType = "CLINICAL"
if(independentPlatform == null || independentPlatform == "") independentType = "CLINICAL"
formParams["divDependentVariabletimepoints"] = window['divDependentVariabletimepoints1'];
formParams["divDependentVariablesamples"] = window['divDependentVariablesamples1'];
formParams["divDependentVariablerbmPanels"] = window['divDependentVariablerbmPanels1'];
formParams["divDependentVariableplatforms"] = dependentPlatform
formParams["divDependentVariablegpls"] = window['divDependentVariablegplsValue1'];
formParams["divDependentVariabletissues"] = window['divDependentVariabletissues1'];
formParams["divDependentVariableprobesAggregation"] = window['divDependentVariableprobesAggregation'];
formParams["divDependentVariableSNPType"] = window['divDependentVariableSNPType'];
formParams["divDependentVariableType"] = dependentType;
formParams["divDependentVariablePathway"] = dependentGeneList;
formParams["divIndependentVariabletimepoints"] = window['divIndependentVariabletimepoints1'];
formParams["divIndependentVariablesamples"] = window['divIndependentVariablesamples1'];
formParams["divIndependentVariablerbmPanels"] = window['divIndependentVariablerbmPanels1'];
formParams["divIndependentVariableplatforms"] = independentPlatform;
formParams["divIndependentVariablegpls"] = window['divIndependentVariablegplsValue1'];
formParams["divIndependentVariabletissues"] = window['divIndependentVariabletissues1'];
formParams["divIndependentVariableprobesAggregation"] = window['divIndependentVariableprobesAggregation'];
formParams["divIndependentVariableSNPType"] = window['divIndependentVariableSNPType'];
formParams["divIndependentVariableType"] = independentType;
formParams["divIndependentVariablePathway"] = independentGeneList;
formParams["gexpathway"] = fullGEXGeneList;
//formParams["gextime"] = fullGEXTime;
//formParams["gextissue"] = fullGEXTissueType;
//formParams["gexsample"] = fullGEXSampleType;
formParams["snppathway"] = fullSNPGeneList;
//formParams["snptime"] = fullSNPTime;
//formParams["snptissue"] = fullSNPTissueType;
//formParams["snpsample"] = fullSNPSampleType;
formParams["divIndependentPathwayName"] = window['divIndependentVariablepathwayName'];
formParams["divDependentPathwayName"] = window['divDependentVariablepathwayName'];
formParams["mrnaData"] = mrnaData;
formParams["snpData"] = snpData;
formParams["gexgpl"] = fullGEXGPL;
formParams["snpgpl"] = fullSNPGPL;
return true;
}
| thehyve/naa-transmartApp | web-app/js/datasetExplorer/highDimensionData.js | JavaScript | gpl-3.0 | 24,989 |
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
File Name: 15.9.5.13.js
ECMA Section: 15.9.5.13
Description: Date.prototype.getUTCDay
1.Let t be this time value.
2.If t is NaN, return NaN.
3.Return WeekDay(t).
Author: christine@netscape.com
Date: 12 november 1997
*/
var SECTION = "15.9.5.13";
var VERSION = "ECMA_1";
startTest();
var TITLE = "Date.prototype.getUTCDay()";
writeHeaderToLog( SECTION + " "+ TITLE);
addTestCase( TIME_1970 );
test();
function addTestCase( t ) {
var start = TimeFromYear(YearFromTime(t));
var stop = TimeFromYear(YearFromTime(t) + 1);
for (var d = start; d < stop; d += msPerDay)
{
new TestCase( SECTION,
"(new Date("+d+")).getUTCDay()",
WeekDay((d)),
(new Date(d)).getUTCDay() );
}
}
| cstipkovic/spidermonkey-research | js/src/tests/ecma/Date/15.9.5.13-3.js | JavaScript | mpl-2.0 | 1,086 |
// Copyright 2013 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-unicode-regexps
var s = "a".repeat(1E7) + "\u1234";
assertEquals(["\u1234", "\u1234"], /(\u1234)/u.exec(s));
| Jet-Streaming/framework | deps/v8/test/mjsunit/harmony/unicode-regexp-unanchored-advance.js | JavaScript | mpl-2.0 | 298 |
/*
* Copyright 2012 OSBI Ltd
*
* 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.
*/
/**
* Dialog for member selections
*/
var SelectionsModal = Modal.extend({
type: "selections",
paramvalue: null,
buttons: [
{ text: "OK", method: "save" },
{ text: "Open Date Filter", method: "open_date_filter" },
{ text: "Cancel", method: "close" }
],
events: {
'click a': 'call',
'click .search_term' : 'search_members',
'click .clear_search' : 'clear_search',
'change #show_unique': 'show_unique_action',
'change #use_result': 'use_result_action',
'dblclick .selection_options li.option_value label' : 'click_move_selection',
'click li.all_options' : 'click_all_member_selection',
'change #show_totals': 'show_totals_action'
//,'click div.updown_buttons a.form_button': 'updown_selection'
},
show_unique_option: false,
use_result_option: Settings.MEMBERS_FROM_RESULT,
show_totals_option: [],
members_limit: Settings.MEMBERS_LIMIT,
members_search_limit: Settings.MEMBERS_SEARCH_LIMIT,
members_search_server: false,
selection_type: "INCLUSION",
initialize: function(args) {
// Initialize properties
var self = this;
_.extend(this, args);
this.options.title = "<span class='i18n'>Selections for</span> " + this.name;
this.message = "Fetching members...";
this.query = args.workspace.query;
this.selected_members = [];
this.available_members = [];
this.topLevel;
_.bindAll(this, "fetch_members", "populate", "finished", "get_members", "use_result_action", "show_totals_action");
// Determine axis
this.axis = "undefined";
if (args.axis) {
this.axis = args.axis;
if (args.axis == "FILTER") {
this.use_result_option = false;
}
} else {
if (args.target.parents('.fields_list_body').hasClass('rows')) {
this.axis = "ROWS";
}
if (args.target.parents('.fields_list_body').hasClass('columns')) {
this.axis = "COLUMNS";
}
if (args.target.parents('.fields_list_body').hasClass('filter')) {
this.axis = "FILTER";
this.use_result_option = false;
}
}
// Resize when rendered
this.bind('open', this.post_render);
this.render();
$(this.el).parent().find('.ui-dialog-titlebar-close').bind('click',this.finished);
// Fetch available members
this.member = new Member({}, {
cube: args.workspace.selected_cube,
dimension: args.key
});
// Load template
$(this.el).find('.dialog_body')
.html(_.template($("#template-selections").html())(this));
var hName = this.member.hierarchy;
var lName = this.member.level;
var hierarchy = this.workspace.query.helper.getHierarchy(hName);
var level = null;
if (hierarchy && hierarchy.levels.hasOwnProperty(lName)) {
level = hierarchy.levels[lName];
}
if ((this.source === 'DateFilterModal' && (_.has(level, 'selection') && level.selection.members.length === 0)) ||
(this.source === 'DateFilterModal' && (_.size(level) === 1 && _.has(level, 'name')))) {
this.$el.find('.dialog_footer a:nth-child(2)').show();
}
else {
this.$el.find('.dialog_footer a:nth-child(2)').hide();
}
if (Settings.ALLOW_PARAMETERS) {
if (level) {
var pName = level.selection ? level.selection.parameterName : null;
if (pName) {
$(this.el).find('#parameter').val(pName);
if(this.query.helper.model().parameters[pName]!=undefined) {
this.paramvalue = this.query.helper.model().parameters[pName].split(",");
}
}
}
$(this.el).find('.parameter').removeClass('hidden');
}
var showTotalsEl = $(this.el).find('#show_totals');
showTotalsEl.val('');
// fixme: we should check for deepest level here
if (_.size(hierarchy.levels) > 1 && level && level.hasOwnProperty('aggregators') && level.aggregators) {
if (level.aggregators.length > 0) {
this.show_totals_option = level.aggregators;
}
showTotalsEl.removeAttr("disabled");
} else {
showTotalsEl.attr("disabled", true);
this.show_totals_option = [];
}
// showTotalsEl.val(this.show_totals_option);
// showTotalsEl.removeAttr("disabled");
$(this.el).find('#use_result').attr('checked', this.use_result_option);
$(this.el).find('.search_limit').text(this.members_search_limit);
$(this.el).find('.members_limit').text(this.members_limit);
var calcMembers = this.workspace.query.helper.getCalculatedMembers();
if (calcMembers.length > 0) {
this.fetch_calcmembers_levels();
}
else {
this.get_members();
}
},
open_date_filter: function(event) {
event.preventDefault();
// Launch date filter dialog
(new DateFilterModal({
dimension: this.objDateFilter.dimension,
hierarchy: this.objDateFilter.hierarchy,
target: this.target,
name: this.name,
data: this.objDateFilter.data,
analyzerDateFormat: this.objDateFilter.analyzerDateFormat,
dimHier: this.objDateFilter.dimHier,
key: this.key,
workspace: this.workspace
})).open();
this.$el.dialog('destroy').remove();
},
show_totals_action: function(event) {
this.show_totals_option = $(event.target).val();
},
get_members: function() {
var self = this;
var path = "/result/metadata/hierarchies/" + encodeURIComponent(this.member.hierarchy) + "/levels/" + encodeURIComponent(this.member.level);
this.search_path = path;
var message = '<span class="processing_image"> </span> <span class="i18n">' + self.message + '</span> ';
self.workspace.block(message);
/**
* gett isn't a typo, although someone should probably rename that method to avoid confusion.
*/
this.workspace.query.action.gett(path, {
success: this.fetch_members,
error: function() {
self.workspace.unblock();
},
data: {result: this.use_result_option, searchlimit: this.members_limit }});
},
clear_search: function() {
$(this.el).find('.filterbox').val('');
this.available_members = [];
this.get_members();
},
search_members: function() {
var self = this;
var search_term = $(this.el).find('.filterbox').val();
if (!search_term)
return false;
var message = '<span class="processing_image"> </span> <span class="i18n">Searching for members matching:</span> ' + search_term;
self.workspace.block(message);
self.workspace.query.action.gett(self.search_path, {
async: false,
success: function(response, model) {
if (model && model.length > 0) {
self.available_members = model;
}
self.populate();
},
error: function () {
self.workspace.unblock();
},
data: { search: search_term, searchlimit: self.members_search_limit }
});
},
fetch_calcmembers_levels: function() {
var dimHier = this.member.hierarchy.split('].[');
var m4=true;
if(dimHier.length===1){
m4=false;
dimHier = this.member.hierarchy.split('.');
}
if(dimHier.length>1){
var hName = dimHier[1].replace(/[\[\]]/gi, '');
}
var dName = dimHier[0].replace(/[\[\]]/gi, '');
var message = '<span class="processing_image"> </span> <span class="i18n">' + this.message + '</span> ';
this.workspace.block(message);
if(!m4){
if(hName!=undefined) {
hName = dName + "." + hName;
}
else{
hName = dName;
}
}
var level = new Level({}, {
ui: this,
cube: this.workspace.selected_cube,
dimension: dName,
hierarchy: hName
});
level.fetch({
success: this.get_levels
});
},
get_levels: function(model, response) {
if (response && response.length > 0) {
model.ui.topLevel = response[0];
model.ui.get_members();
}
},
get_calcmembers: function() {
var self = this;
var hName = this.member.hierarchy;
var calcMembers = this.workspace.query.helper.getCalculatedMembers();
var arrCalcMembers = [];
if (this.topLevel.name === this.member.level) {
_.filter(calcMembers, function(value) {
if (value.hierarchyName === hName && _.isEmpty(value.parentMember)) {
value.uniqueName = value.hierarchyName + '.[' + value.name + ']';
arrCalcMembers.push(value);
}
});
}
else {
_.filter(calcMembers, function(value) {
if (value.hierarchyName === hName && value.parentMemberLevel === self.member.level) {
value.uniqueName = value.parentMember + '.[' + value.name + ']';
arrCalcMembers.push(value);
}
});
}
return arrCalcMembers;
},
fetch_members: function(model, response) {
var self = this;
if (response && response.length > 0) {
_.each(response, function(f){
var cmem = self.workspace.query.helper.getCalculatedMembers();
var calc = false;
if(cmem && cmem.length>0){
_.each(cmem, function(c){
if(c.uniqueName === f.uniqueName){
calc = true;
}
})
}
self.available_members.push({obj:f, calc:calc});
});
}
this.populate();
},
populate: function(model, response) {
var self = this;
self.workspace.unblock();
this.members_search_server = (this.available_members.length >= this.members_limit || this.available_members.length == 0);
self.show_unique_option = false;
$(this.el).find('.options #show_unique').attr('checked',false);
var calcMembers = this.workspace.query.helper.getCalculatedMembers();
if (calcMembers.length > 0) {
var newCalcMembers = this.get_calcmembers();
var len = newCalcMembers.length;
for (var i = 0; i < len; i++) {
var calc = false;
if(calcMembers && calcMembers.length>0){
_.each(calcMembers, function(c){
if(c.uniqueName === newCalcMembers[i].uniqueName){
calc = true;
}
})
}
this.available_members.push({obj:newCalcMembers[i], calc:calc});
}
}
$(this.el).find('.items_size').text(this.available_members.length);
if (this.members_search_server) {
$(this.el).find('.warning').text("More items available than listed. Pre-Filter on server.");
} else {
$(this.el).find('.warning').text("");
}
var hName = self.member.hierarchy;
var lName = self.member.level;
var hierarchy = self.workspace.query.helper.getHierarchy(hName);
if (hierarchy && hierarchy.levels.hasOwnProperty(lName)) {
this.selected_members = [];
if(hierarchy.levels[lName].selection){
_.each(hierarchy.levels[lName].selection.members, function(f){
var cmem = self.workspace.query.helper.getCalculatedMembers();
var calc = false;
if(cmem && cmem.length > 0){
_.each(cmem, function(c){
if(c.uniqueName === f.uniqueName){
calc = true;
}
});
}
self.selected_members.push({obj: f, calc: calc});
});
}
this.selection_type = hierarchy.levels[lName].selection ? hierarchy.levels[lName].selection.type : "INCLUSION";
}
var used_members = [];
// Populate both boxes
for (var j = 0, len = this.selected_members.length; j < len; j++) {
var member = this.selected_members[j];
used_members.push(member.obj.caption);
}
if ($(this.el).find('.used_selections .selection_options li.option_value' ).length == 0) {
var selectedMembers = $(this.el).find('.used_selections .selection_options');
selectedMembers.empty();
var selectedHtml = _.template($("#template-selections-options").html())({ options: this.selected_members });
$(selectedMembers).html(selectedHtml);
}
// Add the selections totals
var measuresArray = self.workspace.query.model.queryModel.details.measures;
for (var j = 0; j < measuresArray.length; j++) {
$(this.el).find('#div-totals-container').append(_.template($("#template-selections-totals").html())({measure: measuresArray[j]}));
}
$('#per_metrics_totals_checkbox').change(function() {
if($(this).is(":checked")) {
$('.per_metrics_container').show();
$('.all_metrics_container').hide();
} else {
$('.per_metrics_container').hide();
$('.all_metrics_container').show();
}
});
// Filter out used members
this.available_members = _.select(this.available_members, function(o) {
return used_members.indexOf(o.obj ? o.obj.caption : o.caption) === -1;
});
if (this.available_members.length > 0) {
var availableMembersSelect = $(this.el).find('.available_selections .selection_options');
availableMembersSelect.empty();
var selectedHtml = _.template($("#template-selections-options").html())({ options: this.available_members });
$(availableMembersSelect).html(selectedHtml);
}
if ($(self.el).find( ".selection_options.ui-selectable" ).length > 0) {
$(self.el).find( ".selection_options" ).selectable( "destroy" );
}
$(self.el).find( ".selection_options" ).selectable({ distance: 20, filter: "li", stop: function( event, ui ) {
$(self.el).find( ".selection_options li.ui-selected input").each(function(index, element) {
if (element && element.hasAttribute('checked')) {
element.checked = true;
} else {
$(element).attr('checked', true);
}
$(element).parents('.selection_options').find('li.all_options input').prop('checked', true);
});
$(self.el).find( ".selection_options li.ui-selected").removeClass('ui-selected');
}});
$(this.el).find('.filterbox').autocomplete({
minLength: 1, //(self.members_search_server ? 2 : 1),
delay: 200, //(self.members_search_server ? 400 : 300),
appendTo: ".autocomplete",
source: function(request, response ) {
var searchlist = self.available_members;
var search_target = self.show_unique_option == false ? "caption" : "name";
var result = $.map( searchlist, function( item ) {
var st = item.obj;
var obj;
if(st === undefined){
st = item;
obj = st[search_target];
} else{
obj = st.caption;
}
if (obj.toLowerCase().indexOf(request.term.toLowerCase()) > -1) {
var label = self.show_unique_option == false? st.caption : st.uniqueName;
var value = self.show_unique_option == false? st.uniqueName : st.caption;
return {
label: label,
value: value
};
}
});
response(result);
},
select: function(event, ui) {
var value = encodeURIComponent(ui.item.value);
var label = ui.item.label;
var searchVal = self.show_unique_option == false? ui.item.value : ui.item.label;
var cap = self.show_unique_option == false? ui.item.label : ui.item.value;
$(self.el).find('.available_selections .selection_options input[value="' + encodeURIComponent(searchVal) + '"]').parent().remove();
$(self.el).find('.used_selections .selection_options input[value="' + encodeURIComponent(searchVal) + '"]').parent().remove();
var option = '<li class="option_value"><input type="checkbox" class="check_option" value="'
+ encodeURIComponent(searchVal) + '" label="' + encodeURIComponent(cap) + '">' + label + '</input></li>';
$(option).appendTo($(self.el).find('.used_selections .selection_options ul'));
$(self.el).find('.filterbox').val('');
ui.item.value = "";
},
close: function(event, ui) {
//$('#filter_selections').val('');
//$(self.el).find('.filterbox').css({ "text-align" : " left"});
},
open: function( event, ui ) {
//$(self.el).find('.filterbox').css({ "text-align" : " right"});
}
});
$(this.el).find('.filterbox').autocomplete("enable");
if (this.selection_type === "EXCLUSION") {
$(this.el).find('.selection_type_inclusion').prop('checked', false);
$(this.el).find('.selection_type_exclusion').prop('checked', true);
} else {
$(this.el).find('.selection_type_inclusion').prop('checked', true);
$(this.el).find('.selection_type_exclusion').prop('checked', false);
}
// Translate
Saiku.i18n.translate();
// Show dialog
Saiku.ui.unblock();
},
post_render: function(args) {
var left = ($(window).width() - 1000)/2;
var width = $(window).width() < 1040 ? $(window).width() : 1040;
$(args.modal.el).parents('.ui-dialog')
.css({ width: width, left: "inherit", margin:"0", height: 630 })
.offset({ left: left});
$('#filter_selections').attr("disabled", false);
$(this.el).find('a[href=#save]').focus();
$(this.el).find('a[href=#save]').blur();
},
move_selection: function(event) {
event.preventDefault();
var action = $(event.target).attr('id');
var $to = action.indexOf('add') !== -1 ?
$(this.el).find('.used_selections .selection_options ul') :
$(this.el).find('.available_selections .selection_options ul');
var $from = action.indexOf('add') !== -1 ?
$(this.el).find('.available_selections .selection_options ul') :
$(this.el).find('.used_selections .selection_options ul');
var $els = action.indexOf('all') !== -1 ?
$from.find('li.option_value input').parent() : $from.find('li.option_value input:checked').parent();
$els.detach().appendTo($to);
$(this.el).find('.selection_options ul li.option_value input:checked').prop('checked', false);
$(this.el).find('.selection_options li.all_options input').prop('checked', false);
},
updown_selection: function(event) {
event.preventDefault();
return false;
/*
var action = $(event.target).attr('href').replace('#','');
if (typeof action != "undefined") {
if ("up" == action) {
$(this.el).find('.used_selections option:selected').insertBefore( $('.used_selections option:selected:first').prev());
} else if ("down" == action) {
$(this.el).find('.used_selections option:selected').insertAfter( $('.used_selections option:selected:last').next());
}
}
*/
},
click_all_member_selection: function(event, ui) {
var checked = $(event.currentTarget).find('input').is(':checked');
if (!checked) {
$(event.currentTarget).parent().find('li.option_value input').removeAttr('checked');
} else {
$(event.currentTarget).parent().find('li.option_value input').prop('checked', true);
}
},
click_move_selection: function(event, ui) {
event.preventDefault();
var to = ($(event.target).parent().parent().parent().parent().hasClass('used_selections')) ? '.available_selections' : '.used_selections';
$(event.target).parent().appendTo($(this.el).find(to +' .selection_options ul'));
},
show_unique_action: function() {
var self = this;
this.show_unique_option= ! this.show_unique_option;
if(this.show_unique_option === true) {
$(this.el).find('.available_selections, .used_selections').addClass('unique');
$(this.el).find('.available_selections, .used_selections').removeClass('caption');
} else {
$(this.el).find('.available_selections, .used_selections').addClass('caption');
$(this.el).find('.available_selections, .used_selections').removeClass('unique');
}
},
use_result_action: function() {
this.use_result_option = !this.use_result_option;
this.get_members();
},
save: function() {
this.query.updatedSelectionFromModal = true;
var self = this;
// Notify user that updates are in progress
var $loading = $("<div>Saving...</div>");
$(this.el).find('.dialog_body').children().hide();
$(this.el).find('.dialog_body').prepend($loading);
var show_u = this.show_unique_option;
var hName = decodeURIComponent(self.member.hierarchy);
var lName = decodeURIComponent(self.member.level)
var hierarchy = self.workspace.query.helper.getHierarchy(hName);
// Determine updates
var updates = [];
var totalsFunction = this.show_totals_option;
// If no selections are used, add level
if ($(this.el).find('.used_selections input').length === 0) {
// nothing to do - include all members of this level
} else {
self.workspace.query.helper.removeAllLevelCalculatedMember(hName);
// Loop through selections
$(this.el).find('.used_selections .option_value input')
.each(function(i, selection) {
var value = $(selection).val();
if($(selection).hasClass("cmember")){
var caption = $(selection).attr('label');
self.workspace.toolbar.group_parents();
self.workspace.query.helper.includeLevelCalculatedMember(self.axis, hName, lName, decodeURIComponent(value), 0);
updates.push({
uniqueName: decodeURIComponent(value),
caption: decodeURIComponent(caption),
type: "calculatedmember"
});
}
else {
var caption = $(selection).attr('label');
updates.push({
uniqueName: decodeURIComponent(value),
caption: decodeURIComponent(caption)
});
}
});
}
var parameterName = $('#parameter').val();
if (hierarchy && hierarchy.levels.hasOwnProperty(lName)) {
var totalsArray = [];
if($('#per_metrics_totals_checkbox').is(":checked")) {
$('.show_totals_select').each(function() {
totalsArray.push($(this).val());
});
} else {
var measuresArray = self.workspace.query.model.queryModel.details.measures;
for (var j = 0; j < measuresArray.length; j++) {
totalsArray.push($('#all_measures_select').val());
}
}
hierarchy.levels[lName]["aggregators"] = totalsArray;
var selectionType = $(self.el).find('input.selection_type:checked').val();
selectionType = selectionType ? selectionType : "INCLUSION";
hierarchy.levels[lName].selection = { "type": selectionType, "members": updates };
if (Settings.ALLOW_PARAMETERS && parameterName) {
hierarchy.levels[lName].selection["parameterName"] = parameterName;
var parameters = self.workspace.query.helper.model().parameters;
if (!parameters[parameterName]) {
// self.workspace.query.helper.model().parameters[parameterName] = "";
}
}
}
this.finished();
},
finished: function() {
$('#filter_selections').remove();
this.available_members = null;
$(this.el).find('.filterbox').autocomplete('destroy').remove();
$(this.el).dialog('destroy');
$(this.el).remove();
this.query.run();
}
});
| qixiaobo/saiku-self | saiku-ui/js/saiku/views/SelectionsModal.js | JavaScript | apache-2.0 | 27,022 |
//>>built
define("dojox/editor/plugins/nls/latinEntities", { root:
//begin v1.x content
({
/* These are already handled in the default RTE
amp:"ampersand",lt:"less-than sign",
gt:"greater-than sign",
nbsp:"no-break space\nnon-breaking space",
quot:"quote",
*/
iexcl:"inverted exclamation mark",
cent:"cent sign",
pound:"pound sign",
curren:"currency sign",
yen:"yen sign\nyuan sign",
brvbar:"broken bar\nbroken vertical bar",
sect:"section sign",
uml:"diaeresis\nspacing diaeresis",
copy:"copyright sign",
ordf:"feminine ordinal indicator",
laquo:"left-pointing double angle quotation mark\nleft pointing guillemet",
not:"not sign",
shy:"soft hyphen\ndiscretionary hyphen",
reg:"registered sign\nregistered trade mark sign",
macr:"macron\nspacing macron\noverline\nAPL overbar",
deg:"degree sign",
plusmn:"plus-minus sign\nplus-or-minus sign",
sup2:"superscript two\nsuperscript digit two\nsquared",
sup3:"superscript three\nsuperscript digit three\ncubed",
acute:"acute accent\nspacing acute",
micro:"micro sign",
para:"pilcrow sign\nparagraph sign",
middot:"middle dot\nGeorgian comma\nGreek middle dot",
cedil:"cedilla\nspacing cedilla",
sup1:"superscript one\nsuperscript digit one",
ordm:"masculine ordinal indicator",
raquo:"right-pointing double angle quotation mark\nright pointing guillemet",
frac14:"vulgar fraction one quarter\nfraction one quarter",
frac12:"vulgar fraction one half\nfraction one half",
frac34:"vulgar fraction three quarters\nfraction three quarters",
iquest:"inverted question mark\nturned question mark",
Agrave:"Latin capital letter A with grave\nLatin capital letter A grave",
Aacute:"Latin capital letter A with acute",
Acirc:"Latin capital letter A with circumflex",
Atilde:"Latin capital letter A with tilde",
Auml:"Latin capital letter A with diaeresis",
Aring:"Latin capital letter A with ring above\nLatin capital letter A ring",
AElig:"Latin capital letter AE\nLatin capital ligature AE",
Ccedil:"Latin capital letter C with cedilla",
Egrave:"Latin capital letter E with grave",
Eacute:"Latin capital letter E with acute",
Ecirc:"Latin capital letter E with circumflex",
Euml:"Latin capital letter E with diaeresis",
Igrave:"Latin capital letter I with grave",
Iacute:"Latin capital letter I with acute",
Icirc:"Latin capital letter I with circumflex",
Iuml:"Latin capital letter I with diaeresis",
ETH:"Latin capital letter ETH",
Ntilde:"Latin capital letter N with tilde",
Ograve:"Latin capital letter O with grave",
Oacute:"Latin capital letter O with acute",
Ocirc:"Latin capital letter O with circumflex",
Otilde:"Latin capital letter O with tilde",
Ouml:"Latin capital letter O with diaeresis",
times:"multiplication sign",
Oslash:"Latin capital letter O with stroke\nLatin capital letter O slash",
Ugrave:"Latin capital letter U with grave",
Uacute:"Latin capital letter U with acute",
Ucirc:"Latin capital letter U with circumflex",
Uuml:"Latin capital letter U with diaeresis",
Yacute:"Latin capital letter Y with acute",
THORN:"Latin capital letter THORN",
szlig:"Latin small letter sharp s\ness-zed",
agrave:"Latin small letter a with grave\nLatin small letter a grave",
aacute:"Latin small letter a with acute",
acirc:"Latin small letter a with circumflex",
atilde:"Latin small letter a with tilde",
auml:"Latin small letter a with diaeresis",
aring:"Latin small letter a with ring above\nLatin small letter a ring",
aelig:"Latin small letter ae\nLatin small ligature ae",
ccedil:"Latin small letter c with cedilla",
egrave:"Latin small letter e with grave",
eacute:"Latin small letter e with acute",
ecirc:"Latin small letter e with circumflex",
euml:"Latin small letter e with diaeresis",
igrave:"Latin small letter i with grave",
iacute:"Latin small letter i with acute",
icirc:"Latin small letter i with circumflex",
iuml:"Latin small letter i with diaeresis",
eth:"Latin small letter eth",
ntilde:"Latin small letter n with tilde",
ograve:"Latin small letter o with grave",
oacute:"Latin small letter o with acute",
ocirc:"Latin small letter o with circumflex",
otilde:"Latin small letter o with tilde",
ouml:"Latin small letter o with diaeresis",
divide:"division sign",
oslash:"Latin small letter o with stroke\nLatin small letter o slash",
ugrave:"Latin small letter u with grave",
uacute:"Latin small letter u with acute",
ucirc:"Latin small letter u with circumflex",
uuml:"Latin small letter u with diaeresis",
yacute:"Latin small letter y with acute",
thorn:"Latin small letter thorn",
yuml:"Latin small letter y with diaeresis",
// Greek Characters and Symbols
fnof:"Latin small f with hook\nfunction\nflorin",
Alpha:"Greek capital letter alpha",
Beta:"Greek capital letter beta",
Gamma:"Greek capital letter gamma",
Delta:"Greek capital letter delta",
Epsilon:"Greek capital letter epsilon",
Zeta:"Greek capital letter zeta",
Eta:"Greek capital letter eta",
Theta:"Greek capital letter theta",
Iota:"Greek capital letter iota",
Kappa:"Greek capital letter kappa",
Lambda:"Greek capital letter lambda",
Mu:"Greek capital letter mu",
Nu:"Greek capital letter nu",
Xi:"Greek capital letter xi",
Omicron:"Greek capital letter omicron",
Pi:"Greek capital letter pi",
Rho:"Greek capital letter rho",
Sigma:"Greek capital letter sigma",
Tau:"Greek capital letter tau",
Upsilon:"Greek capital letter upsilon",
Phi:"Greek capital letter phi",
Chi:"Greek capital letter chi",
Psi:"Greek capital letter psi",
Omega:"Greek capital letter omega",
alpha:"Greek small letter alpha",
beta:"Greek small letter beta",
gamma:"Greek small letter gamma",
delta:"Greek small letter delta",
epsilon:"Greek small letter epsilon",
zeta:"Greek small letter zeta",
eta:"Greek small letter eta",
theta:"Greek small letter theta",
iota:"Greek small letter iota",
kappa:"Greek small letter kappa",
lambda:"Greek small letter lambda",
mu:"Greek small letter mu",
nu:"Greek small letter nu",
xi:"Greek small letter xi",
omicron:"Greek small letter omicron",
pi:"Greek small letter pi",
rho:"Greek small letter rho",
sigmaf:"Greek small letter final sigma",
sigma:"Greek small letter sigma",
tau:"Greek small letter tau",
upsilon:"Greek small letter upsilon",
phi:"Greek small letter phi",
chi:"Greek small letter chi",
psi:"Greek small letter psi",
omega:"Greek small letter omega",
thetasym:"Greek small letter theta symbol",
upsih:"Greek upsilon with hook symbol",
piv:"Greek pi symbol",
bull:"bullet\nblack small circle",
hellip:"horizontal ellipsis\nthree dot leader",
prime:"prime\nminutes\nfeet",
Prime:"double prime\nseconds\ninches",
oline:"overline\nspacing overscore",
frasl:"fraction slash",
weierp:"script capital P\npower set\nWeierstrass p",
image:"blackletter capital I\nimaginary part",
real:"blackletter capital R\nreal part symbol",
trade:"trade mark sign",
alefsym:"alef symbol\nfirst transfinite cardinal",
larr:"leftwards arrow",
uarr:"upwards arrow",
rarr:"rightwards arrow",
darr:"downwards arrow",
harr:"left right arrow",
crarr:"downwards arrow with corner leftwards\ncarriage return",
lArr:"leftwards double arrow",
uArr:"upwards double arrow",
rArr:"rightwards double arrow",
dArr:"downwards double arrow",
hArr:"left right double arrow",
forall:"for all",
part:"partial differential",
exist:"there exists",
empty:"empty set\nnull set\ndiameter",
nabla:"nabla\nbackward difference",
isin:"element of",
notin:"not an element of",
ni:"contains as member",
prod:"n-ary product\nproduct sign",
sum:"n-ary sumation",
minus:"minus sign",
lowast:"asterisk operator",
radic:"square root\nradical sign",
prop:"proportional to",
infin:"infinity",
ang:"angle",
and:"logical and\nwedge",
or:"logical or\nvee",
cap:"intersection\ncap",
cup:"union\ncup","int":"integral",
there4:"therefore",
sim:"tilde operator\nvaries with\nsimilar to",
cong:"approximately equal to",
asymp:"almost equal to\nasymptotic to",
ne:"not equal to",
equiv:"identical to",
le:"less-than or equal to",
ge:"greater-than or equal to",
sub:"subset of",
sup:"superset of",
nsub:"not a subset of",
sube:"subset of or equal to",
supe:"superset of or equal to",
oplus:"circled plus\ndirect sum",
otimes:"circled times\nvector product",
perp:"up tack\northogonal to\nperpendicular",
sdot:"dot operator",
lceil:"left ceiling\nAPL upstile",
rceil:"right ceiling",
lfloor:"left floor\nAPL downstile",
rfloor:"right floor",
lang:"left-pointing angle bracket",
rang:"right-pointing angle bracket",
loz:"lozenge",
spades:"black spade suit",
clubs:"black club suit\nshamrock",
hearts:"black heart suit\nvalentine",
diams:"black diamond suit",
OElig:"Latin capital ligature OE",
oelig:"Latin small ligature oe",
Scaron:"Latin capital letter S with caron",
scaron:"Latin small letter s with caron",
Yuml:"Latin capital letter Y with diaeresis",
circ:"modifier letter circumflex accent",
tilde:"small tilde",
ensp:"en space",
emsp:"em space",
thinsp:"thin space",
zwnj:"zero width non-joiner",
zwj:"zero width joiner",
lrm:"left-to-right mark",
rlm:"right-to-left mark",
ndash:"en dash",
mdash:"em dash",
lsquo:"left single quotation mark",
rsquo:"right single quotation mark",
sbquo:"single low-9 quotation mark",
ldquo:"left double quotation mark",
rdquo:"right double quotation mark",
bdquo:"double low-9 quotation mark",
dagger:"dagger",
Dagger:"double dagger",
permil:"per mille sign",
lsaquo:"single left-pointing angle quotation mark",
rsaquo:"single right-pointing angle quotation mark",
euro:"euro sign"
})
,
//end v1.x content
"zh": true,
"zh-tw": true,
"tr": true,
"th": true,
"sv": true,
"sl": true,
"sk": true,
"ru": true,
"ro": true,
"pt": true,
"pt-pt": true,
"pl": true,
"nl": true,
"nb": true,
"ko": true,
"kk": true,
"ja": true,
"it": true,
"hu": true,
"hr": true,
"he": true,
"fr": true,
"fi": true,
"es": true,
"el": true,
"de": true,
"da": true,
"cs": true,
"ca": true,
"ar": true
});
| cfxram/grails-dojo | web-app/js/dojo/1.7.2/dojox/editor/plugins/nls/latinEntities.js | JavaScript | apache-2.0 | 9,970 |
var node = S(input, "application/json");
node.lastIndexOf("test"); | camunda/camunda-spin | dataformat-json-jackson/src/test/resources/org/camunda/spin/javascript/nashorn/json/tree/JsonTreeEditListPropertyJavascriptTest.shouldFailReadLastIndexOfNonArray.js | JavaScript | apache-2.0 | 67 |
define([
'text!views/home/home.html'
], function (template) {
var model = kendo.observable({
title: 'Home'
});
var view = new kendo.View(template, { model: model });
return view;
}); | kendo-labs/generator-kendo-ui | app/templates/spa/views/home/home.js | JavaScript | apache-2.0 | 210 |
//>>built
define(
"dojox/editor/plugins/nls/da/TextColor", //begin v1.x content
({
"setButtonText": "Definér",
"cancelButtonText": "Annullér"
})
//end v1.x content
);
| cfxram/grails-dojo | web-app/js/dojo/1.7.2/dojox/editor/plugins/nls/da/TextColor.js | JavaScript | apache-2.0 | 172 |
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 15.2.3.6-3-134
description: >
Object.defineProperty - 'value' property in 'Attributes' is own
accessor property that overrides an inherited data property
(8.10.5 step 5.a)
---*/
var obj = {};
var proto = {
value: "inheritedDataProperty"
};
var ConstructFun = function () { };
ConstructFun.prototype = proto;
var child = new ConstructFun();
Object.defineProperty(child, "value", {
get: function () {
return "ownAccessorProperty";
}
});
Object.defineProperty(obj, "property", child);
assert.sameValue(obj.property, "ownAccessorProperty", 'obj.property');
| m0ppers/arangodb | 3rdParty/V8/V8-5.0.71.39/test/test262/data/test/built-ins/Object/defineProperty/15.2.3.6-3-134.js | JavaScript | apache-2.0 | 844 |
/*
* Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
*/
define([
'jquery',
'underscore',
'co-test-utils',
'co-test-constants'
], function ($, _, cotu, cotc) {
var defaultTestSuiteConfig = {
class: '',
groups: [],
severity: cotc.SEVERITY_LOW
};
var createTestSuiteConfig = function (testClass, groups, severity) {
severity = ifNull(severity, cotc.SEVERITY_LOW);
groups = ifNull(groups, ['all']);
return $.extend({}, defaultTestSuiteConfig, {class: testClass, groups: groups, severity: severity});
};
var createViewTestConfig = function (viewId, testSuiteConfig, mokDataConfig) {
var viewTestConfig = {};
viewTestConfig.viewId = ifNull(viewId, "");
viewTestConfig.testSuites = [];
if (testSuiteConfig != null) {
_.each(testSuiteConfig, function (suiteConfig) {
viewTestConfig.testSuites.push(suiteConfig);
});
}
viewTestConfig.mockDataConfig = ifNull(mokDataConfig, {});
return viewTestConfig;
};
var defaultFakeServerConfig = {
options: {
autoRespondAfter: 100
},
responses: [],
getResponsesConfig: function () {
return [];
}
};
this.getDefaultFakeServerConfig = function () {
return defaultFakeServerConfig;
};
this.createFakeServerResponse = function (respObj) {
var defaultResponse = {
method: 'GET',
url: '/',
statusCode: 200,
headers: {"Content-Type": "application/json"},
body: ''
};
return $.extend({}, defaultResponse, respObj);
}
var defaultPageConfig = {
hashParams: {
p: ''
},
loadTimeout: cotc.PAGE_LOAD_TIMEOUT
};
this.getDefaultPageConfig = function () {
return defaultPageConfig;
}
var defaultPageTestConfig = {
moduleId: 'Set moduleId for your Test in pageTestConfig',
testType: 'Set type of the test',
fakeServer: this.getDefaultFakeServerConfig(),
page: this.getDefaultPageConfig(),
getTestConfig: function () {
return {};
},
testInitFn: function(defObj, event) {
if (defObj) defObj.resolve();
if (event) event.notify();
return;
}
};
this.createPageTestConfig = function (moduleId, testType, fakeServerConfig, pageConfig, getTestConfigCB, testInitFn) {
var pageTestConfig = $.extend(true, {}, defaultPageTestConfig);
if (moduleId != null) {
pageTestConfig.moduleId = moduleId;
}
if (testType != null) {
pageTestConfig.testType = testType;
}
if (fakeServerConfig != null) {
pageTestConfig.fakeServer = $.extend({}, pageTestConfig.fakeServer, fakeServerConfig);
}
if (pageConfig != null) {
pageTestConfig.page = $.extend({}, pageTestConfig.page, pageConfig);
}
if (getTestConfigCB != null) {
pageTestConfig.getTestConfig = getTestConfigCB;
}
if (testInitFn != null) {
pageTestConfig.testInitFn = testInitFn;
}
return pageTestConfig;
};
this.cTest = function (message, callback, severity) {
severity = ifNull(severity, cotc.SEVERITY_LOW);
return {
severity: severity,
test: function () {
return test(message, callback);
},
type: cotc.TYPE_CONTRAIL_TEST
};
};
var testGroup = function (name) {
this.name = ifNull(name, '');
this.type = cotc.TYPE_CONTRAIL_TEST_GROUP; //set constant type.
this.tests = [];
/**
* test is an object of CTest.
* @param test
*/
this.registerTest = function (testObj) {
if (testObj.type == cotc.TYPE_CONTRAIL_TEST) {
this.tests.push(testObj);
} else {
console.log("Test should be object of type CUnit.test");
}
}
this.run = function (severity) {
_.each(this.tests, function (testObj) {
if (severity == cotc.SEVERITY_HIGH) {
if (testObj.severity == cotc.SEVERITY_HIGH) {
testObj.test();
}
} else if (severity == cotc.SEVERITY_MEDIUM) {
if (testObj.severity == cotc.SEVERITY_HIGH || testObj.severity == cotc.SEVERITY_MEDIUM) {
testObj.test();
}
} else if (severity == cotc.SEVERITY_LOW) {
testObj.test();
} else {
}
});
};
};
this.createTestGroup = function (name) {
return new testGroup(name);
};
var testSuite = function (name) {
this.name = ifNull(name, '');
this.groups = [];
this.type = cotc.TYPE_CONTRAIL_TEST_SUITE; //set constant type.
this.createTestGroup = function (name) {
var group = new testGroup(name);
this.groups.push(group);
return group;
};
this.registerGroup = function (group) {
if (group.type == cotc.TYPE_CONTRAIL_TEST_GROUP) {
this.groups.push(group);
} else {
console.log("Group should be object of CUnit.testGroup.")
}
}
this.run = function (groupNames, severity) {
var self = this;
_.each(groupNames, function (groupName) {
if (groupName == 'all') {
//run all the groups.
_.each(self.groups, function (group) {
group.run(severity);
})
} else {
//run only the group that matches name.
_.each(self.groups, function (group) {
if (group.name == groupName) {
group.run(severity);
}
});
}
});
}
}
this.createTestSuite = function (name) {
return new testSuite(name);
}
this.executeCommonTests = function (testConfigObj) {
_.each(testConfigObj, function (testConfig) {
_.each(testConfig.suites, function (suiteConfig) {
suiteConfig.severity = cotc.RUN_SEVERITY;
if (contrail.checkIfExist(suiteConfig.class)) {
var testObj;
if (contrail.checkIfExist(testConfig.viewObj)) {
testObj = testConfig.viewObj;
} else if (contrail.checkIfExist(testConfig.modelObj)) {
testObj = testConfig.modelObj;
} else if (contrail.checkIfExist(testConfig.moduleObj)) {
testObj = testConfig.moduleObj;
} else {
console.log("Missing test object. Check your page test config.");
}
suiteConfig.class(testObj, suiteConfig);
}
});
});
};
this.executeUnitTests = function (testConfigObj) {
_.each(testConfigObj, function (testConfig) {
_.each(testConfig.suites, function(suiteConfig) {
if (cotc.RUN_SEVERITY == undefined) {
console.error("check co.test.config and set the run_severity correctly.");
}
suiteConfig.severity = cotc.RUN_SEVERITY;
if (contrail.checkIfExist(suiteConfig.class)) {
suiteConfig.class(testConfig.moduleObj, suiteConfig);
}
});
});
}
/**
* moduleId
* fakeServer.options {}
* fakeServer.responses
* page.hashParams
* page.loadTimeout
* rootView
* testConfig.getTestConfig()
* @param PageTestConfig
*/
this.startTestRunner = function (pageTestConfig) {
var self = this,
fakeServer = null,
fakeServerConfig = ifNull(pageTestConfig.fakeServer, self.getDefaultFakeServerConfig());
module(pageTestConfig.moduleId, {
setup: function () {
fakeServer = cotu.getFakeServer(fakeServerConfig.options);
_.each(fakeServerConfig.responses, function (response) {
fakeServer.respondWith(response.method, response.url, [response.statusCode, response.headers, response.data]);
});
$.ajaxSetup({
cache: true
});
},
teardown: function () {
fakeServer.restore();
delete fakeServer;
}
});
var menuHandlerDoneCB = function () {
asyncTest("Load and Run Test Suite: ", function (assert) {
expect(0);
// commenting out for now. once UT lib update get the async working.
var done = assert.async();
switch (pageTestConfig.testType) {
case cotc.VIEW_TEST:
self.startViewTestRunner(pageTestConfig, fakeServer, assert, done);
break;
case cotc.MODEL_TEST:
self.startModelTestRunner(pageTestConfig, fakeServer, done);
break;
case cotc.UNIT_TEST:
self.startUnitTestRunner(pageTestConfig, done);
break;
case cotc.LIB_API_TEST:
self.startLibTestRunner(pageTestConfig, done);
default:
console.log("Specify test type in your page test config. eg: cotc.VIEW_TEST or cotc.MODEL_TEST");
}
});
};
menuHandlerDoneCB();
};
this.startViewTestRunner = function(viewTestConfig, fakeServer, assert, done) {
if (contrail.checkIfExist(viewTestConfig.page.hashParams)) {
var loadingStartedDefObj = loadFeature(viewTestConfig.page.hashParams);
loadingStartedDefObj.done(function () {
//additional fake server response setup
var responses = viewTestConfig.fakeServer.getResponsesConfig();
_.each(responses, function (response) {
fakeServer.respondWith(response.method, response.url, [response.statusCode, response.headers, response.body]);
});
var pageLoadTimeOut = viewTestConfig.page.loadTimeout,
pageLoadSetTimeoutId, pageLoadStart = new Date();
//Safety timeout until the root view is created. will be fixed in next release.
setTimeout(function () {
var testConfig = viewTestConfig.getTestConfig(),
testInitDefObj = $.Deferred(),
testStarted = false, testStartTime,
qunitStarted = false, qunitStartTime;
console.log("Configured Page Load Timeout (Max): " + pageLoadTimeOut / 1000 + "s");
console.log("Page Load Started: " + pageLoadStart.toString());
//start timer and make sure the startTest is invoked before pageLoadTimeOut.
//This is the max time page should wait for loading. Exit.
clearTimeout(pageLoadSetTimeoutId);
pageLoadSetTimeoutId = window.setTimeout(function () {
if (!testStarted && !qunitStarted) {
testConfig.rootView.onAllViewsRenderComplete.unsubscribe(startTest);
testConfig.rootView.onAllViewsRenderComplete.unsubscribe(initQUnit);
assert.ok(false, "Page should load completely within configured page load timeout");
if (done) done();
}
}, pageLoadTimeOut);
/**
* Run this once testInitFn is executed and onAllViewsRenderComplete is notified.
* before starting QUnit, wait for the promise passed in the testInitFn to be resolved.
* waiting on promise adds additional control on test start if there is more user actions
* needs to be done. (even after the all views render is complete.)
*/
function initQUnit() {
testConfig.rootView.onAllViewsRenderComplete.unsubscribe(initQUnit);
/**
* function to start the QUnit execution.
* This will be invoked once the page loading is complete and test initialization is complete.
*/
function startQUnit() {
qunitStarted = true;
qunitStartTime = new Date();
console.log("Starting QUnit: " + qunitStartTime.toString());
console.log("Time taken to completely load the page: " +
((qunitStartTime.getTime() - pageLoadStart.getTime()) / 1000).toFixed(2) + "s");
if (pageLoadSetTimeoutId) {
window.clearTimeout(pageLoadSetTimeoutId);
pageLoadSetTimeoutId = undefined;
}
var mockDataDefObj = $.Deferred();
cotu.setViewObjAndViewConfig4All(testConfig.rootView, testConfig.tests);
//create and update mock data in test config
cotu.createMockData(testConfig.rootView, testConfig.tests, mockDataDefObj);
$.when(mockDataDefObj).done(function () {
self.executeCommonTests(testConfig.tests);
QUnit.start();
if (done) done();
//uncomment following line to console all the fake server request/responses
//console.log(fakeServer.requests);
});
}
if (testInitDefObj.state() == 'resolved') {
startQUnit();
} else {
$.when(testInitDefObj).done(startQUnit);
}
}
/**
* function to start the Test.
* invoked once the page load is complete. Test initialization can also trigger more loading.
* call initQUnit once render complete.
*/
function startTest() {
testStarted = true;
testStartTime = new Date();
console.log("Starting Test Execution: " + testStartTime.toString());
//Remove the startTest from firing again on views renderComplete.
testConfig.rootView.onAllViewsRenderComplete.unsubscribe(startTest);
/**
* testInitFn can have async calls and multiple view rendering.
* For pages that implement testInitFn; and all the views are already rendered,
* manually call the notify on the onAllViewsRenderComplete event.
* testInitDefObj promise should be resolved inside the testInitFn once the user actions are done.
* subscribe to onAllViewsRenderComplete to start the QUnit init steps.
*/
testConfig.rootView.onAllViewsRenderComplete.subscribe(initQUnit);
console.log("Starting Test Page init actions (User): " + new Date().toString());
viewTestConfig.testInitFn(testInitDefObj, testConfig.rootView.onAllViewsRenderComplete);
}
//Initial Page loading.
//Check if render is active or any active ajax request. Subscribe to onAllViewsRenderComplete
testConfig.rootView.onAllViewsRenderComplete.subscribe(startTest);
}, 100);
});
} else {
console.log("Requires hash params to load the test page. Update your page test config.");
}
};
this.startModelTestRunner = function(pageTestConfig, fakeServer, done) {
//additional fake server response setup
var responses = pageTestConfig.fakeServer.getResponsesConfig();
_.each(responses, function (response) {
fakeServer.respondWith(response.method, response.url, [response.statusCode, response.headers, response.body]);
});
//TODO Remove the page timeout usage
var pageLoadTimeOut = pageTestConfig.page.loadTimeout;
setTimeout(function () {
var modelTestConfig = pageTestConfig.getTestConfig();
var modelObjDefObj = $.Deferred();
cotu.setModelObj4All(modelTestConfig, modelObjDefObj);
$.when(modelObjDefObj).done(function() {
pageTestConfig.testInitFn();
self.executeCommonTests(modelTestConfig.tests);
QUnit.start();
if (done) done();
});
}, pageLoadTimeOut);
};
this.startUnitTestRunner = function(pageTestConfig, done) {
var self = this,
moduleDefObj = $.Deferred(),
testInitDefObj = $.Deferred(),
unitTestConfig = pageTestConfig.getTestConfig();
module(ifNull(pageTestConfig.moduleId, "Unit Test Module"));
if (contrail.checkIfExist(pageTestConfig.testInitFn)) {
pageTestConfig.testInitFn(testInitDefObj);
} else {
testInitDefObj.resolve();
}
$.when(testInitDefObj).done(function() {
cotu.setModuleObj4All(unitTestConfig, moduleDefObj);
$.when(moduleDefObj).done(function() {
expect(0);
self.executeUnitTests(unitTestConfig.tests);
QUnit.start();
if (done) done();
});
});
};
this.startLibTestRunner = function(libTestConfig, done) {
var self = this;
var testInitDefObj = $.Deferred();
module(ifNull(libTestConfig.moduleId, "Library API Test Module"));
asyncTest("Start Library Tests - " + ifNull(libTestConfig.libName, ""), function (assert) {
expect(0);
libTestConfig.testInitFn(testInitDefObj);
var libTests = libTestConfig.getTestConfig();
setTimeout(function() {
self.executeLibTests(libTests);
QUnit.start();
if (done) done();
}, 1000);
});
};
return {
getDefaultFakeServerConfig: getDefaultFakeServerConfig,
createFakeServerResponse: createFakeServerResponse,
getDefaultPageConfig: getDefaultPageConfig,
createTestSuiteConfig: createTestSuiteConfig,
createViewTestConfig: createViewTestConfig,
createPageTestConfig: createPageTestConfig,
executeCommonTests: executeCommonTests,
executeUnitTests: executeUnitTests,
executeLibTests: executeUnitTests,
test: cTest,
createTestGroup: createTestGroup,
createTestSuite: createTestSuite,
startTestRunner: startTestRunner,
startViewTestRunner: startViewTestRunner,
startModelTestRunner: startModelTestRunner,
startLibTestRunner: startLibTestRunner,
startUnitTestRunner: startUnitTestRunner
};
});
| nagakiran/contrail-web-core | webroot/test/ui/js/co.test.runner.js | JavaScript | apache-2.0 | 20,104 |
define(
({
viewer: {
loading: {
step1: "CARGANDO APLICACIÓN",
step2: "CARGANDO DATOS",
step3: "INICIALIZANDO",
fail: "La carga de la comparativa de mapas ha fallado",
loadBuilder: "CAMBIANDO A MODO DE BUILDER",
redirectSignIn: "REDIRIGIENDO A LA PÁGINA DE INICIO DE SESIÓN",
redirectSignIn2: "(se te redirigirá aquí después del inicio de sesión)",
failButton: "Reintentar"
},
errors: {
boxTitle: "Se ha producido un error",
portalSelf: "Error muy grave: no se ha podido obtener la configuración del portal",
invalidConfig: "Error muy grave: configuración no válida",
invalidConfigNoWebmap: "Error muy grave: configuración no válida (no se ha especificado mapa Web)",
createMap: "No se puede crear el mapa",
invalidApp: "Error muy grave: la aplicación no se puede cargar",
initMobile: "Bienvenido a la aplicación Web para la comparativa. La aplicación no está configurada. El builder interactivo no es compatible con dispositivos móviles.",
noBuilderIE8: "El builder interactivo de comparativas no es compatible con las versiones anteriores a Internet Explorer 9.",
noLayerView: "Bienvenido a la aplicación Web para la comparativa.<br />La aplicación aún no está configurada.",
appSave: "Error al guardar la aplicación web",
mapSave: "Error al guardar el mapa web",
notAuthorized: "No tienes autorización para acceder a esta aplicación",
conflictingProjectionsTitle: "Conflicto de proyecciones",
conflictingProjections: "La comparativa de mapas no admite el uso de dos mapas web con distintas proyecciones. Abre los ajustes y utiliza un mapa web que use la misma proyección que el primer mapa.",
cpButton: "Cerrar"
},
mobileView: {
hideIntro: "OCULTAR INTRODUCCIÓN",
navLeft: "Leyenda",
navMap: "Mapa",
navRight: "Datos"
},
desktopView: {
storymapsText: "Un mapa de historias",
builderButton: "Cambiar a modo de builder",
bitlyTooltip: "Consigue un enlace corto a la aplicación"
}
},
builder: {
builder: {
panelHeader: "CONFIGURACIÓN DE LA APLICACIÓN",
buttonSave: "GUARDAR",
buttonHelp: "Ayuda",
buttonShare: "Compartir",
buttonDiscard: "CANCELAR",
buttonSettings: "Configuración",
buttonView: "Modo Vista",
buttonItem: "Abre el elemento de la aplicación web",
noPendingChange: "Sin cambios pendientes",
unSavedChangeSingular: "1 cambio sin guardar",
unSavedChangePlural: "cambios no guardados",
popoverDiscard: "¿Estás seguro de que deseas descartar los cambios no guardados?",
yes: "Sí",
no: "No",
popoverOpenViewExplain: "Al abrir el visor, perderás los cambios no guardados",
popoverOpenViewOk: "Aceptar",
popoverOpenViewCancel: "Cancelar",
popoverSaveWhenDone: "No olvides guardar los cambios cuando hayas terminado",
closeWithPendingChange: "¿Estás seguro de que deseas confirmar la acción? Tus cambios se perderán.",
gotIt: "Aceptar",
savingApplication: "Guardando la aplicación",
saveSuccess: "La aplicación se ha guardado con éxito",
saveError: "Error al guardar. Inténtalo de nuevo",
saveError2: "Error al guardar a causa de una etiqueta HTML no válida en un nombre o una descripción",
saveError3: "El título no puede estar vacío",
signIn: "Inicia sesión con una cuenta en",
signInTwo: "para guardar la aplicación."
},
header:{
editMe: "¡Modifícame!",
templateTitle: "Establecer título de plantilla",
templateSubtitle: "Establecer subtítulo de plantilla"
},
settings: {
settingsHeader: "Ajustes de la aplicación",
modalCancel: "Cancelar",
modalApply: "Aplicar"
},
settingsColors: {
settingsTabColor: "Tema",
settingsColorExplain: "Elige un tema para la aplicación o define tus propios colores.",
settingsLabelColor: "Colores de fondo del encabezado y el panel lateral"
},
settingsHeader: {
settingsTabLogo: "Encabezado",
settingsLogoExplain: "Personaliza el logotipo del encabezado (el valor máximo es 250 x 50px).",
settingsLogoEsri: "Logotipo de Esri",
settingsLogoNone: "Sin logotipo",
settingsLogoCustom: "Logotipo personalizado",
settingsLogoCustomPlaceholder: "URL de imagen",
settingsLogoCustomTargetPlaceholder: "Enlace click-through",
settingsLogoSocialExplain: "Personaliza el enlace superior derecho del encabezado.",
settingsLogoSocialText: "Texto",
settingsLogoSocialLink: "Vínculo",
settingsLogoSocialDisabled: "El administrador ha deshabilitado esta entidad"
},
settingsExtent: {
settingsTabExtent: "Extensión",
settingsExtentExplain: "Establecer la extensión inicial mediante el mapa interactivo siguiente.",
settingsExtentExplainBottom: "La extensión que definas modificará la extensión inicial del mapa web. Ten en cuenta que si estás llevando a cabo una serie comparativa no se usará esa extensión.",
settingsExtentDateLineError: "La extensión no puede atravesar el meridiano de longitud 180�",
settingsExtentDateLineError2: "Error al calcular la extensión",
settingsExtentDrawBtn: "Dibuja una nueva extensión",
settingsExtentModifyBtn: "Edita la extensión actual",
settingsExtentApplyBtn: "Aplica en el mapa principal",
settingsExtentUseMainMap: "Usa la extensión del mapa principal"
}
},
swipe: {
mobileData: {
noData: "No hay datos para mostrar",
noDataExplain: "Puntea el mapa para seleccionar una entidad y volver aquí",
noDataMap: "No hay datos para este mapa",
noPopup: "No se han encontrado ventanas emergentes para esta entidad"
},
mobileLegend: {
noLegend: "No hay leyenda para mostrar."
},
swipeSidePanel: {
editTooltip: "Establecer la descripción del panel lateral",
editMe: "¡Modifícame!",
legendTitle: "Leyenda"
},
infoWindow: {
noFeature: "No hay datos que mostrar",
noFeatureExplain: "Puntea el mapa para seleccionar una entidad"
},
settingsLayout: {
settingsTabLayout: "Cambiar estilo",
settingsLayoutExplain: "Elige un estilo para la comparativa de mapas.",
settingsLayoutSwipe: "Barra vertical",
settingsLayoutSpyGlass: "Lupa",
settingsLayoutSelected: "Diseño seleccionado",
settingsLayoutSelect: "Selecciona este diseño",
settingsSaveConfirm: "Algunos de tus cambios requieren que guardes y vuelvas a cargar la aplicación"
},
settingsDataModel: {
settingsTabDataModel: "Tipo de comparación",
settingsDataModelExplainSwipe: "¿Qué quieres que comparen los usuarios?",
settingsDataModelExplainSwipe2: "",
settingsDataModelExplainSpyGlass: "Elige la capa o el mapa Web que aparecerá en la lupa.",
settingsDataModelOneMap: "Una capa en un mapa web",
settingsDataModel1Explain: "Selecciona la capa que quieras comparar",
settingsDataModel1Warning: "Si la capa está oculta por capas superiores, la comparativa de mapas no tendrá ningún efecto.",
settingsDataModel1SpyGlassExplain: "Selecciona la capa que aparecerá en la lupa.",
settingsDataModelTwoMaps: "Dos mapas Web",
settingsDataModelLayerIds: "ID de capa de mapa Web",
settingsDataModelSelected: "Tipo seleccionado",
settingsDataModelWebmapSwipeId1: "ID del mapa Web derecho",
settingsDataModelWebmapSwipeId2: "ID del mapa Web izquierdo",
settingsDataModelWebmapGlassId1: "ID del mapa Web principal",
settingsDataModelWebmapGlassId2: "ID del mapa Web de la lupa",
settingsDataModelSelect: "Selecciona este tipo",
settingsDataModel2Explain: "Comparar con otro mapa Web.",
settingsDataModel2SpyGlassExplain: "Deja al descubierto otro mapa Web.",
settingsDataModel2HelpTitle: "¿Cómo puedo encontrar el ID de un mapa Web?",
settingsDataModel2HelpContent: "Copia y pega los dígitos que hay tras el signo \"=\" en la URL del mapa Web",
switchMaps: "Intercambiar mapas",
browseWebMaps: "Examinar mapas web"
},
settingsLegend: {
settingsTabLegend: "Diseño de la aplicación",
settingsLegendExplain: "Selecciona los ajustes de diseño de la aplicación.",
settingsLegendEnable: "Activar leyenda",
settingsDescriptionEnable: "Activar descripción",
settingsBookmarksEnable: "Activar series de comparativas",
settingsPopupDisable: "Habilitar ventana emergente",
settingsLocationSearchEnable: "Habilitar la búsqueda del localizador",
settingsGeolocatorEnable: "Habilitar geolocalizador",
settingsLegendHelpContent: "Utiliza la tabla de contenido del visor de mapas web de ArcGIS.com (ocultar en leyenda) para delimitar el contenido de la leyenda.",
settingsSeriesHelpContent: "Las series comparativas es una opción de navegación por pestañas que guía al usuario a una extensión concreta y muestra un título y un texto descriptivo en el panel lateral. En el momento de la primera activación, los marcadores de mapas web se importarán y usarán para rellenar la barra de series. Si deshabilitas esta opción, la barra de series se desactivará, pero la configuración de las series se conservará para usarse de nuevo.",
settingsSeriesHelpContent2: "Las series de comparativas te permiten crear y editar una selección de ubicaciones junto con títulos y texto. Si tu mapa Web tiene marcadores de posición, se mostrarán. Puedes desactivar las series, pero la configuración se mantendrá para su uso futuro.",
settingsSeriesHelpLink: "Mira un ejemplo de una aplicación con una serie de comparativas aquí",
preview: "Vista previa de la interfaz de usuario",
settingsLocateButtonExplain: "Esta funcionalidad es compatible con la mayoría de dispositivos móviles y navegadores de escritorio (incluido Internet Explorer 9+).",
settingsLocateButton: "Habilitar un botón \'Localizar\' en los navegadores compatibles",
settingsAddressSearch: "Habilitar una herramienta de búsqueda de direcciones"
},
settingsSwipePopup: {
settingsSwipePopup: "Ventana emergente",
settingsSwipePopupExplain: "Personaliza la apariencia de los encabezados emergentes para ayudar al usuario a asociar las ventanas emergentes con las capas de mapas.",
settingsSwipePopupSwipe1: "Mapa izquierdo",
settingsSwipePopupSwipe2: "Mapa derecho",
settingsSwipePopupGlass1: "Mapa principal",
settingsSwipePopupGlass2: "Mapa de la lupa",
settingsSwipePopupTitle: "Título del encabezado",
settingsSwipePopupColor: "Color del encabezado"
},
initPopup: {
initHeader: "Bienvenido al builder de Comparativa/Lupa",
modalNext: "Siguiente",
modalPrev: "Anterior",
modalApply: "Abrir la aplicación"
},
seriesPanel: {
title: "Título",
descr: "Descripción",
discard: "Descartar marcadores",
saveExtent: "Configurar extensión de marcadores",
discardDisabled: "No puedes eliminar ese marcador. Las series comparativas pueden deshabilitarse en la Configuración."
},
helpPopup: {
title: "Ayuda",
close: "Cerrar",
tab1: {
div1: "La plantilla Comparativa/Lupa se ha diseñado para comparar dos mapas web o dos capas de un mismo mapa web en una aplicación web atractiva y fácil de usar que se puede utilizar en cualquier navegador web o dispositivo, incluidos los smartphones y las tablets.",
div2: "Si quieres obtener información adicional sobre la plantilla Comparativa/Lupa, incluidos algunos ejemplos creados por los usuarios, <a href='http://storymaps.arcgis.com/en/app-list/swipe/' target='_blank'> visita el sitio web de Story Maps</a>. También puedes seguirnos en Twitter en <a href='https://twitter.com/EsriStoryMaps' target='_blank'>@EsriStoryMaps</a>.",
div3: "Nos gusta mucho tener noticias tuyas. Tanto si tienes alguna pregunta, si deseas solicitar un nueva característica o si crees que has encontrado un error, visita el <a href='http://links.esri.com/storymaps/forum' target='_blank'>foro de usuarios de Story Maps</a>."
}
},
share: {
firstSaveTitle: "La aplicación se ha guardado correctamente",
firstSaveHeader: "La aplicación se ha guardado en ArcGIS Online. Lee las siguientes respuestas a las preguntas frecuentes.",
firstSaveA1: "Si no estás familiarizado con el uso de ArcGIS Online o necesitas un acceso directo a la interfaz de creación, puedes guardar el siguiente enlace: %LINK1%",
firstSaveA1bis: "También puedes encontrar la aplicación en tu <a href='%LINK2%' target='_blank'>carpeta de contenido de ArcGIS Online</a>.",
firstSaveQ2: "¿Se comparte mi aplicación?",
firstSaveA2: "Actualmente, tu aplicación no se comparte. Para compartirla, usa el botón COMPARTIR.",
shareTitle: "Compartir la aplicación",
sharePrivateHeader: "Tu aplicación no se comparte. ¿Deseas compartirla?",
sharePrivateBtn1: "Compartir públicamente",
sharePrivateBtn2: "Compartir con mi organización",
sharePrivateProgress: "Uso compartido en curso...",
sharePrivateErr: "Error del uso compartido. Inténtalo de nuevo o",
sharePrivateOk: "Uso compartido actualizado correctamente, cargando...",
shareStatus1: "La aplicación no se ha guardado",
shareStatus2: "La aplicación se comparte públicamente",
shareStatus3: "La aplicación se comparte dentro de la organización",
shareStatus4: "La aplicación no se comparte",
sharePreviewAsUser: "Presentación preliminar",
shareHeader1: "Tu aplicación está <strong>disponible públicamente</strong>.",
shareHeader2: "Tu aplicación está disponible para los miembros de tu organización (se requiere inicio de sesión).",
shareLinkHeader: "Comparte la aplicación con tu audiencia",
shareLinkOpen: "ABRIR",
learnMore: "Más información",
shareQ1Opt1: "¿Qué debo hacer para que la aplicación siga siendo privada?",
shareQ1Opt2: "¿Qué debo hacer para que la aplicación siga siendo privada o para compartirla públicamente?",
shareA1: "Usa %SHAREIMG% en <a href='%LINK1%' target='_blank'>la página de elemento de la aplicación</a>. Si también quieres dejar de compartir el mapa web, usa <a href='%LINK2%' target='_blank'>la página de elemento del mapa web</a>.",
shareA1bis: "Si también deseas dejar de compartir el servicio de entidades, utiliza la <a href='%LINK1%' target='_blank'>página de elementos del servicio de entidades</a>.",
shareQ2: "¿Cómo puedo editar la aplicación más adelante?",
shareQ2bis: "¿Cómo regreso a la interfaz de creación?",
shareA2div1: "Guarda y vuelve a usar el siguiente vínculo %LINK1% o utiliza la <a href='%LINK2%' target='_blank'>página de elementos de la aplicación</a>.",
shareA2div2: "Como propietario de la aplicación, cuando inicias sesión en ArcGIS.com, la aplicación incluye un botón para abrir el builder interactivo:",
shareQ3: "¿Dónde se almacenan los datos?",
shareA3: "La configuración de la aplicación se almacena en este elemento de aplicación web</a>.",
shareWarning: "Se ha deshabilitado la opción de compartir %WITH% porque no eres el propietario del <a href='%LINK%' target='_blank'>mapa web</a>.",
shareWarningWith1: "públicamente",
shareWarningWith2: "públicamente y con la organización"
},
directCreation: {
header: "Bienvenido al builder de Comparativa/Lupa",
mapPickHeader: "Para empezar, escribe un Id. de mapa web válido o usa el botón de búsqueda para examinar mapas web.",
launchBuilder: "Iniciar Builder",
chooseWebmapLbl: "Elegir mapa web...",
explain2: "Si vas a crear un mapa de historia de Comparativa o Lupa, usa el botón siguiente para elegir el mapa web de ArcGIS Online que deseas utilizar. Si lo prefieres, puedes pegar el Id. del mapa web en el campo siguiente.",
explain3: "Si deseas usar dos mapas web en tu mapa de historia, se te pedirá el segundo mapa web más adelante cuando elijas esa opción.",
webmapPlaceholder: "Especificar un Id. de mapa web..."
}
},
configure: {
mapdlg:{
items:{
organizationLabel: "Mi organización",
onlineLabel: "ArcGIS Online",
contentLabel: "Mi contenido",
favoritesLabel: "Mis favoritos"
},
title: "Seleccionar mapa web",
searchTitle: "Buscar",
ok: "Aceptar",
cancel: "Cancelar",
placeholder: "Introducir término de búsqueda"
}
}
})
); | mapsdotcom/swipe-map-storytelling-template-js | Swipe/src/resources/nls/es/template.js | JavaScript | apache-2.0 | 16,639 |
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
/* Copyright 2012 Mozilla Foundation
*
* 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.
*/
/* globals Cmd, ColorSpace, Dict, MozBlobBuilder, Name, PDFJS, Ref, URL,
Promise */
'use strict';
var globalScope = (typeof window === 'undefined') ? this : window;
var isWorker = (typeof window === 'undefined');
var FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];
var TextRenderingMode = {
FILL: 0,
STROKE: 1,
FILL_STROKE: 2,
INVISIBLE: 3,
FILL_ADD_TO_PATH: 4,
STROKE_ADD_TO_PATH: 5,
FILL_STROKE_ADD_TO_PATH: 6,
ADD_TO_PATH: 7,
FILL_STROKE_MASK: 3,
ADD_TO_PATH_FLAG: 4
};
var ImageKind = {
GRAYSCALE_1BPP: 1,
RGB_24BPP: 2,
RGBA_32BPP: 3
};
var AnnotationType = {
WIDGET: 1,
TEXT: 2,
LINK: 3
};
var StreamType = {
UNKNOWN: 0,
FLATE: 1,
LZW: 2,
DCT: 3,
JPX: 4,
JBIG: 5,
A85: 6,
AHX: 7,
CCF: 8,
RL: 9
};
var FontType = {
UNKNOWN: 0,
TYPE1: 1,
TYPE1C: 2,
CIDFONTTYPE0: 3,
CIDFONTTYPE0C: 4,
TRUETYPE: 5,
CIDFONTTYPE2: 6,
TYPE3: 7,
OPENTYPE: 8,
TYPE0: 9,
MMTYPE1: 10
};
// The global PDFJS object exposes the API
// In production, it will be declared outside a global wrapper
// In development, it will be declared here
if (!globalScope.PDFJS) {
globalScope.PDFJS = {};
}
globalScope.PDFJS.pdfBug = false;
PDFJS.VERBOSITY_LEVELS = {
errors: 0,
warnings: 1,
infos: 5
};
// All the possible operations for an operator list.
var OPS = PDFJS.OPS = {
// Intentionally start from 1 so it is easy to spot bad operators that will be
// 0's.
dependency: 1,
setLineWidth: 2,
setLineCap: 3,
setLineJoin: 4,
setMiterLimit: 5,
setDash: 6,
setRenderingIntent: 7,
setFlatness: 8,
setGState: 9,
save: 10,
restore: 11,
transform: 12,
moveTo: 13,
lineTo: 14,
curveTo: 15,
curveTo2: 16,
curveTo3: 17,
closePath: 18,
rectangle: 19,
stroke: 20,
closeStroke: 21,
fill: 22,
eoFill: 23,
fillStroke: 24,
eoFillStroke: 25,
closeFillStroke: 26,
closeEOFillStroke: 27,
endPath: 28,
clip: 29,
eoClip: 30,
beginText: 31,
endText: 32,
setCharSpacing: 33,
setWordSpacing: 34,
setHScale: 35,
setLeading: 36,
setFont: 37,
setTextRenderingMode: 38,
setTextRise: 39,
moveText: 40,
setLeadingMoveText: 41,
setTextMatrix: 42,
nextLine: 43,
showText: 44,
showSpacedText: 45,
nextLineShowText: 46,
nextLineSetSpacingShowText: 47,
setCharWidth: 48,
setCharWidthAndBounds: 49,
setStrokeColorSpace: 50,
setFillColorSpace: 51,
setStrokeColor: 52,
setStrokeColorN: 53,
setFillColor: 54,
setFillColorN: 55,
setStrokeGray: 56,
setFillGray: 57,
setStrokeRGBColor: 58,
setFillRGBColor: 59,
setStrokeCMYKColor: 60,
setFillCMYKColor: 61,
shadingFill: 62,
beginInlineImage: 63,
beginImageData: 64,
endInlineImage: 65,
paintXObject: 66,
markPoint: 67,
markPointProps: 68,
beginMarkedContent: 69,
beginMarkedContentProps: 70,
endMarkedContent: 71,
beginCompat: 72,
endCompat: 73,
paintFormXObjectBegin: 74,
paintFormXObjectEnd: 75,
beginGroup: 76,
endGroup: 77,
beginAnnotations: 78,
endAnnotations: 79,
beginAnnotation: 80,
endAnnotation: 81,
paintJpegXObject: 82,
paintImageMaskXObject: 83,
paintImageMaskXObjectGroup: 84,
paintImageXObject: 85,
paintInlineImageXObject: 86,
paintInlineImageXObjectGroup: 87,
paintImageXObjectRepeat: 88,
paintImageMaskXObjectRepeat: 89,
paintSolidColorImageMask: 90,
constructPath: 91
};
// A notice for devs. These are good for things that are helpful to devs, such
// as warning that Workers were disabled, which is important to devs but not
// end users.
function info(msg) {
if (PDFJS.verbosity >= PDFJS.VERBOSITY_LEVELS.infos) {
console.log('Info: ' + msg);
}
}
// Non-fatal warnings.
function warn(msg) {
if (PDFJS.verbosity >= PDFJS.VERBOSITY_LEVELS.warnings) {
console.log('Warning: ' + msg);
}
}
// Fatal errors that should trigger the fallback UI and halt execution by
// throwing an exception.
function error(msg) {
// If multiple arguments were passed, pass them all to the log function.
if (arguments.length > 1) {
var logArguments = ['Error:'];
logArguments.push.apply(logArguments, arguments);
console.log.apply(console, logArguments);
// Join the arguments into a single string for the lines below.
msg = [].join.call(arguments, ' ');
} else {
console.log('Error: ' + msg);
}
console.log(backtrace());
UnsupportedManager.notify(UNSUPPORTED_FEATURES.unknown);
throw new Error(msg);
}
function backtrace() {
try {
throw new Error();
} catch (e) {
return e.stack ? e.stack.split('\n').slice(2).join('\n') : '';
}
}
function assert(cond, msg) {
if (!cond) {
error(msg);
}
}
var UNSUPPORTED_FEATURES = PDFJS.UNSUPPORTED_FEATURES = {
unknown: 'unknown',
forms: 'forms',
javaScript: 'javaScript',
smask: 'smask',
shadingPattern: 'shadingPattern',
font: 'font'
};
var UnsupportedManager = PDFJS.UnsupportedManager =
(function UnsupportedManagerClosure() {
var listeners = [];
return {
listen: function (cb) {
listeners.push(cb);
},
notify: function (featureId) {
warn('Unsupported feature "' + featureId + '"');
for (var i = 0, ii = listeners.length; i < ii; i++) {
listeners[i](featureId);
}
}
};
})();
// Combines two URLs. The baseUrl shall be absolute URL. If the url is an
// absolute URL, it will be returned as is.
function combineUrl(baseUrl, url) {
if (!url) {
return baseUrl;
}
if (/^[a-z][a-z0-9+\-.]*:/i.test(url)) {
return url;
}
var i;
if (url.charAt(0) === '/') {
// absolute path
i = baseUrl.indexOf('://');
if (url.charAt(1) === '/') {
++i;
} else {
i = baseUrl.indexOf('/', i + 3);
}
return baseUrl.substring(0, i) + url;
} else {
// relative path
var pathLength = baseUrl.length;
i = baseUrl.lastIndexOf('#');
pathLength = i >= 0 ? i : pathLength;
i = baseUrl.lastIndexOf('?', pathLength);
pathLength = i >= 0 ? i : pathLength;
var prefixLength = baseUrl.lastIndexOf('/', pathLength);
return baseUrl.substring(0, prefixLength + 1) + url;
}
}
// Validates if URL is safe and allowed, e.g. to avoid XSS.
function isValidUrl(url, allowRelative) {
if (!url) {
return false;
}
// RFC 3986 (http://tools.ietf.org/html/rfc3986#section-3.1)
// scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
var protocol = /^[a-z][a-z0-9+\-.]*(?=:)/i.exec(url);
if (!protocol) {
return allowRelative;
}
protocol = protocol[0].toLowerCase();
switch (protocol) {
case 'http':
case 'https':
case 'ftp':
case 'mailto':
return true;
default:
return false;
}
}
PDFJS.isValidUrl = isValidUrl;
function shadow(obj, prop, value) {
Object.defineProperty(obj, prop, { value: value,
enumerable: true,
configurable: true,
writable: false });
return value;
}
var PasswordResponses = PDFJS.PasswordResponses = {
NEED_PASSWORD: 1,
INCORRECT_PASSWORD: 2
};
var PasswordException = (function PasswordExceptionClosure() {
function PasswordException(msg, code) {
this.name = 'PasswordException';
this.message = msg;
this.code = code;
}
PasswordException.prototype = new Error();
PasswordException.constructor = PasswordException;
return PasswordException;
})();
var UnknownErrorException = (function UnknownErrorExceptionClosure() {
function UnknownErrorException(msg, details) {
this.name = 'UnknownErrorException';
this.message = msg;
this.details = details;
}
UnknownErrorException.prototype = new Error();
UnknownErrorException.constructor = UnknownErrorException;
return UnknownErrorException;
})();
var InvalidPDFException = (function InvalidPDFExceptionClosure() {
function InvalidPDFException(msg) {
this.name = 'InvalidPDFException';
this.message = msg;
}
InvalidPDFException.prototype = new Error();
InvalidPDFException.constructor = InvalidPDFException;
return InvalidPDFException;
})();
var MissingPDFException = (function MissingPDFExceptionClosure() {
function MissingPDFException(msg) {
this.name = 'MissingPDFException';
this.message = msg;
}
MissingPDFException.prototype = new Error();
MissingPDFException.constructor = MissingPDFException;
return MissingPDFException;
})();
var NotImplementedException = (function NotImplementedExceptionClosure() {
function NotImplementedException(msg) {
this.message = msg;
}
NotImplementedException.prototype = new Error();
NotImplementedException.prototype.name = 'NotImplementedException';
NotImplementedException.constructor = NotImplementedException;
return NotImplementedException;
})();
var MissingDataException = (function MissingDataExceptionClosure() {
function MissingDataException(begin, end) {
this.begin = begin;
this.end = end;
this.message = 'Missing data [' + begin + ', ' + end + ')';
}
MissingDataException.prototype = new Error();
MissingDataException.prototype.name = 'MissingDataException';
MissingDataException.constructor = MissingDataException;
return MissingDataException;
})();
var XRefParseException = (function XRefParseExceptionClosure() {
function XRefParseException(msg) {
this.message = msg;
}
XRefParseException.prototype = new Error();
XRefParseException.prototype.name = 'XRefParseException';
XRefParseException.constructor = XRefParseException;
return XRefParseException;
})();
function bytesToString(bytes) {
var length = bytes.length;
var MAX_ARGUMENT_COUNT = 8192;
if (length < MAX_ARGUMENT_COUNT) {
return String.fromCharCode.apply(null, bytes);
}
var strBuf = [];
for (var i = 0; i < length; i += MAX_ARGUMENT_COUNT) {
var chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length);
var chunk = bytes.subarray(i, chunkEnd);
strBuf.push(String.fromCharCode.apply(null, chunk));
}
return strBuf.join('');
}
function stringToBytes(str) {
var length = str.length;
var bytes = new Uint8Array(length);
for (var i = 0; i < length; ++i) {
bytes[i] = str.charCodeAt(i) & 0xFF;
}
return bytes;
}
function string32(value) {
return String.fromCharCode((value >> 24) & 0xff, (value >> 16) & 0xff,
(value >> 8) & 0xff, value & 0xff);
}
function log2(x) {
var n = 1, i = 0;
while (x > n) {
n <<= 1;
i++;
}
return i;
}
function readInt8(data, start) {
return (data[start] << 24) >> 24;
}
function readUint16(data, offset) {
return (data[offset] << 8) | data[offset + 1];
}
function readUint32(data, offset) {
return ((data[offset] << 24) | (data[offset + 1] << 16) |
(data[offset + 2] << 8) | data[offset + 3]) >>> 0;
}
// Lazy test the endianness of the platform
// NOTE: This will be 'true' for simulated TypedArrays
function isLittleEndian() {
var buffer8 = new Uint8Array(2);
buffer8[0] = 1;
var buffer16 = new Uint16Array(buffer8.buffer);
return (buffer16[0] === 1);
}
Object.defineProperty(PDFJS, 'isLittleEndian', {
configurable: true,
get: function PDFJS_isLittleEndian() {
return shadow(PDFJS, 'isLittleEndian', isLittleEndian());
}
});
//#if !(FIREFOX || MOZCENTRAL || B2G || CHROME)
//// Lazy test if the userAgant support CanvasTypedArrays
function hasCanvasTypedArrays() {
var canvas = document.createElement('canvas');
canvas.width = canvas.height = 1;
var ctx = canvas.getContext('2d');
var imageData = ctx.createImageData(1, 1);
return (typeof imageData.data.buffer !== 'undefined');
}
Object.defineProperty(PDFJS, 'hasCanvasTypedArrays', {
configurable: true,
get: function PDFJS_hasCanvasTypedArrays() {
return shadow(PDFJS, 'hasCanvasTypedArrays', hasCanvasTypedArrays());
}
});
var Uint32ArrayView = (function Uint32ArrayViewClosure() {
function Uint32ArrayView(buffer, length) {
this.buffer = buffer;
this.byteLength = buffer.length;
this.length = length === undefined ? (this.byteLength >> 2) : length;
ensureUint32ArrayViewProps(this.length);
}
Uint32ArrayView.prototype = Object.create(null);
var uint32ArrayViewSetters = 0;
function createUint32ArrayProp(index) {
return {
get: function () {
var buffer = this.buffer, offset = index << 2;
return (buffer[offset] | (buffer[offset + 1] << 8) |
(buffer[offset + 2] << 16) | (buffer[offset + 3] << 24)) >>> 0;
},
set: function (value) {
var buffer = this.buffer, offset = index << 2;
buffer[offset] = value & 255;
buffer[offset + 1] = (value >> 8) & 255;
buffer[offset + 2] = (value >> 16) & 255;
buffer[offset + 3] = (value >>> 24) & 255;
}
};
}
function ensureUint32ArrayViewProps(length) {
while (uint32ArrayViewSetters < length) {
Object.defineProperty(Uint32ArrayView.prototype,
uint32ArrayViewSetters,
createUint32ArrayProp(uint32ArrayViewSetters));
uint32ArrayViewSetters++;
}
}
return Uint32ArrayView;
})();
//#else
//PDFJS.hasCanvasTypedArrays = true;
//#endif
var IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];
var Util = PDFJS.Util = (function UtilClosure() {
function Util() {}
var rgbBuf = ['rgb(', 0, ',', 0, ',', 0, ')'];
// makeCssRgb() can be called thousands of times. Using |rgbBuf| avoids
// creating many intermediate strings.
Util.makeCssRgb = function Util_makeCssRgb(rgb) {
rgbBuf[1] = rgb[0];
rgbBuf[3] = rgb[1];
rgbBuf[5] = rgb[2];
return rgbBuf.join('');
};
// Concatenates two transformation matrices together and returns the result.
Util.transform = function Util_transform(m1, m2) {
return [
m1[0] * m2[0] + m1[2] * m2[1],
m1[1] * m2[0] + m1[3] * m2[1],
m1[0] * m2[2] + m1[2] * m2[3],
m1[1] * m2[2] + m1[3] * m2[3],
m1[0] * m2[4] + m1[2] * m2[5] + m1[4],
m1[1] * m2[4] + m1[3] * m2[5] + m1[5]
];
};
// For 2d affine transforms
Util.applyTransform = function Util_applyTransform(p, m) {
var xt = p[0] * m[0] + p[1] * m[2] + m[4];
var yt = p[0] * m[1] + p[1] * m[3] + m[5];
return [xt, yt];
};
Util.applyInverseTransform = function Util_applyInverseTransform(p, m) {
var d = m[0] * m[3] - m[1] * m[2];
var xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d;
var yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d;
return [xt, yt];
};
// Applies the transform to the rectangle and finds the minimum axially
// aligned bounding box.
Util.getAxialAlignedBoundingBox =
function Util_getAxialAlignedBoundingBox(r, m) {
var p1 = Util.applyTransform(r, m);
var p2 = Util.applyTransform(r.slice(2, 4), m);
var p3 = Util.applyTransform([r[0], r[3]], m);
var p4 = Util.applyTransform([r[2], r[1]], m);
return [
Math.min(p1[0], p2[0], p3[0], p4[0]),
Math.min(p1[1], p2[1], p3[1], p4[1]),
Math.max(p1[0], p2[0], p3[0], p4[0]),
Math.max(p1[1], p2[1], p3[1], p4[1])
];
};
Util.inverseTransform = function Util_inverseTransform(m) {
var d = m[0] * m[3] - m[1] * m[2];
return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d,
(m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d];
};
// Apply a generic 3d matrix M on a 3-vector v:
// | a b c | | X |
// | d e f | x | Y |
// | g h i | | Z |
// M is assumed to be serialized as [a,b,c,d,e,f,g,h,i],
// with v as [X,Y,Z]
Util.apply3dTransform = function Util_apply3dTransform(m, v) {
return [
m[0] * v[0] + m[1] * v[1] + m[2] * v[2],
m[3] * v[0] + m[4] * v[1] + m[5] * v[2],
m[6] * v[0] + m[7] * v[1] + m[8] * v[2]
];
};
// This calculation uses Singular Value Decomposition.
// The SVD can be represented with formula A = USV. We are interested in the
// matrix S here because it represents the scale values.
Util.singularValueDecompose2dScale =
function Util_singularValueDecompose2dScale(m) {
var transpose = [m[0], m[2], m[1], m[3]];
// Multiply matrix m with its transpose.
var a = m[0] * transpose[0] + m[1] * transpose[2];
var b = m[0] * transpose[1] + m[1] * transpose[3];
var c = m[2] * transpose[0] + m[3] * transpose[2];
var d = m[2] * transpose[1] + m[3] * transpose[3];
// Solve the second degree polynomial to get roots.
var first = (a + d) / 2;
var second = Math.sqrt((a + d) * (a + d) - 4 * (a * d - c * b)) / 2;
var sx = first + second || 1;
var sy = first - second || 1;
// Scale values are the square roots of the eigenvalues.
return [Math.sqrt(sx), Math.sqrt(sy)];
};
// Normalize rectangle rect=[x1, y1, x2, y2] so that (x1,y1) < (x2,y2)
// For coordinate systems whose origin lies in the bottom-left, this
// means normalization to (BL,TR) ordering. For systems with origin in the
// top-left, this means (TL,BR) ordering.
Util.normalizeRect = function Util_normalizeRect(rect) {
var r = rect.slice(0); // clone rect
if (rect[0] > rect[2]) {
r[0] = rect[2];
r[2] = rect[0];
}
if (rect[1] > rect[3]) {
r[1] = rect[3];
r[3] = rect[1];
}
return r;
};
// Returns a rectangle [x1, y1, x2, y2] corresponding to the
// intersection of rect1 and rect2. If no intersection, returns 'false'
// The rectangle coordinates of rect1, rect2 should be [x1, y1, x2, y2]
Util.intersect = function Util_intersect(rect1, rect2) {
function compare(a, b) {
return a - b;
}
// Order points along the axes
var orderedX = [rect1[0], rect1[2], rect2[0], rect2[2]].sort(compare),
orderedY = [rect1[1], rect1[3], rect2[1], rect2[3]].sort(compare),
result = [];
rect1 = Util.normalizeRect(rect1);
rect2 = Util.normalizeRect(rect2);
// X: first and second points belong to different rectangles?
if ((orderedX[0] === rect1[0] && orderedX[1] === rect2[0]) ||
(orderedX[0] === rect2[0] && orderedX[1] === rect1[0])) {
// Intersection must be between second and third points
result[0] = orderedX[1];
result[2] = orderedX[2];
} else {
return false;
}
// Y: first and second points belong to different rectangles?
if ((orderedY[0] === rect1[1] && orderedY[1] === rect2[1]) ||
(orderedY[0] === rect2[1] && orderedY[1] === rect1[1])) {
// Intersection must be between second and third points
result[1] = orderedY[1];
result[3] = orderedY[2];
} else {
return false;
}
return result;
};
Util.sign = function Util_sign(num) {
return num < 0 ? -1 : 1;
};
Util.appendToArray = function Util_appendToArray(arr1, arr2) {
Array.prototype.push.apply(arr1, arr2);
};
Util.prependToArray = function Util_prependToArray(arr1, arr2) {
Array.prototype.unshift.apply(arr1, arr2);
};
Util.extendObj = function extendObj(obj1, obj2) {
for (var key in obj2) {
obj1[key] = obj2[key];
}
};
Util.getInheritableProperty = function Util_getInheritableProperty(dict,
name) {
while (dict && !dict.has(name)) {
dict = dict.get('Parent');
}
if (!dict) {
return null;
}
return dict.get(name);
};
Util.inherit = function Util_inherit(sub, base, prototype) {
sub.prototype = Object.create(base.prototype);
sub.prototype.constructor = sub;
for (var prop in prototype) {
sub.prototype[prop] = prototype[prop];
}
};
Util.loadScript = function Util_loadScript(src, callback) {
var script = document.createElement('script');
var loaded = false;
script.setAttribute('src', src);
if (callback) {
script.onload = function() {
if (!loaded) {
callback();
}
loaded = true;
};
}
document.getElementsByTagName('head')[0].appendChild(script);
};
return Util;
})();
/**
* PDF page viewport created based on scale, rotation and offset.
* @class
* @alias PDFJS.PageViewport
*/
var PageViewport = PDFJS.PageViewport = (function PageViewportClosure() {
/**
* @constructor
* @private
* @param viewBox {Array} xMin, yMin, xMax and yMax coordinates.
* @param scale {number} scale of the viewport.
* @param rotation {number} rotations of the viewport in degrees.
* @param offsetX {number} offset X
* @param offsetY {number} offset Y
* @param dontFlip {boolean} if true, axis Y will not be flipped.
*/
function PageViewport(viewBox, scale, rotation, offsetX, offsetY, dontFlip) {
this.viewBox = viewBox;
this.scale = scale;
this.rotation = rotation;
this.offsetX = offsetX;
this.offsetY = offsetY;
// creating transform to convert pdf coordinate system to the normal
// canvas like coordinates taking in account scale and rotation
var centerX = (viewBox[2] + viewBox[0]) / 2;
var centerY = (viewBox[3] + viewBox[1]) / 2;
var rotateA, rotateB, rotateC, rotateD;
rotation = rotation % 360;
rotation = rotation < 0 ? rotation + 360 : rotation;
switch (rotation) {
case 180:
rotateA = -1; rotateB = 0; rotateC = 0; rotateD = 1;
break;
case 90:
rotateA = 0; rotateB = 1; rotateC = 1; rotateD = 0;
break;
case 270:
rotateA = 0; rotateB = -1; rotateC = -1; rotateD = 0;
break;
//case 0:
default:
rotateA = 1; rotateB = 0; rotateC = 0; rotateD = -1;
break;
}
if (dontFlip) {
rotateC = -rotateC; rotateD = -rotateD;
}
var offsetCanvasX, offsetCanvasY;
var width, height;
if (rotateA === 0) {
offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX;
offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY;
width = Math.abs(viewBox[3] - viewBox[1]) * scale;
height = Math.abs(viewBox[2] - viewBox[0]) * scale;
} else {
offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX;
offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY;
width = Math.abs(viewBox[2] - viewBox[0]) * scale;
height = Math.abs(viewBox[3] - viewBox[1]) * scale;
}
// creating transform for the following operations:
// translate(-centerX, -centerY), rotate and flip vertically,
// scale, and translate(offsetCanvasX, offsetCanvasY)
this.transform = [
rotateA * scale,
rotateB * scale,
rotateC * scale,
rotateD * scale,
offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY,
offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY
];
this.width = width;
this.height = height;
this.fontScale = scale;
}
PageViewport.prototype = /** @lends PDFJS.PageViewport.prototype */ {
/**
* Clones viewport with additional properties.
* @param args {Object} (optional) If specified, may contain the 'scale' or
* 'rotation' properties to override the corresponding properties in
* the cloned viewport.
* @returns {PDFJS.PageViewport} Cloned viewport.
*/
clone: function PageViewPort_clone(args) {
args = args || {};
var scale = 'scale' in args ? args.scale : this.scale;
var rotation = 'rotation' in args ? args.rotation : this.rotation;
return new PageViewport(this.viewBox.slice(), scale, rotation,
this.offsetX, this.offsetY, args.dontFlip);
},
/**
* Converts PDF point to the viewport coordinates. For examples, useful for
* converting PDF location into canvas pixel coordinates.
* @param x {number} X coordinate.
* @param y {number} Y coordinate.
* @returns {Object} Object that contains 'x' and 'y' properties of the
* point in the viewport coordinate space.
* @see {@link convertToPdfPoint}
* @see {@link convertToViewportRectangle}
*/
convertToViewportPoint: function PageViewport_convertToViewportPoint(x, y) {
return Util.applyTransform([x, y], this.transform);
},
/**
* Converts PDF rectangle to the viewport coordinates.
* @param rect {Array} xMin, yMin, xMax and yMax coordinates.
* @returns {Array} Contains corresponding coordinates of the rectangle
* in the viewport coordinate space.
* @see {@link convertToViewportPoint}
*/
convertToViewportRectangle:
function PageViewport_convertToViewportRectangle(rect) {
var tl = Util.applyTransform([rect[0], rect[1]], this.transform);
var br = Util.applyTransform([rect[2], rect[3]], this.transform);
return [tl[0], tl[1], br[0], br[1]];
},
/**
* Converts viewport coordinates to the PDF location. For examples, useful
* for converting canvas pixel location into PDF one.
* @param x {number} X coordinate.
* @param y {number} Y coordinate.
* @returns {Object} Object that contains 'x' and 'y' properties of the
* point in the PDF coordinate space.
* @see {@link convertToViewportPoint}
*/
convertToPdfPoint: function PageViewport_convertToPdfPoint(x, y) {
return Util.applyInverseTransform([x, y], this.transform);
}
};
return PageViewport;
})();
var PDFStringTranslateTable = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0x2D8, 0x2C7, 0x2C6, 0x2D9, 0x2DD, 0x2DB, 0x2DA, 0x2DC, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014,
0x2013, 0x192, 0x2044, 0x2039, 0x203A, 0x2212, 0x2030, 0x201E, 0x201C,
0x201D, 0x2018, 0x2019, 0x201A, 0x2122, 0xFB01, 0xFB02, 0x141, 0x152, 0x160,
0x178, 0x17D, 0x131, 0x142, 0x153, 0x161, 0x17E, 0, 0x20AC
];
function stringToPDFString(str) {
var i, n = str.length, strBuf = [];
if (str[0] === '\xFE' && str[1] === '\xFF') {
// UTF16BE BOM
for (i = 2; i < n; i += 2) {
strBuf.push(String.fromCharCode(
(str.charCodeAt(i) << 8) | str.charCodeAt(i + 1)));
}
} else {
for (i = 0; i < n; ++i) {
var code = PDFStringTranslateTable[str.charCodeAt(i)];
strBuf.push(code ? String.fromCharCode(code) : str.charAt(i));
}
}
return strBuf.join('');
}
function stringToUTF8String(str) {
return decodeURIComponent(escape(str));
}
function isEmptyObj(obj) {
for (var key in obj) {
return false;
}
return true;
}
function isBool(v) {
return typeof v === 'boolean';
}
function isInt(v) {
return typeof v === 'number' && ((v | 0) === v);
}
function isNum(v) {
return typeof v === 'number';
}
function isString(v) {
return typeof v === 'string';
}
function isNull(v) {
return v === null;
}
function isName(v) {
return v instanceof Name;
}
function isCmd(v, cmd) {
return v instanceof Cmd && (cmd === undefined || v.cmd === cmd);
}
function isDict(v, type) {
if (!(v instanceof Dict)) {
return false;
}
if (!type) {
return true;
}
var dictType = v.get('Type');
return isName(dictType) && dictType.name === type;
}
function isArray(v) {
return v instanceof Array;
}
function isStream(v) {
return typeof v === 'object' && v !== null && v.getBytes !== undefined;
}
function isArrayBuffer(v) {
return typeof v === 'object' && v !== null && v.byteLength !== undefined;
}
function isRef(v) {
return v instanceof Ref;
}
/**
* Promise Capability object.
*
* @typedef {Object} PromiseCapability
* @property {Promise} promise - A promise object.
* @property {function} resolve - Fullfills the promise.
* @property {function} reject - Rejects the promise.
*/
/**
* Creates a promise capability object.
* @alias PDFJS.createPromiseCapability
*
* @return {PromiseCapability} A capability object contains:
* - a Promise, resolve and reject methods.
*/
function createPromiseCapability() {
var capability = {};
capability.promise = new Promise(function (resolve, reject) {
capability.resolve = resolve;
capability.reject = reject;
});
return capability;
}
PDFJS.createPromiseCapability = createPromiseCapability;
/**
* Polyfill for Promises:
* The following promise implementation tries to generally implement the
* Promise/A+ spec. Some notable differences from other promise libaries are:
* - There currently isn't a seperate deferred and promise object.
* - Unhandled rejections eventually show an error if they aren't handled.
*
* Based off of the work in:
* https://bugzilla.mozilla.org/show_bug.cgi?id=810490
*/
(function PromiseClosure() {
if (globalScope.Promise) {
// Promises existing in the DOM/Worker, checking presence of all/resolve
if (typeof globalScope.Promise.all !== 'function') {
globalScope.Promise.all = function (iterable) {
var count = 0, results = [], resolve, reject;
var promise = new globalScope.Promise(function (resolve_, reject_) {
resolve = resolve_;
reject = reject_;
});
iterable.forEach(function (p, i) {
count++;
p.then(function (result) {
results[i] = result;
count--;
if (count === 0) {
resolve(results);
}
}, reject);
});
if (count === 0) {
resolve(results);
}
return promise;
};
}
if (typeof globalScope.Promise.resolve !== 'function') {
globalScope.Promise.resolve = function (value) {
return new globalScope.Promise(function (resolve) { resolve(value); });
};
}
if (typeof globalScope.Promise.reject !== 'function') {
globalScope.Promise.reject = function (reason) {
return new globalScope.Promise(function (resolve, reject) {
reject(reason);
});
};
}
if (typeof globalScope.Promise.prototype.catch !== 'function') {
globalScope.Promise.prototype.catch = function (onReject) {
return globalScope.Promise.prototype.then(undefined, onReject);
};
}
return;
}
//#if !MOZCENTRAL
var STATUS_PENDING = 0;
var STATUS_RESOLVED = 1;
var STATUS_REJECTED = 2;
// In an attempt to avoid silent exceptions, unhandled rejections are
// tracked and if they aren't handled in a certain amount of time an
// error is logged.
var REJECTION_TIMEOUT = 500;
var HandlerManager = {
handlers: [],
running: false,
unhandledRejections: [],
pendingRejectionCheck: false,
scheduleHandlers: function scheduleHandlers(promise) {
if (promise._status === STATUS_PENDING) {
return;
}
this.handlers = this.handlers.concat(promise._handlers);
promise._handlers = [];
if (this.running) {
return;
}
this.running = true;
setTimeout(this.runHandlers.bind(this), 0);
},
runHandlers: function runHandlers() {
var RUN_TIMEOUT = 1; // ms
var timeoutAt = Date.now() + RUN_TIMEOUT;
while (this.handlers.length > 0) {
var handler = this.handlers.shift();
var nextStatus = handler.thisPromise._status;
var nextValue = handler.thisPromise._value;
try {
if (nextStatus === STATUS_RESOLVED) {
if (typeof handler.onResolve === 'function') {
nextValue = handler.onResolve(nextValue);
}
} else if (typeof handler.onReject === 'function') {
nextValue = handler.onReject(nextValue);
nextStatus = STATUS_RESOLVED;
if (handler.thisPromise._unhandledRejection) {
this.removeUnhandeledRejection(handler.thisPromise);
}
}
} catch (ex) {
nextStatus = STATUS_REJECTED;
nextValue = ex;
}
handler.nextPromise._updateStatus(nextStatus, nextValue);
if (Date.now() >= timeoutAt) {
break;
}
}
if (this.handlers.length > 0) {
setTimeout(this.runHandlers.bind(this), 0);
return;
}
this.running = false;
},
addUnhandledRejection: function addUnhandledRejection(promise) {
this.unhandledRejections.push({
promise: promise,
time: Date.now()
});
this.scheduleRejectionCheck();
},
removeUnhandeledRejection: function removeUnhandeledRejection(promise) {
promise._unhandledRejection = false;
for (var i = 0; i < this.unhandledRejections.length; i++) {
if (this.unhandledRejections[i].promise === promise) {
this.unhandledRejections.splice(i);
i--;
}
}
},
scheduleRejectionCheck: function scheduleRejectionCheck() {
if (this.pendingRejectionCheck) {
return;
}
this.pendingRejectionCheck = true;
setTimeout(function rejectionCheck() {
this.pendingRejectionCheck = false;
var now = Date.now();
for (var i = 0; i < this.unhandledRejections.length; i++) {
if (now - this.unhandledRejections[i].time > REJECTION_TIMEOUT) {
var unhandled = this.unhandledRejections[i].promise._value;
var msg = 'Unhandled rejection: ' + unhandled;
if (unhandled.stack) {
msg += '\n' + unhandled.stack;
}
warn(msg);
this.unhandledRejections.splice(i);
i--;
}
}
if (this.unhandledRejections.length) {
this.scheduleRejectionCheck();
}
}.bind(this), REJECTION_TIMEOUT);
}
};
function Promise(resolver) {
this._status = STATUS_PENDING;
this._handlers = [];
try {
resolver.call(this, this._resolve.bind(this), this._reject.bind(this));
} catch (e) {
this._reject(e);
}
}
/**
* Builds a promise that is resolved when all the passed in promises are
* resolved.
* @param {array} array of data and/or promises to wait for.
* @return {Promise} New dependant promise.
*/
Promise.all = function Promise_all(promises) {
var resolveAll, rejectAll;
var deferred = new Promise(function (resolve, reject) {
resolveAll = resolve;
rejectAll = reject;
});
var unresolved = promises.length;
var results = [];
if (unresolved === 0) {
resolveAll(results);
return deferred;
}
function reject(reason) {
if (deferred._status === STATUS_REJECTED) {
return;
}
results = [];
rejectAll(reason);
}
for (var i = 0, ii = promises.length; i < ii; ++i) {
var promise = promises[i];
var resolve = (function(i) {
return function(value) {
if (deferred._status === STATUS_REJECTED) {
return;
}
results[i] = value;
unresolved--;
if (unresolved === 0) {
resolveAll(results);
}
};
})(i);
if (Promise.isPromise(promise)) {
promise.then(resolve, reject);
} else {
resolve(promise);
}
}
return deferred;
};
/**
* Checks if the value is likely a promise (has a 'then' function).
* @return {boolean} true if value is thenable
*/
Promise.isPromise = function Promise_isPromise(value) {
return value && typeof value.then === 'function';
};
/**
* Creates resolved promise
* @param value resolve value
* @returns {Promise}
*/
Promise.resolve = function Promise_resolve(value) {
return new Promise(function (resolve) { resolve(value); });
};
/**
* Creates rejected promise
* @param reason rejection value
* @returns {Promise}
*/
Promise.reject = function Promise_reject(reason) {
return new Promise(function (resolve, reject) { reject(reason); });
};
Promise.prototype = {
_status: null,
_value: null,
_handlers: null,
_unhandledRejection: null,
_updateStatus: function Promise__updateStatus(status, value) {
if (this._status === STATUS_RESOLVED ||
this._status === STATUS_REJECTED) {
return;
}
if (status === STATUS_RESOLVED &&
Promise.isPromise(value)) {
value.then(this._updateStatus.bind(this, STATUS_RESOLVED),
this._updateStatus.bind(this, STATUS_REJECTED));
return;
}
this._status = status;
this._value = value;
if (status === STATUS_REJECTED && this._handlers.length === 0) {
this._unhandledRejection = true;
HandlerManager.addUnhandledRejection(this);
}
HandlerManager.scheduleHandlers(this);
},
_resolve: function Promise_resolve(value) {
this._updateStatus(STATUS_RESOLVED, value);
},
_reject: function Promise_reject(reason) {
this._updateStatus(STATUS_REJECTED, reason);
},
then: function Promise_then(onResolve, onReject) {
var nextPromise = new Promise(function (resolve, reject) {
this.resolve = resolve;
this.reject = reject;
});
this._handlers.push({
thisPromise: this,
onResolve: onResolve,
onReject: onReject,
nextPromise: nextPromise
});
HandlerManager.scheduleHandlers(this);
return nextPromise;
},
catch: function Promise_catch(onReject) {
return this.then(undefined, onReject);
}
};
globalScope.Promise = Promise;
//#else
//throw new Error('DOM Promise is not present');
//#endif
})();
var StatTimer = (function StatTimerClosure() {
function rpad(str, pad, length) {
while (str.length < length) {
str += pad;
}
return str;
}
function StatTimer() {
this.started = {};
this.times = [];
this.enabled = true;
}
StatTimer.prototype = {
time: function StatTimer_time(name) {
if (!this.enabled) {
return;
}
if (name in this.started) {
warn('Timer is already running for ' + name);
}
this.started[name] = Date.now();
},
timeEnd: function StatTimer_timeEnd(name) {
if (!this.enabled) {
return;
}
if (!(name in this.started)) {
warn('Timer has not been started for ' + name);
}
this.times.push({
'name': name,
'start': this.started[name],
'end': Date.now()
});
// Remove timer from started so it can be called again.
delete this.started[name];
},
toString: function StatTimer_toString() {
var i, ii;
var times = this.times;
var out = '';
// Find the longest name for padding purposes.
var longest = 0;
for (i = 0, ii = times.length; i < ii; ++i) {
var name = times[i]['name'];
if (name.length > longest) {
longest = name.length;
}
}
for (i = 0, ii = times.length; i < ii; ++i) {
var span = times[i];
var duration = span.end - span.start;
out += rpad(span['name'], ' ', longest) + ' ' + duration + 'ms\n';
}
return out;
}
};
return StatTimer;
})();
PDFJS.createBlob = function createBlob(data, contentType) {
if (typeof Blob !== 'undefined') {
return new Blob([data], { type: contentType });
}
// Blob builder is deprecated in FF14 and removed in FF18.
var bb = new MozBlobBuilder();
bb.append(data);
return bb.getBlob(contentType);
};
PDFJS.createObjectURL = (function createObjectURLClosure() {
// Blob/createObjectURL is not available, falling back to data schema.
var digits =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
return function createObjectURL(data, contentType) {
if (!PDFJS.disableCreateObjectURL &&
typeof URL !== 'undefined' && URL.createObjectURL) {
var blob = PDFJS.createBlob(data, contentType);
return URL.createObjectURL(blob);
}
var buffer = 'data:' + contentType + ';base64,';
for (var i = 0, ii = data.length; i < ii; i += 3) {
var b1 = data[i] & 0xFF;
var b2 = data[i + 1] & 0xFF;
var b3 = data[i + 2] & 0xFF;
var d1 = b1 >> 2, d2 = ((b1 & 3) << 4) | (b2 >> 4);
var d3 = i + 1 < ii ? ((b2 & 0xF) << 2) | (b3 >> 6) : 64;
var d4 = i + 2 < ii ? (b3 & 0x3F) : 64;
buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4];
}
return buffer;
};
})();
function MessageHandler(name, comObj) {
this.name = name;
this.comObj = comObj;
this.callbackIndex = 1;
this.postMessageTransfers = true;
var callbacksCapabilities = this.callbacksCapabilities = {};
var ah = this.actionHandler = {};
ah['console_log'] = [function ahConsoleLog(data) {
console.log.apply(console, data);
}];
ah['console_error'] = [function ahConsoleError(data) {
console.error.apply(console, data);
}];
ah['_unsupported_feature'] = [function ah_unsupportedFeature(data) {
UnsupportedManager.notify(data);
}];
comObj.onmessage = function messageHandlerComObjOnMessage(event) {
var data = event.data;
if (data.isReply) {
var callbackId = data.callbackId;
if (data.callbackId in callbacksCapabilities) {
var callback = callbacksCapabilities[callbackId];
delete callbacksCapabilities[callbackId];
if ('error' in data) {
callback.reject(data.error);
} else {
callback.resolve(data.data);
}
} else {
error('Cannot resolve callback ' + callbackId);
}
} else if (data.action in ah) {
var action = ah[data.action];
if (data.callbackId) {
Promise.resolve().then(function () {
return action[0].call(action[1], data.data);
}).then(function (result) {
comObj.postMessage({
isReply: true,
callbackId: data.callbackId,
data: result
});
}, function (reason) {
comObj.postMessage({
isReply: true,
callbackId: data.callbackId,
error: reason
});
});
} else {
action[0].call(action[1], data.data);
}
} else {
error('Unknown action from worker: ' + data.action);
}
};
}
MessageHandler.prototype = {
on: function messageHandlerOn(actionName, handler, scope) {
var ah = this.actionHandler;
if (ah[actionName]) {
error('There is already an actionName called "' + actionName + '"');
}
ah[actionName] = [handler, scope];
},
/**
* Sends a message to the comObj to invoke the action with the supplied data.
* @param {String} actionName Action to call.
* @param {JSON} data JSON data to send.
* @param {Array} [transfers] Optional list of transfers/ArrayBuffers
*/
send: function messageHandlerSend(actionName, data, transfers) {
var message = {
action: actionName,
data: data
};
this.postMessage(message, transfers);
},
/**
* Sends a message to the comObj to invoke the action with the supplied data.
* Expects that other side will callback with the response.
* @param {String} actionName Action to call.
* @param {JSON} data JSON data to send.
* @param {Array} [transfers] Optional list of transfers/ArrayBuffers.
* @returns {Promise} Promise to be resolved with response data.
*/
sendWithPromise:
function messageHandlerSendWithPromise(actionName, data, transfers) {
var callbackId = this.callbackIndex++;
var message = {
action: actionName,
data: data,
callbackId: callbackId
};
var capability = createPromiseCapability();
this.callbacksCapabilities[callbackId] = capability;
try {
this.postMessage(message, transfers);
} catch (e) {
capability.reject(e);
}
return capability.promise;
},
/**
* Sends raw message to the comObj.
* @private
* @param message {Object} Raw message.
* @param transfers List of transfers/ArrayBuffers, or undefined.
*/
postMessage: function (message, transfers) {
if (transfers && this.postMessageTransfers) {
this.comObj.postMessage(message, transfers);
} else {
this.comObj.postMessage(message);
}
}
};
function loadJpegStream(id, imageUrl, objs) {
var img = new Image();
img.onload = (function loadJpegStream_onloadClosure() {
objs.resolve(id, img);
});
img.onerror = (function loadJpegStream_onerrorClosure() {
objs.resolve(id, null);
warn('Error during JPEG image loading');
});
img.src = imageUrl;
}
| jpambrun/jpx-medical | util.js | JavaScript | apache-2.0 | 45,189 |
;(function(root) {
/**
* Constructs a new cross storage client given the url to a hub. By default,
* an iframe is created within the document body that points to the url. It
* also accepts an options object, which may include a timeout, frameId, and
* promise. The timeout, in milliseconds, is applied to each request and
* defaults to 5000ms. The options object may also include a frameId,
* identifying an existing frame on which to install its listeners. If the
* promise key is supplied the constructor for a Promise, that Promise library
* will be used instead of the default window.Promise.
*
* @example
* var storage = new CrossStorageClient('https://store.example.com/hub.html');
*
* @example
* var storage = new CrossStorageClient('https://store.example.com/hub.html', {
* timeout: 5000,
* frameId: 'storageFrame'
* });
*
* @constructor
*
* @param {string} url The url to a cross storage hub
* @param {object} [opts] An optional object containing additional options,
* including timeout, frameId, and promise
*
* @property {string} _id A UUID v4 id
* @property {function} _promise The Promise object to use
* @property {string} _frameId The id of the iFrame pointing to the hub url
* @property {string} _origin The hub's origin
* @property {object} _requests Mapping of request ids to callbacks
* @property {bool} _connected Whether or not it has connected
* @property {bool} _closed Whether or not the client has closed
* @property {int} _count Number of requests sent
* @property {function} _listener The listener added to the window
* @property {Window} _hub The hub window
*/
function CrossStorageClient(url, opts) {
opts = opts || {};
this._id = CrossStorageClient._generateUUID();
this._promise = opts.promise || Promise;
this._frameId = opts.frameId || 'CrossStorageClient-' + this._id;
this._origin = CrossStorageClient._getOrigin(url);
this._requests = {};
this._connected = false;
this._closed = false;
this._count = 0;
this._timeout = opts.timeout || 5000;
this._listener = null;
this._installListener();
var frame;
if (opts.frameId) {
frame = document.getElementById(opts.frameId);
}
// If using a passed iframe, poll the hub for a ready message
if (frame) {
this._poll();
}
// Create the frame if not found or specified
frame = frame || this._createFrame(url);
this._hub = frame.contentWindow;
}
/**
* The styles to be applied to the generated iFrame. Defines a set of properties
* that hide the element by positioning it outside of the visible area, and
* by modifying its display.
*
* @member {Object}
*/
CrossStorageClient.frameStyle = {
display: 'none',
position: 'absolute',
top: '-999px',
left: '-999px'
};
/**
* Returns the origin of an url, with cross browser support. Accommodates
* the lack of location.origin in IE, as well as the discrepancies in the
* inclusion of the port when using the default port for a protocol, e.g.
* 443 over https. Defaults to the origin of window.location if passed a
* relative path.
*
* @param {string} url The url to a cross storage hub
* @returns {string} The origin of the url
*/
CrossStorageClient._getOrigin = function(url) {
var uri, protocol, origin;
uri = document.createElement('a');
uri.href = url;
if (!uri.host) {
uri = window.location;
}
if (!uri.protocol || uri.protocol === ':') {
protocol = window.location.protocol;
} else {
protocol = uri.protocol;
}
origin = protocol + '//' + uri.host;
origin = origin.replace(/:80$|:443$/, '');
return origin;
};
/**
* UUID v4 generation, taken from: http://stackoverflow.com/questions/
* 105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
*
* @returns {string} A UUID v4 string
*/
CrossStorageClient._generateUUID = function() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random() * 16|0, v = c == 'x' ? r : (r&0x3|0x8);
return v.toString(16);
});
};
/**
* Returns a promise that is fulfilled when a connection has been established
* with the cross storage hub. Its use is required to avoid sending any
* requests prior to initialization being complete.
*
* @returns {Promise} A promise that is resolved on connect
*/
CrossStorageClient.prototype.onConnect = function() {
var client = this;
if (this._connected) {
return this._promise.resolve();
} else if (this._closed) {
return this._promise.reject(new Error('CrossStorageClient has closed'));
}
// Queue connect requests for client re-use
if (!this._requests.connect) {
this._requests.connect = [];
}
return new this._promise(function(resolve, reject) {
var timeout = setTimeout(function() {
reject(new Error('CrossStorageClient could not connect'));
}, client._timeout);
client._requests.connect.push(function(err) {
clearTimeout(timeout);
if (err) return reject(err);
resolve();
});
});
};
/**
* Sets a key to the specified value, optionally accepting a ttl to passively
* expire the key after a number of milliseconds. Returns a promise that is
* fulfilled on success, or rejected if any errors setting the key occurred,
* or the request timed out.
*
* @param {string} key The key to set
* @param {*} value The value to assign
* @param {int} ttl Time to live in milliseconds
* @returns {Promise} A promise that is settled on hub response or timeout
*/
CrossStorageClient.prototype.set = function(key, value, ttl) {
return this._request('set', {
key: key,
value: value,
ttl: ttl
});
};
/**
* Accepts one or more keys for which to retrieve their values. Returns a
* promise that is settled on hub response or timeout. On success, it is
* fulfilled with the value of the key if only passed a single argument.
* Otherwise it's resolved with an array of values. On failure, it is rejected
* with the corresponding error message.
*
* @param {...string} key The key to retrieve
* @returns {Promise} A promise that is settled on hub response or timeout
*/
CrossStorageClient.prototype.get = function(key) {
var args = Array.prototype.slice.call(arguments);
return this._request('get', {keys: args});
};
/**
* Accepts one or more keys for deletion. Returns a promise that is settled on
* hub response or timeout.
*
* @param {...string} key The key to delete
* @returns {Promise} A promise that is settled on hub response or timeout
*/
CrossStorageClient.prototype.del = function() {
var args = Array.prototype.slice.call(arguments);
return this._request('del', {keys: args});
};
/**
* Returns a promise that, when resolved, indicates that all localStorage
* data has been cleared.
*
* @returns {Promise} A promise that is settled on hub response or timeout
*/
CrossStorageClient.prototype.clear = function() {
return this._request('clear');
};
/**
* Returns a promise that, when resolved, passes an array of all keys
* currently in storage.
*
* @returns {Promise} A promise that is settled on hub response or timeout
*/
CrossStorageClient.prototype.getKeys = function() {
return this._request('getKeys');
};
/**
* Deletes the iframe and sets the connected state to false. The client can
* no longer be used after being invoked.
*/
CrossStorageClient.prototype.close = function() {
var frame = document.getElementById(this._frameId);
if (frame) {
frame.parentNode.removeChild(frame);
}
// Support IE8 with detachEvent
if (window.removeEventListener) {
window.removeEventListener('message', this._listener, false);
} else {
window.detachEvent('onmessage', this._listener);
}
this._connected = false;
this._closed = true;
};
/**
* Installs the necessary listener for the window message event. When a message
* is received, the client's _connected status is changed to true, and the
* onConnect promise is fulfilled. Given a response message, the callback
* corresponding to its request is invoked. If response.error holds a truthy
* value, the promise associated with the original request is rejected with
* the error. Otherwise the promise is fulfilled and passed response.result.
*
* @private
*/
CrossStorageClient.prototype._installListener = function() {
var client = this;
this._listener = function(message) {
var i, error, response;
// Ignore invalid messages, those not from the correct hub, or when
// the client has closed
if (client._closed || !message.data || typeof message.data !== 'string' ||
message.origin !== client._origin) {
return;
}
// LocalStorage isn't available in the hub
if (message.data === 'cross-storage:unavailable') {
if (!client._closed) client.close();
if (!client._requests.connect) return;
error = new Error('Closing client. Could not access localStorage in hub.');
for (i = 0; i < client._requests.connect.length; i++) {
client._requests.connect[i](error);
}
return;
}
// Handle initial connection
if (message.data.indexOf('cross-storage:') !== -1 && !client._connected) {
client._connected = true;
if (!client._requests.connect) return;
for (i = 0; i < client._requests.connect.length; i++) {
client._requests.connect[i](error);
}
delete client._requests.connect;
}
if (message.data === 'cross-storage:ready') return;
// All other messages
try {
response = JSON.parse(message.data);
} catch(e) {
return;
}
if (!response.id) return;
if (client._requests[response.id]) {
client._requests[response.id](response.error, response.result);
}
};
// Support IE8 with attachEvent
if (window.addEventListener) {
window.addEventListener('message', this._listener, false);
} else {
window.attachEvent('onmessage', this._listener);
}
};
/**
* Invoked when a frame id was passed to the client, rather than allowing
* the client to create its own iframe. Polls the hub for a ready event to
* establish a connected state.
*/
CrossStorageClient.prototype._poll = function() {
var client, interval;
client = this;
interval = setInterval(function() {
if (client._connected) return clearInterval(interval);
if (!client._hub) return;
client._hub.postMessage('cross-storage:poll', client._origin);
}, 1000);
};
/**
* Creates a new iFrame containing the hub. Applies the necessary styles to
* hide the element from view, prior to adding it to the document body.
* Returns the created element.
*
* @private
*
* @param {string} url The url to the hub
* returns {HTMLIFrameElement} The iFrame element itself
*/
CrossStorageClient.prototype._createFrame = function(url) {
var frame, key;
frame = window.document.createElement('iframe');
frame.id = this._frameId;
// Style the iframe
for (key in CrossStorageClient.frameStyle) {
if (CrossStorageClient.frameStyle.hasOwnProperty(key)) {
frame.style[key] = CrossStorageClient.frameStyle[key];
}
}
window.document.body.appendChild(frame);
frame.src = url;
return frame;
};
/**
* Sends a message containing the given method and params to the hub. Stores
* a callback in the _requests object for later invocation on message, or
* deletion on timeout. Returns a promise that is settled in either instance.
*
* @private
*
* @param {string} method The method to invoke
* @param {*} params The arguments to pass
* @returns {Promise} A promise that is settled on hub response or timeout
*/
CrossStorageClient.prototype._request = function(method, params) {
var req, client;
if (this._closed) {
return this._promise.reject(new Error('CrossStorageClient has closed'));
}
client = this;
client._count++;
req = {
id: this._id + ':' + client._count,
method: 'cross-storage:' + method,
params: params
};
return new this._promise(function(resolve, reject) {
var timeout, originalToJSON;
// Timeout if a response isn't received after 4s
timeout = setTimeout(function() {
if (!client._requests[req.id]) return;
delete client._requests[req.id];
reject(new Error('Timeout: could not perform ' + req.method));
}, client._timeout);
// Add request callback
client._requests[req.id] = function(err, result) {
clearTimeout(timeout);
if (err) return reject(new Error(err));
resolve(result);
};
// In case we have a broken Array.prototype.toJSON, e.g. because of
// old versions of prototype
if (Array.prototype.toJSON) {
originalToJSON = Array.prototype.toJSON;
Array.prototype.toJSON = null;
}
// Send serialized message
client._hub.postMessage(JSON.stringify(req), client._origin);
// Restore original toJSON
if (originalToJSON) {
Array.prototype.toJSON = originalToJSON;
}
});
};
/**
* Export for various environments.
*/
if (typeof module !== 'undefined' && module.exports) {
module.exports = CrossStorageClient;
} else if (typeof exports !== 'undefined') {
exports.CrossStorageClient = CrossStorageClient;
} else if (typeof define === 'function' && define.amd) {
define('CrossStorageClient', [], function() {
return CrossStorageClient;
});
} else {
root.CrossStorageClient = CrossStorageClient;
}
}(this));
| emiljas/cross-storage | lib/client.js | JavaScript | apache-2.0 | 14,264 |
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
import { Log } from './Log.js';
import { IFrameWindow } from './IFrameWindow.js';
export class IFrameNavigator {
prepare(params) {
let frame = new IFrameWindow(params);
return Promise.resolve(frame);
}
callback(url) {
Log.debug("IFrameNavigator.callback");
try {
IFrameWindow.notifyParent(url);
return Promise.resolve();
}
catch (e) {
return Promise.reject(e);
}
}
}
| IdentityModel/oidc-client-js | src/IFrameNavigator.js | JavaScript | apache-2.0 | 656 |
/**
* Copyright 2013 Google, Inc.
* @fileoverview Calculate SHA1 hash of the given content.
*/
goog.provide("adapt.sha1");
goog.require("adapt.base");
/**
* @param {number} n
* @return {string} big-endian byte sequence
*/
adapt.sha1.encode32 = function(n) {
return String.fromCharCode((n >>> 24)&0xFF, (n >>> 16)&0xFF, (n >>> 8)&0xFF, n&0xFF);
};
/**
* @param {string} bytes big-endian byte sequence
* @return {number}
*/
adapt.sha1.decode32 = function(bytes) {
// Important facts: "".charCodeAt(0) == NaN, NaN & 0xFF == 0
var b0 = bytes.charCodeAt(0) & 0xFF;
var b1 = bytes.charCodeAt(1) & 0xFF;
var b2 = bytes.charCodeAt(2) & 0xFF;
var b3 = bytes.charCodeAt(3) & 0xFF;
return (b0 << 24) | (b1 << 16) | (b2 << 8) | b3;
};
/**
* @param {string} bytes chars with codes 0 - 255 that represent message byte values
* @return {Array.<number>} big-endian uint32 numbers representing sha1 hash
*/
adapt.sha1.bytesToSHA1Int32 = function(bytes) {
var sb = new adapt.base.StringBuffer();
sb.append(bytes);
var appendCount = (55 - bytes.length) & 63;
sb.append('\u0080');
while (appendCount > 0) {
appendCount--;
sb.append('\0');
}
sb.append('\0\0\0\0');
sb.append(adapt.sha1.encode32(bytes.length*8));
bytes = sb.toString();
var h = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0];
var w = /** @type Array.<number> */ ([]);
var i;
for (var bi = 0; bi < bytes.length; bi += 64) {
for (i = 0; i < 16; i++) {
w[i] = adapt.sha1.decode32(bytes.substr(bi + 4*i, 4));
}
for ( ; i < 80; i++) {
var q = w[i-3] ^ w[i-8] ^ w[i-14] ^ w[i-16];
w[i] = (q << 1) | (q >>> 31);
}
var a = h[0];
var b = h[1];
var c = h[2];
var d = h[3];
var e = h[4];
var f;
for (i = 0; i < 80; i++) {
if (i < 20) {
f = ((b & c) | (~b & d)) + 0x5A827999;
} else if (i < 40) {
f = (b ^ c ^ d) + 0x6ED9EBA1;
} else if (i < 60) {
f = ((b & c) | (b & d) | (c & d)) + 0x8F1BBCDC;
} else {
f = (b ^ c ^ d) + 0xCA62C1D6;
}
f += ((a << 5) | (a >>> 27)) + e + w[i];
e = d;
d = c;
c = (b << 30) | (b >>> 2);
b = a;
a = f;
}
h[0] = (h[0] + a) | 0;
h[1] = (h[1] + b) | 0;
h[2] = (h[2] + c) | 0;
h[3] = (h[3] + d) | 0;
h[4] = (h[4] + e) | 0;
}
return h;
};
/**
* @param {string} bytes chars with codes 0 - 255 that represent message byte values
* @return {Array.<number>} uint8 numbers representing sha1 hash
*/
adapt.sha1.bytesToSHA1Int8 = function(bytes) {
var h = adapt.sha1.bytesToSHA1Int32(bytes);
var res = [];
for (var i = 0; i < h.length; i++) {
var n = h[i];
res.push((n >>> 24)&0xFF, (n >>> 16)&0xFF, (n >>> 8)&0xFF, n&0xFF);
}
return res;
};
/**
* @param {string} bytes chars with codes 0 - 255 that represent message byte values
* @return {string} chars with codes 0 - 255 equal to SHA1 hash of the input
*/
adapt.sha1.bytesToSHA1Bytes = function(bytes) {
var h = adapt.sha1.bytesToSHA1Int32(bytes);
var sb = new adapt.base.StringBuffer();
for (var i = 0; i < h.length; i++) {
sb.append(adapt.sha1.encode32(h[i]));
}
return sb.toString();
};
/**
* @param {string} bytes chars with codes 0 - 255 that represent message byte values
* @return {string} hex-encoded SHA1 hash
*/
adapt.sha1.bytesToSHA1Hex = function(bytes) {
var sha1 = adapt.sha1.bytesToSHA1Bytes(bytes);
var sb = new adapt.base.StringBuffer();
for (var i = 0; i < sha1.length; i++) {
sb.append((sha1.charCodeAt(i)|0x100).toString(16).substr(1));
}
return sb.toString();
};
/**
* @param {string} bytes chars with codes 0 - 255 that represent message byte values
* @return {string} base64-encoded SHA1 hash of the input
*/
adapt.sha1.bytesToSHA1Base64 = function(bytes) {
var sha1 = adapt.sha1.bytesToSHA1Bytes(bytes);
var sb = new adapt.base.StringBuffer();
adapt.base.appendBase64(sb, sha1);
return sb.toString();
};
| kuad9/vivliostyle.js_study | src/adapt/sha1.js | JavaScript | apache-2.0 | 4,018 |
(function () {
var ns = $.namespace('pskl.controller.settings');
var settings = {
'user' : {
template : 'templates/settings/preferences.html',
controller : ns.PreferencesController
},
'resize' : {
template : 'templates/settings/resize.html',
controller : ns.resize.ResizeController
},
'export' : {
template : 'templates/settings/export.html',
controller : ns.exportimage.ExportController
},
'import' : {
template : 'templates/settings/import.html',
controller : ns.ImportController
},
'localstorage' : {
template : 'templates/settings/localstorage.html',
controller : ns.LocalStorageController
},
'save' : {
template : 'templates/settings/save.html',
controller : ns.SaveController
}
};
var SEL_SETTING_CLS = 'has-expanded-drawer';
var EXP_DRAWER_CLS = 'expanded';
ns.SettingsController = function (piskelController) {
this.piskelController = piskelController;
this.closeDrawerShortcut = pskl.service.keyboard.Shortcuts.MISC.CLOSE_POPUP;
this.settingsContainer = document.querySelector('[data-pskl-controller=settings]');
this.drawerContainer = document.getElementById('drawer-container');
this.isExpanded = false;
this.currentSetting = null;
};
/**
* @public
*/
ns.SettingsController.prototype.init = function() {
pskl.utils.Event.addEventListener(this.settingsContainer, 'click', this.onSettingsContainerClick_, this);
pskl.utils.Event.addEventListener(document.body, 'click', this.onBodyClick_, this);
$.subscribe(Events.CLOSE_SETTINGS_DRAWER, this.closeDrawer_.bind(this));
};
ns.SettingsController.prototype.onSettingsContainerClick_ = function (evt) {
var setting = pskl.utils.Dom.getData(evt.target, 'setting');
if (!setting) {
return;
}
if (this.currentSetting != setting) {
this.loadSetting_(setting);
} else {
this.closeDrawer_();
}
evt.stopPropagation();
evt.preventDefault();
};
ns.SettingsController.prototype.onBodyClick_ = function (evt) {
var target = evt.target;
var isInDrawerContainer = pskl.utils.Dom.isParent(target, this.drawerContainer);
var isInSettingsIcon = target.dataset.setting;
var isInSettingsContainer = isInDrawerContainer || isInSettingsIcon;
if (this.isExpanded && !isInSettingsContainer) {
this.closeDrawer_();
}
};
ns.SettingsController.prototype.loadSetting_ = function (setting) {
this.drawerContainer.innerHTML = pskl.utils.Template.get(settings[setting].template);
// when switching settings controller, destroy previously loaded controller
this.destroyCurrentController_();
this.currentSetting = setting;
this.currentController = new settings[setting].controller(this.piskelController);
this.currentController.init();
pskl.app.shortcutService.registerShortcut(this.closeDrawerShortcut, this.closeDrawer_.bind(this));
pskl.utils.Dom.removeClass(SEL_SETTING_CLS);
var selectedSettingButton = document.querySelector('[data-setting=' + setting + ']');
if (selectedSettingButton) {
selectedSettingButton.classList.add(SEL_SETTING_CLS);
}
this.settingsContainer.classList.add(EXP_DRAWER_CLS);
this.isExpanded = true;
};
ns.SettingsController.prototype.closeDrawer_ = function () {
pskl.utils.Dom.removeClass(SEL_SETTING_CLS);
this.settingsContainer.classList.remove(EXP_DRAWER_CLS);
this.isExpanded = false;
this.currentSetting = null;
document.activeElement.blur();
this.destroyCurrentController_();
};
ns.SettingsController.prototype.destroyCurrentController_ = function () {
if (this.currentController) {
pskl.app.shortcutService.unregisterShortcut(this.closeDrawerShortcut);
if (this.currentController.destroy) {
this.currentController.destroy();
this.currentController = null;
}
}
};
})();
| piskelapp/piskel | src/js/controller/settings/SettingsController.js | JavaScript | apache-2.0 | 3,958 |
// Copyright 2015-present runtime.js project authors
//
// 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.
'use strict';
class BufferBuilder {
constructor() {
this._p = [];
this._repeatFirst = 0;
this._repeatLast = 0;
this._ck = null;
this._checksumFirst = 0;
this._checksumLast = 0;
this._checksumOffset = 0;
}
uint8(valueOpt) {
const value = (valueOpt >>> 0) & 0xff;
this._p.push(value);
this._repeatFirst = this._p.length - 1;
this._repeatLast = this._p.length;
return this;
}
uint16(valueOpt) {
const value = valueOpt >>> 0;
this.uint8((value >>> 8) & 0xff);
this.uint8(value & 0xff);
this._repeatFirst = this._p.length - 2;
this._repeatLast = this._p.length;
return this;
}
beginChecksum() {
this._checksumFirst = this._p.length;
return this;
}
endChecksum() {
this._checksumLast = this._p.length;
return this;
}
checksum(fn) {
this._checksumOffset = this._p.length;
this._ck = fn;
return this.uint16(0);
}
uint32(valueOpt) {
const value = valueOpt >>> 0;
this.uint8((value >>> 24) & 0xff);
this.uint8((value >>> 16) & 0xff);
this.uint8((value >>> 8) & 0xff);
this.uint8(value & 0xff);
this._repeatFirst = this._p.length - 4;
this._repeatLast = this._p.length;
return this;
}
align(alignment = 0, value = 0) {
while ((this._p.length % alignment) !== 0) {
this.uint8(value);
}
return this;
}
array(u8) {
for (const item of u8) {
this.uint8(item & 0xff);
}
this._repeatFirst = this._p.length - u8.length;
this._repeatLast = this._p.length;
return this;
}
repeat(times = 0) {
for (let t = 0; t < times; ++t) {
for (let i = this._repeatFirst; i < this._repeatLast; ++i) {
this._p.push(this._p[i]);
}
}
return this;
}
buffer() {
const buf = new Uint8Array(this._p);
if (this._ck) {
if (this._checksumLast === 0) {
this._checksumLast = this._p.length;
}
const sub = buf.subarray(this._checksumFirst, this._checksumLast);
const cksum = this._ck(sub);
buf[this._checksumOffset] = (cksum >>> 8) & 0xff;
buf[this._checksumOffset + 1] = cksum & 0xff;
}
return buf;
}
}
module.exports = BufferBuilder;
| SpaceboyRoss01/PeabodyOS | src/system/node_modules/runtimejs/js/test/unit/lib/buffer-builder.js | JavaScript | apache-2.0 | 2,824 |
var b;
b.reduce(function (c, d) {
return c + d;
}, 0); // should not error on '+'
| hippich/typescript | tests/baselines/reference/genericContextualTypingSpecialization.js | JavaScript | apache-2.0 | 90 |
continue;
ONE:
for (var x in {})
continue TWO;
TWO:
for (var x in {}) {
var fn = function () {
continue TWO;
};
}
THREE:
for (var x in {}) {
var fn = function () {
continue THREE;
};
}
for (var x in {}) {
continue FIVE;
FIVE:
for (var x in {}) {
}
}
NINE:
var y = 12;
for (var x in {}) {
continue NINE;
}
| hippich/typescript | tests/baselines/reference/invalidForInContinueStatements.js | JavaScript | apache-2.0 | 400 |
/* 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.
*/
activitiApp.controller('LandingController', ['$scope','$window', '$location', '$http', '$translate', '$modal', 'RuntimeAppDefinitionService', '$rootScope',
function ($scope, $window, $location, $http, $translate, $modal, RuntimeAppDefinitionService, $rootScope) {
$scope.model = {
loading: true
};
$translate('APP.ACTION.DELETE').then(function(message) {
$scope.appActions = [
{
text: message,
click: 'deleteApp(app); '
}
];
});
$scope.loadApps = function() {
$scope.model.customAppsFetched = false;
RuntimeAppDefinitionService.getApplications().then(function(result){
$scope.model.apps = result.defaultApps.concat(result.customApps);
$scope.model.customAppsFetched = true;
$scope.model.customApps = result.customApps.length > 0;
// Determine the full url with a context root (if any)
var baseUrl = $location.absUrl();
var index = baseUrl.indexOf('/#');
if (index >= 0) {
baseUrl = baseUrl.substring(0, index);
}
index = baseUrl.indexOf('?');
if (index >= 0) {
baseUrl = baseUrl.substring(0, index);
}
if (baseUrl[baseUrl.length - 1] == '/') {
baseUrl = baseUrl.substring(0, baseUrl.length - 1);
}
$scope.urls = {
editor: baseUrl + '/editor/',
identity: baseUrl + '/idm/',
workflow: baseUrl + '/workflow/',
analytics: baseUrl + '/analytics/'
};
})
};
$scope.appSelected = function(app) {
if(app.fixedUrl) {
$window.location.href = app.fixedUrl;
}
};
$scope.addAppDefinition = function() {
_internalCreateModal({
template: 'views/modal/add-app-definition-modal.html',
scope: $scope
}, $modal, $scope);
};
$scope.deleteApp = function(app) {
if(app && app.id) {
RuntimeAppDefinitionService.deleteAppDefinition(app.id).then(function() {
$rootScope.addAlertPromise($translate('APP.MESSAGE.DELETED'), 'info')
// Remove app from list
var index = -1;
for(var i=0; i< $scope.model.apps.length; i++) {
if($scope.model.apps[i].id == app.id) {
index = i;
break;
}
}
if(index >= 0) {
$scope.model.apps.splice(index, 1);
}
});
}
};
$scope.loadApps();
}]
);
| roberthafner/flowable-engine | modules/flowable-ui-task/flowable-ui-task-app/src/main/webapp/scripts/landing-controller.js | JavaScript | apache-2.0 | 3,572 |
/*
*name:dtt
*time:2014.12.01
*content:注册页
*/
seajs.config({
// 别名配置
alias: {
'head':'../../../../module/head/js/init.js',
'service':'../../../../module/service/js/init.js',
'rightTips':'../../../../module/rightTips/js/init.js',
'dialog':'../../../../module/dialog/js/init.js'
}
});
define(function(require, exports, module) {
require('head');
require('service');
require('rightTips');
require('dialog');
//输入框
var $form=$("form[name='register']");
$form.find("input").blur(function(){
var $th=$(this),
$val=$th.val(),
$leb=$th.parent("span.bor").siblings("span.po");
$form.find("span.bor").removeClass("cur");
$leb.removeClass("err");
$leb.removeClass("err2");
$leb.removeClass("succ");
switch($th.attr("name")){
case "userName"://用户名
var length=$val.replace(/[\u2E80-\u9FFF]/g,"aa").length;
if(length>=6&&!/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/g.test($val)){
$leb.addClass("err").addClass("lh").html("6-16个字符,可包含英文字母、中文、数字和下划线。");
}else if(length<6||length>16||!/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/g.test($val)){
$leb.addClass("err").addClass("lh").html($th.attr("data-err"));
}else if(length>=6&&/^[0-9]/g.test($val)){
$leb.addClass("err2").removeClass("lh").html("用户名不能以数字开头");
}else if(length>=6&&/^xnw/g.test($val)){
$leb.addClass("err2").removeClass("lh").html("用户名不能以 xnw 开头");
}else{
$leb.addClass("onload").html("正在进行校验,请稍候...");
$.ajax({
url:$th.attr("data-url")+encodeURI(encodeURI($val)),
type:"get",
dataType:"json",
success:function(data){
switch(data){
case "1":
$leb.addClass("succ").html("");
break;
case "3":
$leb.addClass("err2").removeClass("lh").html("该用户名已被使用,请更换用户名");
break;
case "9":
$leb.addClass("err").addClass("lh").html($th.attr("data-err"));
break;
}
},
error:function(){
$leb.addClass("err2").removeClass("lh").html("服务器没有返回数据,可能服务器忙");
}
});
}
break;
case "password"://密码
var length=$val.length,
sibLeb=$leb.addClass("err2").removeClass("lh");
if(length<6||length>20){
sibLeb.html($th.attr("data-err"));
}else if(length>=6&&/^[0-9]+$/g.test($val)){
sibLeb.html("密码不能为纯数字");
}else if(length>=6&&/^[A-Z]+$/g.test($val)){
sibLeb.html("密码不能为纯大写字母");
}else if(length>=6&&/^[a-z]+$/g.test($val)){
sibLeb.html("密码不能为纯小写字母");
}else if(length>=6&&/^\W+$/g.test($val)){
sibLeb.html("密码不能为纯符号");
}else if(length>=6&&/^\s+$/g.test($val)){
sibLeb.html("密码不能包含空格");
}else{
$leb.removeClass("err2").addClass("succ").html("");
}
break;
case "confirmPassword"://重复密码
var pwdOne=$form.find("input[name='password']").val();
if($val.length<6){
$leb.addClass("err2").html($th.attr("data-err"));
}else if(pwdOne.length>=6&&pwdOne!=$val&&$val.length>=6){
$leb.addClass("err2").html("两次密码输入不一致");
}else if(pwdOne.length>=6&&pwdOne==$val){
$leb.addClass("succ").html("");
}else{
$leb.html("");
}
break;
case "verifyCode"://验证码
if($val==""||$val.length<4){
$leb.addClass("err2").html($th.attr("data-err"));
}else{
$leb.removeClass("err2").html("");
}
break;
case "refferee"://推荐人
if($val!=""){
$.ajax({
url:$th.attr("data-url")+encodeURI(encodeURI($val)),
type:"get",
dataType:"json",
success:function(data){
switch(data){
case "20":
$leb.addClass("succ").html("");
break;
case "21":
$leb.addClass("err2").removeClass("lh").html("该推荐人不存在");
break;
}
},
error:function(){
$leb.addClass("err2").removeClass("lh").html("服务器验证推荐人出现错误");
}
});
}else{
$leb.html("");
}
break;
case "mobile"://手机号
phone($th);
break;
case "phoneCode"://手机验证码
break;
}
}).focus(function(){
var $th=$(this),
$leb=$th.parent("span.bor").siblings("span.po");
$th.parent("span.bor").addClass("cur");
$leb.removeClass("err");
$leb.removeClass("err2");
$leb.removeClass("succ");
$leb.removeClass("onload");
if($th.attr("name")=="userName"||$th.attr("name")=="password"){
$leb.addClass("lh").html($th.attr("data-po"));
code($th.val());
}else if($th.attr("name")=="mobile"){
phone($th);
}else{
$th.parent("span.bor").siblings("span.po").html($th.attr("data-po"));
}
});
(function ($) {
/*
* 0-弱
* 1-中
* 2-强
*/
var pswstrength = function () {}
pswstrength.prototype = {
constructor: pswstrength,
//Unicode 编码区分数字,字母,特殊字符
CharMode: function (iN) {
if (iN >= 48 && iN <= 57) //数字(U+0030 - U+0039)
return 1; //二进制是0001
if (iN >= 65 && iN <= 90) //大写字母(U+0041 - U+005A)
return 2; //二进制是0010
if (iN >= 97 && iN <= 122) //小写字母(U+0061 - U+007A)
return 4; //二进制是0100
else //其他算特殊字符
return 8; //二进制是1000
},
bitTotal: function (num) {
modes = 0;
for (i = 0; i < 4; i++) {
if (num & 1) //num不是0的话
modes++; //复杂度+1
num >>>= 1; //num右移1位
}
return modes;
},
check: function (sPW) {
if (sPW.length < 6) //小于7位,直接“弱”
return 0;
Modes = 0;
for (i = 0; i < sPW.length; i++) { //密码的每一位执行“位运算 OR”
Modes |= this.CharMode(sPW.charCodeAt(i));
}
return this.bitTotal(Modes);
}
}
window.pswstrength=new pswstrength();
})(jQuery);
var code=function(val){
var a=pswstrength.check(val);
$(".tab span.po span").removeClass("cl");
$(".tab span.po span:lt("+a+")").addClass("cl");
}
//密码强、中、弱
$form.find("input[name='password']").keyup(function(){
var $th=$(this),$val=$th.val();
code($val);
});
//验证回调提示
var fnbreak=function(leb,info){
$('ul.but .r a.next').removeClass("no-push").html('下一步');
leb.parent().siblings(".po").removeClass("err");
leb.parent().siblings(".po").removeClass("err2");
leb.parent().siblings(".po").removeClass("succ");
leb.parent().siblings(".po").removeClass("onload");
leb.parent().siblings(".po").addClass("err2").removeClass("lh").html(info);
}
//第一步提交
var register=true;
var registerPush=function(){
for(var i=0;i<$form.find("input.ipt").length;i++){
if($form.find("input.ipt").eq(i).val()==""){
$form.find("input.ipt").eq(i).focus();
return false;
}
}
if(register){
register=false;
$('ul.but .r a.next').addClass("no-push").html('提交中...');
//设置密码加密
var pwdval=$("input[name='password']").val(),
pwdval2=$("input[name='confirmPassword']").val();
if(pwdval.length<=20){
pwdval=RSAUtils.pwdEncode($("input[name='password']").val());
pwdval2=RSAUtils.pwdEncode($("input[name='confirmPassword']").val());
}
$form.find("input[name='password']").val(pwdval);
$form.find("input[name='confirmPassword']").val(pwdval2);
var param=$form.serialize();
$.ajax({
url:$form.attr("data-url"),
data:param,
type:"POST",
dataType: "json",
success: function(data){
register=true;
switch(data){
case "1":
//注册成功
$form.submit();
$('ul.but .r a.next').addClass("no-push").html('提交中...');
break;
case "13":
fnbreak($form.find("input[name='userName']"),"用户名为空");
break;
case "14":
fnbreak($form.find("input[name='password']"),"密码为空");
break;
case "15":
fnbreak($form.find("input[name='confirmPassword']"),"密码不匹配");
break;
case "17":
fnbreak($form.find("input[name='verifyCode']"),"验证码为空");
break;
case "18":
fnbreak($form.find("input[name='verifyCode']"),"验证码错误");
break;
case "3":
fnbreak($form.find("input[name='userName']"),"该用户名已被使用,请更换用户名");
break;
case "9":
fnbreak($form.find("input[name='userName']"),"用户名格式错误");
break;
case "10":
fnbreak($form.find("input[name='password']"),"密码格式错误");
break;
case "5":
fnbreak($form.find("input[name='password']"),"密码检验失败");
break;
}
}
});
}
}
//第二步提交
var registerTwo=true;
var registerPushTwo=function(){
for(var i=0;i<$form.find("input.ipt").length;i++){
if($form.find("input.ipt").eq(i).val()==""){
$form.find("input.ipt").eq(i).focus();
return false;
}
}
if(registerTwo){
registerTwo=false;
$('ul.but .r a.next').addClass("no-push").html('提交中...');
//设置密码加密
var pwdval=$("input[name='password']").val(),
pwdval2=$("input[name='confirmPassword']").val();
if(pwdval.length<=20){
pwdval=RSAUtils.pwdEncode($("input[name='password']").val());
pwdval2=RSAUtils.pwdEncode($("input[name='confirmPassword']").val());
}
$form.find("input[name='mobile']").removeAttr("disabled");
var param=$form.serialize();
$.ajax({
url:$form.attr("data-url"),
data:param,
type:"POST",
dataType: "json",
success: function(data){
registerTwo=true;
switch(data){
case "1":
//注册成功
$form.submit();
$('ul.but .r a.next').addClass("no-push").html('提交中...');
//$('ul.but .r a.next').html('下一步');
break;
case "22":
fnbreak($form.find("input[name='mobile']"),"手机号码为空");
break;
case "23":
fnbreak($form.find("input[name='phoneCode']"),"手机验证码为空");
break;
case "28":
fnbreak($form.find("input[name='phoneCode']"),"服务器没有返回数据,请重发短信");
break;
case "24":
fnbreak($form.find("input[name='phoneCode']"),"手机验证码不匹配");
break;
case "25":
fnbreak($form.find("input[name='mobile']"),"手机号码不匹配");
break;
case "2":
fnbreak($form.find("input[name='phoneCode']"),"您所注册的用户名已存在,请重新注册");
break;
case "6":
fnbreak($form.find("input[name='mobile']"),"手机号码已被使用,请更换手机号码");
break;
}
}
});
}
}
var subutNext=function(){
if($(".no-push").length<=0){
if($(".btn-one").length&&$(".color-agre input[name='agre']").is(":checked")){
if(!$("span.err").length>0&&!$("span.err2").length>0){
registerPush();
}
}else{
registerPushTwo();
}
}
}
$("ul.but .r").delegate("a.next","click",function(event){
event.preventDefault();
subutNext();
return false;
});
//处理键盘的回车键登录
$(document).keydown(function(event){
if(event.keyCode==13){
subutNext();
}
});
//选中使用条款及隐私条款
$(".color-agre").delegate("input[name='agre']","click",function(){
if($(this).is(":checked")){
registerTwo=true;
$('ul.but .r a.next').removeClass("no-push");
}else{
registerTwo=false;
$('ul.but .r a.next').addClass("no-push");
}
});
//使用条款及隐私条款
$("ul.color-agre").delegate("a.info","click",function(event){
event.preventDefault();
var $th=$(this),til=$th.index()==0?"使用条款":"隐私条款";
var urlCen=$th.attr("data-url");
$.dialog({
title:til,
width:800,
height:600,
lock: true,
opacity: 0.5,
background:'#000',
max: false,
padding:0,
min: false,
content:'<iframe class="iframe-height" src="'+urlCen+'" marginheight="0" marginwidth="0" frameborder="0" width="800" height="600"></iframe>'
});
return false;
});
//手机验证
var phone=function(tmp){
var $th=tmp,$val=$th.val(),
$leb=$th.parent("span.bor").siblings("span.po");
$leb.removeClass("err");
$leb.removeClass("err2");
$leb.removeClass("succ");
$leb.removeClass("onload");
$(".send-modle .send-vcode").removeClass("clk-bg");
if($val.length==11&&/(^[1][34587][0-9]{9}$)/g.test($val)){
$th.parent("span.bor").siblings("span.po").removeClass("lh").addClass("onload").html("正在进行合法性校验,请稍候...");
$.ajax({
url:$th.attr("data-url")+$val,
type:"get",
dataType:"json",
success:function(data){
switch(data){
case "1":
$leb.addClass("succ").html("");
$(".send-modle .send-vcode").addClass("clk-bg");
break;
case "22":
$leb.addClass("err2").removeClass("lh").html("手机号码为空");
break;
case "6":
$leb.addClass("err2").removeClass("lh").html("注册手机号重复");
break;
case "8":
$leb.addClass("err2").removeClass("lh").html("手机号码格式错误");
break;
}
}
});
}else if($val.length<11){
$leb.addClass("lh").html($th.attr("data-err"));
}
}
//手机号验证
$form.find("input[name='mobile']").keyup(function(){
phone($(this));
});
//选择有或无推荐人选项
$(".name-h ul").delegate("li","click",function(){
var $th=$(this),$leb=$th.parent("ul").siblings("span.po");;
$leb.html("");
$leb.siblings(".bor").find("input").val("");
$leb.removeClass("err2");
$leb.removeClass("succ");
$leb.removeClass("onload");
if(!$th.hasClass("check")){
$th.addClass("check").siblings().removeClass("check");
}
if($th.index()==1&&$th.hasClass("check")){
$(".name-h .bor").addClass("bor-show");
}else{
$(".name-h .bor").removeClass("bor-show");
}
}).delegate("li","mouseover",function(){
$(this).addClass("ckcur");
}).delegate("li","mouseout",function(){
$(this).removeClass("ckcur");
});
//注册成功互动方式鼠标滑过加背景
$(".start-suc").delegate("li","mouseover",function(){
$(this).addClass("bg");
}).delegate("li","mouseout",function(){
$(this).removeClass("bg");
})
//注册成功微信二维码显示
$(".start-suc li").delegate("i.i01","mouseover",function(){
$(".start-suc li i.i02").show("fast");
}).delegate("i.i01","mouseout",function(){
$(".start-suc li i.i02").hide("fast");
})
var switchCode=function(tmp){
var timenow =eval(+(new Date));
var imgUrl=$("ul.ipt-code img").attr("data-img");
tmp.parent("li").find("input").val("");
tmp.parent("li").find("img").attr("src", imgUrl+"?" + timenow);
}
//刷新验证码
$("ul.ipt-code").delegate("a.cd-a","click",function(event){
event.preventDefault();
var $th=$(this);
switchCode($th);
return false;
});
$("ul.ipt-code").delegate("img","click",function(){
var $th=$(this);
var timenow =eval(+(new Date));
var imgUrl=$("ul.ipt-code img").attr("data-img");
$th.attr("src", imgUrl+"?" + timenow);
});
var stopInfo=function(leb){
leb.html("重发短信");
leb.addClass("clk-bg");
$("ul.send-modle span.pvoice").html(" ");
$form.find("input[name='mobile']").removeAttr("disabled");
}
var timeLefts;
var timeDwon=function(leb,time){
leb.html("重发短信("+time+")");
if(!time--){
stopInfo(leb);
}else{
timeLefts = setTimeout(function(){timeDwon($(".send-vcode"),time)},1000);
}
}
var pushCode=function(start,info){
var leb=$(".send-modle .po");
leb.removeClass("err2");
leb.removeClass("succ");
leb.removeClass("onload");
$form.find("input[name='mobile']").attr("disabled","disabled");
$.ajax({
url:$(".send-vcode").attr("data-url"),
type:"post",
data:{"mobile":$form.find("input[name='mobile']").val(),"type":start},
dataType:"json",
success:function(data){
switch(data){
case "1":
timeDwon($(".send-vcode"),60);
$(".send-vcode").removeClass("clk-bg");
if(start=="sms"){
$("span.pvoice").addClass("pve-line").html(info);
}else{
$("span.pvoice").removeClass("pve-line").html(info);
}
leb.addClass("succ").html("");
break;
case "26":
stopInfo($(".send-vcode"));
leb.addClass("err2").removeClass("lh").html("非正常跳转用户,禁止发送短信");
break;
case "27":
stopInfo($(".send-vcode"));
leb.addClass("err2").removeClass("lh").html("发送验证码失败");
break;
case "22":
stopInfo($(".send-vcode"));
leb.addClass("err2").removeClass("lh").html("手机号码为空");
break;
}
}
});
}
//手机验证码
$("ul.send-modle").delegate("span.clk-bg","click",function(){
clearTimeout(timeLefts);
pushCode("sms",$(this).attr("data-po"));
});
//发送语音验证码
$("ul.send-modle span").delegate("i.phd","click",function(){
clearTimeout(timeLefts);
pushCode("pvoice",$(".send-vcode").attr("data-pvoice"));
});
});
| ldjking/sharegrid | proxy/data/bankcard/zhuce/user/js-1223/project/user/register/js/init.js | JavaScript | apache-2.0 | 17,033 |
const React = require('react');
const CompLibrary = require('../../core/CompLibrary');
const Container = CompLibrary.Container;
const GridBlock = CompLibrary.GridBlock;
const CWD = process.cwd();
const translate = require('../../server/translate.js').translate;
const siteConfig = require(`${CWD}/siteConfig.js`);
// versions post docusaurus
const versions = require(`${CWD}/versions.json`);
// versions pre docusaurus
const oldversions = require(`${CWD}/oldversions.json`);
function Versions(props) {
const latestStableVersion = versions[0];
const repoUrl = `https://github.com/${siteConfig.organizationName}/${
siteConfig.projectName
}`;
return (
<div className="pageContainer">
<Container className="mainContainer documentContainer postContainer">
<div className="post">
<header className="postHeader">
<h1>{siteConfig.title} <translate>Versions</translate></h1>
</header>
<h3 id="latest"><translate>Latest Stable Version</translate></h3>
<p><translate>Latest stable release of Apache Pulsar.</translate></p>
<table className="versions">
<tbody>
<tr>
<th>{latestStableVersion}</th>
<td>
<a
href={`${siteConfig.baseUrl}docs/${props.language}/standalone`}>
<translate>
Documentation
</translate>
</a>
</td>
<td>
<a href={`${siteConfig.baseUrl}release-notes#${latestStableVersion}`}>
<translate>
Release Notes
</translate>
</a>
</td>
</tr>
</tbody>
</table>
<h3 id="rc"><translate>Latest Version</translate></h3>
<translate>
Here you can find the latest documentation and unreleased code.
</translate>
<table className="versions">
<tbody>
<tr>
<th>master</th>
<td>
<a
href={`${siteConfig.baseUrl}docs/${props.language}/next/standalone`}>
<translate>Documentation</translate>
</a>
</td>
<td>
<a href={repoUrl}><translate>Source Code</translate></a>
</td>
</tr>
</tbody>
</table>
<h3 id="archive"><translate>Past Versions</translate></h3>
<p>
<translate>
Here you can find documentation for previous versions of Apache Pulsar.
</translate>
</p>
<table className="versions">
<tbody>
{versions.map(
version =>
version !== latestStableVersion && (
<tr key={version}>
<th>{version}</th>
<td>
<a
href={`${siteConfig.baseUrl}docs/${props.language}/${version}/standalone`}>
<translate>Documentation</translate>
</a>
</td>
<td>
<a href={`${siteConfig.baseUrl}release-notes#${version}`}>
<translate>Release Notes</translate>
</a>
</td>
</tr>
)
)}
{oldversions.map(
version =>
version !== latestStableVersion && (
<tr key={version}>
<th>{version}</th>
<td>
<a
href={`${siteConfig.baseUrl}docs/v${version}/getting-started/LocalCluster/`}>
<translate>Documentation</translate>
</a>
</td>
<td>
<a href={`${siteConfig.baseUrl}release-notes#${version}`}>
<translate>Release Notes</translate>
</a>
</td>
</tr>
)
)}
</tbody>
</table>
<p>
<translate>
You can find past versions of this project on{' '}
<a href={`${repoUrl}/releases`}>GitHub</a> or download from{' '}
<a href={`${siteConfig.baseUrl}download`}>Apache</a>.
</translate>
</p>
</div>
</Container>
</div>
);
}
Versions.title = 'Versions';
module.exports = Versions;
| ArvinDevel/incubator-pulsar | site2/website/pages/en/versions.js | JavaScript | apache-2.0 | 4,767 |
var searchData=
[
['jsontographfunction',['jsonToGraphFunction',['../namespacechi.html#a6a3fedb48e6702c016f996d8a7f445fc',1,'chi']]],
['jsontographmodule',['jsonToGraphModule',['../namespacechi.html#a4489e333fecc4168278e94f8b3f81e3c',1,'chi']]],
['jsontographstruct',['jsonToGraphStruct',['../namespacechi.html#a629f77832b6e7a6e0eaab123c4be1cda',1,'chi']]],
['jumpbackinst',['jumpBackInst',['../structchi_1_1NodeCompiler.html#a7dc06ad0390f2113fbeb5e7c0cf3dd06',1,'chi::NodeCompiler']]]
];
| russelltg/chigraph | docs/search/functions_8.js | JavaScript | apache-2.0 | 497 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Based in part on code from Apache Ripple, https://github.com/apache/incubator-ripple
var utils = require('utils');
var _lastMouseEvent,
_isMouseDown;
// NOTE: missing view, detail, touches, targetTouches, scale and rotation
function _createTouchEvent(type, canBubble, cancelable, eventData) {
var touchEvent = window.document.createEvent('Event');
touchEvent.initEvent(type, canBubble, cancelable);
utils.mixin(eventData, touchEvent);
return touchEvent;
}
function _simulateTouchEvent(type, mouseevent) {
if (_lastMouseEvent &&
mouseevent.type === _lastMouseEvent.type &&
mouseevent.pageX === _lastMouseEvent.pageX &&
mouseevent.pageY === _lastMouseEvent.pageY) {
return;
}
_lastMouseEvent = mouseevent;
var touchObj = {
clientX: mouseevent.pageX,
clientY: mouseevent.pageY,
pageX: mouseevent.pageX,
pageY: mouseevent.pageY,
screenX: mouseevent.pageX,
screenY: mouseevent.pageY,
target: mouseevent.target,
identifier: ''
};
var eventData = {
altKey: mouseevent.altKey,
ctrlKey: mouseevent.ctrlKey,
shiftKey: mouseevent.shiftKey,
metaKey: mouseevent.metaKey,
changedTouches: [touchObj],
targetTouches: type === 'touchend' ? [] : [touchObj],
touches: type === 'touchend' ? [] : [touchObj]
};
utils.mixin(touchObj, eventData);
var itemFn = function (index) {
return this[index];
};
eventData.touches.item = itemFn;
eventData.changedTouches.item = itemFn;
eventData.targetTouches.item = itemFn;
var listenerName = 'on' + type,
simulatedEvent = _createTouchEvent(type, true, true, eventData);
mouseevent.target.dispatchEvent(simulatedEvent);
if (typeof mouseevent.target[listenerName] === 'function') {
mouseevent.target[listenerName].apply(mouseevent.target, [simulatedEvent]);
}
}
function init() {
window.document.addEventListener('mousedown', function (event) {
_isMouseDown = true;
_simulateTouchEvent('touchstart', event);
}, true);
window.document.addEventListener('mousemove', function (event) {
if (_isMouseDown) {
_simulateTouchEvent('touchmove', event);
}
}, true);
window.document.addEventListener('mouseup', function (event) {
_isMouseDown = false;
_simulateTouchEvent('touchend', event);
}, true);
window.Node.prototype.ontouchstart = null;
window.Node.prototype.ontouchend = null;
window.Node.prototype.ontouchmove = null;
}
module.exports.init = init;
| busykai/cordova-simulate | src/app-host/touch-events.js | JavaScript | apache-2.0 | 2,718 |
/*************************************************************************
Copyright (c) 20136 Adobe Systems Incorporated. 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.
**************************************************************************/
/*jslint node:true, bitwise:true */
/*global localStorage, Crypto, EdgeInspectGlobals:true, Uint8Array, WebSocket, Window */
/*
runInBrowserMode: defaults to false, assuming that you are running this in Node.
If you are running this in node, it will attempt to require the following libraries for you:
- ws
- node-localstorage
- cryptojs
If you are running this in a browser, you will also need to include the third-party Crypto-JS v2.5.3 library
*/
var runInBrowserMode = false;
(function (that) {
'use strict';
if (that.window !== undefined) {
runInBrowserMode = that instanceof Window;
}
}(this));
EdgeInspectGlobals = {};
EdgeInspectGlobals.StorageManager = function (localStorage) {
'use strict';
var my = {};
// localStorage only holds strings.
my.get = function (key) {
return localStorage.getItem(key);
};
my.put = function (key, value) {
return localStorage.setItem(key, value);
};
my.clear = function (key) {
return localStorage.removeItem(key);
};
my.log = function (message) {
if (typeof message !== 'string') {
// Anything but a string gets kicked back
return false;
}
var log,
unpacked;
try {
// Unpack the message, in case we have to scrub data
unpacked = JSON.parse(message);
} catch (ex) {
// Can't parse the JSON, it's an error;
return false;
}
if (unpacked.payload && unpacked.payload.action === "publish") {
unpacked.payload.options.message.options.url = "***scrubbed***";
message = JSON.stringify(unpacked);
} else if (unpacked.payload && unpacked.payload.options.rand) {
delete unpacked.payload.options.rand;
message = JSON.stringify(unpacked);
}
log = my.get("log");
if (log === null) {
// This is an empty object
log = [];
} else {
log = JSON.parse(log);
}
if (log.length > 1000) {
log.shift();
}
log.push(message);
my.put("log", JSON.stringify(log));
return JSON.stringify(log);
};
my.destroySavedSettings = function () {
var i;
for (i = 0; i < localStorage.length; i += 1) {
localStorage.removeItem(localStorage.key(i));
}
};
return my;
};
EdgeInspectGlobals.CryptoHandler = function (Crypto) {
'use strict';
var my = {},
salt,
passcode,
keyAsBytes,
keyAsHex,
challenge;
function calculateKey(asBytes) {
if (typeof asBytes === 'undefined') {
asBytes = false;
}
var result = Crypto.PBKDF2(passcode, salt, 32, { iterations: 1000, asBytes: asBytes});
return result;
}
function encryptAsBytes(plaintext) {
return Crypto.util.base64ToBytes(Crypto.AES.encrypt(plaintext, keyAsBytes, { mode: new Crypto.mode.CBC(Crypto.pad.pkcs7) }));
}
function encryptAsHex(plaintext) {
return Crypto.util.bytesToHex(encryptAsBytes(plaintext));
}
function decryptAsBytes(encrypted) {
return (Crypto.AES.decrypt(Crypto.util.bytesToBase64(encrypted), keyAsBytes, { mode: new Crypto.mode.CBC(Crypto.pad.pkcs7), asBytes: true }));
}
function decryptAsHex(encrypted) {
return decryptAsBytes(Crypto.util.hexToBytes(encrypted));
}
my.verify = function () {
try {
if (Crypto.MD5('test') === '098f6bcd4621d373cade4e832627b4f6') {
return true;
} else {
return false;
}
} catch (ex) {
return false;
}
};
my.configure = function (parameters) {
if (parameters.encryptionkey) {
challenge = my.getRandomString();
keyAsHex = parameters.encryptionkey;
keyAsBytes = Crypto.util.hexToBytes(parameters.encryptionkey);
} else {
salt = parameters.salt;
passcode = parameters.passcode;
challenge = my.getRandomString();
keyAsHex = calculateKey(false);
keyAsBytes = calculateKey(true);
}
};
my.getRandomString = function () {
return Crypto.util.bytesToHex(Crypto.util.randomBytes(16));
};
my.getChallengeString = function () {
return challenge;
};
my.getKeyAsHex = function () {
return keyAsHex;
};
my.verifyChallenge = function (candidate) {
var unpacked, mine, yours;
try {
unpacked = Crypto.util.bytesToHex(decryptAsHex(candidate));
mine = unpacked.substring(0, 32);
yours = unpacked.substring(32, 64);
} catch (ex) {
// Cannot Decrypt
return false;
}
if (mine === challenge) {
return encryptAsHex(Crypto.util.hexToBytes((yours + my.getRandomString())));
} else {
// rand mismatch
return false;
}
};
my.decryptMessageFromDM = function (encrypted) {
try {
return JSON.parse(Crypto.charenc.UTF8.bytesToString(decryptAsBytes(new Uint8Array(encrypted))));
} catch (ex) {
return false;
}
};
my.encryptMessageForDM = function (plaintext) {
return encryptAsBytes(plaintext);
};
return my;
};
EdgeInspectGlobals.MessageFormatter = function (CryptoHandler) {
'use strict';
var my = {},
uuid,
inspectionUrl,
clientName = 'unset client name',
mergeObjects,
createAdminMessage,
createDeviceMessage,
createInventoryMessage,
createPreferencesMessage,
createBasicMessage,
createPingMessage,
actionMap;
my.configure = function (parameters) {
uuid = parameters.uuid;
inspectionUrl = parameters.inspectionUrl;
clientName = parameters.clientName;
};
mergeObjects = (function () {
return function (object, retval) {
var i;
for (i in object) {
if (object.hasOwnProperty(i)) {
if (typeof object[i] === 'string' || object[i] === null) {
// This allows us to overload existing parameters
if (!retval[i]) {
retval[i] = object[i];
}
} else {
if (typeof retval[i] === 'undefined') {
retval[i] = {};
}
retval[i] = mergeObjects(object[i], retval[i]);
}
}
}
return retval;
};
}());
createAdminMessage = (function () {
return function (parameters) {
var basicMessage = {
options: {
name: clientName,
type: "administrator",
id: uuid,
rand: CryptoHandler.getChallengeString()
},
source: uuid
};
return JSON.stringify(mergeObjects(basicMessage, parameters));
};
}());
createInventoryMessage = (function () {
return function (parameters) {
if (typeof parameters.deviceids === 'string') {
parameters.deviceids = [parameters.deviceids];
}
var basicMessage = {
action: 'inventory',
options: {
random: CryptoHandler.getRandomString()
},
source: uuid
},
wrappedParameters = {action: 'inventory', options: parameters };
return JSON.stringify(mergeObjects(basicMessage, wrappedParameters));
};
}());
createDeviceMessage = (function () {
return function (parameters) {
var basicMessage = {
action: 'publish',
options: {
message: {
source: uuid,
options: {
}
},
random: CryptoHandler.getRandomString(),
destinations: []
},
source: uuid
},
wrappedParameters = {action: 'publish', options: parameters };
return JSON.stringify(mergeObjects(basicMessage, wrappedParameters));
};
}());
createPingMessage = (function () {
return function () {
return {
action: 'ping',
source: uuid,
options: {
random: CryptoHandler.getRandomString()
}
};
};
}());
createPreferencesMessage = (function () {
return function (parameters) {
var basicMessage = {
action: 'preferences',
options: {
random: CryptoHandler.getRandomString()
},
source: uuid
},
wrappedParameters = {action: 'preferences', options: parameters };
return JSON.stringify(mergeObjects(basicMessage, wrappedParameters));
};
}());
createBasicMessage = (function () {
return function (parameters) {
var basicMessage = {
options: {
random: CryptoHandler.getRandomString()
},
source: uuid
};
return JSON.stringify(mergeObjects(basicMessage, parameters));
};
}());
my.basic = function (parameters) {
return createAdminMessage(parameters);
};
my.pairFirst = function () {
var parameters = {
action: 'pair',
options: {
passcode: CryptoHandler.getKeyAsHex()
}
};
return createAdminMessage(parameters);
};
my.pair = function () {
var parameters = {
action: 'pair'
};
return createAdminMessage(parameters);
};
my.ping = function () {
return createPingMessage();
};
my.connect = function (verified) {
var parameters = {
action: 'connect',
options: {
challenge: verified
}
};
return createAdminMessage(parameters);
};
my.inventory = function (status) {
var parameters = {
subaction: 'listresources',
status: status,
type: 'device'
};
return createInventoryMessage(parameters);
};
my.passcode = function (passcode, deviceid) {
var parameters = {
subaction: 'passcode_response',
passcode: passcode,
id: deviceid
};
return createInventoryMessage(parameters);
};
my.eject = function (devices) {
var parameters = {
subaction: 'eject_device',
deviceids: devices
};
return createInventoryMessage(parameters);
};
my.forget = function (devices) {
var parameters = {
subaction: 'forget_device',
deviceids: devices
};
return createInventoryMessage(parameters);
};
my.cancel = function (devices) {
var parameters = {
subaction: 'cancel_connect',
deviceids: devices
};
return createInventoryMessage(parameters);
};
my.hostinfo = function () {
var parameters = {
subaction: 'get_manager_info'
};
return createInventoryMessage(parameters);
};
my.browse = function (url, devices, fullscreen) {
var parameters = {
message: {
action: 'browser_navigate',
options: {
url: url,
fullscreen: fullscreen
}
},
destinations: devices
};
return createDeviceMessage(parameters);
};
my.inspect = function (url, devices, fullscreen) {
var parameters = {
message: {
action: 'browser_navigate',
options: {
url: url,
remoteinspect: inspectionUrl,
fullscreen: fullscreen
}
},
destinations: devices
};
return createDeviceMessage(parameters);
};
my.screenshot = function (requestId, fullPage, dualOrientation, devices) {
var parameters = {
message: {
action: 'screenshot_request',
options: {
request_id: requestId,
full_page: fullPage,
dual_orientation: dualOrientation
}
},
destinations: devices
};
return createDeviceMessage(parameters);
};
my.refresh = function (requestId, devices) {
var parameters = {
message: {
action: 'force_refresh',
options: {
request_id: requestId
}
},
destinations: devices
};
return createDeviceMessage(parameters);
};
my.cancelScreenshot = function (requestId, devices) {
var parameters = {
message: {
action: 'transfer_cancel',
options: {
request_id: requestId
}
},
destinations: devices
};
return createDeviceMessage(parameters);
};
my.showChrome = function (requestId, devices) {
var parameters = {
message: {
action: 'show_chrome',
options: {
request_id: requestId
}
},
destinations: devices
};
return createDeviceMessage(parameters);
};
my.hideChrome = function (requestId, devices) {
var parameters = {
message: {
action: 'full_screen',
options: {
request_id: requestId
}
},
destinations: devices
};
return createDeviceMessage(parameters);
};
my.preferences = function (action, prefs) {
var parameters = {
subaction: action
};
if (typeof prefs !== 'undefined') {
parameters.prefs = prefs;
}
return createPreferencesMessage(parameters);
};
my.basic = function (action) {
var parameters = {
action: action
};
return createBasicMessage(parameters);
};
return my;
};
EdgeInspectGlobals.MessageParser = function (StorageManager, CryptoHandler) {
'use strict';
var my = {};
my.parse = function (message) {
var parsed;
if (typeof message.data === 'string') {
try {
parsed = JSON.parse(message.data);
} catch (ex) {
StorageManager.log(JSON.stringify('MessageParser Error (Not Valid JSON): ' + message.data));
return false;
}
} else {
parsed = CryptoHandler.decryptMessageFromDM(message.data);
}
if (parsed === false) {
StorageManager.log(JSON.stringify('MessageParser Error (Could Not Decrypt): ' + message.data));
return false;
}
if (parsed.action !== 'pong') {
if (parsed.options) {
delete parsed.options.random;
}
StorageManager.log(JSON.stringify(parsed));
return parsed;
} else {
return false;
}
};
return my;
};
EdgeInspectGlobals.ConnectionManager = function (WebSocket, StorageManager) {
'use strict';
var my = {
isConnected: false
},
handle,
subscribers = {},
connectionData = {},
isConnecting = false,
defaultConnectionData = {
protocol: 'ws',
host: '127.0.0.1',
port: '7682'
};
function performFirstRunCheck() {
if (StorageManager.get('protocol') === null || StorageManager.get('host') === null || StorageManager.get('port') === null) {
StorageManager.put('protocol', defaultConnectionData.protocol);
StorageManager.put('host', defaultConnectionData.host);
StorageManager.put('port', defaultConnectionData.port);
}
}
function loadConnectionSettings() {
connectionData.protocol = StorageManager.get('protocol');
connectionData.host = StorageManager.get('host');
connectionData.port = StorageManager.get('port');
}
function publish(name, data) {
var i;
if (typeof subscribers[name] !== 'undefined') {
for (i = 0; i < subscribers[name].length; i += 1) {
subscribers[name][i](data);
}
}
}
my.subscribe = function (name, handler) {
if (typeof subscribers[name] === 'undefined') {
subscribers[name] = [];
}
subscribers[name].push(handler);
};
my.connect = function () {
if (!isConnecting) {
isConnecting = true;
loadConnectionSettings();
handle = new WebSocket(connectionData.protocol + "://" + connectionData.host + ":" + connectionData.port + "/shadow");
handle.binaryType = 'arraybuffer';
handle.onopen = function (ev) {
my.isConnected = true;
isConnecting = false;
publish('connect');
};
handle.onclose = function (ev) {
my.isConnected = false;
isConnecting = false;
publish('disconnect', ev);
};
handle.onmessage = function (ev) {
// Call out to a browser specific function
publish('message', ev);
};
handle.onerror = function (ev) {
// Call out to a browser specific function
publish('error', ev);
};
}
};
my.disconnect = function () {
handle.close(1000, "All Done");
};
my.send = function (message) {
var bufferedMessage;
if (my.isConnected) {
if (Array.isArray(message)) {
if (runInBrowserMode) {
// Convert array of binary into a typed array and send the buffer
return handle.send(new Uint8Array(message).buffer);
} else {
// Expects node is using an instance of ws for WebSockets
return handle.send(message, {mask: false, binary: true});
}
} else {
return handle.send(message);
}
}
};
my.configure = function () {
performFirstRunCheck();
};
my.reset = function () {
StorageManager.clear('protocol');
StorageManager.clear('host');
StorageManager.clear('port');
connectionData = {};
return;
};
my.getConnectionSettings = function () {
return connectionData;
};
return my;
};
if (typeof exports !== 'undefined') {
exports.EdgeInspectGlobals = EdgeInspectGlobals;
}
var EdgeInspect = function () {
'use strict';
var my = {
deviceManagerFirstRun: false,
isConnected: false,
uuid: null,
CONNECTED_EVENT: 'connected',
DISCONNECTED_EVENT: 'disconnected',
SCREENSHOTS_COMPLETE_EVENT: "screenshotsComplete",
CLOSE_REASON_CLEAN: 1001,
CLOSE_REASON_SERVER_SHUTDOWN: 2001,
CLOSE_REASON_SERVER_EJECTED: 2002,
CLOSE_REASON_SERVER_REJECTED: 2003,
CLOSE_REASON_SERVER_MAX_CONNECTIONS: 2004,
CLOSE_REASON_VERSION_MISMATCH: 3001,
CLOSE_REASON_UNKNOWN: 4001
},
messageActionMap = {},
verifiedChallenge = false,
deviceManagerMessageVersion = 0,
hasSubscribed = false,
keepAliveTimer = null,
shutdownCode = false,
subscribers = {},
defaultSalt = 'b8b5d15f0de11ceed565376436d25d74',
StorageManager,
ConnectionManager,
CryptoHandler,
MessageFormatter,
MessageParser,
WebSocketObject,
LocalStorageObject,
LocalStorageInstance,
CryptoObject;
if (runInBrowserMode) {
// We're in a browser as far as we know, use the native objects.
WebSocketObject = WebSocket;
LocalStorageObject = {};
LocalStorageInstance = localStorage;
CryptoObject = Crypto;
} else {
// We're not in a browser as far as we know. Probably Node, try requiring.
WebSocketObject = require('ws');
LocalStorageObject = require('node-localstorage').LocalStorage;
LocalStorageInstance = new LocalStorageObject('./EdgeInspect');
CryptoObject = require('cryptojs').Crypto;
}
StorageManager = new EdgeInspectGlobals.StorageManager(LocalStorageInstance);
ConnectionManager = new EdgeInspectGlobals.ConnectionManager(WebSocketObject, StorageManager);
CryptoHandler = new EdgeInspectGlobals.CryptoHandler(CryptoObject);
MessageFormatter = new EdgeInspectGlobals.MessageFormatter(CryptoHandler);
MessageParser = new EdgeInspectGlobals.MessageParser(StorageManager, CryptoHandler);
function publish(name, data) {
var i;
if (typeof subscribers[name] !== 'undefined') {
for (i = 0; i < subscribers[name].length; i += 1) {
subscribers[name][i](data);
}
}
}
function checkForSupportedDeviceManager() {
if (deviceManagerMessageVersion < 1) {
shutdownCode = my.CLOSE_REASON_VERSION_MISMATCH;
ConnectionManager.disconnect();
return false;
} else {
return true;
}
}
function pingDeviceManager() {
if (my.isConnected) {
var pingMessage = MessageFormatter.ping();
StorageManager.log(pingMessage);
ConnectionManager.send(CryptoHandler.encryptMessageForDM(pingMessage));
}
}
function startKeepAliveTimer() {
keepAliveTimer = setInterval(pingDeviceManager, 20000);
}
function stopKeepAliveTimer() {
if (keepAliveTimer) {
clearInterval(keepAliveTimer);
keepAliveTimer = null;
}
}
function configure(driverName, driverId, encryptionToken) {
if (typeof driverName === 'undefined') {
throw new Error('You must provide at least a name and a UUID');
}
if (driverName === '') {
throw new Error('Your name cannot be empty.');
}
if (!driverId.match(/^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$/)) {
throw new Error('Your driver ID is not a UUID.');
}
var configureParameters = {};
my.uuid = driverId;
if (typeof encryptionToken === 'undefined' || String(encryptionToken) === '') {
configureParameters = {salt: defaultSalt, passcode: my.generateUUID()};
} else {
configureParameters = {encryptionkey: encryptionToken};
}
CryptoHandler.configure(configureParameters);
// This should be refactored
MessageFormatter.configure({uuid: my.uuid, inspectionUrl: '', clientName: driverName});
ConnectionManager.configure();
if (!hasSubscribed) {
ConnectionManager.subscribe('connect', function () {
var pairMessage = MessageFormatter.pair();
StorageManager.log(pairMessage);
ConnectionManager.send(pairMessage);
});
ConnectionManager.subscribe('message', function (message) {
var parsed = MessageParser.parse(message);
if (parsed) {
if (typeof messageActionMap[parsed.action] !== 'undefined') {
messageActionMap[parsed.action](parsed);
}
}
});
ConnectionManager.subscribe('disconnect', function (message) {
var reasonCode = parseInt(message.code, 10);
my.isConnected = false;
if (shutdownCode !== false) {
reasonCode = shutdownCode;
}
publish(my.DISCONNECTED_EVENT, reasonCode);
shutdownCode = false;
});
hasSubscribed = true;
}
}
function updateDeviceManagerMessageVersion(message) {
deviceManagerMessageVersion = parseInt(message.version, 10);
StorageManager.put('dmmsgversion', deviceManagerMessageVersion);
}
messageActionMap = {
'pair_ready' : function (message) {
updateDeviceManagerMessageVersion(message);
if (checkForSupportedDeviceManager()) {
verifiedChallenge = CryptoHandler.verifyChallenge(message.options.challenge);
var responseMessage;
if (verifiedChallenge) {
responseMessage = MessageFormatter.connect(verifiedChallenge);
StorageManager.log(responseMessage);
ConnectionManager.send(responseMessage);
} else {
responseMessage = MessageFormatter.pairFirst();
StorageManager.log(responseMessage);
ConnectionManager.send(responseMessage);
}
}
},
'passcode_request' : function (message) {
var responseMessage = MessageFormatter.pairFirst();
StorageManager.log(responseMessage);
updateDeviceManagerMessageVersion(message);
if (checkForSupportedDeviceManager()) {
ConnectionManager.send(responseMessage);
}
},
'connect_ok' : function () {
my.isConnected = true;
startKeepAliveTimer();
publish(my.CONNECTED_EVENT, CryptoHandler.getKeyAsHex());
},
'transfer_complete' : function () {
publish(my.SCREENSHOTS_COMPLETE_EVENT);
}
};
my.subscribe = function (name, handler) {
if (typeof subscribers[name] === 'undefined') {
subscribers[name] = [];
}
subscribers[name].push(handler);
};
my.connect = function (driverName, driverId, encryptionToken) {
configure(driverName, driverId, encryptionToken);
if (!ConnectionManager.isConnected) {
ConnectionManager.connect();
}
};
my.disconnect = function () {
if (ConnectionManager.isConnected) {
stopKeepAliveTimer();
shutdownCode = my.CLOSE_REASON_CLEAN;
ConnectionManager.disconnect();
}
};
my.reset = function () {
ConnectionManager.reset();
my.uuid = null;
StorageManager.destroySavedSettings();
};
my.getConnectionSettings = function () {
return ConnectionManager.getConnectionSettings();
};
my.sendURL = function (url, fullscreen) {
if (typeof fullscreen === 'undefined' || fullscreen === false) {
fullscreen = "false";
} else {
fullscreen = "true";
}
var sendUrlMessage = MessageFormatter.browse(url, [], fullscreen);
StorageManager.log(sendUrlMessage);
ConnectionManager.send(CryptoHandler.encryptMessageForDM(sendUrlMessage));
};
my.takeScreenshot = function (fullPage, dualOrientation) {
var screenshotMessage = MessageFormatter.screenshot(my.generateUUID(), fullPage, dualOrientation, []);
ConnectionManager.send(CryptoHandler.encryptMessageForDM(screenshotMessage));
};
my.generateUUID = function () {
// Big hat tip to the https://github.com/jed and his public gist for this https://gist.github.com/982883
function b(a) {
return a ? (a ^ Math.random() * 16 >> a / 4).toString(16) : ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, b);
}
return b();
};
return my;
};
if (typeof exports !== 'undefined') {
exports.EdgeInspect = EdgeInspect;
}
| edge-code/edge-inspect-api | edge-inspect-api-1.0.0.js | JavaScript | apache-2.0 | 30,259 |
/**
* Copyright 2013-2014 Facebook, Inc.
*
* 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.
*
* @providesModule ReactTransitionGroup
*/
"use strict";
var React = require('React');
var ReactTransitionChildMapping = require('ReactTransitionChildMapping');
var cloneWithProps = require('cloneWithProps');
var emptyFunction = require('emptyFunction');
var merge = require('merge');
var ReactTransitionGroup = React.createClass({
propTypes: {
component: React.PropTypes.func,
childFactory: React.PropTypes.func
},
getDefaultProps: function() {
return {
component: React.DOM.span,
childFactory: emptyFunction.thatReturnsArgument
};
},
getInitialState: function() {
return {
children: ReactTransitionChildMapping.getChildMapping(this.props.children)
};
},
componentWillReceiveProps: function(nextProps) {
var nextChildMapping = ReactTransitionChildMapping.getChildMapping(
nextProps.children
);
var prevChildMapping = this.state.children;
this.setState({
children: ReactTransitionChildMapping.mergeChildMappings(
prevChildMapping,
nextChildMapping
)
});
var key;
for (key in nextChildMapping) {
var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key);
if (nextChildMapping[key] && !hasPrev &&
!this.currentlyTransitioningKeys[key]) {
this.keysToEnter.push(key);
}
}
for (key in prevChildMapping) {
var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key);
if (prevChildMapping[key] && !hasNext &&
!this.currentlyTransitioningKeys[key]) {
this.keysToLeave.push(key);
}
}
// If we want to someday check for reordering, we could do it here.
},
componentWillMount: function() {
this.currentlyTransitioningKeys = {};
this.keysToEnter = [];
this.keysToLeave = [];
},
componentDidUpdate: function() {
var keysToEnter = this.keysToEnter;
this.keysToEnter = [];
keysToEnter.forEach(this.performEnter);
var keysToLeave = this.keysToLeave;
this.keysToLeave = [];
keysToLeave.forEach(this.performLeave);
},
performEnter: function(key) {
this.currentlyTransitioningKeys[key] = true;
var component = this.refs[key];
if (component.componentWillEnter) {
component.componentWillEnter(
this._handleDoneEntering.bind(this, key)
);
} else {
this._handleDoneEntering(key);
}
},
_handleDoneEntering: function(key) {
var component = this.refs[key];
if (component.componentDidEnter) {
component.componentDidEnter();
}
delete this.currentlyTransitioningKeys[key];
var currentChildMapping = ReactTransitionChildMapping.getChildMapping(
this.props.children
);
if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {
// This was removed before it had fully entered. Remove it.
this.performLeave(key);
}
},
performLeave: function(key) {
this.currentlyTransitioningKeys[key] = true;
var component = this.refs[key];
if (component.componentWillLeave) {
component.componentWillLeave(this._handleDoneLeaving.bind(this, key));
} else {
// Note that this is somewhat dangerous b/c it calls setState()
// again, effectively mutating the component before all the work
// is done.
this._handleDoneLeaving(key);
}
},
_handleDoneLeaving: function(key) {
var component = this.refs[key];
if (component.componentDidLeave) {
component.componentDidLeave();
}
delete this.currentlyTransitioningKeys[key];
var currentChildMapping = ReactTransitionChildMapping.getChildMapping(
this.props.children
);
if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) {
// This entered again before it fully left. Add it again.
this.performEnter(key);
} else {
var newChildren = merge(this.state.children);
delete newChildren[key];
this.setState({children: newChildren});
}
},
render: function() {
// TODO: we could get rid of the need for the wrapper node
// by cloning a single child
var childrenToRender = {};
for (var key in this.state.children) {
var child = this.state.children[key];
if (child) {
// You may need to apply reactive updates to a child as it is leaving.
// The normal React way to do it won't work since the child will have
// already been removed. In case you need this behavior you can provide
// a childFactory function to wrap every child, even the ones that are
// leaving.
childrenToRender[key] = cloneWithProps(
this.props.childFactory(child),
{ref: key}
);
}
}
return this.transferPropsTo(this.props.component(null, childrenToRender));
}
});
module.exports = ReactTransitionGroup;
| atom/react | src/addons/transitions/ReactTransitionGroup.js | JavaScript | apache-2.0 | 5,458 |
$(document).ready(function () {
form = $('#form');
$("#Grid tbody>tr").click(function () {
var id = $(this).find("[name='id']").attr('value');
$("#grid_selecteditem").val(id);
});
});
function ClearSelection(e) {
$("#grid_selecteditem").val("");
}
var options = {};
function Show(prefix) {
$("#" + prefix + "SearchPanel").show('slide');
}
function Hide(prefix) {
$("#" + prefix + "SearchPanel").hide('slide');
}
function OnComboboxMasterChange(e) {
var slave = $('#' + e.target.id + "SlaveName").val();
var params = $('#' + e.target.id + "ParameterString").val().replace("*value*", e.value);
var ddl = $('#' + slave).data('tComboBox');
if (ddl.ajax) {
start = '?';
if (ddl.backupAjax.selectUrl.indexOf('?') != -1) {
start = '&';
}
ddl.ajax.selectUrl = ddl.backupAjax.selectUrl + start + params;
ddl.reload();
}
}
function OnComboboxSlaveLoad(e) {
var ddl = $('#' + e.target.id).data('tComboBox');
if (ddl && ddl.ajax) {
ddl.backupAjax = new Object;
ddl.backupAjax.selectUrl = ddl.ajax.selectUrl;
}
}
function GetAllObjectProps(obj) {
var str = "";
for(p in obj)
{
str += p + ': ' + obj[p] + '\r\n';
}
return str;
}
function FillStandardRange(range, idfrom, idto) {
var date = new Date();
var datefrom;
if (range == "month") {
datefrom = new Date(date.getFullYear(), date.getMonth(), 1);
}
else {
if (range == "quarter") {
datefrom = new Date(date.getFullYear(), 3*(date.getMonth() / 3), 1);
}
else {
if (range == "year") {
datefrom = new Date(date.getFullYear(), 0, 1);
}
}
}
var pickerFrom = $("#" + idfrom).data("tDatePicker");
var pickerTo = $("#" + idto).data("tDatePicker");
if (pickerFrom && pickerTo) {
pickerFrom.value(datefrom);
pickerTo.value(new Date(date.getFullYear(),date.getMonth(),date.getDate())); //always to current date
}
}
function ClearSearch() {
//$("input[type='text']").val("");
$("input[class='t-input']").val("");
$("input[type='text']").val("");
} | EIDSS/EIDSS-Legacy | EIDSS v6/eidss.webui/Scripts/Search/Panel.js | JavaScript | bsd-2-clause | 2,371 |
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBorderCharacters = exports.createStream = exports.table = void 0;
const createStream_1 = require("./createStream");
Object.defineProperty(exports, "createStream", { enumerable: true, get: function () { return createStream_1.createStream; } });
const getBorderCharacters_1 = require("./getBorderCharacters");
Object.defineProperty(exports, "getBorderCharacters", { enumerable: true, get: function () { return getBorderCharacters_1.getBorderCharacters; } });
const table_1 = require("./table");
Object.defineProperty(exports, "table", { enumerable: true, get: function () { return table_1.table; } });
__exportStar(require("./types/api"), exports);
//# sourceMappingURL=index.js.map | ChromeDevTools/devtools-frontend | node_modules/table/dist/src/index.js | JavaScript | bsd-3-clause | 1,280 |
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule testEditDistance
* @flow
* @typechecks
*
*/
/* eslint-disable no-shadow */
/**
* @internal
*
* Determines whether the edit distance between two strings is at or below the
* specified threshold distance, using the approach described by Ukkonen (1985)
* in "Algorithms for Approximate String Matching"[0] and then improved upon by
* Berghel and Roach (1996) in "An Extension of Ukkonen's Enhanced Dynamic
* Programming ASM Algorithm"[1].
*
* Given two strings of length `m` and `n` respectively, and threshold `t`,
* uses `O(t*min(m,n))` time and `O(min(t,m,n))` space.
*
* @see [0]: http://www.cs.helsinki.fi/u/ukkonen/InfCont85.PDF
* @see [1]: http://berghel.net/publications/asm/asm.pdf
*/
function testEditDistance(a: string, b: string, threshold: number): boolean {
// Ensure `b` is at least as long as `a`, swapping if necessary.
let m = a.length;
let n = b.length;
if (n < m) {
[n, m] = [m, n];
[b, a] = [a, b];
}
if (!m) {
return n <= threshold;
}
const zeroK = n;
const maxK = zeroK * 2 + 1;
const fkp = Array.from(Array(maxK), () => []);
for (let k = -zeroK; k < 0; k++) {
const p = -k - 1;
fkp[k + zeroK][p + 1] = -k - 1;
fkp[k + zeroK][p] = -Infinity;
}
fkp[zeroK][0] = -1;
for (let k = 1; k <= zeroK; k++) {
const p = k - 1;
fkp[k + zeroK][p + 1] = -1;
fkp[k + zeroK][p] = -Infinity;
}
// This loop is the alternative form suggested in the afterword of Berghel &
// Roach.
let p = n - m - 1;
do {
if (p > threshold) {
return false;
}
p++;
for (let i = Math.floor((p - (n - m)) / 2); i >= 1; i--) {
f(n - m + i, p - i);
}
for (let i = Math.floor((n - m + p) / 2); i >= 1; i--) {
f(n - m - i, p - i);
}
f(n - m, p);
} while (fkp[n - m + zeroK][p] !== m);
return true;
function f(k, p) {
let t = fkp[k + zeroK][p] + 1;
let t2 = t;
// Check for transposed characters.
if (a[t - 1] === b[k + t] && a[t] === b[k + t - 1]) {
t2 = t + 1;
}
t = Math.max(
t,
fkp[k - 1 + zeroK][p],
fkp[k + 1 + zeroK][p] + 1,
t2
);
while (a[t] === b[t + k] && t < Math.min(m, n - k)) {
t++;
}
fkp[k + zeroK][p + 1] = t;
}
}
module.exports = testEditDistance;
| mroch/relay | src/tools/testEditDistance.js | JavaScript | bsd-3-clause | 2,607 |
import Ember from 'ember';
import ColumnDefinition from 'ember-table/models/column-definition';
export default Ember.Controller.extend({
tableColumns: Ember.computed(function() {
var dateColumn = ColumnDefinition.create({
savedWidth: 150,
textAlign: 'text-align-left',
headerCellName: 'Date',
getCellContent: function(row) {
return row.get('date').toDateString();
}
});
var openColumn = ColumnDefinition.create({
savedWidth: 100,
headerCellName: 'Open',
getCellContent: function(row) {
return row.get('open').toFixed(2);
}
});
var highColumn = ColumnDefinition.create({
savedWidth: 100,
headerCellName: 'High',
getCellContent: function(row) {
return row.get('high').toFixed(2);
}
});
var lowColumn = ColumnDefinition.create({
savedWidth: 100,
headerCellName: 'Low',
getCellContent: function(row) {
return row.get('low').toFixed(2);
}
});
var closeColumn = ColumnDefinition.create({
savedWidth: 100,
headerCellName: 'Close',
getCellContent: function(row) {
return row.get('close').toFixed(2);
}
});
return [dateColumn, openColumn, highColumn, lowColumn, closeColumn];
}),
tableContent: Ember.computed(function() {
return _.range(100).map(function(index) {
var date = new Date();
date.setDate(date.getDate() + index);
return {
date: date,
open: Math.random() * 100 - 50,
high: Math.random() * 100 - 50,
low: Math.random() * 100 - 50,
close: Math.random() * 100 - 50,
volume: Math.random() * 1000000
};
});
})
});
| Cuiyansong/ember-table | tests/dummy/app/controllers/simple.js | JavaScript | bsd-3-clause | 1,711 |
/*
*
* Copyright (C) 2011, The Locker Project
* All rights reserved.
*
* Please see the LICENSE file for more information.
*
*/
var assert = require("assert");
var vows = require("vows");
var RESTeasy = require("api-easy");
var http = require("http");
var request = require('request');
var querystring = require("querystring");
var events = require("events");
var fs = require("fs");
var lconfig = require('../Common/node/lconfig.js');
lconfig.load('Config/config.json');
var tests = RESTeasy.describe("Locker core API");
tests.use(lconfig.lockerHost, lconfig.lockerPort)
.discuss("Core can")
.discuss("map existing services with")
.path("/map")
.get()
.expect(200)
.expect("has stuff", function(err, res, body) {
assert.isNull(err);
var map = JSON.parse(body);
assert.include(map, "testURLCallback");
serviceMap = map;
})
.unpath().undiscuss()
.discuss("list services providing a specific type")
.path("/providers")
.get("", {types:"testtype/testproviders"})
.expect(200)
.expect("and return an array of length 1 of valid services", function(err, res, body) {
assert.equal(res.statusCode, 200);
assert.isNotNull(body);
var providers = JSON.parse(body);
assert.equal(providers.length, 1);
assert.equal(providers[0].title, "Test /providers");
})
.get("", {types:"badtype/badsvc"})
.expect(200)
.expect("and return an empty array", function(err, res, body) {
assert.equal(res.statusCode, 200);
assert.isNotNull(body);
var providers = JSON.parse(body);
assert.equal(providers.length, 0);
})
.get("", {types:"testtype/testproviders,testtype/anotherprovider"})
.expect(200)
.expect("and return an array of valid services", function(err, res, body) {
assert.equal(res.statusCode, 200);
assert.isNotNull(body);
var providers = JSON.parse(body);
assert.equal(providers.length, 2);
})
.get("", {types:"testtype"})
.expect(200)
.expect("and return an array of length 2", function(err, res, body) {
assert.equal(res.statusCode, 200);
assert.isNotNull(body);
var providers = JSON.parse(body);
assert.equal(providers.length, 2);
})
.unpath()
.undiscuss()
tests.next()
.path("/Me")
.discuss("not spawn an invalid service")
.get("/spawn-invalid/")
.expect(404)
.undiscuss().unpath()
tests.next()
// Tests for the proxying
.path("/Me")
.discuss("proxy requests via GET to services")
.get("testURLCallback/test")
.expect(200)
.expect({url:"/test", method:"GET"})
.undiscuss().unpath()
tests.next()
// Tests for the proxying
.path("/Me")
.discuss("proxy requests via GET to services")
.get("invalidServicename/test")
.expect(404)
.undiscuss().unpath()
tests.next()
.path("/Me")
.discuss("proxy requests via POST to invalid services")
.post("invalidServicename/test")
.expect(404)
.undiscuss().unpath()
tests.next()
.discuss("proxy handles Unicode ")
.path("/Me/testUnicode/test")
.get()
.expect(200)
.expect("returned unicode JSON should be parsable", function(err, res, body) {
var json;
try {
json = JSON.parse(body);
} catch(E) {
throw new Error('Could not parse json correctly: ' + body);
}
assert.isNotNull(json);
})
.unpath()
.undiscuss().unpath()
tests.next()
// Diary storage
.path("/core/testURLCallback/diary?" + querystring.stringify({level:2, message:"Test message"}))
.discuss("store diary messages")
.get()
.expect(200)
.undiscuss().unpath()
tests.next()
.path("/core/revision")
.discuss("returns a revision if git is available")
.get()
.expect(200)
.expect("didn't get an 'unknown' response", function(err, res, body) {
assert.notEqual(body, "unknown");
})
.unpath()
.undiscuss().unpath()
tests.next()
tests.next()
.path("/core/stats")
.discuss("return statistics")
.get()
.expect(200)
.undiscuss().unpath()
// Event basics
.path("/core/testURLCallback/listen?" + querystring.stringify({type:"test/event2", cb:"/event"}))
.discuss("register a listener for an event")
.get()
.expect(200)
.undiscuss().unpath();
// These tests are dependent on the previous tests so we make sure they fire after them
tests.next()
// Test this after the main suite so we're sure the diary POST is done
.discuss("retrieve stored diary messages")
.path("/diary")
.get()
.expect(200)
.expect("that have full info", function(err, res, body) {
var diaryLine = JSON.parse(body)[0];
assert.include(diaryLine, "message");
assert.include(diaryLine, "level");
assert.include(diaryLine, "timestamp");
})
.undiscuss().unpath()
// Makes sure the /listen is done first
.path("/core/testURLCallback/deafen?" + querystring.stringify({type:"test/event2", cb:"/event"}))
.discuss("deafen a listener for an event")
.get()
.expect(200)
.undiscuss().unpath();
// These tests are written in normal Vows
tests.next().suite.addBatch({
"Core can schedule a uri callback" : {
topic:function() {
var promise = new events.EventEmitter();
var when = new Date();
when.setTime(when.getTime() + 250);
var options = {
host:lconfig.lockerHost,
port:lconfig.lockerPort,
path:"/core/testURLCallback/at?" + querystring.stringify({at:when.getTime()/1000,cb:"/write"})
};
try {
fs.unlinkSync(lconfig.me + "/testURLCallback/result.json");
} catch (E) {
}
http.get(options, function(res) {
setTimeout(function() {
fs.stat(lconfig.me + "/testURLCallback/result.json", function(err, stats) {
if (!err)
promise.emit("success", true);
else
promise.emit("error", err);
});
}, 1500);
}).on('data', function(chunk) {
}).on("error", function(e) {
promise.emit("error", e);
});
return promise;
},
"and is called":function(err, stat) {
assert.isNull(err);
}
},
"Core can fire an event" : {
topic:function() {
var promise = new events.EventEmitter();
var getOptions = {
host:lconfig.lockerHost,
port:lconfig.lockerPort,
path:"/core/testURLCallback/listen?" + querystring.stringify({type:"test/event", cb:"/event"})
};
var req = http.get(getOptions, function(res) {
var options = {
host:lconfig.lockerHost,
port:lconfig.lockerPort,
method:"POST",
path:"/core/testURLCallback/event",
headers:{
"Content-Type":"application/json"
}
};
try {
fs.unlinkSync(lconfig.me + "/testURLCallback/event.json");
} catch (E) {
}
var req = http.request(options);
req.on("response", function(res) {
setTimeout(function() {
fs.stat(lconfig.me + "/testURLCallback/event.json", function(err, stats) {
if (!err)
promise.emit("success", true);
else
promise.emit("error", err);
});
}, 1000);
});
req.on("error", function(e) {
console.log("Error from request");
promise.emit("error", e);
});
req.write(JSON.stringify({idr:"test://event",action:"new",data:{test:"value", result:true}}));
req.end();
}).on("error", function(e) {
promise.emit("error", e);
});
return promise;
},
"and callbacks are called":function(err, stat) {
assert.isNull(err);
}
}
});
tests.export(module);
| quartzjer/Locker | tests/locker-core-api-test.js | JavaScript | bsd-3-clause | 9,146 |
import "ember";
import EmberHandlebars from "ember-handlebars";
var compile = EmberHandlebars.compile;
var Router, App, AppView, router, container;
var set = Ember.set;
function bootApplication() {
router = container.lookup('router:main');
Ember.run(App, 'advanceReadiness');
}
// IE includes the host name
function normalizeUrl(url) {
return url.replace(/https?:\/\/[^\/]+/,'');
}
function shouldNotBeActive(selector) {
checkActive(selector, false);
}
function shouldBeActive(selector) {
checkActive(selector, true);
}
function checkActive(selector, active) {
var classList = Ember.$(selector, '#qunit-fixture')[0].className;
equal(classList.indexOf('active') > -1, active, selector + " active should be " + active.toString());
}
var updateCount, replaceCount;
function sharedSetup() {
App = Ember.Application.create({
name: "App",
rootElement: '#qunit-fixture'
});
App.deferReadiness();
updateCount = replaceCount = 0;
App.Router.reopen({
location: Ember.NoneLocation.createWithMixins({
setURL: function(path) {
updateCount++;
set(this, 'path', path);
},
replaceURL: function(path) {
replaceCount++;
set(this, 'path', path);
}
})
});
Router = App.Router;
container = App.__container__;
}
function sharedTeardown() {
Ember.run(function() { App.destroy(); });
Ember.TEMPLATES = {};
}
QUnit.module("The {{link-to}} helper", {
setup: function() {
Ember.run(function() {
sharedSetup();
Ember.TEMPLATES.app = compile("{{outlet}}");
Ember.TEMPLATES.index = compile("<h3>Home</h3>{{#link-to 'about' id='about-link'}}About{{/link-to}}{{#link-to 'index' id='self-link'}}Self{{/link-to}}");
Ember.TEMPLATES.about = compile("<h3>About</h3>{{#link-to 'index' id='home-link'}}Home{{/link-to}}{{#link-to 'about' id='self-link'}}Self{{/link-to}}");
Ember.TEMPLATES.item = compile("<h3>Item</h3><p>{{name}}</p>{{#link-to 'index' id='home-link'}}Home{{/link-to}}");
AppView = Ember.View.extend({
templateName: 'app'
});
container.register('view:app', AppView);
container.register('router:main', Router);
});
},
teardown: sharedTeardown
});
test("The {{link-to}} helper moves into the named route", function() {
Router.map(function(match) {
this.route("about");
});
bootApplication();
Ember.run(function() {
router.handleURL("/");
});
equal(Ember.$('h3:contains(Home)', '#qunit-fixture').length, 1, "The home template was rendered");
equal(Ember.$('#self-link.active', '#qunit-fixture').length, 1, "The self-link was rendered with active class");
equal(Ember.$('#about-link:not(.active)', '#qunit-fixture').length, 1, "The other link was rendered without active class");
Ember.run(function() {
Ember.$('#about-link', '#qunit-fixture').click();
});
equal(Ember.$('h3:contains(About)', '#qunit-fixture').length, 1, "The about template was rendered");
equal(Ember.$('#self-link.active', '#qunit-fixture').length, 1, "The self-link was rendered with active class");
equal(Ember.$('#home-link:not(.active)', '#qunit-fixture').length, 1, "The other link was rendered without active class");
});
test("The {{link-to}} helper supports URL replacement", function() {
Ember.TEMPLATES.index = compile("<h3>Home</h3>{{#link-to 'about' id='about-link' replace=true}}About{{/link-to}}");
Router.map(function() {
this.route("about");
});
bootApplication();
Ember.run(function() {
router.handleURL("/");
});
equal(updateCount, 0, 'precond: setURL has not been called');
equal(replaceCount, 0, 'precond: replaceURL has not been called');
Ember.run(function() {
Ember.$('#about-link', '#qunit-fixture').click();
});
equal(updateCount, 0, 'setURL should not be called');
equal(replaceCount, 1, 'replaceURL should be called once');
});
test("the {{link-to}} helper doesn't add an href when the tagName isn't 'a'", function() {
Ember.TEMPLATES.index = compile("{{#link-to 'about' id='about-link' tagName='div'}}About{{/link-to}}");
Router.map(function() {
this.route("about");
});
bootApplication();
Ember.run(function() {
router.handleURL("/");
});
equal(Ember.$('#about-link').attr('href'), undefined, "there is no href attribute");
});
test("the {{link-to}} applies a 'disabled' class when disabled", function () {
Ember.TEMPLATES.index = compile('{{#link-to "about" id="about-link" disabledWhen="shouldDisable"}}About{{/link-to}}');
App.IndexController = Ember.Controller.extend({
shouldDisable: true
});
Router.map(function() {
this.route("about");
});
bootApplication();
Ember.run(function() {
router.handleURL("/");
});
equal(Ember.$('#about-link.disabled', '#qunit-fixture').length, 1, "The link is disabled when its disabledWhen is true");
});
test("the {{link-to}} doesn't apply a 'disabled' class if disabledWhen is not provided", function () {
Ember.TEMPLATES.index = compile('{{#link-to "about" id="about-link"}}About{{/link-to}}');
Router.map(function() {
this.route("about");
});
bootApplication();
Ember.run(function() {
router.handleURL("/");
});
ok(!Ember.$('#about-link', '#qunit-fixture').hasClass("disabled"), "The link is not disabled if disabledWhen not provided");
});
test("the {{link-to}} helper supports a custom disabledClass", function () {
Ember.TEMPLATES.index = compile('{{#link-to "about" id="about-link" disabledWhen="shouldDisable" disabledClass="do-not-want"}}About{{/link-to}}');
App.IndexController = Ember.Controller.extend({
shouldDisable: true
});
Router.map(function() {
this.route("about");
});
bootApplication();
Ember.run(function() {
router.handleURL("/");
});
equal(Ember.$('#about-link.do-not-want', '#qunit-fixture').length, 1, "The link can apply a custom disabled class");
});
test("the {{link-to}} helper does not respond to clicks when disabled", function () {
Ember.TEMPLATES.index = compile('{{#link-to "about" id="about-link" disabledWhen="shouldDisable"}}About{{/link-to}}');
App.IndexController = Ember.Controller.extend({
shouldDisable: true
});
Router.map(function() {
this.route("about");
});
bootApplication();
Ember.run(function() {
router.handleURL("/");
});
Ember.run(function() {
Ember.$('#about-link', '#qunit-fixture').click();
});
equal(Ember.$('h3:contains(About)', '#qunit-fixture').length, 0, "Transitioning did not occur");
});
test("The {{link-to}} helper supports a custom activeClass", function() {
Ember.TEMPLATES.index = compile("<h3>Home</h3>{{#link-to 'about' id='about-link'}}About{{/link-to}}{{#link-to 'index' id='self-link' activeClass='zomg-active'}}Self{{/link-to}}");
Router.map(function() {
this.route("about");
});
bootApplication();
Ember.run(function() {
router.handleURL("/");
});
equal(Ember.$('h3:contains(Home)', '#qunit-fixture').length, 1, "The home template was rendered");
equal(Ember.$('#self-link.zomg-active', '#qunit-fixture').length, 1, "The self-link was rendered with active class");
equal(Ember.$('#about-link:not(.active)', '#qunit-fixture').length, 1, "The other link was rendered without active class");
});
test("The {{link-to}} helper supports leaving off .index for nested routes", function() {
Router.map(function() {
this.resource("about", function() {
this.route("item");
});
});
Ember.TEMPLATES.about = compile("<h1>About</h1>{{outlet}}");
Ember.TEMPLATES['about/index'] = compile("<div id='index'>Index</div>");
Ember.TEMPLATES['about/item'] = compile("<div id='item'>{{#link-to 'about'}}About{{/link-to}}</div>");
bootApplication();
Ember.run(router, 'handleURL', '/about/item');
equal(normalizeUrl(Ember.$('#item a', '#qunit-fixture').attr('href')), '/about');
});
test("The {{link-to}} helper supports currentWhen (DEPRECATED)", function() {
expectDeprecation('Using currentWhen with {{link-to}} is deprecated in favor of `current-when`.');
Router.map(function(match) {
this.resource("index", { path: "/" }, function() {
this.route("about");
});
this.route("item");
});
Ember.TEMPLATES.index = compile("<h3>Home</h3>{{outlet}}");
Ember.TEMPLATES['index/about'] = compile("{{#link-to 'item' id='other-link' currentWhen='index'}}ITEM{{/link-to}}");
bootApplication();
Ember.run(function() {
router.handleURL("/about");
});
equal(Ember.$('#other-link.active', '#qunit-fixture').length, 1, "The link is active since current-when is a parent route");
});
test("The {{link-to}} helper supports custom, nested, current-when", function() {
Router.map(function(match) {
this.resource("index", { path: "/" }, function() {
this.route("about");
});
this.route("item");
});
Ember.TEMPLATES.index = compile("<h3>Home</h3>{{outlet}}");
Ember.TEMPLATES['index/about'] = compile("{{#link-to 'item' id='other-link' current-when='index'}}ITEM{{/link-to}}");
bootApplication();
Ember.run(function() {
router.handleURL("/about");
});
equal(Ember.$('#other-link.active', '#qunit-fixture').length, 1, "The link is active since current-when is a parent route");
});
test("The {{link-to}} helper does not disregard current-when when it is given explicitly for a resource", function() {
Router.map(function(match) {
this.resource("index", { path: "/" }, function() {
this.route("about");
});
this.resource("items",function(){
this.route('item');
});
});
Ember.TEMPLATES.index = compile("<h3>Home</h3>{{outlet}}");
Ember.TEMPLATES['index/about'] = compile("{{#link-to 'items' id='other-link' current-when='index'}}ITEM{{/link-to}}");
bootApplication();
Ember.run(function() {
router.handleURL("/about");
});
equal(Ember.$('#other-link.active', '#qunit-fixture').length, 1, "The link is active when current-when is given for explicitly for a resource");
});
if (Ember.FEATURES.isEnabled("ember-routing-multi-current-when")) {
test("The {{link-to}} helper supports multiple current-when routes", function() {
Router.map(function(match) {
this.resource("index", { path: "/" }, function() {
this.route("about");
});
this.route("item");
this.route("foo");
});
Ember.TEMPLATES.index = compile("<h3>Home</h3>{{outlet}}");
Ember.TEMPLATES['index/about'] = compile("{{#link-to 'item' id='link1' current-when='item index'}}ITEM{{/link-to}}");
Ember.TEMPLATES['item'] = compile("{{#link-to 'item' id='link2' current-when='item index'}}ITEM{{/link-to}}");
Ember.TEMPLATES['foo'] = compile("{{#link-to 'item' id='link3' current-when='item index'}}ITEM{{/link-to}}");
bootApplication();
Ember.run(function() {
router.handleURL("/about");
});
equal(Ember.$('#link1.active', '#qunit-fixture').length, 1, "The link is active since current-when contains the parent route");
Ember.run(function() {
router.handleURL("/item");
});
equal(Ember.$('#link2.active', '#qunit-fixture').length, 1, "The link is active since you are on the active route");
Ember.run(function() {
router.handleURL("/foo");
});
equal(Ember.$('#link3.active', '#qunit-fixture').length, 0, "The link is not active since current-when does not contain the active route");
});
}
test("The {{link-to}} helper defaults to bubbling", function() {
Ember.TEMPLATES.about = compile("<div {{action 'hide'}}>{{#link-to 'about.contact' id='about-contact'}}About{{/link-to}}</div>{{outlet}}");
Ember.TEMPLATES['about/contact'] = compile("<h1 id='contact'>Contact</h1>");
Router.map(function() {
this.resource("about", function() {
this.route("contact");
});
});
var hidden = 0;
App.AboutRoute = Ember.Route.extend({
actions: {
hide: function() {
hidden++;
}
}
});
bootApplication();
Ember.run(function() {
router.handleURL("/about");
});
Ember.run(function() {
Ember.$('#about-contact', '#qunit-fixture').click();
});
equal(Ember.$("#contact", "#qunit-fixture").text(), "Contact", "precond - the link worked");
equal(hidden, 1, "The link bubbles");
});
test("The {{link-to}} helper supports bubbles=false", function() {
Ember.TEMPLATES.about = compile("<div {{action 'hide'}}>{{#link-to 'about.contact' id='about-contact' bubbles=false}}About{{/link-to}}</div>{{outlet}}");
Ember.TEMPLATES['about/contact'] = compile("<h1 id='contact'>Contact</h1>");
Router.map(function() {
this.resource("about", function() {
this.route("contact");
});
});
var hidden = 0;
App.AboutRoute = Ember.Route.extend({
actions: {
hide: function() {
hidden++;
}
}
});
bootApplication();
Ember.run(function() {
router.handleURL("/about");
});
Ember.run(function() {
Ember.$('#about-contact', '#qunit-fixture').click();
});
equal(Ember.$("#contact", "#qunit-fixture").text(), "Contact", "precond - the link worked");
equal(hidden, 0, "The link didn't bubble");
});
test("The {{link-to}} helper moves into the named route with context", function() {
Router.map(function(match) {
this.route("about");
this.resource("item", { path: "/item/:id" });
});
Ember.TEMPLATES.about = compile("<h3>List</h3><ul>{{#each person in controller}}<li>{{#link-to 'item' person}}{{person.name}}{{/link-to}}</li>{{/each}}</ul>{{#link-to 'index' id='home-link'}}Home{{/link-to}}");
App.AboutRoute = Ember.Route.extend({
model: function() {
return Ember.A([
{ id: "yehuda", name: "Yehuda Katz" },
{ id: "tom", name: "Tom Dale" },
{ id: "erik", name: "Erik Brynroflsson" }
]);
}
});
App.ItemRoute = Ember.Route.extend({
serialize: function(object) {
return { id: object.id };
}
});
bootApplication();
Ember.run(function() {
router.handleURL("/about");
});
equal(Ember.$('h3:contains(List)', '#qunit-fixture').length, 1, "The home template was rendered");
equal(normalizeUrl(Ember.$('#home-link').attr('href')), '/', "The home link points back at /");
Ember.run(function() {
Ember.$('li a:contains(Yehuda)', '#qunit-fixture').click();
});
equal(Ember.$('h3:contains(Item)', '#qunit-fixture').length, 1, "The item template was rendered");
equal(Ember.$('p', '#qunit-fixture').text(), "Yehuda Katz", "The name is correct");
Ember.run(function() { Ember.$('#home-link').click(); });
Ember.run(function() { Ember.$('#about-link').click(); });
equal(normalizeUrl(Ember.$('li a:contains(Yehuda)').attr('href')), "/item/yehuda");
equal(normalizeUrl(Ember.$('li a:contains(Tom)').attr('href')), "/item/tom");
equal(normalizeUrl(Ember.$('li a:contains(Erik)').attr('href')), "/item/erik");
Ember.run(function() {
Ember.$('li a:contains(Erik)', '#qunit-fixture').click();
});
equal(Ember.$('h3:contains(Item)', '#qunit-fixture').length, 1, "The item template was rendered");
equal(Ember.$('p', '#qunit-fixture').text(), "Erik Brynroflsson", "The name is correct");
});
test("The {{link-to}} helper binds some anchor html tag common attributes", function() {
Ember.TEMPLATES.index = compile("<h3>Home</h3>{{#link-to 'index' id='self-link' title='title-attr' rel='rel-attr' tabindex='-1'}}Self{{/link-to}}");
bootApplication();
Ember.run(function() {
router.handleURL("/");
});
var link = Ember.$('#self-link', '#qunit-fixture');
equal(link.attr('title'), 'title-attr', "The self-link contains title attribute");
equal(link.attr('rel'), 'rel-attr', "The self-link contains rel attribute");
equal(link.attr('tabindex'), '-1', "The self-link contains tabindex attribute");
});
if(Ember.FEATURES.isEnabled('ember-routing-linkto-target-attribute')) {
test("The {{link-to}} helper supports `target` attribute", function() {
Ember.TEMPLATES.index = compile("<h3>Home</h3>{{#link-to 'index' id='self-link' target='_blank'}}Self{{/link-to}}");
bootApplication();
Ember.run(function() {
router.handleURL("/");
});
var link = Ember.$('#self-link', '#qunit-fixture');
equal(link.attr('target'), '_blank', "The self-link contains `target` attribute");
});
test("The {{link-to}} helper does not call preventDefault if `target` attribute is provided", function() {
Ember.TEMPLATES.index = compile("<h3>Home</h3>{{#link-to 'index' id='self-link' target='_blank'}}Self{{/link-to}}");
bootApplication();
Ember.run(function() {
router.handleURL("/");
});
var event = Ember.$.Event("click");
Ember.$('#self-link', '#qunit-fixture').trigger(event);
equal(event.isDefaultPrevented(), false, "should not preventDefault when target attribute is specified");
});
test("The {{link-to}} helper should preventDefault when `target = _self`", function() {
Ember.TEMPLATES.index = compile("<h3>Home</h3>{{#link-to 'index' id='self-link' target='_self'}}Self{{/link-to}}");
bootApplication();
Ember.run(function() {
router.handleURL("/");
});
var event = Ember.$.Event("click");
Ember.$('#self-link', '#qunit-fixture').trigger(event);
equal(event.isDefaultPrevented(), true, "should preventDefault when target attribute is `_self`");
});
test("The {{link-to}} helper should not transition if target is not equal to _self or empty", function() {
Ember.TEMPLATES.index = compile("{{#link-to 'about' id='about-link' replace=true target='_blank'}}About{{/link-to}}");
Router.map(function() {
this.route("about");
});
bootApplication();
Ember.run(function() {
router.handleURL("/");
});
Ember.run(function() {
Ember.$('#about-link', '#qunit-fixture').click();
});
notEqual(container.lookup('controller:application').get('currentRouteName'), 'about', 'link-to should not transition if target is not equal to _self or empty');
});
}
test("The {{link-to}} helper accepts string/numeric arguments", function() {
Router.map(function() {
this.route('filter', { path: '/filters/:filter' });
this.route('post', { path: '/post/:post_id' });
this.route('repo', { path: '/repo/:owner/:name' });
});
App.FilterController = Ember.Controller.extend({
filter: "unpopular",
repo: Ember.Object.create({owner: 'ember', name: 'ember.js'}),
post_id: 123
});
Ember.TEMPLATES.filter = compile('<p>{{filter}}</p>{{#link-to "filter" "unpopular" id="link"}}Unpopular{{/link-to}}{{#link-to "filter" filter id="path-link"}}Unpopular{{/link-to}}{{#link-to "post" post_id id="post-path-link"}}Post{{/link-to}}{{#link-to "post" 123 id="post-number-link"}}Post{{/link-to}}{{#link-to "repo" repo id="repo-object-link"}}Repo{{/link-to}}');
Ember.TEMPLATES.index = compile(' ');
bootApplication();
Ember.run(function() { router.handleURL("/filters/popular"); });
equal(normalizeUrl(Ember.$('#link', '#qunit-fixture').attr('href')), "/filters/unpopular");
equal(normalizeUrl(Ember.$('#path-link', '#qunit-fixture').attr('href')), "/filters/unpopular");
equal(normalizeUrl(Ember.$('#post-path-link', '#qunit-fixture').attr('href')), "/post/123");
equal(normalizeUrl(Ember.$('#post-number-link', '#qunit-fixture').attr('href')), "/post/123");
equal(normalizeUrl(Ember.$('#repo-object-link', '#qunit-fixture').attr('href')), "/repo/ember/ember.js");
});
test("Issue 4201 - Shorthand for route.index shouldn't throw errors about context arguments", function() {
expect(2);
Router.map(function() {
this.resource('lobby', function() {
this.route('index', { path: ':lobby_id' });
this.route('list');
});
});
App.LobbyIndexRoute = Ember.Route.extend({
model: function(params) {
equal(params.lobby_id, 'foobar');
return params.lobby_id;
}
});
Ember.TEMPLATES['lobby/index'] = compile("{{#link-to 'lobby' 'foobar' id='lobby-link'}}Lobby{{/link-to}}");
Ember.TEMPLATES.index = compile("");
Ember.TEMPLATES['lobby/list'] = compile("{{#link-to 'lobby' 'foobar' id='lobby-link'}}Lobby{{/link-to}}");
bootApplication();
Ember.run(router, 'handleURL', '/lobby/list');
Ember.run(Ember.$('#lobby-link'), 'click');
shouldBeActive('#lobby-link');
});
test("The {{link-to}} helper unwraps controllers", function() {
expect(5);
Router.map(function() {
this.route('filter', { path: '/filters/:filter' });
});
var indexObject = { filter: 'popular' };
App.FilterRoute = Ember.Route.extend({
model: function(params) {
return indexObject;
},
serialize: function(passedObject) {
equal(passedObject, indexObject, "The unwrapped object is passed");
return { filter: 'popular' };
}
});
App.IndexRoute = Ember.Route.extend({
model: function() {
return indexObject;
}
});
Ember.TEMPLATES.filter = compile('<p>{{filter}}</p>');
Ember.TEMPLATES.index = compile('{{#link-to "filter" this id="link"}}Filter{{/link-to}}');
bootApplication();
Ember.run(function() { router.handleURL("/"); });
Ember.$('#link', '#qunit-fixture').trigger('click');
});
test("The {{link-to}} helper doesn't change view context", function() {
App.IndexView = Ember.View.extend({
elementId: 'index',
name: 'test',
isTrue: true
});
Ember.TEMPLATES.index = compile("{{view.name}}-{{#link-to 'index' id='self-link'}}Link: {{view.name}}-{{#if view.isTrue}}{{view.name}}{{/if}}{{/link-to}}");
bootApplication();
Ember.run(function() {
router.handleURL("/");
});
equal(Ember.$('#index', '#qunit-fixture').text(), 'test-Link: test-test', "accesses correct view");
});
test("Quoteless route param performs property lookup", function() {
Ember.TEMPLATES.index = compile("{{#link-to 'index' id='string-link'}}string{{/link-to}}{{#link-to foo id='path-link'}}path{{/link-to}}{{#link-to view.foo id='view-link'}}{{view.foo}}{{/link-to}}");
function assertEquality(href) {
equal(normalizeUrl(Ember.$('#string-link', '#qunit-fixture').attr('href')), '/');
equal(normalizeUrl(Ember.$('#path-link', '#qunit-fixture').attr('href')), href);
equal(normalizeUrl(Ember.$('#view-link', '#qunit-fixture').attr('href')), href);
}
App.IndexView = Ember.View.extend({
foo: 'index',
elementId: 'index-view'
});
App.IndexController = Ember.Controller.extend({
foo: 'index'
});
App.Router.map(function() {
this.route('about');
});
bootApplication();
Ember.run(router, 'handleURL', '/');
assertEquality('/');
var controller = container.lookup('controller:index');
var view = Ember.View.views['index-view'];
Ember.run(function() {
controller.set('foo', 'about');
view.set('foo', 'about');
});
assertEquality('/about');
});
test("link-to with null/undefined dynamic parameters are put in a loading state", function() {
expect(19);
var oldWarn = Ember.Logger.warn, warnCalled = false;
Ember.Logger.warn = function() { warnCalled = true; };
Ember.TEMPLATES.index = compile("{{#link-to destinationRoute routeContext loadingClass='i-am-loading' id='context-link'}}string{{/link-to}}{{#link-to secondRoute loadingClass='i-am-loading' id='static-link'}}string{{/link-to}}");
var thing = Ember.Object.create({ id: 123 });
App.IndexController = Ember.Controller.extend({
destinationRoute: null,
routeContext: null
});
App.AboutRoute = Ember.Route.extend({
activate: function() {
ok(true, "About was entered");
}
});
App.Router.map(function() {
this.route('thing', { path: '/thing/:thing_id' });
this.route('about');
});
bootApplication();
Ember.run(router, 'handleURL', '/');
function assertLinkStatus($link, url) {
if (url) {
equal(normalizeUrl($link.attr('href')), url, "loaded link-to has expected href");
ok(!$link.hasClass('i-am-loading'), "loaded linkView has no loadingClass");
} else {
equal(normalizeUrl($link.attr('href')), '#', "unloaded link-to has href='#'");
ok($link.hasClass('i-am-loading'), "loading linkView has loadingClass");
}
}
var $contextLink = Ember.$('#context-link', '#qunit-fixture');
var $staticLink = Ember.$('#static-link', '#qunit-fixture');
var controller = container.lookup('controller:index');
assertLinkStatus($contextLink);
assertLinkStatus($staticLink);
Ember.run(function() {
warnCalled = false;
$contextLink.click();
ok(warnCalled, "Logger.warn was called from clicking loading link");
});
// Set the destinationRoute (context is still null).
Ember.run(controller, 'set', 'destinationRoute', 'thing');
assertLinkStatus($contextLink);
// Set the routeContext to an id
Ember.run(controller, 'set', 'routeContext', '456');
assertLinkStatus($contextLink, '/thing/456');
// Test that 0 isn't interpreted as falsy.
Ember.run(controller, 'set', 'routeContext', 0);
assertLinkStatus($contextLink, '/thing/0');
// Set the routeContext to an object
Ember.run(controller, 'set', 'routeContext', thing);
assertLinkStatus($contextLink, '/thing/123');
// Set the destinationRoute back to null.
Ember.run(controller, 'set', 'destinationRoute', null);
assertLinkStatus($contextLink);
Ember.run(function() {
warnCalled = false;
$staticLink.click();
ok(warnCalled, "Logger.warn was called from clicking loading link");
});
Ember.run(controller, 'set', 'secondRoute', 'about');
assertLinkStatus($staticLink, '/about');
// Click the now-active link
Ember.run($staticLink, 'click');
Ember.Logger.warn = oldWarn;
});
test("The {{link-to}} helper refreshes href element when one of params changes", function() {
Router.map(function() {
this.route('post', { path: '/posts/:post_id' });
});
var post = Ember.Object.create({id: '1'});
var secondPost = Ember.Object.create({id: '2'});
Ember.TEMPLATES.index = compile('{{#link-to "post" post id="post"}}post{{/link-to}}');
App.IndexController = Ember.Controller.extend();
var indexController = container.lookup('controller:index');
Ember.run(function() { indexController.set('post', post); });
bootApplication();
Ember.run(function() { router.handleURL("/"); });
equal(normalizeUrl(Ember.$('#post', '#qunit-fixture').attr('href')), '/posts/1', 'precond - Link has rendered href attr properly');
Ember.run(function() { indexController.set('post', secondPost); });
equal(Ember.$('#post', '#qunit-fixture').attr('href'), '/posts/2', 'href attr was updated after one of the params had been changed');
Ember.run(function() { indexController.set('post', null); });
equal(Ember.$('#post', '#qunit-fixture').attr('href'), '#', 'href attr becomes # when one of the arguments in nullified');
});
test("The {{link-to}} helper's bound parameter functionality works as expected in conjunction with an ObjectProxy/Controller", function() {
Router.map(function() {
this.route('post', { path: '/posts/:post_id' });
});
var post = Ember.Object.create({id: '1'});
var secondPost = Ember.Object.create({id: '2'});
Ember.TEMPLATES = {
index: compile(' '),
post: compile('{{#link-to "post" this id="self-link"}}selflink{{/link-to}}')
};
App.PostController = Ember.ObjectController.extend();
var postController = container.lookup('controller:post');
bootApplication();
Ember.run(router, 'transitionTo', 'post', post);
var $link = Ember.$('#self-link', '#qunit-fixture');
equal(normalizeUrl($link.attr('href')), '/posts/1', 'self link renders post 1');
Ember.run(postController, 'set', 'model', secondPost);
equal(normalizeUrl($link.attr('href')), '/posts/2', 'self link updated to post 2');
});
test("{{linkTo}} is aliased", function() {
Ember.TEMPLATES.index = compile("<h3>Home</h3>{{#linkTo 'about' id='about-link' replace=true}}About{{/linkTo}}");
Router.map(function() {
this.route("about");
});
expectDeprecation(function() {
bootApplication();
}, "The 'linkTo' view helper is deprecated in favor of 'link-to'");
Ember.run(function() {
router.handleURL("/");
});
Ember.run(function() {
Ember.$('#about-link', '#qunit-fixture').click();
});
equal(container.lookup('controller:application').get('currentRouteName'), 'about', 'linkTo worked properly');
});
test("The {{link-to}} helper is active when a resource is active", function() {
Router.map(function() {
this.resource("about", function() {
this.route("item");
});
});
Ember.TEMPLATES.about = compile("<div id='about'>{{#link-to 'about' id='about-link'}}About{{/link-to}} {{#link-to 'about.item' id='item-link'}}Item{{/link-to}} {{outlet}}</div>");
Ember.TEMPLATES['about/item'] = compile(" ");
Ember.TEMPLATES['about/index'] = compile(" ");
bootApplication();
Ember.run(router, 'handleURL', '/about');
equal(Ember.$('#about-link.active', '#qunit-fixture').length, 1, "The about resource link is active");
equal(Ember.$('#item-link.active', '#qunit-fixture').length, 0, "The item route link is inactive");
Ember.run(router, 'handleURL', '/about/item');
equal(Ember.$('#about-link.active', '#qunit-fixture').length, 1, "The about resource link is active");
equal(Ember.$('#item-link.active', '#qunit-fixture').length, 1, "The item route link is active");
});
test("The {{link-to}} helper works in an #each'd array of string route names", function() {
Router.map(function() {
this.route('foo');
this.route('bar');
this.route('rar');
});
App.IndexController = Ember.Controller.extend({
routeNames: Ember.A(['foo', 'bar', 'rar']),
route1: 'bar',
route2: 'foo'
});
Ember.TEMPLATES = {
index: compile('{{#each routeName in routeNames}}{{#link-to routeName}}{{routeName}}{{/link-to}}{{/each}}{{#each routeNames}}{{#link-to this}}{{this}}{{/link-to}}{{/each}}{{#link-to route1}}a{{/link-to}}{{#link-to route2}}b{{/link-to}}')
};
expectDeprecation(function() {
bootApplication();
}, 'Using the context switching form of {{each}} is deprecated. Please use the keyword form (`{{#each foo in bar}}`) instead. See http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope for more details.');
function linksEqual($links, expected) {
equal($links.length, expected.length, "Has correct number of links");
var idx;
for (idx = 0; idx < $links.length; idx++) {
var href = Ember.$($links[idx]).attr('href');
// Old IE includes the whole hostname as well
equal(href.slice(-expected[idx].length), expected[idx], "Expected link to be '"+expected[idx]+"', but was '"+href+"'");
}
}
linksEqual(Ember.$('a', '#qunit-fixture'), ["/foo", "/bar", "/rar", "/foo", "/bar", "/rar", "/bar", "/foo"]);
var indexController = container.lookup('controller:index');
Ember.run(indexController, 'set', 'route1', 'rar');
linksEqual(Ember.$('a', '#qunit-fixture'), ["/foo", "/bar", "/rar", "/foo", "/bar", "/rar", "/rar", "/foo"]);
Ember.run(indexController.routeNames, 'shiftObject');
linksEqual(Ember.$('a', '#qunit-fixture'), ["/bar", "/rar", "/bar", "/rar", "/rar", "/foo"]);
});
test("The non-block form {{link-to}} helper moves into the named route", function() {
expect(3);
Router.map(function(match) {
this.route("contact");
});
Ember.TEMPLATES.index = compile("<h3>Home</h3>{{link-to 'Contact us' 'contact' id='contact-link'}}{{#link-to 'index' id='self-link'}}Self{{/link-to}}");
Ember.TEMPLATES.contact = compile("<h3>Contact</h3>{{link-to 'Home' 'index' id='home-link'}}{{link-to 'Self' 'contact' id='self-link'}}");
bootApplication();
Ember.run(function() {
Ember.$('#contact-link', '#qunit-fixture').click();
});
equal(Ember.$('h3:contains(Contact)', '#qunit-fixture').length, 1, "The contact template was rendered");
equal(Ember.$('#self-link.active', '#qunit-fixture').length, 1, "The self-link was rendered with active class");
equal(Ember.$('#home-link:not(.active)', '#qunit-fixture').length, 1, "The other link was rendered without active class");
});
test("The non-block form {{link-to}} helper updates the link text when it is a binding", function() {
expect(8);
Router.map(function(match) {
this.route("contact");
});
App.IndexController = Ember.Controller.extend({
contactName: 'Jane'
});
Ember.TEMPLATES.index = compile("<h3>Home</h3>{{link-to contactName 'contact' id='contact-link'}}{{#link-to 'index' id='self-link'}}Self{{/link-to}}");
Ember.TEMPLATES.contact = compile("<h3>Contact</h3>{{link-to 'Home' 'index' id='home-link'}}{{link-to 'Self' 'contact' id='self-link'}}");
bootApplication();
Ember.run(function() {
router.handleURL("/");
});
var controller = container.lookup('controller:index');
equal(Ember.$('#contact-link:contains(Jane)', '#qunit-fixture').length, 1, "The link title is correctly resolved");
Ember.run(function() {
controller.set('contactName', 'Joe');
});
equal(Ember.$('#contact-link:contains(Joe)', '#qunit-fixture').length, 1, "The link title is correctly updated when the bound property changes");
Ember.run(function() {
controller.set('contactName', 'Robert');
});
equal(Ember.$('#contact-link:contains(Robert)', '#qunit-fixture').length, 1, "The link title is correctly updated when the bound property changes a second time");
Ember.run(function() {
Ember.$('#contact-link', '#qunit-fixture').click();
});
equal(Ember.$('h3:contains(Contact)', '#qunit-fixture').length, 1, "The contact template was rendered");
equal(Ember.$('#self-link.active', '#qunit-fixture').length, 1, "The self-link was rendered with active class");
equal(Ember.$('#home-link:not(.active)', '#qunit-fixture').length, 1, "The other link was rendered without active class");
Ember.run(function() {
Ember.$('#home-link', '#qunit-fixture').click();
});
equal(Ember.$('h3:contains(Home)', '#qunit-fixture').length, 1, "The index template was rendered");
equal(Ember.$('#contact-link:contains(Robert)', '#qunit-fixture').length, 1, "The link title is correctly updated when the route changes");
});
test("The non-block form {{link-to}} helper moves into the named route with context", function() {
expect(5);
Router.map(function(match) {
this.route("item", { path: "/item/:id" });
});
App.IndexRoute = Ember.Route.extend({
model: function() {
return Ember.A([
{ id: "yehuda", name: "Yehuda Katz" },
{ id: "tom", name: "Tom Dale" },
{ id: "erik", name: "Erik Brynroflsson" }
]);
}
});
App.ItemRoute = Ember.Route.extend({
serialize: function(object) {
return { id: object.id };
}
});
Ember.TEMPLATES.index = compile("<h3>Home</h3><ul>{{#each person in controller}}<li>{{link-to person.name 'item' person}}</li>{{/each}}</ul>");
Ember.TEMPLATES.item = compile("<h3>Item</h3><p>{{name}}</p>{{#link-to 'index' id='home-link'}}Home{{/link-to}}");
bootApplication();
Ember.run(function() {
Ember.$('li a:contains(Yehuda)', '#qunit-fixture').click();
});
equal(Ember.$('h3:contains(Item)', '#qunit-fixture').length, 1, "The item template was rendered");
equal(Ember.$('p', '#qunit-fixture').text(), "Yehuda Katz", "The name is correct");
Ember.run(function() { Ember.$('#home-link').click(); });
equal(normalizeUrl(Ember.$('li a:contains(Yehuda)').attr('href')), "/item/yehuda");
equal(normalizeUrl(Ember.$('li a:contains(Tom)').attr('href')), "/item/tom");
equal(normalizeUrl(Ember.$('li a:contains(Erik)').attr('href')), "/item/erik");
});
test("The non-block form {{link-to}} performs property lookup", function() {
Ember.TEMPLATES.index = compile("{{link-to 'string' 'index' id='string-link'}}{{link-to path foo id='path-link'}}{{link-to view.foo view.foo id='view-link'}}");
function assertEquality(href) {
equal(normalizeUrl(Ember.$('#string-link', '#qunit-fixture').attr('href')), '/');
equal(normalizeUrl(Ember.$('#path-link', '#qunit-fixture').attr('href')), href);
equal(normalizeUrl(Ember.$('#view-link', '#qunit-fixture').attr('href')), href);
}
App.IndexView = Ember.View.extend({
foo: 'index',
elementId: 'index-view'
});
App.IndexController = Ember.Controller.extend({
foo: 'index'
});
App.Router.map(function() {
this.route('about');
});
bootApplication();
Ember.run(router, 'handleURL', '/');
assertEquality('/');
var controller = container.lookup('controller:index');
var view = Ember.View.views['index-view'];
Ember.run(function() {
controller.set('foo', 'about');
view.set('foo', 'about');
});
assertEquality('/about');
});
test("The non-block form {{link-to}} protects against XSS", function() {
Ember.TEMPLATES.application = compile("{{link-to display 'index' id='link'}}");
App.ApplicationController = Ember.Controller.extend({
display: 'blahzorz'
});
bootApplication();
Ember.run(router, 'handleURL', '/');
var controller = container.lookup('controller:application');
equal(Ember.$('#link', '#qunit-fixture').text(), 'blahzorz');
Ember.run(function() {
controller.set('display', '<b>BLAMMO</b>');
});
equal(Ember.$('#link', '#qunit-fixture').text(), '<b>BLAMMO</b>');
equal(Ember.$('b', '#qunit-fixture').length, 0);
});
test("the {{link-to}} helper calls preventDefault", function(){
Router.map(function() {
this.route("about");
});
bootApplication();
Ember.run(router, 'handleURL', '/');
var event = Ember.$.Event("click");
Ember.$('#about-link', '#qunit-fixture').trigger(event);
equal(event.isDefaultPrevented(), true, "should preventDefault");
});
test("the {{link-to}} helper does not call preventDefault if `preventDefault=false` is passed as an option", function(){
Ember.TEMPLATES.index = compile("{{#link-to 'about' id='about-link' preventDefault=false}}About{{/link-to}}");
Router.map(function() {
this.route("about");
});
bootApplication();
Ember.run(router, 'handleURL', '/');
var event = Ember.$.Event("click");
Ember.$('#about-link', '#qunit-fixture').trigger(event);
equal(event.isDefaultPrevented(), false, "should not preventDefault");
});
test("the {{link-to}} helper does not throw an error if its route has exited", function(){
expect(0);
Ember.TEMPLATES.application = compile("{{#link-to 'index' id='home-link'}}Home{{/link-to}}{{#link-to 'post' defaultPost id='default-post-link'}}Default Post{{/link-to}}{{#if currentPost}}{{#link-to 'post' id='post-link'}}Post{{/link-to}}{{/if}}");
App.ApplicationController = Ember.Controller.extend({
needs: ['post'],
currentPost: Ember.computed.alias('controllers.post.model')
});
App.PostController = Ember.Controller.extend({
model: {id: 1}
});
Router.map(function() {
this.route("post", {path: 'post/:post_id'});
});
bootApplication();
Ember.run(router, 'handleURL', '/');
Ember.run(function() {
Ember.$('#default-post-link', '#qunit-fixture').click();
});
Ember.run(function() {
Ember.$('#home-link', '#qunit-fixture').click();
});
});
test("{{link-to}} active property respects changing parent route context", function() {
Ember.TEMPLATES.application = compile(
"{{link-to 'OMG' 'things' 'omg' id='omg-link'}} " +
"{{link-to 'LOL' 'things' 'lol' id='lol-link'}} ");
Router.map(function() {
this.resource('things', { path: '/things/:name' }, function() {
this.route('other');
});
});
bootApplication();
Ember.run(router, 'handleURL', '/things/omg');
shouldBeActive('#omg-link');
shouldNotBeActive('#lol-link');
Ember.run(router, 'handleURL', '/things/omg/other');
shouldBeActive('#omg-link');
shouldNotBeActive('#lol-link');
});
test("{{link-to}} populates href with default query param values even without query-params object", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo'],
foo: '123'
});
Ember.TEMPLATES.index = compile("{{#link-to 'index' id='the-link'}}Index{{/link-to}}");
bootApplication();
equal(Ember.$('#the-link').attr('href'), "/", "link has right href");
});
test("{{link-to}} populates href with default query param values with empty query-params object", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo'],
foo: '123'
});
Ember.TEMPLATES.index = compile("{{#link-to 'index' (query-params) id='the-link'}}Index{{/link-to}}");
bootApplication();
equal(Ember.$('#the-link').attr('href'), "/", "link has right href");
});
test("{{link-to}} populates href with supplied query param values", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo'],
foo: '123'
});
Ember.TEMPLATES.index = compile("{{#link-to 'index' (query-params foo='456') id='the-link'}}Index{{/link-to}}");
bootApplication();
equal(Ember.$('#the-link').attr('href'), "/?foo=456", "link has right href");
});
test("{{link-to}} populates href with partially supplied query param values", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo', 'bar'],
foo: '123',
bar: 'yes'
});
Ember.TEMPLATES.index = compile("{{#link-to 'index' (query-params foo='456') id='the-link'}}Index{{/link-to}}");
bootApplication();
equal(Ember.$('#the-link').attr('href'), "/?foo=456", "link has right href");
});
test("{{link-to}} populates href with partially supplied query param values, but omits if value is default value", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo', 'bar'],
foo: '123',
bar: 'yes'
});
Ember.TEMPLATES.index = compile("{{#link-to 'index' (query-params foo='123') id='the-link'}}Index{{/link-to}}");
bootApplication();
equal(Ember.$('#the-link').attr('href'), "/", "link has right href");
});
test("{{link-to}} populates href with fully supplied query param values", function() {
App.IndexController = Ember.Controller.extend({
queryParams: ['foo', 'bar'],
foo: '123',
bar: 'yes'
});
Ember.TEMPLATES.index = compile("{{#link-to 'index' (query-params foo='456' bar='NAW') id='the-link'}}Index{{/link-to}}");
bootApplication();
equal(Ember.$('#the-link').attr('href'), "/?bar=NAW&foo=456", "link has right href");
});
QUnit.module("The {{link-to}} helper: invoking with query params", {
setup: function() {
Ember.run(function() {
sharedSetup();
App.IndexController = Ember.Controller.extend({
queryParams: ['foo', 'bar', 'abool'],
foo: '123',
bar: 'abc',
boundThing: "OMG",
abool: true
});
App.AboutController = Ember.Controller.extend({
queryParams: ['baz', 'bat'],
baz: 'alex',
bat: 'borf'
});
container.register('router:main', Router);
});
},
teardown: sharedTeardown
});
test("doesn't update controller QP properties on current route when invoked", function() {
Ember.TEMPLATES.index = compile("{{#link-to 'index' id='the-link'}}Index{{/link-to}}");
bootApplication();
Ember.run(Ember.$('#the-link'), 'click');
var indexController = container.lookup('controller:index');
deepEqual(indexController.getProperties('foo', 'bar'), { foo: '123', bar: 'abc' }, "controller QP properties not");
});
test("doesn't update controller QP properties on current route when invoked (empty query-params obj)", function() {
Ember.TEMPLATES.index = compile("{{#link-to 'index' (query-params) id='the-link'}}Index{{/link-to}}");
bootApplication();
Ember.run(Ember.$('#the-link'), 'click');
var indexController = container.lookup('controller:index');
deepEqual(indexController.getProperties('foo', 'bar'), { foo: '123', bar: 'abc' }, "controller QP properties not");
});
test("link-to with no params throws", function() {
Ember.TEMPLATES.index = compile("{{#link-to id='the-link'}}Index{{/link-to}}");
expectAssertion(function() {
bootApplication();
}, /one or more/);
});
test("doesn't update controller QP properties on current route when invoked (empty query-params obj, inferred route)", function() {
Ember.TEMPLATES.index = compile("{{#link-to (query-params) id='the-link'}}Index{{/link-to}}");
bootApplication();
Ember.run(Ember.$('#the-link'), 'click');
var indexController = container.lookup('controller:index');
deepEqual(indexController.getProperties('foo', 'bar'), { foo: '123', bar: 'abc' }, "controller QP properties not");
});
test("updates controller QP properties on current route when invoked", function() {
Ember.TEMPLATES.index = compile("{{#link-to 'index' (query-params foo='456') id='the-link'}}Index{{/link-to}}");
bootApplication();
Ember.run(Ember.$('#the-link'), 'click');
var indexController = container.lookup('controller:index');
deepEqual(indexController.getProperties('foo', 'bar'), { foo: '456', bar: 'abc' }, "controller QP properties updated");
});
test("updates controller QP properties on current route when invoked (inferred route)", function() {
Ember.TEMPLATES.index = compile("{{#link-to (query-params foo='456') id='the-link'}}Index{{/link-to}}");
bootApplication();
Ember.run(Ember.$('#the-link'), 'click');
var indexController = container.lookup('controller:index');
deepEqual(indexController.getProperties('foo', 'bar'), { foo: '456', bar: 'abc' }, "controller QP properties updated");
});
test("updates controller QP properties on other route after transitioning to that route", function() {
Router.map(function() {
this.route('about');
});
Ember.TEMPLATES.index = compile("{{#link-to 'about' (query-params baz='lol') id='the-link'}}About{{/link-to}}");
bootApplication();
equal(Ember.$('#the-link').attr('href'), '/about?baz=lol');
Ember.run(Ember.$('#the-link'), 'click');
var aboutController = container.lookup('controller:about');
deepEqual(aboutController.getProperties('baz', 'bat'), { baz: 'lol', bat: 'borf' }, "about controller QP properties updated");
equal(container.lookup('controller:application').get('currentPath'), "about");
});
test("supplied QP properties can be bound", function() {
var indexController = container.lookup('controller:index');
Ember.TEMPLATES.index = compile("{{#link-to (query-params foo=boundThing) id='the-link'}}Index{{/link-to}}");
bootApplication();
equal(Ember.$('#the-link').attr('href'), '/?foo=OMG');
Ember.run(indexController, 'set', 'boundThing', "ASL");
equal(Ember.$('#the-link').attr('href'), '/?foo=ASL');
});
test("supplied QP properties can be bound (booleans)", function() {
var indexController = container.lookup('controller:index');
Ember.TEMPLATES.index = compile("{{#link-to (query-params abool=boundThing) id='the-link'}}Index{{/link-to}}");
bootApplication();
equal(Ember.$('#the-link').attr('href'), '/?abool=OMG');
Ember.run(indexController, 'set', 'boundThing', false);
equal(Ember.$('#the-link').attr('href'), '/?abool=false');
Ember.run(Ember.$('#the-link'), 'click');
deepEqual(indexController.getProperties('foo', 'bar', 'abool'), { foo: '123', bar: 'abc', abool: false });
});
test("href updates when unsupplied controller QP props change", function() {
var indexController = container.lookup('controller:index');
Ember.TEMPLATES.index = compile("{{#link-to (query-params foo='lol') id='the-link'}}Index{{/link-to}}");
bootApplication();
equal(Ember.$('#the-link').attr('href'), '/?foo=lol');
Ember.run(indexController, 'set', 'bar', 'BORF');
equal(Ember.$('#the-link').attr('href'), '/?bar=BORF&foo=lol');
Ember.run(indexController, 'set', 'foo', 'YEAH');
equal(Ember.$('#the-link').attr('href'), '/?bar=BORF&foo=lol');
});
test("The {{link-to}} applies activeClass when query params are not changed", function() {
Ember.TEMPLATES.index = compile(
"{{#link-to (query-params foo='cat') id='cat-link'}}Index{{/link-to}} " +
"{{#link-to (query-params foo='dog') id='dog-link'}}Index{{/link-to}} " +
"{{#link-to 'index' id='change-nothing'}}Index{{/link-to}}"
);
Ember.TEMPLATES.search = compile(
"{{#link-to (query-params search='same') id='same-search'}}Index{{/link-to}} " +
"{{#link-to (query-params search='change') id='change-search'}}Index{{/link-to}} " +
"{{#link-to (query-params search='same' archive=true) id='same-search-add-archive'}}Index{{/link-to}} " +
"{{#link-to (query-params archive=true) id='only-add-archive'}}Index{{/link-to}} " +
"{{#link-to (query-params search='same' archive=true) id='both-same'}}Index{{/link-to}} " +
"{{#link-to (query-params search='different' archive=true) id='change-one'}}Index{{/link-to}} " +
"{{#link-to (query-params search='different' archive=false) id='remove-one'}}Index{{/link-to}} " +
"{{outlet}}"
);
Ember.TEMPLATES['search/results'] = compile(
"{{#link-to (query-params sort='title') id='same-sort-child-only'}}Index{{/link-to}} " +
"{{#link-to (query-params search='same') id='same-search-parent-only'}}Index{{/link-to}} " +
"{{#link-to (query-params search='change') id='change-search-parent-only'}}Index{{/link-to}} " +
"{{#link-to (query-params search='same' sort='title') id='same-search-same-sort-child-and-parent'}}Index{{/link-to}} " +
"{{#link-to (query-params search='same' sort='author') id='same-search-different-sort-child-and-parent'}}Index{{/link-to}} " +
"{{#link-to (query-params search='change' sort='title') id='change-search-same-sort-child-and-parent'}}Index{{/link-to}} " +
"{{#link-to (query-params foo='dog') id='dog-link'}}Index{{/link-to}} "
);
Router.map(function() {
this.resource("search", function() {
this.route("results");
});
});
App.SearchController = Ember.Controller.extend({
queryParams: ['search', 'archive'],
search: '',
archive: false
});
App.SearchResultsController = Ember.Controller.extend({
queryParams: ['sort', 'showDetails'],
sort: 'title',
showDetails: true
});
bootApplication();
//Basic tests
shouldNotBeActive('#cat-link');
shouldNotBeActive('#dog-link');
Ember.run(router, 'handleURL', '/?foo=cat');
shouldBeActive('#cat-link');
shouldNotBeActive('#dog-link');
Ember.run(router, 'handleURL', '/?foo=dog');
shouldBeActive('#dog-link');
shouldNotBeActive('#cat-link');
shouldBeActive('#change-nothing');
//Multiple params
Ember.run(function() {
router.handleURL("/search?search=same");
});
shouldBeActive('#same-search');
shouldNotBeActive('#change-search');
shouldNotBeActive('#same-search-add-archive');
shouldNotBeActive('#only-add-archive');
shouldNotBeActive('#remove-one');
Ember.run(function() {
router.handleURL("/search?search=same&archive=true");
});
shouldBeActive('#both-same');
shouldNotBeActive('#change-one');
//Nested Controllers
Ember.run(function() {
// Note: this is kind of a strange case; sort's default value is 'title',
// so this URL shouldn't have been generated in the first place, but
// we should also be able to gracefully handle these cases.
router.handleURL("/search/results?search=same&sort=title&showDetails=true");
});
//shouldBeActive('#same-sort-child-only');
shouldBeActive('#same-search-parent-only');
shouldNotBeActive('#change-search-parent-only');
shouldBeActive('#same-search-same-sort-child-and-parent');
shouldNotBeActive('#same-search-different-sort-child-and-parent');
shouldNotBeActive('#change-search-same-sort-child-and-parent');
});
test("The {{link-to}} applies active class when query-param is number", function() {
Ember.TEMPLATES.index = compile(
"{{#link-to (query-params page=pageNumber) id='page-link'}}Index{{/link-to}} ");
App.IndexController = Ember.Controller.extend({
queryParams: ['page'],
page: 1,
pageNumber: 5
});
bootApplication();
shouldNotBeActive('#page-link');
Ember.run(router, 'handleURL', '/?page=5');
shouldBeActive('#page-link');
});
test("The {{link-to}} applies active class when query-param is array", function() {
Ember.TEMPLATES.index = compile(
"{{#link-to (query-params pages=pagesArray) id='array-link'}}Index{{/link-to}} " +
"{{#link-to (query-params pages=biggerArray) id='bigger-link'}}Index{{/link-to}} " +
"{{#link-to (query-params pages=emptyArray) id='empty-link'}}Index{{/link-to}} "
);
App.IndexController = Ember.Controller.extend({
queryParams: ['pages'],
pages: [],
pagesArray: [1,2],
biggerArray: [1,2,3],
emptyArray: []
});
bootApplication();
shouldNotBeActive('#array-link');
Ember.run(router, 'handleURL', '/?pages=%5B1%2C2%5D');
shouldBeActive('#array-link');
shouldNotBeActive('#bigger-link');
shouldNotBeActive('#empty-link');
Ember.run(router, 'handleURL', '/?pages=%5B2%2C1%5D');
shouldNotBeActive('#array-link');
shouldNotBeActive('#bigger-link');
shouldNotBeActive('#empty-link');
Ember.run(router, 'handleURL', '/?pages=%5B1%2C2%2C3%5D');
shouldBeActive('#bigger-link');
shouldNotBeActive('#array-link');
shouldNotBeActive('#empty-link');
});
test("The {{link-to}} helper applies active class to parent route", function() {
App.Router.map(function() {
this.resource('parent', function() {
this.route('child');
});
});
Ember.TEMPLATES.application = compile(
"{{#link-to 'parent' id='parent-link'}}Parent{{/link-to}} " +
"{{#link-to 'parent.child' id='parent-child-link'}}Child{{/link-to}} " +
"{{#link-to 'parent' (query-params foo=cat) id='parent-link-qp'}}Parent{{/link-to}} " +
"{{outlet}}"
);
App.ParentChildController = Ember.ObjectController.extend({
queryParams: ['foo'],
foo: 'bar'
});
bootApplication();
shouldNotBeActive('#parent-link');
shouldNotBeActive('#parent-child-link');
shouldNotBeActive('#parent-link-qp');
Ember.run(router, 'handleURL', '/parent/child?foo=dog');
shouldBeActive('#parent-link');
shouldNotBeActive('#parent-link-qp');
});
test("The {{link-to}} helper disregards query-params in activeness computation when current-when specified", function() {
App.Router.map(function() {
this.route('parent');
});
Ember.TEMPLATES.application = compile(
"{{#link-to 'parent' (query-params page=1) current-when='parent' id='app-link'}}Parent{{/link-to}} {{outlet}}");
Ember.TEMPLATES.parent = compile(
"{{#link-to 'parent' (query-params page=1) current-when='parent' id='parent-link'}}Parent{{/link-to}} {{outlet}}");
App.ParentController = Ember.ObjectController.extend({
queryParams: ['page'],
page: 1
});
bootApplication();
equal(Ember.$('#app-link').attr('href'), '/parent');
shouldNotBeActive('#app-link');
Ember.run(router, 'handleURL', '/parent?page=2');
equal(Ember.$('#app-link').attr('href'), '/parent');
shouldBeActive('#app-link');
equal(Ember.$('#parent-link').attr('href'), '/parent');
shouldBeActive('#parent-link');
var parentController = container.lookup('controller:parent');
equal(parentController.get('page'), 2);
Ember.run(parentController, 'set', 'page', 3);
equal(router.get('location.path'), '/parent?page=3');
shouldBeActive('#app-link');
shouldBeActive('#parent-link');
Ember.$('#app-link').click();
equal(router.get('location.path'), '/parent');
});
function basicEagerURLUpdateTest(setTagName) {
expect(6);
if (setTagName) {
Ember.TEMPLATES.application = compile("{{outlet}}{{link-to 'Index' 'index' id='index-link'}}{{link-to 'About' 'about' id='about-link' tagName='span'}}");
}
bootApplication();
equal(updateCount, 0);
Ember.run(Ember.$('#about-link'), 'click');
// URL should be eagerly updated now
equal(updateCount, 1);
equal(router.get('location.path'), '/about');
// Resolve the promise.
Ember.run(aboutDefer, 'resolve');
equal(router.get('location.path'), '/about');
// Shouldn't have called update url again.
equal(updateCount, 1);
equal(router.get('location.path'), '/about');
}
var aboutDefer;
QUnit.module("The {{link-to}} helper: eager URL updating", {
setup: function() {
Ember.run(function() {
sharedSetup();
container.register('router:main', Router);
Router.map(function() {
this.route('about');
});
App.AboutRoute = Ember.Route.extend({
model: function() {
aboutDefer = Ember.RSVP.defer();
return aboutDefer.promise;
}
});
Ember.TEMPLATES.application = compile("{{outlet}}{{link-to 'Index' 'index' id='index-link'}}{{link-to 'About' 'about' id='about-link'}}");
});
},
teardown: function() {
sharedTeardown();
aboutDefer = null;
}
});
test("invoking a link-to with a slow promise eager updates url", function() {
basicEagerURLUpdateTest(false);
});
test("when link-to eagerly updates url, the path it provides does NOT include the rootURL", function() {
expect(2);
// HistoryLocation is the only Location class that will cause rootURL to be
// prepended to link-to href's right now
var HistoryTestLocation = Ember.HistoryLocation.extend({
location: {
hash: '',
hostname: 'emberjs.com',
href: 'http://emberjs.com/app/',
pathname: '/app/',
protocol: 'http:',
port: '',
search: ''
},
// Don't actually touch the URL
replaceState: function(path) {},
pushState: function(path) {},
setURL: function(path) {
set(this, 'path', path);
},
replaceURL: function(path) {
set(this, 'path', path);
}
});
container.register('location:historyTest', HistoryTestLocation);
Router.reopen({
location: 'historyTest',
rootURL: '/app/'
});
bootApplication();
// href should have rootURL prepended
equal(Ember.$('#about-link').attr('href'), '/app/about');
Ember.run(Ember.$('#about-link'), 'click');
// Actual path provided to Location class should NOT have rootURL
equal(router.get('location.path'), '/about');
});
test("non `a` tags also eagerly update URL", function() {
basicEagerURLUpdateTest(true);
});
test("invoking a link-to with a promise that rejects on the run loop doesn't update url", function() {
App.AboutRoute = Ember.Route.extend({
model: function() {
return Ember.RSVP.reject();
}
});
bootApplication();
Ember.run(Ember.$('#about-link'), 'click');
// Shouldn't have called update url.
equal(updateCount, 0);
equal(router.get('location.path'), '', 'url was not updated');
});
test("invoking a link-to whose transition gets aborted in will transition doesn't update the url", function() {
App.IndexRoute = Ember.Route.extend({
actions: {
willTransition: function(transition) {
ok(true, "aborting transition");
transition.abort();
}
}
});
bootApplication();
Ember.run(Ember.$('#about-link'), 'click');
// Shouldn't have called update url.
equal(updateCount, 0);
equal(router.get('location.path'), '', 'url was not updated');
});
| ming-codes/ember.js | packages/ember/tests/helpers/link_to_test.js | JavaScript | mit | 58,903 |
/*
* Copyright (c) 2014 - present Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*/
/*jslint regexp: true */
/*global describe, it, expect, beforeFirst, afterLast, beforeEach, afterEach, waits, waitsFor, waitsForDone, runs, spyOn */
define(function (require, exports, module) {
"use strict";
var Commands = require("command/Commands"),
KeyEvent = require("utils/KeyEvent"),
SpecRunnerUtils = require("spec/SpecRunnerUtils"),
FileSystemError = require("filesystem/FileSystemError"),
FileUtils = require("file/FileUtils"),
FindUtils = require("search/FindUtils"),
Async = require("utils/Async"),
LanguageManager = require("language/LanguageManager"),
StringUtils = require("utils/StringUtils"),
Strings = require("strings"),
_ = require("thirdparty/lodash");
var PreferencesManager;
var promisify = Async.promisify; // for convenience
describe("FindInFiles", function () {
this.category = "integration";
var defaultSourcePath = SpecRunnerUtils.getTestPath("/spec/FindReplace-test-files"),
testPath,
nextFolderIndex = 1,
searchResults,
CommandManager,
DocumentManager,
MainViewManager,
EditorManager,
FileFilters,
FileSystem,
File,
FindInFiles,
FindInFilesUI,
ProjectManager,
testWindow,
$;
beforeFirst(function () {
SpecRunnerUtils.createTempDirectory();
// Create a new window that will be shared by ALL tests in this spec.
SpecRunnerUtils.createTestWindowAndRun(this, function (w) {
testWindow = w;
// Load module instances from brackets.test
CommandManager = testWindow.brackets.test.CommandManager;
DocumentManager = testWindow.brackets.test.DocumentManager;
EditorManager = testWindow.brackets.test.EditorManager;
FileFilters = testWindow.brackets.test.FileFilters;
FileSystem = testWindow.brackets.test.FileSystem;
File = testWindow.brackets.test.File;
FindInFiles = testWindow.brackets.test.FindInFiles;
FindInFilesUI = testWindow.brackets.test.FindInFilesUI;
ProjectManager = testWindow.brackets.test.ProjectManager;
MainViewManager = testWindow.brackets.test.MainViewManager;
$ = testWindow.$;
PreferencesManager = testWindow.brackets.test.PreferencesManager;
PreferencesManager.set("findInFiles.nodeSearch", false);
PreferencesManager.set("findInFiles.instantSearch", false);
});
});
afterLast(function () {
CommandManager = null;
DocumentManager = null;
EditorManager = null;
FileSystem = null;
File = null;
FindInFiles = null;
FindInFilesUI = null;
ProjectManager = null;
MainViewManager = null;
$ = null;
testWindow = null;
PreferencesManager = null;
SpecRunnerUtils.closeTestWindow();
SpecRunnerUtils.removeTempDirectory();
});
function openProject(sourcePath) {
testPath = sourcePath;
SpecRunnerUtils.loadProjectInTestWindow(testPath);
}
// Note: these utilities can be called without wrapping in a runs() block, because all their top-level
// statements are calls to runs() or waitsFor() (or other functions that make the same guarantee). But after
// calling one of these, calls to other Jasmine APIs (e.g. such as expects()) *must* be wrapped in runs().
function waitForSearchBarClose() {
// Make sure search bar from previous test has animated out fully
waitsFor(function () {
return $(".modal-bar").length === 0;
}, "search bar close");
}
function openSearchBar(scope, showReplace) {
runs(function () {
FindInFiles._searchDone = false;
FindInFilesUI._showFindBar(scope, showReplace);
});
waitsFor(function () {
return $(".modal-bar").length === 1;
}, "search bar open");
runs(function () {
// Reset the regexp and case-sensitivity toggles.
["#find-regexp", "#find-case-sensitive"].forEach(function (button) {
if ($(button).is(".active")) {
$(button).click();
expect($(button).is(".active")).toBe(false);
}
});
});
}
function closeSearchBar() {
runs(function () {
FindInFilesUI._closeFindBar();
});
waitForSearchBarClose();
}
function executeSearch(searchString) {
runs(function () {
var $searchField = $("#find-what");
$searchField.val(searchString).trigger("input");
SpecRunnerUtils.simulateKeyEvent(KeyEvent.DOM_VK_RETURN, "keydown", $searchField[0]);
});
waitsFor(function () {
return FindInFiles._searchDone;
}, "Find in Files done");
}
function numMatches(results) {
return _.reduce(_.pluck(results, "matches"), function (sum, matches) {
return sum + matches.length;
}, 0);
}
function doSearch(options) {
runs(function () {
FindInFiles.doSearchInScope(options.queryInfo, null, null, options.replaceText).done(function (results) {
searchResults = results;
});
});
waitsFor(function () { return searchResults; }, 1000, "search completed");
runs(function () {
expect(numMatches(searchResults)).toBe(options.numMatches);
});
}
// The functions below are *not* safe to call without wrapping in runs(), if there were any async steps previously
// (including calls to any of the utilities above)
function doReplace(options) {
return FindInFiles.doReplace(searchResults, options.replaceText, {
forceFilesOpen: options.forceFilesOpen,
isRegexp: options.queryInfo.isRegexp
});
}
/**
* Helper function that calls the given asynchronous processor once on each file in the given subtree
* and returns a promise that's resolved when all files are processed.
* @param {string} rootPath The root of the subtree to search.
* @param {function(string, string): $.Promise} processor The function that processes each file. Args are:
* contents: the contents of the file
* fullPath: the full path to the file on disk
* @return {$.Promise} A promise that is resolved when all files are processed, or rejected if there was
* an error reading one of the files or one of the process steps was rejected.
*/
function visitAndProcessFiles(rootPath, processor) {
var rootEntry = FileSystem.getDirectoryForPath(rootPath),
files = [];
function visitor(file) {
if (!file.isDirectory) {
// Skip binary files, since we don't care about them for these purposes and we can't read them
// to get their contents.
if (!LanguageManager.getLanguageForPath(file.fullPath).isBinary()) {
files.push(file);
}
}
return true;
}
return promisify(rootEntry, "visit", visitor).then(function () {
return Async.doInParallel(files, function (file) {
return promisify(file, "read").then(function (contents) {
return processor(contents, file.fullPath);
});
});
});
}
function ensureParentExists(file) {
var parentDir = FileSystem.getDirectoryForPath(file.parentPath);
return promisify(parentDir, "exists").then(function (exists) {
if (!exists) {
return promisify(parentDir, "create");
}
return null;
});
}
function copyWithLineEndings(src, dest, lineEndings) {
function copyOneFileWithLineEndings(contents, srcPath) {
var destPath = dest + srcPath.slice(src.length),
destFile = FileSystem.getFileForPath(destPath),
newContents = FileUtils.translateLineEndings(contents, lineEndings);
return ensureParentExists(destFile).then(function () {
return promisify(destFile, "write", newContents);
});
}
return promisify(FileSystem.getDirectoryForPath(dest), "create").then(function () {
return visitAndProcessFiles(src, copyOneFileWithLineEndings);
});
}
// Creates a clean copy of the test project before each test. We don't delete the old
// folders as we go along (to avoid problems with deleting the project out from under the
// open test window); we just delete the whole temp folder at the end.
function openTestProjectCopy(sourcePath, lineEndings) {
testPath = SpecRunnerUtils.getTempDirectory() + "/find-in-files-test-" + (nextFolderIndex++);
runs(function () {
if (lineEndings) {
waitsForDone(copyWithLineEndings(sourcePath, testPath, lineEndings), "copy test files with line endings");
} else {
// Note that we don't skip image files in this case, but it doesn't matter since we'll
// only compare files that have an associated file in the known goods folder.
waitsForDone(SpecRunnerUtils.copy(sourcePath, testPath), "copy test files");
}
});
SpecRunnerUtils.loadProjectInTestWindow(testPath);
}
beforeEach(function () {
searchResults = null;
});
describe("Find", function () {
beforeEach(function () {
openProject(defaultSourcePath);
});
afterEach(closeSearchBar);
it("should find all occurences in project", function () {
openSearchBar();
executeSearch("foo");
runs(function () {
var fileResults = FindInFiles.searchModel.results[testPath + "/bar.txt"];
expect(fileResults).toBeFalsy();
fileResults = FindInFiles.searchModel.results[testPath + "/foo.html"];
expect(fileResults).toBeTruthy();
expect(fileResults.matches.length).toBe(7);
fileResults = FindInFiles.searchModel.results[testPath + "/foo.js"];
expect(fileResults).toBeTruthy();
expect(fileResults.matches.length).toBe(4);
fileResults = FindInFiles.searchModel.results[testPath + "/css/foo.css"];
expect(fileResults).toBeTruthy();
expect(fileResults.matches.length).toBe(3);
});
});
it("should ignore known binary file types", function () {
var $dlg, actualMessage, expectedMessage,
exists = false,
done = false,
imageDirPath = testPath + "/images";
runs(function () {
// Set project to have only images
SpecRunnerUtils.loadProjectInTestWindow(imageDirPath);
// Verify an image exists in folder
var file = FileSystem.getFileForPath(testPath + "/images/icon_twitter.png");
file.exists(function (fileError, fileExists) {
exists = fileExists;
done = true;
});
});
waitsFor(function () {
return done;
}, "file.exists");
runs(function () {
expect(exists).toBe(true);
openSearchBar();
});
runs(function () {
// Launch filter editor
FileFilters.editFilter({ name: "", patterns: [] }, -1);
// Dialog should state there are 0 files in project
$dlg = $(".modal");
expectedMessage = StringUtils.format(Strings.FILTER_FILE_COUNT_ALL, 0, Strings.FIND_IN_FILES_NO_SCOPE);
});
// Message loads asynchronously, but dialog should eventually state: "Allows all 0 files in project"
waitsFor(function () {
actualMessage = $dlg.find(".exclusions-filecount").text();
return (actualMessage === expectedMessage);
}, "display file count");
runs(function () {
// Dismiss filter dialog (OK button is disabled, have to click on Cancel)
$dlg.find(".dialog-button[data-button-id='cancel']").click();
// Close search bar
var $searchField = $(".modal-bar #find-group input");
SpecRunnerUtils.simulateKeyEvent(KeyEvent.DOM_VK_ESCAPE, "keydown", $searchField[0]);
});
runs(function () {
// Set project back to main test folder
SpecRunnerUtils.loadProjectInTestWindow(testPath);
});
});
it("should ignore unreadable files", function () {
// Add a nonexistent file to the ProjectManager.getAllFiles() result, which will force a file IO error
// when we try to read the file later. Similar errors may arise in real-world for non-UTF files, etc.
SpecRunnerUtils.injectIntoGetAllFiles(testWindow, testPath + "/doesNotExist.txt");
openSearchBar();
executeSearch("foo");
runs(function () {
expect(Object.keys(FindInFiles.searchModel.results).length).toBe(3);
});
});
it("should find all occurences in folder", function () {
var dirEntry = FileSystem.getDirectoryForPath(testPath + "/css/");
openSearchBar(dirEntry);
executeSearch("foo");
runs(function () {
var fileResults = FindInFiles.searchModel.results[testPath + "/bar.txt"];
expect(fileResults).toBeFalsy();
fileResults = FindInFiles.searchModel.results[testPath + "/foo.html"];
expect(fileResults).toBeFalsy();
fileResults = FindInFiles.searchModel.results[testPath + "/foo.js"];
expect(fileResults).toBeFalsy();
fileResults = FindInFiles.searchModel.results[testPath + "/css/foo.css"];
expect(fileResults).toBeTruthy();
expect(fileResults.matches.length).toBe(3);
});
});
it("should find all occurences in single file", function () {
var fileEntry = FileSystem.getFileForPath(testPath + "/foo.js");
openSearchBar(fileEntry);
executeSearch("foo");
runs(function () {
var fileResults = FindInFiles.searchModel.results[testPath + "/bar.txt"];
expect(fileResults).toBeFalsy();
fileResults = FindInFiles.searchModel.results[testPath + "/foo.html"];
expect(fileResults).toBeFalsy();
fileResults = FindInFiles.searchModel.results[testPath + "/foo.js"];
expect(fileResults).toBeTruthy();
expect(fileResults.matches.length).toBe(4);
fileResults = FindInFiles.searchModel.results[testPath + "/css/foo.css"];
expect(fileResults).toBeFalsy();
});
});
it("should find start and end positions", function () {
var filePath = testPath + "/foo.js",
fileEntry = FileSystem.getFileForPath(filePath);
openSearchBar(fileEntry);
executeSearch("callFoo");
runs(function () {
var fileResults = FindInFiles.searchModel.results[filePath];
expect(fileResults).toBeTruthy();
expect(fileResults.matches.length).toBe(1);
var match = fileResults.matches[0];
expect(match.start.ch).toBe(13);
expect(match.start.line).toBe(6);
expect(match.end.ch).toBe(20);
expect(match.end.line).toBe(6);
});
});
it("should keep dialog and show panel when there are results", function () {
var filePath = testPath + "/foo.js",
fileEntry = FileSystem.getFileForPath(filePath);
openSearchBar(fileEntry);
executeSearch("callFoo");
// With instant search, the Search Bar should not close on a search
runs(function () {
var fileResults = FindInFiles.searchModel.results[filePath];
expect(fileResults).toBeTruthy();
expect($("#find-in-files-results").is(":visible")).toBeTruthy();
expect($(".modal-bar").length).toBe(1);
});
});
it("should keep dialog and not show panel when there are no results", function () {
var filePath = testPath + "/bar.txt",
fileEntry = FileSystem.getFileForPath(filePath);
openSearchBar(fileEntry);
executeSearch("abcdefghi");
waitsFor(function () {
return (FindInFiles._searchDone);
}, "search complete");
runs(function () {
var result, resultFound = false;
// verify searchModel.results Object is empty
for (result in FindInFiles.searchModel.results) {
if (FindInFiles.searchModel.results.hasOwnProperty(result)) {
resultFound = true;
}
}
expect(resultFound).toBe(false);
expect($("#find-in-files-results").is(":visible")).toBeFalsy();
expect($(".modal-bar").length).toBe(1);
// Close search bar
var $searchField = $(".modal-bar #find-group input");
SpecRunnerUtils.simulateKeyEvent(KeyEvent.DOM_VK_ESCAPE, "keydown", $searchField[0]);
});
});
it("should open file in editor and select text when a result is clicked", function () {
var filePath = testPath + "/foo.html",
fileEntry = FileSystem.getFileForPath(filePath);
openSearchBar(fileEntry);
executeSearch("foo");
runs(function () {
// Verify no current document
var editor = EditorManager.getActiveEditor();
expect(editor).toBeFalsy();
// Get panel
var $searchResults = $("#find-in-files-results");
expect($searchResults.is(":visible")).toBeTruthy();
// Get list in panel
var $panelResults = $searchResults.find("table.bottom-panel-table tr");
expect($panelResults.length).toBe(8); // 7 hits + 1 file section
// First item in list is file section
expect($($panelResults[0]).hasClass("file-section")).toBeTruthy();
// Click second item which is first hit
var $firstHit = $($panelResults[1]);
expect($firstHit.hasClass("file-section")).toBeFalsy();
$firstHit.click();
setTimeout(function () {
// Verify current document
editor = EditorManager.getActiveEditor();
expect(editor.document.file.fullPath).toEqual(filePath);
// Verify selection
expect(editor.getSelectedText().toLowerCase() === "foo");
waitsForDone(CommandManager.execute(Commands.FILE_CLOSE_ALL), "closing all files");
}, 500);
});
});
it("should open file in working set when a result is double-clicked", function () {
var filePath = testPath + "/foo.js",
fileEntry = FileSystem.getFileForPath(filePath);
openSearchBar(fileEntry);
executeSearch("foo");
runs(function () {
// Verify document is not yet in working set
expect(MainViewManager.findInWorkingSet(MainViewManager.ALL_PANES, filePath)).toBe(-1);
// Get list in panel
var $panelResults = $("#find-in-files-results table.bottom-panel-table tr");
expect($panelResults.length).toBe(5); // 4 hits + 1 file section
// Double-click second item which is first hit
var $firstHit = $($panelResults[1]);
expect($firstHit.hasClass("file-section")).toBeFalsy();
$firstHit.dblclick();
// Verify document is now in working set
expect(MainViewManager.findInWorkingSet(MainViewManager.ALL_PANES, filePath)).not.toBe(-1);
waitsForDone(CommandManager.execute(Commands.FILE_CLOSE_ALL), "closing all files");
});
});
it("should update results when a result in a file is edited", function () {
var filePath = testPath + "/foo.html",
fileEntry = FileSystem.getFileForPath(filePath),
panelListLen = 8, // 7 hits + 1 file section
$panelResults;
openSearchBar(fileEntry);
executeSearch("foo");
runs(function () {
// Verify document is not yet in working set
expect(MainViewManager.findInWorkingSet(MainViewManager.ALL_PANES, filePath)).toBe(-1);
// Get list in panel
$panelResults = $("#find-in-files-results table.bottom-panel-table tr");
expect($panelResults.length).toBe(panelListLen);
// Click second item which is first hit
var $firstHit = $($panelResults[1]);
expect($firstHit.hasClass("file-section")).toBeFalsy();
$firstHit.click();
});
// Wait for file to open if not already open
waitsFor(function () {
var editor = EditorManager.getActiveEditor();
return (editor.document.file.fullPath === filePath);
}, 1000, "file open");
// Wait for selection to change (this happens asynchronously after file opens)
waitsFor(function () {
var editor = EditorManager.getActiveEditor(),
sel = editor.getSelection();
return (sel.start.line === 4 && sel.start.ch === 7);
}, 1000, "selection change");
runs(function () {
// Verify current selection
var editor = EditorManager.getActiveEditor();
expect(editor.getSelectedText().toLowerCase()).toBe("foo");
// Edit text to remove hit from file
var sel = editor.getSelection();
editor.document.replaceRange("Bar", sel.start, sel.end);
});
// Panel is updated asynchronously
waitsFor(function () {
$panelResults = $("#find-in-files-results table.bottom-panel-table tr");
return ($panelResults.length < panelListLen);
}, "Results panel updated");
runs(function () {
// Verify list automatically updated
expect($panelResults.length).toBe(panelListLen - 1);
waitsForDone(CommandManager.execute(Commands.FILE_CLOSE, { _forceClose: true }), "closing file");
});
});
it("should not clear the model until next search is actually committed", function () {
var filePath = testPath + "/foo.js",
fileEntry = FileSystem.getFileForPath(filePath);
openSearchBar(fileEntry);
executeSearch("foo");
runs(function () {
expect(Object.keys(FindInFiles.searchModel.results).length).not.toBe(0);
});
closeSearchBar();
openSearchBar(fileEntry);
runs(function () {
// Search model shouldn't be cleared from merely reopening search bar
expect(Object.keys(FindInFiles.searchModel.results).length).not.toBe(0);
});
closeSearchBar();
runs(function () {
// Search model shouldn't be cleared after search bar closed without running a search
expect(Object.keys(FindInFiles.searchModel.results).length).not.toBe(0);
});
});
});
describe("Find results paging", function () {
var expectedPages = [
{
totalResults: 500,
totalFiles: 2,
overallFirstIndex: 1,
overallLastIndex: 100,
matchRanges: [{file: 0, filename: "manyhits-1.txt", first: 0, firstLine: 1, last: 99, lastLine: 100, pattern: /i'm going to\s+find this\s+now/}],
firstPageEnabled: false,
lastPageEnabled: true,
prevPageEnabled: false,
nextPageEnabled: true
},
{
totalResults: 500,
totalFiles: 2,
overallFirstIndex: 101,
overallLastIndex: 200,
matchRanges: [{file: 0, filename: "manyhits-1.txt", first: 0, firstLine: 101, last: 99, lastLine: 200, pattern: /i'm going to\s+find this\s+now/}],
firstPageEnabled: true,
lastPageEnabled: true,
prevPageEnabled: true,
nextPageEnabled: true
},
{
totalResults: 500,
totalFiles: 2,
overallFirstIndex: 201,
overallLastIndex: 300,
matchRanges: [
{file: 0, filename: "manyhits-1.txt", first: 0, firstLine: 201, last: 49, lastLine: 250, pattern: /i'm going to\s+find this\s+now/},
{file: 1, filename: "manyhits-2.txt", first: 0, firstLine: 1, last: 49, lastLine: 50, pattern: /you're going to\s+find this\s+now/}
],
firstPageEnabled: true,
lastPageEnabled: true,
prevPageEnabled: true,
nextPageEnabled: true
},
{
totalResults: 500,
totalFiles: 2,
overallFirstIndex: 301,
overallLastIndex: 400,
matchRanges: [{file: 0, filename: "manyhits-2.txt", first: 0, firstLine: 51, last: 99, lastLine: 150, pattern: /you're going to\s+find this\s+now/}],
firstPageEnabled: true,
lastPageEnabled: true,
prevPageEnabled: true,
nextPageEnabled: true
},
{
totalResults: 500,
totalFiles: 2,
overallFirstIndex: 401,
overallLastIndex: 500,
matchRanges: [{file: 0, filename: "manyhits-2.txt", first: 0, firstLine: 151, last: 99, lastLine: 250, pattern: /you're going to\s+find this\s+now/}],
firstPageEnabled: true,
lastPageEnabled: false,
prevPageEnabled: true,
nextPageEnabled: false
}
];
function expectPageDisplay(options) {
// Check the title
expect($("#find-in-files-results .title").text().match("\\b" + options.totalResults + "\\b")).toBeTruthy();
expect($("#find-in-files-results .title").text().match("\\b" + options.totalFiles + "\\b")).toBeTruthy();
var paginationInfo = $("#find-in-files-results .pagination-col").text();
expect(paginationInfo.match("\\b" + options.overallFirstIndex + "\\b")).toBeTruthy();
expect(paginationInfo.match("\\b" + options.overallLastIndex + "\\b")).toBeTruthy();
// Check for presence of file and first/last item rows within each file
options.matchRanges.forEach(function (range) {
var $fileRow = $("#find-in-files-results tr.file-section[data-file-index='" + range.file + "']");
expect($fileRow.length).toBe(1);
expect($fileRow.find(".dialog-filename").text()).toEqual(range.filename);
var $firstMatchRow = $("#find-in-files-results tr[data-file-index='" + range.file + "'][data-item-index='" + range.first + "']");
expect($firstMatchRow.length).toBe(1);
expect($firstMatchRow.find(".line-number").text().match("\\b" + range.firstLine + "\\b")).toBeTruthy();
expect($firstMatchRow.find(".line-text").text().match(range.pattern)).toBeTruthy();
var $lastMatchRow = $("#find-in-files-results tr[data-file-index='" + range.file + "'][data-item-index='" + range.last + "']");
expect($lastMatchRow.length).toBe(1);
expect($lastMatchRow.find(".line-number").text().match("\\b" + range.lastLine + "\\b")).toBeTruthy();
expect($lastMatchRow.find(".line-text").text().match(range.pattern)).toBeTruthy();
});
// Check enablement of buttons
expect($("#find-in-files-results .first-page").hasClass("disabled")).toBe(!options.firstPageEnabled);
expect($("#find-in-files-results .last-page").hasClass("disabled")).toBe(!options.lastPageEnabled);
expect($("#find-in-files-results .prev-page").hasClass("disabled")).toBe(!options.prevPageEnabled);
expect($("#find-in-files-results .next-page").hasClass("disabled")).toBe(!options.nextPageEnabled);
}
it("should page forward, then jump back to first page, displaying correct contents at each step", function () {
openProject(SpecRunnerUtils.getTestPath("/spec/FindReplace-test-files-manyhits"));
openSearchBar();
// This search will find 500 hits in 2 files. Since there are 100 hits per page, there should
// be five pages, and the third page should have 50 results from the first file and 50 results
// from the second file.
executeSearch("find this");
runs(function () {
var i;
for (i = 0; i < 5; i++) {
if (i > 0) {
$("#find-in-files-results .next-page").click();
}
expectPageDisplay(expectedPages[i]);
}
$("#find-in-files-results .first-page").click();
expectPageDisplay(expectedPages[0]);
});
});
it("should jump to last page, then page backward, displaying correct contents at each step", function () {
openProject(SpecRunnerUtils.getTestPath("/spec/FindReplace-test-files-manyhits"));
executeSearch("find this");
runs(function () {
var i;
$("#find-in-files-results .last-page").click();
for (i = 4; i >= 0; i--) {
if (i < 4) {
$("#find-in-files-results .prev-page").click();
}
expectPageDisplay(expectedPages[i]);
}
});
});
});
describe("SearchModel update on change events", function () {
var oldResults, gotChange, wasQuickChange;
function fullTestPath(path) {
return testPath + "/" + path;
}
function expectUnchangedExcept(paths) {
Object.keys(FindInFiles.searchModel.results).forEach(function (path) {
if (paths.indexOf(path) === -1) {
expect(FindInFiles.searchModel.results[path]).toEqual(oldResults[path]);
}
});
}
beforeEach(function () {
gotChange = false;
oldResults = null;
wasQuickChange = false;
FindInFiles.searchModel.on("change.FindInFilesTest", function (event, quickChange) {
gotChange = true;
wasQuickChange = quickChange;
});
openTestProjectCopy(defaultSourcePath);
doSearch({
queryInfo: {query: "foo"},
numMatches: 14
});
runs(function () {
oldResults = _.cloneDeep(FindInFiles.searchModel.results);
});
});
afterEach(function () {
FindInFiles.searchModel.off(".FindInFilesTest");
waitsForDone(CommandManager.execute(Commands.FILE_CLOSE_ALL, { _forceClose: true }), "close all files");
});
describe("when filename changes", function () {
it("should handle a filename change", function () {
runs(function () {
FindInFiles._fileNameChangeHandler(null, fullTestPath("foo.html"), fullTestPath("newfoo.html"));
});
waitsFor(function () { return gotChange; }, "model change event");
runs(function () {
expectUnchangedExcept([fullTestPath("foo.html"), fullTestPath("newfoo.html")]);
expect(FindInFiles.searchModel.results[fullTestPath("foo.html")]).toBeUndefined();
expect(FindInFiles.searchModel.results[fullTestPath("newfoo.html")]).toEqual(oldResults[fullTestPath("foo.html")]);
expect(FindInFiles.searchModel.countFilesMatches()).toEqual({files: 3, matches: 14});
expect(wasQuickChange).toBeFalsy();
});
});
it("should handle a folder change", function () {
runs(function () {
FindInFiles._fileNameChangeHandler(null, fullTestPath("css"), fullTestPath("newcss"));
});
waitsFor(function () { return gotChange; }, "model change event");
runs(function () {
expectUnchangedExcept([fullTestPath("css/foo.css"), fullTestPath("newcss/foo.css")]);
expect(FindInFiles.searchModel.results[fullTestPath("css/foo.css")]).toBeUndefined();
expect(FindInFiles.searchModel.results[fullTestPath("newcss/foo.css")]).toEqual(oldResults[fullTestPath("css/foo.css")]);
expect(FindInFiles.searchModel.countFilesMatches()).toEqual({files: 3, matches: 14});
expect(wasQuickChange).toBeFalsy();
});
});
});
describe("when in-memory document changes", function () {
it("should update the results when a matching line is added, updating line numbers and adding the match", function () {
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: fullTestPath("foo.html") }));
});
runs(function () {
var doc = DocumentManager.getOpenDocumentForPath(fullTestPath("foo.html")),
i;
expect(doc).toBeTruthy();
// Insert another line containing "foo" immediately above the second "foo" match.
doc.replaceRange("this is a foo instance\n", {line: 5, ch: 0});
// This should update synchronously.
expect(gotChange).toBe(true);
var oldFileResults = oldResults[fullTestPath("foo.html")],
newFileResults = FindInFiles.searchModel.results[fullTestPath("foo.html")];
// First match should be unchanged.
expect(newFileResults.matches[0]).toEqual(oldFileResults.matches[0]);
// Next match should be the new match. We just check the offsets here, not everything in the match record.
expect(newFileResults.matches[1].start).toEqual({line: 5, ch: 10});
expect(newFileResults.matches[1].end).toEqual({line: 5, ch: 13});
// Rest of the matches should have had their lines adjusted.
for (i = 2; i < newFileResults.matches.length; i++) {
var newMatch = newFileResults.matches[i],
oldMatch = oldFileResults.matches[i - 1];
expect(newMatch.start).toEqual({line: oldMatch.start.line + 1, ch: oldMatch.start.ch});
expect(newMatch.end).toEqual({line: oldMatch.end.line + 1, ch: oldMatch.end.ch});
}
// There should be one new match.
expect(FindInFiles.searchModel.countFilesMatches()).toEqual({files: 3, matches: 15});
// Make sure the model is adding the flag that will make the view debounce changes.
expect(wasQuickChange).toBeTruthy();
});
});
it("should update the results when a matching line is deleted, updating line numbers and removing the match", function () {
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: fullTestPath("foo.html") }));
});
runs(function () {
var doc = DocumentManager.getOpenDocumentForPath(fullTestPath("foo.html")),
i;
expect(doc).toBeTruthy();
// Remove the second "foo" match.
doc.replaceRange("", {line: 5, ch: 0}, {line: 6, ch: 0});
// This should update synchronously.
expect(gotChange).toBe(true);
var oldFileResults = oldResults[fullTestPath("foo.html")],
newFileResults = FindInFiles.searchModel.results[fullTestPath("foo.html")];
// First match should be unchanged.
expect(newFileResults.matches[0]).toEqual(oldFileResults.matches[0]);
// Second match should be deleted. The rest of the matches should have their lines adjusted.
for (i = 1; i < newFileResults.matches.length; i++) {
var newMatch = newFileResults.matches[i],
oldMatch = oldFileResults.matches[i + 1];
expect(newMatch.start).toEqual({line: oldMatch.start.line - 1, ch: oldMatch.start.ch});
expect(newMatch.end).toEqual({line: oldMatch.end.line - 1, ch: oldMatch.end.ch});
}
// There should be one fewer match.
expect(FindInFiles.searchModel.countFilesMatches()).toEqual({files: 3, matches: 13});
// Make sure the model is adding the flag that will make the view debounce changes.
expect(wasQuickChange).toBeTruthy();
});
});
it("should replace matches in a portion of the document that was edited to include a new match", function () {
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: fullTestPath("foo.html") }));
});
runs(function () {
var doc = DocumentManager.getOpenDocumentForPath(fullTestPath("foo.html")),
i;
expect(doc).toBeTruthy();
// Replace the second and third foo matches (on two adjacent lines) with a single foo match on a single line.
doc.replaceRange("this is a new foo match\n", {line: 5, ch: 0}, {line: 7, ch: 0});
// This should update synchronously.
expect(gotChange).toBe(true);
var oldFileResults = oldResults[fullTestPath("foo.html")],
newFileResults = FindInFiles.searchModel.results[fullTestPath("foo.html")];
// First match should be unchanged.
expect(newFileResults.matches[0]).toEqual(oldFileResults.matches[0]);
// Second match should be changed to reflect the new position.
expect(newFileResults.matches[1].start).toEqual({line: 5, ch: 14});
expect(newFileResults.matches[1].end).toEqual({line: 5, ch: 17});
// Third match should be deleted. The rest of the matches should have their lines adjusted.
for (i = 2; i < newFileResults.matches.length; i++) {
var newMatch = newFileResults.matches[i],
oldMatch = oldFileResults.matches[i + 1];
expect(newMatch.start).toEqual({line: oldMatch.start.line - 1, ch: oldMatch.start.ch});
expect(newMatch.end).toEqual({line: oldMatch.end.line - 1, ch: oldMatch.end.ch});
}
// There should be one fewer match.
expect(FindInFiles.searchModel.countFilesMatches()).toEqual({files: 3, matches: 13});
// Make sure the model is adding the flag that will make the view debounce changes.
expect(wasQuickChange).toBeTruthy();
});
});
it("should completely remove the document from the results list if all matches in the document are deleted", function () {
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: fullTestPath("foo.html") }));
});
runs(function () {
var doc = DocumentManager.getOpenDocumentForPath(fullTestPath("foo.html"));
expect(doc).toBeTruthy();
// Replace all matches and check that the entire file was removed from the results list.
doc.replaceRange("this will not match", {line: 4, ch: 0}, {line: 18, ch: 0});
// This should update synchronously.
expect(gotChange).toBe(true);
expect(FindInFiles.searchModel.results[fullTestPath("foo.html")]).toBeUndefined();
// There should be one fewer file and the matches for that file should be gone.
expect(FindInFiles.searchModel.countFilesMatches()).toEqual({files: 2, matches: 7});
// Make sure the model is adding the flag that will make the view debounce changes.
expect(wasQuickChange).toBeTruthy();
});
});
});
// Unfortunately, we can't easily mock file changes, so we just do them in a copy of the project.
// This set of tests isn't as thorough as it could be, because it's difficult to perform file
// ops that will exercise all possible scenarios of change events (e.g. change events with
// both added and removed files), and conversely it's difficult to mock all the filesystem stuff
// without doing a bunch of work. So this is really just a set of basic sanity tests to make
// sure that stuff being refactored between the change handler and the model doesn't break
// basic update functionality.
describe("when on-disk file or folder changes", function () {
it("should add matches for a new file", function () {
var newFilePath;
runs(function () {
newFilePath = fullTestPath("newfoo.html");
expect(FindInFiles.searchModel.results[newFilePath]).toBeFalsy();
waitsForDone(promisify(FileSystem.getFileForPath(newFilePath), "write", "this is a new foo match\n"), "add new file");
});
waitsFor(function () { return gotChange; }, "model change event");
runs(function () {
var newFileResults = FindInFiles.searchModel.results[newFilePath];
expect(newFileResults).toBeTruthy();
expect(newFileResults.matches.length).toBe(1);
expect(newFileResults.matches[0].start).toEqual({line: 0, ch: 14});
expect(newFileResults.matches[0].end).toEqual({line: 0, ch: 17});
// There should be one new file and match.
expect(FindInFiles.searchModel.countFilesMatches()).toEqual({files: 4, matches: 15});
});
});
it("should remove matches for a deleted file", function () {
runs(function () {
expect(FindInFiles.searchModel.results[fullTestPath("foo.html")]).toBeTruthy();
waitsForDone(promisify(FileSystem.getFileForPath(fullTestPath("foo.html")), "unlink"), "delete file");
});
waitsFor(function () { return gotChange; }, "model change event");
runs(function () {
expect(FindInFiles.searchModel.results[fullTestPath("foo.html")]).toBeFalsy();
// There should be one fewer file and the matches should be removed.
expect(FindInFiles.searchModel.countFilesMatches()).toEqual({files: 2, matches: 7});
});
});
it("should remove matches for a deleted folder", function () {
runs(function () {
expect(FindInFiles.searchModel.results[fullTestPath("css/foo.css")]).toBeTruthy();
waitsForDone(promisify(FileSystem.getFileForPath(fullTestPath("css")), "unlink"), "delete folder");
});
waitsFor(function () { return gotChange; }, "model change event");
runs(function () {
expect(FindInFiles.searchModel.results[fullTestPath("css/foo.css")]).toBeFalsy();
// There should be one fewer file and the matches should be removed.
expect(FindInFiles.searchModel.countFilesMatches()).toEqual({files: 2, matches: 11});
});
});
});
});
describe("Replace", function () {
function expectProjectToMatchKnownGood(kgFolder, lineEndings, filesToSkip) {
runs(function () {
var testRootPath = ProjectManager.getProjectRoot().fullPath,
kgRootPath = SpecRunnerUtils.getTestPath("/spec/FindReplace-known-goods/" + kgFolder + "/");
function compareKnownGoodToTestFile(kgContents, kgFilePath) {
var testFilePath = testRootPath + kgFilePath.slice(kgRootPath.length);
if (!filesToSkip || filesToSkip.indexOf(testFilePath) === -1) {
return promisify(FileSystem.getFileForPath(testFilePath), "read").then(function (testContents) {
if (lineEndings) {
kgContents = FileUtils.translateLineEndings(kgContents, lineEndings);
}
expect(testContents).toEqual(kgContents);
});
}
}
waitsForDone(visitAndProcessFiles(kgRootPath, compareKnownGoodToTestFile), "project comparison done");
});
}
// Does a standard test for files on disk: search, replace, and check that files on disk match.
// Options:
// knownGoodFolder: name of folder containing known goods to match to project files on disk
// lineEndings: optional, one of the FileUtils.LINE_ENDINGS_* constants
// - if specified, files on disk are expected to have these line endings
// uncheckMatches: optional array of {file: string, index: number} items to uncheck; if
// index unspecified, will uncheck all matches in file
function doBasicTest(options) {
doSearch(options);
runs(function () {
if (options.uncheckMatches) {
options.uncheckMatches.forEach(function (matchToUncheck) {
var matches = searchResults[testPath + matchToUncheck.file].matches;
if (matchToUncheck.index) {
matches[matchToUncheck.index].isChecked = false;
} else {
matches.forEach(function (match) {
match.isChecked = false;
});
}
});
}
waitsForDone(doReplace(options), "finish replacement");
});
expectProjectToMatchKnownGood(options.knownGoodFolder, options.lineEndings);
}
// Like doBasicTest, but expects some files to have specific errors.
// Options: same as doBasicTest, plus:
// test: optional function (which must contain one or more runs blocks) to run between
// search and replace
// errors: array of errors expected to occur (in the same format as performReplacement() returns)
function doTestWithErrors(options) {
var done = false;
doSearch(options);
if (options.test) {
// The test function *must* contain one or more runs blocks.
options.test();
}
runs(function () {
doReplace(options)
.then(function () {
expect("should fail due to error").toBe(true);
done = true;
}, function (errors) {
expect(errors).toEqual(options.errors);
done = true;
});
});
waitsFor(function () { return done; }, 1000, "finish replacement");
expectProjectToMatchKnownGood(options.knownGoodFolder, options.lineEndings);
}
function expectInMemoryFiles(options) {
runs(function () {
waitsForDone(Async.doInParallel(options.inMemoryFiles, function (filePath) {
var fullPath;
// If this is a full file path (as would be the case for an external file), handle it specially.
if (typeof filePath === "object" && filePath.fullPath) {
fullPath = filePath.fullPath;
filePath = "/" + FileUtils.getBaseName(fullPath);
} else {
fullPath = testPath + filePath;
}
// Check that the document open in memory was changed and matches the expected replaced version of that file.
var doc = DocumentManager.getOpenDocumentForPath(fullPath);
expect(doc).toBeTruthy();
expect(doc.isDirty).toBe(true);
var kgPath = SpecRunnerUtils.getTestPath("/spec/FindReplace-known-goods/" + options.inMemoryKGFolder + filePath),
kgFile = FileSystem.getFileForPath(kgPath);
return promisify(kgFile, "read").then(function (contents) {
expect(doc.getText(true)).toEqual(contents);
});
}), "check in memory file contents");
});
}
// Like doBasicTest, but expects one or more files to be open in memory and the replacements to happen there.
// Options: same as doBasicTest, plus:
// inMemoryFiles: array of project-relative paths (each starting with "/") to files that should be open in memory
// inMemoryKGFolder: folder containing known goods to compare each of the inMemoryFiles to
function doInMemoryTest(options) {
// Like the basic test, we expect everything on disk to match the kgFolder (which means the file open in memory
// should *not* have changed on disk yet).
doBasicTest(options);
expectInMemoryFiles(options);
}
afterEach(function () {
runs(function () {
waitsForDone(CommandManager.execute(Commands.FILE_CLOSE_ALL, { _forceClose: true }), "close all files");
});
});
describe("Engine", function () {
it("should replace all instances of a simple string in a project on disk case-insensitively", function () {
openTestProjectCopy(defaultSourcePath);
doBasicTest({
queryInfo: {query: "foo"},
numMatches: 14,
replaceText: "bar",
knownGoodFolder: "simple-case-insensitive"
});
});
it("should replace all instances of a simple string in a project on disk case-sensitively", function () {
openTestProjectCopy(defaultSourcePath);
doBasicTest({
queryInfo: {query: "foo", isCaseSensitive: true},
numMatches: 9,
replaceText: "bar",
knownGoodFolder: "simple-case-sensitive"
});
});
it("should replace all instances of a regexp in a project on disk case-insensitively with a simple replace string", function () {
openTestProjectCopy(defaultSourcePath);
doBasicTest({
queryInfo: {query: "\\b[a-z]{3}\\b", isRegexp: true},
numMatches: 33,
replaceText: "CHANGED",
knownGoodFolder: "regexp-case-insensitive"
});
});
it("should replace all instances of a regexp that spans multiple lines in a project on disk", function () {
openTestProjectCopy(defaultSourcePath);
// This query should find each rule in the CSS file (but not in the JS file since there's more than one line
// between each pair of braces).
doBasicTest({
queryInfo: {query: "\\{\\n[^\\n]*\\n\\}", isRegexp: true},
numMatches: 4,
replaceText: "CHANGED",
knownGoodFolder: "regexp-replace-multiline"
});
});
it("should replace all instances of a regexp that spans multiple lines in a project in memory", function () {
openTestProjectCopy(defaultSourcePath);
// This query should find each rule in the CSS file (but not in the JS file since there's more than one line
// between each pair of braces).
doInMemoryTest({
queryInfo: {query: "\\{\\n[^\\n]*\\n\\}", isRegexp: true},
numMatches: 4,
replaceText: "CHANGED",
knownGoodFolder: "unchanged",
forceFilesOpen: true,
inMemoryFiles: ["/css/foo.css"],
inMemoryKGFolder: "regexp-replace-multiline"
});
});
it("should replace all instances of a regexp that spans multiple lines in a project on disk when the last line is a partial match", function () {
openTestProjectCopy(defaultSourcePath);
// This query should match from the open brace through to (and including) the first colon of each rule in the
// CSS file.
doBasicTest({
queryInfo: {query: "\\{\\n[^:]+:", isRegexp: true},
numMatches: 4,
replaceText: "CHANGED",
knownGoodFolder: "regexp-replace-multiline-partial"
});
});
it("should replace all instances of a regexp that spans multiple lines in a project in memory when the last line is a partial match", function () {
openTestProjectCopy(defaultSourcePath);
// This query should match from the open brace through to (and including) the first colon of each rule in the
// CSS file.
doInMemoryTest({
queryInfo: {query: "\\{\\n[^:]+:", isRegexp: true},
numMatches: 4,
replaceText: "CHANGED",
knownGoodFolder: "unchanged",
forceFilesOpen: true,
inMemoryFiles: ["/css/foo.css"],
inMemoryKGFolder: "regexp-replace-multiline-partial"
});
});
it("should replace all instances of a regexp in a project on disk case-sensitively with a simple replace string", function () {
openTestProjectCopy(defaultSourcePath);
doBasicTest({
queryInfo: {query: "\\b[a-z]{3}\\b", isRegexp: true, isCaseSensitive: true},
numMatches: 25,
replaceText: "CHANGED",
knownGoodFolder: "regexp-case-sensitive"
});
});
it("should replace instances of a regexp with a $-substitution on disk", function () {
openTestProjectCopy(defaultSourcePath);
doBasicTest({
queryInfo: {query: "\\b([a-z]{3})\\b", isRegexp: true},
numMatches: 33,
replaceText: "[$1]",
knownGoodFolder: "regexp-dollar-replace"
});
});
it("should replace instances of a regexp with a $-substitution in in-memory files", function () {
// This test case is necessary because the in-memory case goes through a separate code path before it deals with
// the replace text.
openTestProjectCopy(defaultSourcePath);
doInMemoryTest({
queryInfo: {query: "\\b([a-z]{3})\\b", isRegexp: true},
numMatches: 33,
replaceText: "[$1]",
knownGoodFolder: "unchanged",
forceFilesOpen: true,
inMemoryFiles: ["/css/foo.css", "/foo.html", "/foo.js"],
inMemoryKGFolder: "regexp-dollar-replace"
});
});
it("should replace instances of regexp with 0-length matches on disk", function () {
openTestProjectCopy(defaultSourcePath);
doBasicTest({
queryInfo: {query: "^", isRegexp: true},
numMatches: 55,
replaceText: "CHANGED",
knownGoodFolder: "regexp-zero-length"
});
});
it("should replace instances of regexp with 0-length matches in memory", function () {
openTestProjectCopy(defaultSourcePath);
doInMemoryTest({
queryInfo: {query: "^", isRegexp: true},
numMatches: 55,
replaceText: "CHANGED",
knownGoodFolder: "unchanged",
forceFilesOpen: true,
inMemoryFiles: ["/css/foo.css", "/foo.html", "/foo.js"],
inMemoryKGFolder: "regexp-zero-length"
});
});
it("should replace instances of a string in a project respecting CRLF line endings", function () {
openTestProjectCopy(defaultSourcePath, FileUtils.LINE_ENDINGS_CRLF);
doBasicTest({
queryInfo: {query: "foo"},
numMatches: 14,
replaceText: "bar",
knownGoodFolder: "simple-case-insensitive",
lineEndings: FileUtils.LINE_ENDINGS_CRLF
});
});
it("should replace instances of a string in a project respecting LF line endings", function () {
openTestProjectCopy(defaultSourcePath, FileUtils.LINE_ENDINGS_LF);
doBasicTest({
queryInfo: {query: "foo"},
numMatches: 14,
replaceText: "bar",
knownGoodFolder: "simple-case-insensitive",
lineEndings: FileUtils.LINE_ENDINGS_LF
});
});
it("should not replace unchecked matches on disk", function () {
openTestProjectCopy(defaultSourcePath);
doBasicTest({
queryInfo: {query: "foo"},
numMatches: 14,
uncheckMatches: [{file: "/css/foo.css"}],
replaceText: "bar",
knownGoodFolder: "simple-case-insensitive-except-foo.css"
});
});
it("should do all in-memory replacements synchronously, so user can't accidentally edit document after start of replace process", function () {
openTestProjectCopy(defaultSourcePath);
// Open two of the documents we want to replace in memory.
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: testPath + "/css/foo.css" }), "opening document");
});
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: testPath + "/foo.js" }), "opening document");
});
// We can't use expectInMemoryFiles(), since this test requires everything to happen fully synchronously
// (no file reads) once the replace has started. So we read the files here.
var kgFileContents = {};
runs(function () {
var kgPath = SpecRunnerUtils.getTestPath("/spec/FindReplace-known-goods/simple-case-insensitive");
waitsForDone(visitAndProcessFiles(kgPath, function (contents, fullPath) {
// Translate line endings to in-memory document style (always LF)
kgFileContents[fullPath.slice(kgPath.length)] = FileUtils.translateLineEndings(contents, FileUtils.LINE_ENDINGS_LF);
}), "reading known good");
});
doSearch({
queryInfo: {query: "foo"},
numMatches: 14,
replaceText: "bar"
});
runs(function () {
// Start the replace, but don't wait for it to complete. Since the in-memory replacements should occur
// synchronously, the in-memory documents should have already been changed. This means we don't have to
// worry about detecting changes in documents once the replace starts. (If the user had changed
// the document after the search but before the replace started, we would have already closed the panel,
// preventing the user from doing a replace.)
var promise = FindInFiles.doReplace(searchResults, "bar");
// Check the in-memory contents against the known goods.
["/css/foo.css", "/foo.js"].forEach(function (filename) {
var fullPath = testPath + filename,
doc = DocumentManager.getOpenDocumentForPath(fullPath);
expect(doc).toBeTruthy();
expect(doc.isDirty).toBe(true);
expect(doc.getText()).toEqual(kgFileContents[filename]);
});
// Finish the replace operation, which should go ahead and do the file on disk.
waitsForDone(promise);
});
runs(function () {
// Now the file on disk should have been replaced too.
waitsForDone(promisify(FileSystem.getFileForPath(testPath + "/foo.html"), "read").then(function (contents) {
expect(FileUtils.translateLineEndings(contents, FileUtils.LINE_ENDINGS_LF)).toEqual(kgFileContents["/foo.html"]);
}), "checking known good");
});
});
it("should return an error and not do the replacement in files that have changed on disk since the search", function () {
openTestProjectCopy(defaultSourcePath);
doTestWithErrors({
queryInfo: {query: "foo"},
numMatches: 14,
replaceText: "bar",
knownGoodFolder: "changed-file",
test: function () {
// Wait for one second to make sure that the changed file gets an updated timestamp.
// TODO: this seems like a FileSystem issue - we don't get timestamp changes with a resolution
// of less than one second.
waits(1000);
runs(function () {
// Clone the results so we don't use the version that's auto-updated by FindInFiles when we modify the file
// on disk. This case might not usually come up in the real UI if we always guarantee that the results list will
// be auto-updated, but we want to make sure there's no edge case where we missed an update and still clobber the
// file on disk anyway.
searchResults = _.cloneDeep(searchResults);
waitsForDone(promisify(FileSystem.getFileForPath(testPath + "/css/foo.css"), "write", "/* changed content */"), "modify file");
});
},
errors: [{item: testPath + "/css/foo.css", error: FindUtils.ERROR_FILE_CHANGED}]
});
});
it("should return an error if a write fails", function () {
openTestProjectCopy(defaultSourcePath);
// Return a fake error when we try to write to the CSS file. (Note that this is spying on the test window's File module.)
var writeSpy = spyOn(File.prototype, "write").andCallFake(function (data, options, callback) {
if (typeof options === "function") {
callback = options;
} else {
callback = callback || function () {};
}
if (this.fullPath === testPath + "/css/foo.css") {
callback(FileSystemError.NOT_WRITABLE);
} else {
return writeSpy.originalValue.apply(this, arguments);
}
});
doTestWithErrors({
queryInfo: {query: "foo"},
numMatches: 14,
replaceText: "bar",
knownGoodFolder: "simple-case-insensitive-except-foo.css",
errors: [{item: testPath + "/css/foo.css", error: FileSystemError.NOT_WRITABLE}]
});
});
it("should return an error if a match timestamp doesn't match an in-memory document timestamp", function () {
openTestProjectCopy(defaultSourcePath);
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: testPath + "/css/foo.css" }), "opening document");
});
doTestWithErrors({
queryInfo: {query: "foo"},
numMatches: 14,
replaceText: "bar",
knownGoodFolder: "simple-case-insensitive-except-foo.css",
test: function () {
runs(function () {
// Clone the results so we don't use the version that's auto-updated by FindInFiles when we modify the file
// on disk. This case might not usually come up in the real UI if we always guarantee that the results list will
// be auto-updated, but we want to make sure there's no edge case where we missed an update and still clobber the
// file on disk anyway.
searchResults = _.cloneDeep(searchResults);
var oldTimestamp = searchResults[testPath + "/css/foo.css"].timestamp;
searchResults[testPath + "/css/foo.css"].timestamp = new Date(oldTimestamp.getTime() - 5000);
});
},
errors: [{item: testPath + "/css/foo.css", error: FindUtils.ERROR_FILE_CHANGED}]
});
});
it("should do the replacement in memory for a file open in an Editor in the working set", function () {
openTestProjectCopy(defaultSourcePath);
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, {fullPath: testPath + "/css/foo.css"}), "add file to working set");
});
doInMemoryTest({
queryInfo: {query: "foo"},
numMatches: 14,
replaceText: "bar",
knownGoodFolder: "simple-case-insensitive-except-foo.css",
inMemoryFiles: ["/css/foo.css"],
inMemoryKGFolder: "simple-case-insensitive"
});
});
it("should do the search/replace in the current document content for a dirty in-memory document", function () {
openTestProjectCopy(defaultSourcePath);
var options = {
queryInfo: {query: "foo"},
numMatches: 15,
replaceText: "bar",
inMemoryFiles: ["/css/foo.css"],
inMemoryKGFolder: "simple-case-insensitive-modified"
};
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, {fullPath: testPath + "/css/foo.css"}), "add file to working set");
});
runs(function () {
var doc = DocumentManager.getOpenDocumentForPath(testPath + "/css/foo.css");
expect(doc).toBeTruthy();
doc.replaceRange("/* added a foo line */\n", {line: 0, ch: 0});
});
doSearch(options);
runs(function () {
waitsForDone(doReplace(options), "replace done");
});
expectInMemoryFiles(options);
expectProjectToMatchKnownGood("simple-case-insensitive-modified", null, [testPath + "/css/foo.css"]);
});
it("should do the replacement in memory for a file open in an Editor that's not in the working set", function () {
openTestProjectCopy(defaultSourcePath);
runs(function () {
waitsForDone(CommandManager.execute(Commands.FILE_OPEN, {fullPath: testPath + "/css/foo.css"}), "open file");
});
doInMemoryTest({
queryInfo: {query: "foo"},
numMatches: 14,
replaceText: "bar",
knownGoodFolder: "simple-case-insensitive-except-foo.css",
inMemoryFiles: ["/css/foo.css"],
inMemoryKGFolder: "simple-case-insensitive"
});
});
it("should do the replacement in memory for a file that's in the working set but not yet open in an editor", function () {
openTestProjectCopy(defaultSourcePath);
runs(function () {
MainViewManager.addToWorkingSet(MainViewManager.ACTIVE_PANE, FileSystem.getFileForPath(testPath + "/css/foo.css"));
});
doInMemoryTest({
queryInfo: {query: "foo"},
numMatches: 14,
replaceText: "bar",
knownGoodFolder: "simple-case-insensitive-except-foo.css",
inMemoryFiles: ["/css/foo.css"],
inMemoryKGFolder: "simple-case-insensitive"
});
});
it("should open the document in an editor and do the replacement there if the document is open but not in an Editor", function () {
var doc, openFilePath;
openTestProjectCopy(defaultSourcePath);
runs(function () {
openFilePath = testPath + "/css/foo.css";
waitsForDone(DocumentManager.getDocumentForPath(openFilePath).done(function (d) {
doc = d;
doc.addRef();
}), "get document");
});
doInMemoryTest({
queryInfo: {query: "foo"},
numMatches: 14,
replaceText: "bar",
knownGoodFolder: "simple-case-insensitive-except-foo.css",
inMemoryFiles: ["/css/foo.css"],
inMemoryKGFolder: "simple-case-insensitive"
});
runs(function () {
var workingSet = MainViewManager.getWorkingSet(MainViewManager.ALL_PANES);
expect(workingSet.some(function (file) { return file.fullPath === openFilePath; })).toBe(true);
doc.releaseRef();
});
});
it("should open files and do all replacements in memory if forceFilesOpen is true", function () {
openTestProjectCopy(defaultSourcePath);
doInMemoryTest({
queryInfo: {query: "foo"},
numMatches: 14,
replaceText: "bar",
knownGoodFolder: "unchanged",
forceFilesOpen: true,
inMemoryFiles: ["/css/foo.css", "/foo.html", "/foo.js"],
inMemoryKGFolder: "simple-case-insensitive"
});
});
it("should not perform unchecked matches in memory", function () {
openTestProjectCopy(defaultSourcePath);
doInMemoryTest({
queryInfo: {query: "foo"},
numMatches: 14,
uncheckMatches: [{file: "/css/foo.css", index: 1}, {file: "/foo.html", index: 3}],
replaceText: "bar",
knownGoodFolder: "unchanged",
forceFilesOpen: true,
inMemoryFiles: ["/css/foo.css", "/foo.html", "/foo.js"],
inMemoryKGFolder: "simple-case-insensitive-unchecked"
});
});
it("should not perform unchecked matches on disk", function () {
openTestProjectCopy(defaultSourcePath);
doBasicTest({
queryInfo: {query: "foo"},
numMatches: 14,
uncheckMatches: [{file: "/css/foo.css", index: 1}, {file: "/foo.html", index: 3}],
replaceText: "bar",
knownGoodFolder: "simple-case-insensitive-unchecked"
});
});
it("should select the first modified file in the working set if replacements are done in memory and current editor wasn't affected", function () {
openTestProjectCopy(defaultSourcePath);
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, {fullPath: testPath + "/bar.txt"}), "open file");
});
doInMemoryTest({
queryInfo: {query: "foo"},
numMatches: 14,
replaceText: "bar",
knownGoodFolder: "unchanged",
forceFilesOpen: true,
inMemoryFiles: ["/css/foo.css", "/foo.html", "/foo.js"],
inMemoryKGFolder: "simple-case-insensitive"
});
runs(function () {
var expectedFile = testPath + "/foo.html";
expect(DocumentManager.getCurrentDocument().file.fullPath).toBe(expectedFile);
expect(MainViewManager.findInWorkingSet(MainViewManager.ACTIVE_PANE, expectedFile)).not.toBe(-1);
});
});
it("should select the first modified file in the working set if replacements are done in memory and no editor was open", function () {
openTestProjectCopy(defaultSourcePath);
var testFiles = ["/css/foo.css", "/foo.html", "/foo.js"];
doInMemoryTest({
queryInfo: {query: "foo"},
numMatches: 14,
replaceText: "bar",
knownGoodFolder: "unchanged",
forceFilesOpen: true,
inMemoryFiles: testFiles,
inMemoryKGFolder: "simple-case-insensitive"
});
runs(function () {
// since nothing was opened prior to doing the
// replacements then the first file modified will be opened.
// This may not be the first item in the array above
// since the files are sorted differently in performReplacements
// and the replace is performed asynchronously.
// So, just ensure that *something* was opened
expect(DocumentManager.getCurrentDocument().file.fullPath).toBeTruthy();
testFiles.forEach(function (relPath) {
expect(MainViewManager.findInWorkingSet(MainViewManager.ACTIVE_PANE, testPath + relPath)).not.toBe(-1);
});
});
});
it("should select the first modified file in the working set if replacements are done in memory and there were no matches checked for current editor", function () {
openTestProjectCopy(defaultSourcePath);
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, {fullPath: testPath + "/css/foo.css"}), "open file");
});
doInMemoryTest({
queryInfo: {query: "foo"},
numMatches: 14,
uncheckMatches: [{file: "/css/foo.css"}],
replaceText: "bar",
knownGoodFolder: "unchanged",
forceFilesOpen: true,
inMemoryFiles: ["/foo.html", "/foo.js"],
inMemoryKGFolder: "simple-case-insensitive-except-foo.css"
});
runs(function () {
expect(DocumentManager.getCurrentDocument().file.fullPath).toEqual(testPath + "/foo.html");
});
});
});
describe("UI", function () {
function executeReplace(findText, replaceText, fromKeyboard) {
runs(function () {
FindInFiles._searchDone = false;
FindInFiles._replaceDone = false;
$("#find-what").val(findText).trigger("input");
$("#replace-with").val(replaceText).trigger("input");
if (fromKeyboard) {
SpecRunnerUtils.simulateKeyEvent(KeyEvent.DOM_VK_RETURN, "keydown", $("#replace-with").get(0));
} else {
$("#replace-all").click();
}
});
}
function showSearchResults(findText, replaceText, fromKeyboard) {
openTestProjectCopy(defaultSourcePath);
openSearchBar(null, true);
executeReplace(findText, replaceText, fromKeyboard);
waitsFor(function () {
return FindInFiles._searchDone;
}, "search finished");
}
afterEach(function () {
closeSearchBar();
});
describe("Replace in Files Bar", function () {
it("should only show a Replace All button", function () {
openTestProjectCopy(defaultSourcePath);
openSearchBar(null, true);
runs(function () {
expect($("#replace-yes").length).toBe(0);
expect($("#replace-all").length).toBe(1);
});
});
it("should disable the Replace button if query is empty", function () {
openTestProjectCopy(defaultSourcePath);
openSearchBar(null, true);
runs(function () {
$("#find-what").val("").trigger("input");
expect($("#replace-all").is(":disabled")).toBe(true);
});
});
it("should enable the Replace button if the query is a non-empty string", function () {
openTestProjectCopy(defaultSourcePath);
openSearchBar(null, true);
runs(function () {
$("#find-what").val("my query").trigger("input");
expect($("#replace-all").is(":disabled")).toBe(false);
});
});
it("should disable the Replace button if query is an invalid regexp", function () {
openTestProjectCopy(defaultSourcePath);
openSearchBar(null, true);
runs(function () {
$("#find-regexp").click();
$("#find-what").val("[invalid").trigger("input");
expect($("#replace-all").is(":disabled")).toBe(true);
});
});
it("should enable the Replace button if query is a valid regexp", function () {
openTestProjectCopy(defaultSourcePath);
openSearchBar(null, true);
runs(function () {
$("#find-regexp").click();
$("#find-what").val("[valid]").trigger("input");
expect($("#replace-all").is(":disabled")).toBe(false);
});
});
it("should start with focus in Find, and set focus to the Replace field when the user hits enter in the Find field", function () {
openTestProjectCopy(defaultSourcePath);
openSearchBar(null, true);
runs(function () {
// For some reason using $().is(":focus") here is flaky.
expect(testWindow.document.activeElement).toBe($("#find-what").get(0));
SpecRunnerUtils.simulateKeyEvent(KeyEvent.DOM_VK_RETURN, "keydown", $("#find-what").get(0));
expect(testWindow.document.activeElement).toBe($("#replace-with").get(0));
});
});
});
describe("Full workflow", function () {
it("should prepopulate the find bar with selected text", function () {
var doc, editor;
openTestProjectCopy(defaultSourcePath);
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: testPath + "/foo.html" }), "open file");
});
runs(function () {
doc = DocumentManager.getOpenDocumentForPath(testPath + "/foo.html");
expect(doc).toBeTruthy();
MainViewManager._edit(MainViewManager.ACTIVE_PANE, doc);
editor = doc._masterEditor;
expect(editor).toBeTruthy();
editor.setSelection({line: 4, ch: 7}, {line: 4, ch: 10});
});
openSearchBar(null);
runs(function () {
expect($("#find-what").val()).toBe("Foo");
});
waitsForDone(CommandManager.execute(Commands.FILE_CLOSE_ALL), "closing all files");
});
it("should prepopulate the find bar with only first line of selected text", function () {
var doc, editor;
openTestProjectCopy(defaultSourcePath);
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: testPath + "/foo.html" }), "open file");
});
runs(function () {
doc = DocumentManager.getOpenDocumentForPath(testPath + "/foo.html");
expect(doc).toBeTruthy();
MainViewManager._edit(MainViewManager.ACTIVE_PANE, doc);
editor = doc._masterEditor;
expect(editor).toBeTruthy();
editor.setSelection({line: 4, ch: 7}, {line: 6, ch: 10});
});
openSearchBar(null);
runs(function () {
expect($("#find-what").val()).toBe("Foo</title>");
});
waitsForDone(CommandManager.execute(Commands.FILE_CLOSE_ALL), "closing all files");
});
it("should show results from the search with all checkboxes checked", function () {
showSearchResults("foo", "bar");
runs(function () {
expect($("#find-in-files-results").length).toBe(1);
expect($("#find-in-files-results .check-one").length).toBe(14);
expect($("#find-in-files-results .check-one:checked").length).toBe(14);
});
});
it("should do a simple search/replace all from find bar, opening results in memory, when user clicks on Replace... button", function () {
showSearchResults("foo", "bar");
// Click the "Replace" button in the search panel - this should kick off the replace
runs(function () {
$(".replace-checked").click();
});
waitsFor(function () {
return FindInFiles._replaceDone;
}, "replace finished");
expectInMemoryFiles({
inMemoryFiles: ["/css/foo.css", "/foo.html", "/foo.js"],
inMemoryKGFolder: "simple-case-insensitive"
});
});
it("should do a simple search/replace all from find bar, opening results in memory, when user hits Enter in Replace field", function () {
showSearchResults("foo", "bar");
// Click the "Replace" button in the search panel - this should kick off the replace
runs(function () {
$(".replace-checked").click();
});
waitsFor(function () {
return FindInFiles._replaceDone;
}, "replace finished");
expectInMemoryFiles({
inMemoryFiles: ["/css/foo.css", "/foo.html", "/foo.js"],
inMemoryKGFolder: "simple-case-insensitive"
});
});
it("should do a search in folder, replace all from find bar", function () {
openTestProjectCopy(defaultSourcePath);
var dirEntry = FileSystem.getDirectoryForPath(testPath + "/css/");
openSearchBar(dirEntry, true);
executeReplace("foo", "bar", true);
waitsFor(function () {
return FindInFiles._searchDone;
}, "search finished");
// Click the "Replace" button in the search panel - this should kick off the replace
runs(function () {
$(".replace-checked").click();
});
waitsFor(function () {
return FindInFiles._replaceDone;
}, "replace finished");
expectInMemoryFiles({
inMemoryFiles: ["/css/foo.css"],
inMemoryKGFolder: "simple-case-insensitive-only-foo.css"
});
});
it("should do a search in file, replace all from find bar", function () {
openTestProjectCopy(defaultSourcePath);
var fileEntry = FileSystem.getFileForPath(testPath + "/css/foo.css");
openSearchBar(fileEntry, true);
executeReplace("foo", "bar", true);
waitsFor(function () {
return FindInFiles._searchDone;
}, "search finished");
// Click the "Replace" button in the search panel - this should kick off the replace
runs(function () {
$(".replace-checked").click();
});
waitsFor(function () {
return FindInFiles._replaceDone;
}, "replace finished");
expectInMemoryFiles({
inMemoryFiles: ["/css/foo.css"],
inMemoryKGFolder: "simple-case-insensitive-only-foo.css"
});
});
it("should do a regexp search/replace from find bar", function () {
openTestProjectCopy(defaultSourcePath);
openSearchBar(null, true);
runs(function () {
$("#find-regexp").click();
});
executeReplace("\\b([a-z]{3})\\b", "[$1]", true);
waitsFor(function () {
return FindInFiles._searchDone;
}, "search finished");
// Click the "Replace" button in the search panel - this should kick off the replace
runs(function () {
$(".replace-checked").click();
});
waitsFor(function () {
return FindInFiles._replaceDone;
}, "replace finished");
expectInMemoryFiles({
inMemoryFiles: ["/css/foo.css", "/foo.html", "/foo.js"],
inMemoryKGFolder: "regexp-dollar-replace"
});
});
it("should do a case-sensitive search/replace from find bar", function () {
openTestProjectCopy(defaultSourcePath);
openSearchBar(null, true);
runs(function () {
$("#find-case-sensitive").click();
});
executeReplace("foo", "bar", true);
waitsFor(function () {
return FindInFiles._searchDone;
}, "search finished");
// Click the "Replace" button in the search panel - this should kick off the replace
runs(function () {
$(".replace-checked").click();
});
waitsFor(function () {
return FindInFiles._replaceDone;
}, "replace finished");
expectInMemoryFiles({
inMemoryFiles: ["/css/foo.css", "/foo.html", "/foo.js"],
inMemoryKGFolder: "simple-case-sensitive"
});
});
it("should warn and do changes on disk if there are changes in >20 files", function () {
openTestProjectCopy(SpecRunnerUtils.getTestPath("/spec/FindReplace-test-files-large"));
openSearchBar(null, true);
executeReplace("foo", "bar");
waitsFor(function () {
return FindInFiles._searchDone;
}, "search finished");
// Click the "Replace" button in the search panel - this should cause the dialog to appear
runs(function () {
$(".replace-checked").click();
});
runs(function () {
expect(FindInFiles._replaceDone).toBeFalsy();
});
var $okButton;
waitsFor(function () {
$okButton = $(".dialog-button[data-button-id='ok']");
return !!$okButton.length;
}, "dialog appearing");
runs(function () {
expect($okButton.length).toBe(1);
expect($okButton.text()).toBe(Strings.BUTTON_REPLACE_WITHOUT_UNDO);
$okButton.click();
});
waitsFor(function () {
return FindInFiles._replaceDone;
}, "replace finished");
expectProjectToMatchKnownGood("simple-case-insensitive-large");
});
it("should not do changes on disk if Cancel is clicked in 'too many files' dialog", function () {
spyOn(FindInFiles, "doReplace").andCallThrough();
openTestProjectCopy(SpecRunnerUtils.getTestPath("/spec/FindReplace-test-files-large"));
openSearchBar(null, true);
executeReplace("foo", "bar");
waitsFor(function () {
return FindInFiles._searchDone;
}, "search finished");
// Click the "Replace" button in the search panel - this should cause the dialog to appear
runs(function () {
$(".replace-checked").click();
});
runs(function () {
expect(FindInFiles._replaceDone).toBeFalsy();
});
var $cancelButton;
waitsFor(function () {
$cancelButton = $(".dialog-button[data-button-id='cancel']");
return !!$cancelButton.length;
});
runs(function () {
expect($cancelButton.length).toBe(1);
$cancelButton.click();
});
waitsFor(function () {
return $(".dialog-button[data-button-id='cancel']").length === 0;
}, "dialog dismissed");
runs(function () {
expect(FindInFiles.doReplace).not.toHaveBeenCalled();
// Panel should be left open.
expect($("#find-in-files-results").is(":visible")).toBeTruthy();
});
});
it("should do single-file Replace All in an open file in the project", function () {
openTestProjectCopy(defaultSourcePath);
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: testPath + "/foo.js" }), "open file");
});
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_REPLACE), "open single-file replace bar");
});
waitsFor(function () {
return $(".modal-bar").length === 1;
}, "search bar open");
executeReplace("foo", "bar");
waitsFor(function () {
return FindInFiles._searchDone;
}, "search finished");
// Click the "Replace" button in the search panel - this should kick off the replace
runs(function () {
$(".replace-checked").click();
});
waitsFor(function () {
return FindInFiles._replaceDone;
}, "replace finished");
expectInMemoryFiles({
inMemoryFiles: ["/foo.js"],
inMemoryKGFolder: "simple-case-insensitive"
});
});
it("should do single-file Replace All in a non-project file", function () {
// Open an empty project.
var blankProject = SpecRunnerUtils.getTempDirectory() + "/blank-project",
externalFilePath = defaultSourcePath + "/foo.js";
runs(function () {
var dirEntry = FileSystem.getDirectoryForPath(blankProject);
waitsForDone(promisify(dirEntry, "create"));
});
SpecRunnerUtils.loadProjectInTestWindow(blankProject);
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: externalFilePath }), "open external file");
});
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_REPLACE), "open single-file replace bar");
});
waitsFor(function () {
return $(".modal-bar").length === 1;
}, "search bar open");
executeReplace("foo", "bar");
waitsFor(function () {
return FindInFiles._searchDone;
}, "search finished");
// Click the "Replace" button in the search panel - this should kick off the replace
runs(function () {
$(".replace-checked").click();
});
waitsFor(function () {
return FindInFiles._replaceDone;
}, "replace finished");
expectInMemoryFiles({
inMemoryFiles: [{fullPath: externalFilePath}], // pass a full file path since this is an external file
inMemoryKGFolder: "simple-case-insensitive"
});
});
it("should show an error dialog if errors occurred during the replacement", function () {
showSearchResults("foo", "bar");
runs(function () {
spyOn(FindInFiles, "doReplace").andCallFake(function () {
return new $.Deferred().reject([
{item: testPath + "/css/foo.css", error: FindUtils.ERROR_FILE_CHANGED},
{item: testPath + "/foo.html", error: FileSystemError.NOT_WRITABLE}
]);
});
});
runs(function () {
// This will call our mock doReplace
$(".replace-checked").click();
});
var $dlg;
waitsFor(function () {
$dlg = $(".error-dialog");
return !!$dlg.length;
}, "dialog appearing");
runs(function () {
expect($dlg.length).toBe(1);
// Both files should be mentioned in the dialog.
var text = $dlg.find(".dialog-message").text();
// Have to check this in a funny way because breakableUrl() adds a special character after the slash.
expect(text.match(/css\/.*foo.css/)).not.toBe(-1);
expect(text.indexOf(StringUtils.breakableUrl("foo.html"))).not.toBe(-1);
$dlg.find(".dialog-button[data-button-id='ok']").click();
expect($(".error-dialog").length).toBe(0);
});
});
});
// TODO: these could be split out into unit tests, but would need to be able to instantiate
// a SearchResultsView in the test runner window.
describe("Checkbox interactions", function () {
it("should uncheck all checkboxes and update model when Check All is clicked while checked", function () {
showSearchResults("foo", "bar");
runs(function () {
expect($(".check-all").is(":checked")).toBeTruthy();
$(".check-all").click();
expect($(".check-all").is(":checked")).toBeFalsy();
expect($(".check-one:checked").length).toBe(0);
expect(_.find(FindInFiles.searchModel.results, function (result) {
return _.find(result.matches, function (match) { return match.isChecked; });
})).toBeFalsy();
});
});
it("should uncheck one checkbox and update model, unchecking the Check All checkbox", function () {
showSearchResults("foo", "bar");
runs(function () {
$(".check-one").eq(1).click();
expect($(".check-one").eq(1).is(":checked")).toBeFalsy();
expect($(".check-all").is(":checked")).toBeFalsy();
// In the sorting, this item should be the second match in the first file, which is foo.html
var uncheckedMatch = FindInFiles.searchModel.results[testPath + "/foo.html"].matches[1];
expect(uncheckedMatch.isChecked).toBe(false);
// Check that all items in the model besides the unchecked one to be checked.
expect(_.every(FindInFiles.searchModel.results, function (result) {
return _.every(result.matches, function (match) {
if (match === uncheckedMatch) {
// This one is already expected to be unchecked.
return true;
}
return match.isChecked;
});
})).toBeTruthy();
});
});
it("should re-check unchecked checkbox and update model after clicking Check All again", function () {
showSearchResults("foo", "bar");
runs(function () {
$(".check-one").eq(1).click();
expect($(".check-one").eq(1).is(":checked")).toBeFalsy();
expect($(".check-all").is(":checked")).toBeFalsy();
$(".check-all").click();
expect($(".check-all").is(":checked")).toBeTruthy();
expect($(".check-one:checked").length).toEqual($(".check-one").length);
expect(_.every(FindInFiles.searchModel.results, function (result) {
return _.every(result.matches, function (match) { return match.isChecked; });
})).toBeTruthy();
});
});
// TODO: checkboxes with paging
});
// Untitled documents are covered in the "Search -> Replace All in untitled document" cases above.
describe("Panel closure on changes", function () {
it("should close the panel and detach listeners if a file is modified on disk", function () {
showSearchResults("foo", "bar");
runs(function () {
expect($("#find-in-files-results").is(":visible")).toBe(true);
waitsForDone(promisify(FileSystem.getFileForPath(testPath + "/foo.html"), "write", "changed content"));
});
runs(function () {
expect($("#find-in-files-results").is(":visible")).toBe(false);
});
});
it("should close the panel if a file is modified in memory", function () {
openTestProjectCopy(defaultSourcePath);
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: testPath + "/foo.html" }), "open file");
});
openSearchBar(null, true);
executeReplace("foo", "bar");
waitsFor(function () {
return FindInFiles._searchDone;
}, "search finished");
runs(function () {
expect($("#find-in-files-results").is(":visible")).toBe(true);
var doc = DocumentManager.getOpenDocumentForPath(testPath + "/foo.html");
expect(doc).toBeTruthy();
doc.replaceRange("", {line: 0, ch: 0}, {line: 1, ch: 0});
expect($("#find-in-files-results").is(":visible")).toBe(false);
});
});
it("should close the panel if a document was open and modified before the search, but then the file was closed and changes dropped", function () {
var doc;
openTestProjectCopy(defaultSourcePath);
runs(function () {
waitsForDone(CommandManager.execute(Commands.CMD_ADD_TO_WORKINGSET_AND_OPEN, { fullPath: testPath + "/foo.html" }), "open file");
});
runs(function () {
doc = DocumentManager.getOpenDocumentForPath(testPath + "/foo.html");
expect(doc).toBeTruthy();
doc.replaceRange("", {line: 0, ch: 0}, {line: 1, ch: 0});
});
openSearchBar(null, true);
executeReplace("foo", "bar");
waitsFor(function () {
return FindInFiles._searchDone;
}, "search finished");
runs(function () {
expect($("#find-in-files-results").is(":visible")).toBe(true);
// We have to go through the dialog workflow for closing the file without saving changes,
// because the "revert" behavior only happens in that workflow (it doesn't happen if you
// do forceClose, since that's only intended as a shortcut for the end of a unit test).
var closePromise = CommandManager.execute(Commands.FILE_CLOSE, { file: doc.file }),
$dontSaveButton = $(".dialog-button[data-button-id='dontsave']");
expect($dontSaveButton.length).toBe(1);
$dontSaveButton.click();
waitsForDone(closePromise);
});
runs(function () {
expect($("#find-in-files-results").is(":visible")).toBe(false);
});
});
});
describe("Disclosure Arrows", function () {
it("should expand/collapse items when clicked", function () {
showSearchResults("foo", "bar");
runs(function () {
$(".disclosure-triangle").click();
expect($(".disclosure-triangle").hasClass("expanded")).toBeFalsy();
// Check that all results are hidden
expect($(".bottom-panel-table tr[data-file-index=0][data-match-index]:hidden").length).toEqual(7);
expect($(".bottom-panel-table tr[data-file-index=1][data-match-index]:hidden").length).toEqual(4);
$(".disclosure-triangle").click();
expect($(".disclosure-triangle").hasClass("expanded")).toBeTruthy();
expect($(".bottom-panel-table tr[data-file-index=0][data-match-index]:visible").length).toEqual(7);
expect($(".bottom-panel-table tr[data-file-index=1][data-match-index]:visible").length).toEqual(4);
});
});
});
});
});
});
});
| busykai/brackets | test/spec/FindInFiles-test.js | JavaScript | mit | 119,508 |
import Model from 'flarum/Model';
import Discussion from 'flarum/models/Discussion';
import IndexPage from 'flarum/components/IndexPage';
import Tag from 'tags/models/Tag';
import TagsPage from 'tags/components/TagsPage';
import DiscussionTaggedPost from 'tags/components/DiscussionTaggedPost';
import addTagList from 'tags/addTagList';
import addTagFilter from 'tags/addTagFilter';
import addTagLabels from 'tags/addTagLabels';
import addTagControl from 'tags/addTagControl';
import addTagComposer from 'tags/addTagComposer';
app.initializers.add('tags', function(app) {
app.routes.tags = {path: '/tags', component: TagsPage.component()};
app.routes.tag = {path: '/t/:tags', component: IndexPage.component()};
app.route.tag = tag => app.route('tag', {tags: tag.slug()});
app.postComponents.discussionTagged = DiscussionTaggedPost;
app.store.models.tags = Tag;
Discussion.prototype.tags = Model.hasMany('tags');
Discussion.prototype.canTag = Model.attribute('canTag');
addTagList();
addTagFilter();
addTagLabels();
addTagControl();
addTagComposer();
});
| Luceos/flarum-tags | js/forum/src/main.js | JavaScript | mit | 1,086 |
var $content,
$deferred;
$(document).ready(function() {
// Bind ASAP events
$(window).on("request.asap", pageRequested)
.on("progress.asap", pageLoadProgress)
.on("load.asap", pageLoaded)
.on("render.asap", pageRendered)
.on("error.asap", pageLoadError);
$content = $("#content");
// Init ASAP
$.asap({
cache: false,
selector: "a:not(.no-asap)",
transitionOut: function() {
if ($deferred) {
$deferred.reject();
}
$deferred = $.Deferred();
$content.animate({ opacity: 0 }, 1000, function() {
console.log("Animate complete");
$deferred.resolve();
});
return $deferred;
}
});
// Remember to init first page
pageRendered();
});
function pageRequested(e) {
// update state to reflect loading
console.log("Request new page");
}
function pageLoadProgress(e, percent) {
// update progress to reflect loading
console.log("New page load progress", percent);
}
function pageLoaded(e) {
// unbind old events and remove plugins
console.log("Destroy old page");
}
function pageRendered(e) {
// bind new events and initialize plugins
console.log("Render new page");
$content.animate({ opacity: 1 }, 1000);
}
function pageLoadError(e, error) {
// watch for load errors
console.warn("Error loading page: ", error);
} | LoganArnett/Formstone | demo/site/extra/asap/js/main.js | JavaScript | mit | 1,400 |
import { Class, clone, isArray } from './lib/objects';
import { diffs } from './lib/diffs';
import { eq } from './lib/eq';
import { PathNotFoundException } from './lib/exceptions';
/**
`Document` is a complete implementation of the JSON PATCH spec detailed in
[RFC 6902](http://tools.ietf.org/html/rfc6902).
A document can be manipulated via a `transform` method that accepts an
`operation`, or with the methods `add`, `remove`, `replace`, `move`, `copy` and
`test`.
Data at a particular path can be retrieved from a `Document` with `retrieve()`.
@class Document
@namespace Orbit
@param {Object} [data] The initial data for the document
@param {Object} [options]
@param {Boolean} [options.arrayBasedPaths=false] Should paths be array based, or `'/'` delimited (the default)?
@constructor
*/
var Document = Class.extend({
init: function(data, options) {
options = options || {};
this.arrayBasedPaths = options.arrayBasedPaths !== undefined ? options.arrayBasedPaths : false;
this.reset(data);
},
/**
Reset the contents of the whole document.
If no data is specified, the contents of the document will be reset to an
empty object.
@method reset
@param {Object} [data] New root object
*/
reset: function(data) {
this._data = data || {};
},
/**
Retrieve the value at a path.
If the path does not exist in the document, `PathNotFoundException` will be
thrown by default. If `quiet` is truthy, `undefined` will be returned
instead.
@method retrieve
@param {Array or String} [path]
@param {Boolean} [quiet=false] Return `undefined` instead of throwing an exception if `path` can't be found?
@returns {Object} Value at the specified `path` or `undefined`
*/
retrieve: function(path, quiet) {
return this._retrieve(this.deserializePath(path), quiet);
},
/**
Sets the value at a path.
If the target location specifies an array index, inserts a new value
into the array at the specified index.
If the target location specifies an object member that does not
already exist, adds a new member to the object.
If the target location specifies an object member that does exist,
replaces that member's value.
If the target location does not exist, throws `PathNotFoundException`.
@method add
@param {Array or String} path
@param {Object} value
@param {Boolean} [invert=false] Return the inverse operations?
@returns {Array} Array of inverse operations if `invert === true`
*/
add: function(path, value, invert) {
return this._add(this.deserializePath(path), value, invert);
},
/**
Removes the value from a path.
If removing an element from an array, shifts any elements above the
specified index one position to the left.
If the target location does not exist, throws `PathNotFoundException`.
@method remove
@param {Array or String} path
@param {Boolean} [invert=false] Return the inverse operations?
@returns {Array} Array of inverse operations if `invert === true`
*/
remove: function(path, invert) {
return this._remove(this.deserializePath(path), invert);
},
/**
Replaces the value at a path.
This operation is functionally identical to a "remove" operation for
a value, followed immediately by an "add" operation at the same
location with the replacement value.
If the target location does not exist, throws `PathNotFoundException`.
@method replace
@param {Array or String} path
@param {Object} value
@param {Boolean} [invert=false] Return the inverse operations?
@returns {Array} Array of inverse operations if `invert === true`
*/
replace: function(path, value, invert) {
return this._replace(this.deserializePath(path), value, invert);
},
/**
Moves an object from one path to another.
Identical to calling `remove()` followed by `add()`.
Throws `PathNotFoundException` if either path does not exist in the document.
@method move
@param {Array or String} fromPath
@param {Array or String} toPath
@param {Boolean} [invert=false] Return the inverse operations?
@returns {Array} Array of inverse operations if `invert === true`
*/
move: function(fromPath, toPath, invert) {
return this._move(this.deserializePath(fromPath), this.deserializePath(toPath), invert);
},
/**
Copies an object at one path and adds it to another.
Identical to calling `add()` with the value at `fromPath`.
Throws `PathNotFoundException` if either path does not exist in the document.
@method copy
@param {Array or String} fromPath
@param {Array or String} toPath
@param {Boolean} [invert=false] Return the inverse operations?
@returns {Array} Array of inverse operations if `invert === true`
*/
copy: function(fromPath, toPath, invert) {
return this._copy(this.deserializePath(fromPath), this.deserializePath(toPath), invert);
},
/**
Tests that the value at a path matches an expectation.
Uses `Orbit.eq` to test equality.
Throws `PathNotFoundException` if the path does not exist in the document.
@method test
@param {Array or String} [path]
@param {Object} [value] Expected value to test
@param {Boolean} [quiet=false] Use `undefined` instead of throwing an exception if `path` can't be found?
@returns {Boolean} Does the value at `path` equal `value`?
*/
test: function(path, value, quiet) {
return eq(this._retrieve(this.deserializePath(path), quiet), value);
},
/**
Transforms the document with an RFC 6902-compliant operation.
Throws `PathNotFoundException` if the path does not exist in the document.
@method transform
@param {Object} operation
@param {String} operation.op Must be "add", "remove", "replace", "move", "copy", or "test"
@param {Array or String} operation.path Path to target location
@param {Array or String} operation.from Path to source target location. Required for "copy" and "move"
@param {Object} operation.value Value to set. Required for "add", "replace" and "test"
@param {Boolean} [invert=false] Return the inverse operations?
@returns {Array} Array of inverse operations if `invert === true`
*/
transform: function(operation, invert) {
if (operation.op === 'add') {
return this.add(operation.path, operation.value, invert);
} else if (operation.op === 'remove') {
return this.remove(operation.path, invert);
} else if (operation.op === 'replace') {
return this.replace(operation.path, operation.value, invert);
} else if (operation.op === 'move') {
return this.move(operation.from, operation.path, invert);
} else if (operation.op === 'copy') {
return this.copy(operation.from, operation.path, invert);
} else if (operation.op === 'test') {
return this.copy(operation.path, operation.value);
}
},
serializePath: function(path) {
if (this.arrayBasedPaths) {
return path;
} else {
if (path.length === 0) {
return '/';
} else {
return '/' + path.join('/');
}
}
},
deserializePath: function(path) {
if (typeof path === 'string') {
if (path.indexOf('/') === 0) {
path = path.substr(1);
}
if (path.length === 0) {
return [];
} else {
return path.split('/');
}
} else {
return path;
}
},
/////////////////////////////////////////////////////////////////////////////
// Internals
/////////////////////////////////////////////////////////////////////////////
_pathNotFound: function(path, quiet) {
if (quiet) {
return undefined;
} else {
throw new PathNotFoundException(this.serializePath(path));
}
},
_retrieve: function(path, quiet) {
var ptr = this._data,
segment;
if (path) {
for (var i = 0, len = path.length; i < len; i++) {
segment = path[i];
if (isArray(ptr)) {
if (segment === '-') {
ptr = ptr[ptr.length-1];
} else {
ptr = ptr[parseInt(segment, 10)];
}
} else {
ptr = ptr[segment];
}
if (ptr === undefined) {
return this._pathNotFound(path, quiet);
}
}
}
return ptr;
},
_add: function(path, value, invert) {
var inverse;
value = clone(value);
if (path.length > 0) {
var parentKey = path[path.length-1];
if (path.length > 1) {
var grandparent = this._retrieve(path.slice(0, -1));
if (isArray(grandparent)) {
if (parentKey === '-') {
if (invert) {
inverse = [{op: 'remove', path: this.serializePath(path)}];
}
grandparent.push(value);
} else {
var parentIndex = parseInt(parentKey, 10);
if (parentIndex > grandparent.length) {
this._pathNotFound(path);
} else {
if (invert) {
inverse = [{op: 'remove', path: this.serializePath(path)}];
}
grandparent.splice(parentIndex, 0, value);
}
}
} else {
if (invert) {
if (grandparent.hasOwnProperty(parentKey)) {
inverse = [{op: 'replace', path: this.serializePath(path), value: clone(grandparent[parentKey])}];
} else {
inverse = [{op: 'remove', path: this.serializePath(path)}];
}
}
grandparent[parentKey] = value;
}
} else {
if (invert) {
if (this._data.hasOwnProperty(parentKey)) {
inverse = [{op: 'replace', path: this.serializePath(path), value: clone(this._data[parentKey])}];
} else {
inverse = [{op: 'remove', path: this.serializePath(path)}];
}
}
this._data[parentKey] = value;
}
} else {
if (invert) {
inverse = [{op: 'replace', path: this.serializePath([]), value: clone(this._data)}];
}
this._data = value;
}
return inverse;
},
_remove: function(path, invert) {
var inverse;
if (path.length > 0) {
var parentKey = path[path.length-1];
if (path.length > 1) {
var grandparent = this._retrieve(path.slice(0, -1));
if (isArray(grandparent)) {
if (grandparent.length > 0) {
if (parentKey === '-') {
if (invert) {
inverse = [{op: 'add', path: this.serializePath(path), value: clone(grandparent.pop())}];
} else {
grandparent.pop();
}
} else {
var parentIndex = parseInt(parentKey, 10);
if (grandparent[parentIndex] === undefined) {
this._pathNotFound(path);
} else {
if (invert) {
inverse = [{op: 'add', path: this.serializePath(path), value: clone(grandparent.splice(parentIndex, 1)[0])}];
} else {
grandparent.splice(parentIndex, 1);
}
}
}
} else {
this._pathNotFound(path);
}
} else if (grandparent[parentKey] === undefined) {
this._pathNotFound(path);
} else {
if (invert) {
inverse = [{op: 'add', path: this.serializePath(path), value: clone(grandparent[parentKey])}];
}
delete grandparent[parentKey];
}
} else if (this._data[parentKey] === undefined) {
this._pathNotFound(path);
} else {
if (invert) {
inverse = [{op: 'add', path: this.serializePath(path), value: clone(this._data[parentKey])}];
}
delete this._data[parentKey];
}
} else {
if (invert) {
inverse = [{op: 'add', path: this.serializePath(path), value: clone(this._data)}];
}
this._data = {};
}
return inverse;
},
_replace: function(path, value, invert) {
var inverse;
value = clone(value);
if (path.length > 0) {
var parentKey = path[path.length-1];
if (path.length > 1) {
var grandparent = this._retrieve(path.slice(0, -1));
if (isArray(grandparent)) {
if (grandparent.length > 0) {
if (parentKey === '-') {
if (invert) {
inverse = [{op: 'replace', path: this.serializePath(path), value: clone(grandparent[grandparent.length-1])}];
}
grandparent[grandparent.length-1] = value;
} else {
var parentIndex = parseInt(parentKey, 10);
if (grandparent[parentIndex] === undefined) {
this._pathNotFound(path);
} else {
if (invert) {
inverse = [{op: 'replace', path: this.serializePath(path), value: clone(grandparent.splice(parentIndex, 1, value)[0])}];
} else {
grandparent.splice(parentIndex, 1, value);
}
}
}
} else {
this._pathNotFound(path);
}
} else {
if (invert) {
inverse = [{op: 'replace', path: this.serializePath(path), value: clone(grandparent[parentKey])}];
}
grandparent[parentKey] = value;
}
} else {
if (invert) {
inverse = [{op: 'replace', path: this.serializePath(path), value: clone(this._data[parentKey])}];
}
this._data[parentKey] = value;
}
} else {
if (invert) {
inverse = [{op: 'replace', path: this.serializePath([]), value: clone(this._data)}];
}
this._data = value;
}
return inverse;
},
_move: function(fromPath, toPath, invert) {
if (eq(fromPath, toPath)) {
if (invert) return [];
return;
} else {
var value = this._retrieve(fromPath);
if (invert) {
return this._remove(fromPath, true)
.concat(this._add(toPath, value, true))
.reverse();
} else {
this._remove(fromPath);
this._add(toPath, value);
}
}
},
_copy: function(fromPath, toPath, invert) {
if (eq(fromPath, toPath)) {
if (invert) return [];
return;
} else {
return this._add(toPath, this._retrieve(fromPath), invert);
}
}
});
export default Document;
| beni55/orbit.js | lib/orbit/document.js | JavaScript | mit | 14,393 |
function BxTimelineView(oOptions) {
this._sActionsUri = oOptions.sActionUri;
this._sActionsUrl = oOptions.sActionUrl;
this._sObjName = oOptions.sObjName == undefined ? 'oTimelineView' : oOptions.sObjName;
this._iOwnerId = oOptions.iOwnerId == undefined ? 0 : oOptions.iOwnerId;
this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'slide' : oOptions.sAnimationEffect;
this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
var $this = this;
$(document).ready(function() {
$this.initMasonry();
$('.bx-tl-item').resize(function() {
$this.reloadMasonry();
});
$('img.bx-tl-item-image').load(function() {
$this.reloadMasonry();
});
});
}
BxTimelineView.prototype = new BxTimelineMain();
BxTimelineView.prototype.changePage = function(oElement, iStart, iPerPage) {
this._oRequestParams.start = iStart;
this._oRequestParams.per_page = iPerPage;
this._getPosts(oElement, 'page');
};
BxTimelineView.prototype.changeFilter = function(oLink) {
var sId = $(oLink).attr('id');
this._oRequestParams.start = 0;
this._oRequestParams.filter = sId.substr(sId.lastIndexOf('-') + 1, sId.length);
this._getPosts(oLink, 'filter');
};
BxTimelineView.prototype.changeTimeline = function(oLink, iYear) {
this._oRequestParams.start = 0;
this._oRequestParams.timeline = iYear;
this._getPosts(oLink, 'timeline');
};
BxTimelineView.prototype.deletePost = function(oLink, iId) {
var $this = this;
var oView = $(this.sIdView);
var oData = this._getDefaultData();
oData['id'] = iId;
this.loadingInBlock(oLink, true);
$.post(
this._sActionsUrl + 'delete/',
oData,
function(oData) {
$this.loadingInBlock(oLink, false);
if(oData && oData.msg != undefined)
alert(oData.msg);
if(oData && oData.code == 0)
$(oLink).parents('.bx-popup-applied:first:visible').dolPopupHide();
$($this.sIdItem + oData.id).bx_anim('hide', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
$(this).remove();
if(oView.find('.bx-tl-item').length != 0) {
$this.reloadMasonry();
return;
}
$this.destroyMasonry();
oView.find('.bx-tl-load-more').hide();
oView.find('.bx-tl-empty').show();
});
},
'json'
);
};
BxTimelineView.prototype.showMoreContent = function(oLink) {
$(oLink).parent('span').next('span').show().prev('span').remove();
this.reloadMasonry();
};
BxTimelineView.prototype.showPhoto = function(oLink, sUrl) {
$('#' + this._aHtmlIds['photo_popup']).dolPopupImage(sUrl, $(oLink).parent());
};
BxTimelineView.prototype.commentItem = function(oLink, sSystem, iId) {
var $this = this;
var oData = this._getDefaultData();
oData['system'] = sSystem;
oData['id'] = iId;
var oComments = $(oLink).parents('.' + this.sClassItem + ':first').find('.' + this.sClassItemComments);
if(oComments.children().length > 0) {
oComments.bx_anim('toggle', this._sAnimationEffect, this._iAnimationSpeed);
return;
}
if(oLink)
this.loadingInItem(oLink, true);
jQuery.get (
this._sActionsUrl + 'get_comments',
oData,
function(oData) {
if(oLink)
$this.loadingInItem(oLink, false);
if(!oData.content)
return;
oComments.html($(oData.content).hide()).children(':hidden').bxTime().bx_anim('show', $this._sAnimationEffect, $this._iAnimationSpeed);
},
'json'
);
};
BxTimelineView.prototype._getPosts = function(oElement, sAction) {
var $this = this;
var oView = $(this.sIdView);
switch(sAction) {
case 'page':
this.loadingInButton(oElement, true);
break;
default:
this.loadingInBlock(oElement, true);
break;
}
jQuery.get(
this._sActionsUrl + 'get_posts/',
this._getDefaultData(),
function(oData) {
if(oData && oData.items != undefined) {
var sItems = $.trim(oData.items);
switch(sAction) {
case 'page':
$this.loadingInButton(oElement, false);
$this.appendMasonry($(sItems).bxTime());
break;
default:
$this.loadingInBlock(oElement, false);
oView.find('.' + $this.sClassItems).bx_anim('hide', $this._sAnimationEffect, $this._iAnimationSpeed, function() {
$(this).html(sItems).show().bxTime();
if($this.isMasonryEmpty()) {
$this.destroyMasonry();
return;
}
if($this.isMasonry())
$this.reloadMasonry();
else
$this.initMasonry();
});
break;
}
}
if(oData && oData.load_more != undefined)
oView.find('.' + $this.sSP + '-load-more-holder').html($.trim(oData.load_more));
if(oData && oData.back != undefined)
oView.find('.' + $this.sSP + '-back-holder').html($.trim(oData.back));
},
'json'
);
};
| camperjz/trident | modules/boonex/timeline/updates/8.0.6_8.0.7/source/js/view.js | JavaScript | mit | 5,516 |
var TasteEntriesIndexView = Backbone.View.extend({
initialize: function () {
this.initial_data = $('#data').data('response');
this.collection = new TasteEntriesCollection(this.initial_data);
this.render();
this.taste_entries_index_list_view = new TasteEntriesIndexListView({
el: '#entries_list',
collection: this.collection
});
this.taste_entries_index_form_view = new TasteEntriesIndexFormView({
el: '#entry_form',
collection: this.collection
});
},
render: function () {
this.$el.html('');
this.$el.html(render('taste_entries/index', {}));
}
}); | cgvarela/jennifer_dewalt | app/assets/javascripts/views/taste_entries_index_view.js | JavaScript | mit | 586 |
var AWS = require('./core');
var SequentialExecutor = require('./sequential_executor');
/**
* The namespace used to register global event listeners for request building
* and sending.
*/
AWS.EventListeners = {
/**
* @!attribute VALIDATE_CREDENTIALS
* A request listener that validates whether the request is being
* sent with credentials.
* Handles the {AWS.Request~validate 'validate' Request event}
* @example Sending a request without validating credentials
* var listener = AWS.EventListeners.Core.VALIDATE_CREDENTIALS;
* request.removeListener('validate', listener);
* @readonly
* @return [Function]
* @!attribute VALIDATE_REGION
* A request listener that validates whether the region is set
* for a request.
* Handles the {AWS.Request~validate 'validate' Request event}
* @example Sending a request without validating region configuration
* var listener = AWS.EventListeners.Core.VALIDATE_REGION;
* request.removeListener('validate', listener);
* @readonly
* @return [Function]
* @!attribute VALIDATE_PARAMETERS
* A request listener that validates input parameters in a request.
* Handles the {AWS.Request~validate 'validate' Request event}
* @example Sending a request without validating parameters
* var listener = AWS.EventListeners.Core.VALIDATE_PARAMETERS;
* request.removeListener('validate', listener);
* @example Disable parameter validation globally
* AWS.EventListeners.Core.removeListener('validate',
* AWS.EventListeners.Core.VALIDATE_REGION);
* @readonly
* @return [Function]
* @!attribute SEND
* A request listener that initiates the HTTP connection for a
* request being sent. Handles the {AWS.Request~send 'send' Request event}
* @example Replacing the HTTP handler
* var listener = AWS.EventListeners.Core.SEND;
* request.removeListener('send', listener);
* request.on('send', function(response) {
* customHandler.send(response);
* });
* @return [Function]
* @readonly
* @!attribute HTTP_DATA
* A request listener that reads data from the HTTP connection in order
* to build the response data.
* Handles the {AWS.Request~httpData 'httpData' Request event}.
* Remove this handler if you are overriding the 'httpData' event and
* do not want extra data processing and buffering overhead.
* @example Disabling default data processing
* var listener = AWS.EventListeners.Core.HTTP_DATA;
* request.removeListener('httpData', listener);
* @return [Function]
* @readonly
*/
Core: {} /* doc hack */
};
AWS.EventListeners = {
Core: new SequentialExecutor().addNamedListeners(function(add, addAsync) {
addAsync('VALIDATE_CREDENTIALS', 'validate',
function VALIDATE_CREDENTIALS(req, done) {
if (!req.service.api.signatureVersion) return done(); // none
req.service.config.getCredentials(function(err) {
if (err) {
req.response.error = AWS.util.error(err,
{code: 'CredentialsError', message: 'Missing credentials in config'});
}
done();
});
});
add('VALIDATE_REGION', 'validate', function VALIDATE_REGION(req) {
if (!req.service.config.region && !req.service.isGlobalEndpoint) {
req.response.error = AWS.util.error(new Error(),
{code: 'ConfigError', message: 'Missing region in config'});
}
});
add('BUILD_IDEMPOTENCY_TOKENS', 'validate', function BUILD_IDEMPOTENCY_TOKENS(req) {
var operation = req.service.api.operations[req.operation];
if (!operation) {
return;
}
var idempotentMembers = operation.idempotentMembers;
if (!idempotentMembers.length) {
return;
}
// creates a copy of params so user's param object isn't mutated
var params = AWS.util.copy(req.params);
for (var i = 0, iLen = idempotentMembers.length; i < iLen; i++) {
if (!params[idempotentMembers[i]]) {
// add the member
params[idempotentMembers[i]] = AWS.util.uuid.v4();
}
}
req.params = params;
});
add('VALIDATE_PARAMETERS', 'validate', function VALIDATE_PARAMETERS(req) {
var rules = req.service.api.operations[req.operation].input;
var validation = req.service.config.paramValidation;
new AWS.ParamValidator(validation).validate(rules, req.params);
});
addAsync('COMPUTE_SHA256', 'afterBuild', function COMPUTE_SHA256(req, done) {
req.haltHandlersOnError();
var operation = req.service.api.operations[req.operation];
var authtype = operation ? operation.authtype : '';
if (!req.service.api.signatureVersion && !authtype) return done(); // none
if (req.service.getSignerClass(req) === AWS.Signers.V4) {
var body = req.httpRequest.body || '';
if (authtype.indexOf('unsigned-body') >= 0) {
req.httpRequest.headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD';
return done();
}
AWS.util.computeSha256(body, function(err, sha) {
if (err) {
done(err);
}
else {
req.httpRequest.headers['X-Amz-Content-Sha256'] = sha;
done();
}
});
} else {
done();
}
});
add('SET_CONTENT_LENGTH', 'afterBuild', function SET_CONTENT_LENGTH(req) {
if (req.httpRequest.headers['Content-Length'] === undefined) {
var length = AWS.util.string.byteLength(req.httpRequest.body);
req.httpRequest.headers['Content-Length'] = length;
}
});
add('SET_HTTP_HOST', 'afterBuild', function SET_HTTP_HOST(req) {
req.httpRequest.headers['Host'] = req.httpRequest.endpoint.host;
});
add('RESTART', 'restart', function RESTART() {
var err = this.response.error;
if (!err || !err.retryable) return;
this.httpRequest = new AWS.HttpRequest(
this.service.endpoint,
this.service.region
);
if (this.response.retryCount < this.service.config.maxRetries) {
this.response.retryCount++;
} else {
this.response.error = null;
}
});
addAsync('SIGN', 'sign', function SIGN(req, done) {
var service = req.service;
var operation = req.service.api.operations[req.operation];
var authtype = operation ? operation.authtype : '';
if (!service.api.signatureVersion && !authtype) return done(); // none
service.config.getCredentials(function (err, credentials) {
if (err) {
req.response.error = err;
return done();
}
try {
var date = AWS.util.date.getDate();
var SignerClass = service.getSignerClass(req);
var signer = new SignerClass(req.httpRequest,
service.api.signingName || service.api.endpointPrefix,
{
signatureCache: service.config.signatureCache,
operation: operation
});
signer.setServiceClientId(service._clientId);
// clear old authorization headers
delete req.httpRequest.headers['Authorization'];
delete req.httpRequest.headers['Date'];
delete req.httpRequest.headers['X-Amz-Date'];
// add new authorization
signer.addAuthorization(credentials, date);
req.signedAt = date;
} catch (e) {
req.response.error = e;
}
done();
});
});
add('VALIDATE_RESPONSE', 'validateResponse', function VALIDATE_RESPONSE(resp) {
if (this.service.successfulResponse(resp, this)) {
resp.data = {};
resp.error = null;
} else {
resp.data = null;
resp.error = AWS.util.error(new Error(),
{code: 'UnknownError', message: 'An unknown error occurred.'});
}
});
addAsync('SEND', 'send', function SEND(resp, done) {
resp.httpResponse._abortCallback = done;
resp.error = null;
resp.data = null;
function callback(httpResp) {
resp.httpResponse.stream = httpResp;
httpResp.on('headers', function onHeaders(statusCode, headers, statusMessage) {
resp.request.emit(
'httpHeaders',
[statusCode, headers, resp, statusMessage]
);
if (!resp.httpResponse.streaming) {
if (AWS.HttpClient.streamsApiVersion === 2) { // streams2 API check
httpResp.on('readable', function onReadable() {
var data = httpResp.read();
if (data !== null) {
resp.request.emit('httpData', [data, resp]);
}
});
} else { // legacy streams API
httpResp.on('data', function onData(data) {
resp.request.emit('httpData', [data, resp]);
});
}
}
});
httpResp.on('end', function onEnd() {
resp.request.emit('httpDone');
done();
});
}
function progress(httpResp) {
httpResp.on('sendProgress', function onSendProgress(value) {
resp.request.emit('httpUploadProgress', [value, resp]);
});
httpResp.on('receiveProgress', function onReceiveProgress(value) {
resp.request.emit('httpDownloadProgress', [value, resp]);
});
}
function error(err) {
resp.error = AWS.util.error(err, {
code: 'NetworkingError',
region: resp.request.httpRequest.region,
hostname: resp.request.httpRequest.endpoint.hostname,
retryable: true
});
resp.request.emit('httpError', [resp.error, resp], function() {
done();
});
}
function executeSend() {
var http = AWS.HttpClient.getInstance();
var httpOptions = resp.request.service.config.httpOptions || {};
try {
var stream = http.handleRequest(resp.request.httpRequest, httpOptions,
callback, error);
progress(stream);
} catch (err) {
error(err);
}
}
var timeDiff = (AWS.util.date.getDate() - this.signedAt) / 1000;
if (timeDiff >= 60 * 10) { // if we signed 10min ago, re-sign
this.emit('sign', [this], function(err) {
if (err) done(err);
else executeSend();
});
} else {
executeSend();
}
});
add('HTTP_HEADERS', 'httpHeaders',
function HTTP_HEADERS(statusCode, headers, resp, statusMessage) {
resp.httpResponse.statusCode = statusCode;
resp.httpResponse.statusMessage = statusMessage;
resp.httpResponse.headers = headers;
resp.httpResponse.body = new AWS.util.Buffer('');
resp.httpResponse.buffers = [];
resp.httpResponse.numBytes = 0;
var dateHeader = headers.date || headers.Date;
if (dateHeader) {
var serverTime = Date.parse(dateHeader);
if (resp.request.service.config.correctClockSkew
&& AWS.util.isClockSkewed(serverTime)) {
AWS.util.applyClockOffset(serverTime);
}
}
});
add('HTTP_DATA', 'httpData', function HTTP_DATA(chunk, resp) {
if (chunk) {
if (AWS.util.isNode()) {
resp.httpResponse.numBytes += chunk.length;
var total = resp.httpResponse.headers['content-length'];
var progress = { loaded: resp.httpResponse.numBytes, total: total };
resp.request.emit('httpDownloadProgress', [progress, resp]);
}
resp.httpResponse.buffers.push(new AWS.util.Buffer(chunk));
}
});
add('HTTP_DONE', 'httpDone', function HTTP_DONE(resp) {
// convert buffers array into single buffer
if (resp.httpResponse.buffers && resp.httpResponse.buffers.length > 0) {
var body = AWS.util.buffer.concat(resp.httpResponse.buffers);
resp.httpResponse.body = body;
}
delete resp.httpResponse.numBytes;
delete resp.httpResponse.buffers;
});
add('FINALIZE_ERROR', 'retry', function FINALIZE_ERROR(resp) {
if (resp.httpResponse.statusCode) {
resp.error.statusCode = resp.httpResponse.statusCode;
if (resp.error.retryable === undefined) {
resp.error.retryable = this.service.retryableError(resp.error, this);
}
}
});
add('INVALIDATE_CREDENTIALS', 'retry', function INVALIDATE_CREDENTIALS(resp) {
if (!resp.error) return;
switch (resp.error.code) {
case 'RequestExpired': // EC2 only
case 'ExpiredTokenException':
case 'ExpiredToken':
resp.error.retryable = true;
resp.request.service.config.credentials.expired = true;
}
});
add('EXPIRED_SIGNATURE', 'retry', function EXPIRED_SIGNATURE(resp) {
var err = resp.error;
if (!err) return;
if (typeof err.code === 'string' && typeof err.message === 'string') {
if (err.code.match(/Signature/) && err.message.match(/expired/)) {
resp.error.retryable = true;
}
}
});
add('CLOCK_SKEWED', 'retry', function CLOCK_SKEWED(resp) {
if (!resp.error) return;
if (this.service.clockSkewError(resp.error)
&& this.service.config.correctClockSkew
&& AWS.config.isClockSkewed) {
resp.error.retryable = true;
}
});
add('REDIRECT', 'retry', function REDIRECT(resp) {
if (resp.error && resp.error.statusCode >= 300 &&
resp.error.statusCode < 400 && resp.httpResponse.headers['location']) {
this.httpRequest.endpoint =
new AWS.Endpoint(resp.httpResponse.headers['location']);
this.httpRequest.headers['Host'] = this.httpRequest.endpoint.host;
resp.error.redirect = true;
resp.error.retryable = true;
}
});
add('RETRY_CHECK', 'retry', function RETRY_CHECK(resp) {
if (resp.error) {
if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) {
resp.error.retryDelay = 0;
} else if (resp.retryCount < resp.maxRetries) {
resp.error.retryDelay = this.service.retryDelays(resp.retryCount) || 0;
}
}
});
addAsync('RESET_RETRY_STATE', 'afterRetry', function RESET_RETRY_STATE(resp, done) {
var delay, willRetry = false;
if (resp.error) {
delay = resp.error.retryDelay || 0;
if (resp.error.retryable && resp.retryCount < resp.maxRetries) {
resp.retryCount++;
willRetry = true;
} else if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) {
resp.redirectCount++;
willRetry = true;
}
}
if (willRetry) {
resp.error = null;
setTimeout(done, delay);
} else {
done();
}
});
}),
CorePost: new SequentialExecutor().addNamedListeners(function(add) {
add('EXTRACT_REQUEST_ID', 'extractData', AWS.util.extractRequestId);
add('EXTRACT_REQUEST_ID', 'extractError', AWS.util.extractRequestId);
add('ENOTFOUND_ERROR', 'httpError', function ENOTFOUND_ERROR(err) {
if (err.code === 'NetworkingError' && err.errno === 'ENOTFOUND') {
var message = 'Inaccessible host: `' + err.hostname +
'\'. This service may not be available in the `' + err.region +
'\' region.';
this.response.error = AWS.util.error(new Error(message), {
code: 'UnknownEndpoint',
region: err.region,
hostname: err.hostname,
retryable: true,
originalError: err
});
}
});
}),
Logger: new SequentialExecutor().addNamedListeners(function(add) {
add('LOG_REQUEST', 'complete', function LOG_REQUEST(resp) {
var req = resp.request;
var logger = req.service.config.logger;
if (!logger) return;
function buildMessage() {
var time = AWS.util.date.getDate().getTime();
var delta = (time - req.startTime.getTime()) / 1000;
var ansi = logger.isTTY ? true : false;
var status = resp.httpResponse.statusCode;
var params = require('util').inspect(req.params, true, null);
var message = '';
if (ansi) message += '\x1B[33m';
message += '[AWS ' + req.service.serviceIdentifier + ' ' + status;
message += ' ' + delta.toString() + 's ' + resp.retryCount + ' retries]';
if (ansi) message += '\x1B[0;1m';
message += ' ' + AWS.util.string.lowerFirst(req.operation);
message += '(' + params + ')';
if (ansi) message += '\x1B[0m';
return message;
}
var line = buildMessage();
if (typeof logger.log === 'function') {
logger.log(line);
} else if (typeof logger.write === 'function') {
logger.write(line + '\n');
}
});
}),
Json: new SequentialExecutor().addNamedListeners(function(add) {
var svc = require('./protocol/json');
add('BUILD', 'build', svc.buildRequest);
add('EXTRACT_DATA', 'extractData', svc.extractData);
add('EXTRACT_ERROR', 'extractError', svc.extractError);
}),
Rest: new SequentialExecutor().addNamedListeners(function(add) {
var svc = require('./protocol/rest');
add('BUILD', 'build', svc.buildRequest);
add('EXTRACT_DATA', 'extractData', svc.extractData);
add('EXTRACT_ERROR', 'extractError', svc.extractError);
}),
RestJson: new SequentialExecutor().addNamedListeners(function(add) {
var svc = require('./protocol/rest_json');
add('BUILD', 'build', svc.buildRequest);
add('EXTRACT_DATA', 'extractData', svc.extractData);
add('EXTRACT_ERROR', 'extractError', svc.extractError);
}),
RestXml: new SequentialExecutor().addNamedListeners(function(add) {
var svc = require('./protocol/rest_xml');
add('BUILD', 'build', svc.buildRequest);
add('EXTRACT_DATA', 'extractData', svc.extractData);
add('EXTRACT_ERROR', 'extractError', svc.extractError);
}),
Query: new SequentialExecutor().addNamedListeners(function(add) {
var svc = require('./protocol/query');
add('BUILD', 'build', svc.buildRequest);
add('EXTRACT_DATA', 'extractData', svc.extractData);
add('EXTRACT_ERROR', 'extractError', svc.extractError);
})
};
| ShareTracs/app | node_modules/aws-sdk/lib/event_listeners.js | JavaScript | mit | 18,313 |
var searchData=
[
['changedetailsapi',['ChangeDetailsAPI',['../classbackend_1_1api_1_1users_1_1_change_details_a_p_i.html',1,'backend::api::users']]],
['chatmessageapi',['ChatMessageApi',['../classbackend_1_1api_1_1messages_1_1_chat_message_api.html',1,'backend::api::messages']]],
['chatuserapi',['ChatUserApi',['../classbackend_1_1api_1_1messages_1_1_chat_user_api.html',1,'backend::api::messages']]],
['chatuserretrieveapi',['ChatUserRetrieveApi',['../classbackend_1_1api_1_1messages_1_1_chat_user_retrieve_api.html',1,'backend::api::messages']]]
];
| evanyc15/Fort-Nitta | Documentation/html/search/classes_1.js | JavaScript | mit | 561 |
/*
* The trigger API
*
* - Documentation: ../docs/input-trigger.md
*/
+function ($) { "use strict";
var TriggerOn = function (element, options) {
var $el = this.$el = $(element);
this.options = options || {};
if (this.options.triggerCondition === false)
throw new Error('Trigger condition is not specified.')
if (this.options.trigger === false)
throw new Error('Trigger selector is not specified.')
if (this.options.triggerAction === false)
throw new Error('Trigger action is not specified.')
this.triggerCondition = this.options.triggerCondition
if (this.options.triggerCondition.indexOf('value') == 0) {
var match = this.options.triggerCondition.match(/[^[\]]+(?=])/g)
this.triggerCondition = 'value'
this.triggerConditionValue = (match) ? match : [""]
}
this.triggerParent = this.options.triggerClosestParent !== undefined
? $el.closest(this.options.triggerClosestParent)
: undefined
if (
this.triggerCondition == 'checked' ||
this.triggerCondition == 'unchecked' ||
this.triggerCondition == 'value'
) {
$(document).on('change', this.options.trigger, $.proxy(this.onConditionChanged, this))
}
var self = this
$el.on('oc.triggerOn.update', function(e){
e.stopPropagation()
self.onConditionChanged()
})
self.onConditionChanged()
}
TriggerOn.prototype.onConditionChanged = function() {
if (this.triggerCondition == 'checked') {
this.updateTarget(!!$(this.options.trigger + ':checked', this.triggerParent).length)
}
else if (this.triggerCondition == 'unchecked') {
this.updateTarget(!$(this.options.trigger + ':checked', this.triggerParent).length)
}
else if (this.triggerCondition == 'value') {
var trigger, triggerValue = ''
trigger = $(this.options.trigger, this.triggerParent)
.not('input[type=checkbox], input[type=radio], input[type=button], input[type=submit]')
if (!trigger.length) {
trigger = $(this.options.trigger, this.triggerParent)
.not(':not(input[type=checkbox]:checked, input[type=radio]:checked)')
}
if (!!trigger.length) {
triggerValue = trigger.val()
}
this.updateTarget($.inArray(triggerValue, this.triggerConditionValue) != -1)
}
}
TriggerOn.prototype.updateTarget = function(status) {
var self = this,
actions = this.options.triggerAction.split('|')
$.each(actions, function(index, action) {
self.updateTargetAction(action, status)
})
$(window).trigger('resize')
this.$el.trigger('oc.triggerOn.afterUpdate', status)
}
TriggerOn.prototype.updateTargetAction = function(action, status) {
if (action == 'show') {
this.$el
.toggleClass('hide', !status)
.trigger('hide.oc.triggerapi', [!status])
}
else if (action == 'hide') {
this.$el
.toggleClass('hide', status)
.trigger('hide.oc.triggerapi', [status])
}
else if (action == 'enable') {
this.$el
.prop('disabled', !status)
.toggleClass('control-disabled', !status)
.trigger('disable.oc.triggerapi', [!status])
}
else if (action == 'disable') {
this.$el
.prop('disabled', status)
.toggleClass('control-disabled', status)
.trigger('disable.oc.triggerapi', [status])
}
else if (action == 'empty' && status) {
this.$el
.not('input[type=checkbox], input[type=radio], input[type=button], input[type=submit]')
.val('')
this.$el
.not(':not(input[type=checkbox], input[type=radio])')
.prop('checked', false)
this.$el
.trigger('empty.oc.triggerapi')
.trigger('change')
}
if (action == 'show' || action == 'hide') {
this.fixButtonClasses()
}
}
TriggerOn.prototype.fixButtonClasses = function() {
var group = this.$el.closest('.btn-group')
if (group.length > 0 && this.$el.is(':last-child'))
this.$el.prev().toggleClass('last', this.$el.hasClass('hide'))
}
TriggerOn.DEFAULTS = {
triggerAction: false,
triggerCondition: false,
triggerClosestParent: undefined,
trigger: false
}
// TRIGGERON PLUGIN DEFINITION
// ============================
var old = $.fn.triggerOn
$.fn.triggerOn = function (option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('oc.triggerOn')
var options = $.extend({}, TriggerOn.DEFAULTS, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('oc.triggerOn', (data = new TriggerOn(this, options)))
})
}
$.fn.triggerOn.Constructor = TriggerOn
// TRIGGERON NO CONFLICT
// =================
$.fn.triggerOn.noConflict = function () {
$.fn.triggerOn = old
return this
}
// TRIGGERON DATA-API
// ===============
$(document).render(function(){
$('[data-trigger]').triggerOn()
})
}(window.jQuery);
| timmarner/cms-backendtheme | themes/timmarner/assets/ui/js/input.trigger.js | JavaScript | mit | 5,644 |
Astro.createValidator({
name: 'gte',
validate: function(fieldValue, fieldName, compareValue) {
if (_.isFunction(compareValue)) {
compareValue = compareValue.call(this);
}
return fieldValue >= compareValue;
},
events: {
validationerror: function(e) {
var fieldName = e.data.field;
var compareValue = e.data.options;
if (_.isFunction(compareValue)) {
compareValue = compareValue.call(this);
}
e.data.message = 'The "' + fieldName +
'" field\'s value has to be greater than or equal "' +
compareValue + '"';
}
}
});
| ribbedcrown/meteor-astronomy-validators | lib/validators/size/gte.js | JavaScript | mit | 606 |
define(function(require) {
// Include parent class
var utility = require('../Helper/utility.js')
var Human = require('./Human.js')
var Teacher = Human.extend({
init: function(firstName, lastName, age, specialty) {
Human.init.apply(this, arguments);
this.specialty = specialty;
return this;
},
introduce: function() {
return Human.introduce.apply(this) + ", Specialty: " + this.specialty;
}
});
return Teacher;
}) | TelerikAcademy/flextry-Telerik-Academy | Web Design & Development/5. JavaScript OOP/11. Advanced OOP (Autumn Academy)/01. School - Prototypal OOP/scripts/Classes/Teacher.js | JavaScript | mit | 545 |
/** !
* Google Drive File Picker Example
* By Daniel Lo Nigro (http://dan.cx/)
*/
(function () {
/**
* Initialise a Google Driver file picker
*/
var FilePicker = window.FilePicker = function (options) {
// Config
this.apiKey = options.apiKey
this.clientId = options.clientId
// Elements
this.buttonEl = options.buttonEl
// Events
this.onSelect = options.onSelect
this.buttonEl.on('click', this.open.bind(this))
// Disable the button until the API loads, as it won't work properly until then.
this.buttonEl.prop('disabled', true)
// Load the drive API
window.gapi.client.setApiKey(this.apiKey)
window.gapi.client.load('drive', 'v2', this._driveApiLoaded.bind(this))
window.google.load('picker', '1', { callback: this._pickerApiLoaded.bind(this) })
}
FilePicker.prototype = {
/**
* Open the file picker.
*/
open: function () {
// Check if the user has already authenticated
var token = window.gapi.auth.getToken()
if (token) {
this._showPicker()
} else {
// The user has not yet authenticated with Google
// We need to do the authentication before displaying the Drive picker.
this._doAuth(false, function () { this._showPicker() }.bind(this))
}
},
/**
* Show the file picker once authentication has been done.
* @private
*/
_showPicker: function () {
var accessToken = window.gapi.auth.getToken().access_token
var view = new window.google.picker.DocsView()
view.setMimeTypes('text/markdown,text/html')
view.setIncludeFolders(true)
view.setOwnedByMe(true)
this.picker = new window.google.picker.PickerBuilder()
.enableFeature(window.google.picker.Feature.NAV_HIDDEN)
.addView(view)
.setAppId(this.clientId)
.setOAuthToken(accessToken)
.setCallback(this._pickerCallback.bind(this))
.build()
.setVisible(true)
},
/**
* Called when a file has been selected in the Google Drive file picker.
* @private
*/
_pickerCallback: function (data) {
if (data[window.google.picker.Response.ACTION] === window.google.picker.Action.PICKED) {
var file = data[window.google.picker.Response.DOCUMENTS][0]
var id = file[window.google.picker.Document.ID]
var request = window.gapi.client.drive.files.get({
fileId: id
})
request.execute(this._fileGetCallback.bind(this))
}
},
/**
* Called when file details have been retrieved from Google Drive.
* @private
*/
_fileGetCallback: function (file) {
if (this.onSelect) {
this.onSelect(file)
}
},
/**
* Called when the Google Drive file picker API has finished loading.
* @private
*/
_pickerApiLoaded: function () {
this.buttonEl.prop('disabled', false)
},
/**
* Called when the Google Drive API has finished loading.
* @private
*/
_driveApiLoaded: function () {
this._doAuth(true)
},
/**
* Authenticate with Google Drive via the Google JavaScript API.
* @private
*/
_doAuth: function (immediate, callback) {
window.gapi.auth.authorize({
client_id: this.clientId,
scope: 'https://www.googleapis.com/auth/drive.readonly',
immediate: immediate
}, callback || function () {})
}
}
}())
| Rwing/hackmd | public/js/google-drive-picker.js | JavaScript | mit | 3,553 |
version https://git-lfs.github.com/spec/v1
oid sha256:866863ba9feea81e907968a3bc09f6876511c89dbf5be91d1ed9358a2b6ad4a3
size 563
| yogeshsaroya/new-cdnjs | ajax/libs/yui/3.2.0/datatype/lang/datatype-date-format_fr-CA.js | JavaScript | mit | 128 |
import { createReturnPromise } from '../helpers'
function getUserFactory() {
function getUser({ firebase, path }) {
return createReturnPromise(firebase.getUser(), path)
}
return getUser
}
export default getUserFactory
| yusufsafak/cerebral | packages/node_modules/@cerebral/firebase/src/operators/getUser.js | JavaScript | mit | 231 |
Joshfire.define(['joshfire/class', 'joshfire/tree.ui', 'joshfire/uielements/list', 'joshfire/uielements/panel', 'joshfire/uielements/panel.manager', 'joshfire/uielements/button', 'src/ui-components'], function(Class, UITree, List, Panel, PanelManager, Button, UI) {
return Class(UITree, {
buildTree: function() {
var app = this.app;
return [
{
id: 'sidebarleft',
type: Panel,
children: [
{
id: 'menu',
type: List,
dataPath: '/datasourcelist/',
itemInnerTemplate: '<div class="picto item-<%= item.config.col %>"></div><div class="name"><%= item.name %></div>',
onData: function() {} // trigger data, WTF?
}
]
},
{
id: 'sidebarright',
type: Panel,
children: [
{
id: 'header',
type: Panel,
htmlClass: 'header',
children: [
{
id: 'prev',
type: Button,
label: 'Prev',
autoShow: false
},
{
id: 'title', // the title or the logo
type: Panel,
innerTemplate: UI.tplHeader
}
]
},
{
id: 'content',
type: PanelManager,
uiMaster: '/sidebarleft/menu',
children: [
{
id: 'itemList',
type: List,
loadingTemplate: '<div class="loading"></div>',
itemTemplate: "<li id='<%=itemHtmlId%>' " +
"data-josh-ui-path='<%= path %>' data-josh-grid-id='<%= item.id %>'" +
"class='josh-List joshover item-<%= (item['@type'] || item.itemType).replace('/', '') %> mainitemlist " +
// grid view
"<% if ((item['@type'] || item.itemType) === 'ImageObject') { %>" +
"grid" +
"<% } else if ((item['@type'] || item.itemType) === 'VideoObject') { %>" +
// two rows
"rows" +
"<% } else { %>" +
// list view
"list" +
"<% } %>" +
"' >" +
"<%= itemInner %>" +
"</li>",
itemInnerTemplate:
'<% if ((item["@type"] || item.itemType) === "VideoObject") { %>' +
'<div class="title"><%= item.name %></div>' +
UI.getItemDescriptionTemplate(130) +
UI.tplItemPreview +
'<span class="list-arrow"></span>' +
'<% } else if ((item["@type"] || item.itemType) === "ImageObject") { %>' +
UI.tplItemThumbnail +
'<% } else if ((item["@type"] || item.itemType) === "Article/Status") { %>' +
UI.tplTweetItem +
'<% } else if ((item["@type"] || item.itemType) === "Event") { %>' +
UI.tplEventItem +
'<% } else { %>' +
'<%= item.name %><span class="list-arrow"></span>' +
'<% } %>'
},
{
id: 'detail',
type: Panel,
htmlClass: 'detailView',
uiDataMaster: '/sidebarright/content/itemList',
loadingTemplate: '<div class="loading"></div>',
autoShow: false,
children: [
{
// Article (default)
id: 'article',
type: Panel,
uiDataMaster: '/sidebarright/content/itemList',
forceDataPathRefresh: true,
loadingTemplate: '<div class="loading"></div>',
innerTemplate:
'<div class="title"><h1><%= data.name %></h1>' +
UI.tplDataAuthor +
'<% if (data.articleBody) { print(data.articleBody); } %>',
onData: function(ui) {
var thisEl = app.ui.element('/sidebarright/content/detail/article').htmlEl;
var type = ui.data['@type'] || ui.data.itemType;
if (type === 'VideoObject' ||
type === 'ImageObject' ||
type === 'Event' ||
type === 'Article/Status'
) {
$(thisEl).hide();
}
else {
$(thisEl).show();
}
}
},
{
// Twitter
id: 'twitter',
type: Panel,
uiDataMaster: '/sidebarright/content/itemList',
forceDataPathRefresh: true,
loadingTemplate: '<div class="loading"></div>',
innerTemplate: UI.tplTweetPage,
onData: function(ui) {
var thisEl = app.ui.element('/sidebarright/content/detail/twitter').htmlEl;
if ((ui.data['@type'] || ui.data.itemType) === 'Article/Status') {
$(thisEl).show();
} else {
$(thisEl).hide();
}
}
},
{
// Flickr
id: 'image',
type: Panel,
uiDataMaster: '/sidebarright/content/itemList',
forceDataPathRefresh: true,
loadingTemplate: '<div class="loading"></div>',
innerTemplate: '<img src="<%= data.contentURL %>" />',
onData: function(ui) {
var thisEl = app.ui.element('/sidebarright/content/detail/image').htmlEl;
if ((ui.data['@type'] || ui.data.itemType) === 'ImageObject') {
$(thisEl).show();
} else {
$(thisEl).hide();
}
}
},
{
// Event
id: 'event',
type: Panel,
uiDataMaster: '/sidebarright/content/itemList',
forceDataPathRefresh: true,
loadingTemplate: '<div class="loading"></div>',
innerTemplate: UI.tplEventPage,
onData: function(ui) {
var thisEl = app.ui.element('/sidebarright/content/detail/event').htmlEl;
if ((ui.data['@type'] || ui.data.itemType) === 'Event') {
$(thisEl).show();
} else {
$(thisEl).hide();
}
}
},
{
// Video
id: 'video',
type: Panel,
uiDataMaster: '/sidebarright/content/itemList',
forceDataPathRefresh: true,
loadingTemplate: '<div class="loading"></div>',
onData: function(ui) {
var thisEl = app.ui.element('/sidebarright/content/detail/video').htmlEl,
player = app.ui.element('/sidebarright/content/detail/video/player.youtube');
if (((ui.data['@type'] || ui.data.itemType) === 'VideoObject') && ui.data.publisher && (ui.data.publisher.name === 'Youtube')) {
player.playWithStaticUrl({
url: ui.data.url.replace('http://www.youtube.com/watch?v=', ''),
width: '480px'
});
$(thisEl).show();
} else {
$(thisEl).hide();
}
},
children: [
{
id: 'title',
type: Panel,
uiDataMaster: '/sidebarright/content/itemList',
innerTemplate:
'<div class="title"><h1><%= data.name %></h1>' +
UI.tplDataAuthor +
'</div>'
},
{
id: 'player.youtube',
type: 'video.youtube',
autoShow: true,
controls: true,
noAutoPlay: false
}
]
}
]
},
{
id: 'about',
type: Panel,
loadingTemplate: '<div class="loading"></div>',
autoShow: false,
innerTemplate: UI.tplAboutPage
}
]
}
]
}
];
}
});
}); | joshfire-platform-templates/event | app/src/tree.ui.tablet-onepanel.js | JavaScript | mit | 9,770 |