text:
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

},{}],2:[function(require,module,exports){
//Declaring Item Template
var MenuItem = require("./menuItem")

var Category = require("../../models/category");

var el;

//Initialize function, receives a DomElementId string and assigns the Dom Element to el for future use.
function init(domElementId){
	el = document.getElementById(domElementId)
	//Returns Todo List to simplify Jquery Style Chaining API
	Category.bind("refresh", render);
}

//Renders all objects in TodoList.items using Item Template
function render(){
	var items = Category.all();
	var src = ""
	for(i in items) src += MenuItem(items[i]);
	el.innerHTML = src;
}

module.exports = init;

// NOTES:
// 1. This is the simplest pattern for components that will be instantiated only once.
// 2. Using this for-loop only works with array
// 3. Requires manual rendering, an automatic implementation would use Models with EventEmmiters
},{"../../models/category":9,"./menuItem":3}],3:[function(require,module,exports){
module.exports = function(__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&')
        .replace(/</g, '<')
        .replace(/>/g, '>')
        .replace(/"/g, '"');
    };
  }
  (function() {
    (function() {
      __out.push('
\n \t');

      __out.push(__sanitize(this.name));

      __out.push('\n
\n\n');

    }).call(this);

  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
}
},{}],4:[function(require,module,exports){
module.exports = function(__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&')
        .replace(/</g, '<')
        .replace(/>/g, '>')
        .replace(/"/g, '"');
    };
  }
  (function() {
    (function() {
      __out.push('
\n\n\t
\n\t\t\n\t\t
\n\t\t\t
');

      __out.push(__sanitize(this.name));

      __out.push('
\n\t\t
\n\n\t\t
\n\t\t\t');

      __out.push(this.html);

      __out.push('\n\t\t
\n\n\n\t
\n\n
');

    }).call(this);

  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
}
},{}],5:[function(require,module,exports){
var CategoryItem = require("./categoryItem")
var SubCategoryItem = require("./subcategoryItem")
var ListingItem = require("./listingItem")

var Listing = require("../../models/listing");
var Category = require("../../models/category");

var el;

function init(domElementId){
	el = document.getElementById(domElementId);
	Category.bind("refresh", render);
}

function render(){
	var categories = Category.all();
	var src = ""

	for(categoryIndex in categories){
		var category = categories[categoryIndex];
		category.html = ""

		for (var i = category.subcategories.length - 1; i >= 0; i--) {
			var subcategory = category.subcategories[i];
			var listingHtml = ""
			var listingsInCategory = Listing.select(function(listing){ return category.name == listing.category && subcategory == listing.subcategory });

			for (var ii = 0; ii < listingsInCategory.length; ii++) listingHtml += ListingItem( listingsInCategory[ii] );
			category.html += SubCategoryItem({name: subcategory, html: listingHtml });
		};

		src += CategoryItem(category);
	}
	el.innerHTML = src;
}

module.exports = init;

},{"../../models/category":9,"../../models/listing":10,"./categoryItem":4,"./listingItem":6,"./subcategoryItem":7}],6:[function(require,module,exports){
module.exports = function(__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&')
        .replace(/</g, '<')
        .replace(/>/g, '>')
        .replace(/"/g, '"');
    };
  }
  (function() {
    (function() {
      __out.push('
\n  \n    \n  \n
\n
');

      __out.push(__sanitize(this.name));

      __out.push('
\n\t\t
');

      __out.push(__sanitize(this.description));

      __out.push('
\n\t\t+ Info: ');

      __out.push(__sanitize(this.link));

      __out.push('\t\t\t\t    \n
\n
');

    }).call(this);

  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
}
},{}],7:[function(require,module,exports){
module.exports = function(__obj) {
  if (!__obj) __obj = {};
  var __out = [], __capture = function(callback) {
    var out = __out, result;
    __out = [];
    callback.call(this);
    result = __out.join('');
    __out = out;
    return __safe(result);
  }, __sanitize = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else if (typeof value !== 'undefined' && value != null) {
      return __escape(value);
    } else {
      return '';
    }
  }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;
  __safe = __obj.safe = function(value) {
    if (value && value.ecoSafe) {
      return value;
    } else {
      if (!(typeof value !== 'undefined' && value != null)) value = '';
      var result = new String(value);
      result.ecoSafe = true;
      return result;
    }
  };
  if (!__escape) {
    __escape = __obj.escape = function(value) {
      return ('' + value)
        .replace(/&/g, '&')
        .replace(/</g, '<')
        .replace(/>/g, '>')
        .replace(/"/g, '"');
    };
  }
  (function() {
    (function() {
      __out.push('
\n\t
');

      __out.push(__sanitize(this.name));

      __out.push('
\n\t');

      __out.push(this.html);

      __out.push('\n
');

    }).call(this);

  }).call(__obj);
  __obj.safe = __objSafe, __obj.escape = __escape;
  return __out.join('');
}
},{}],8:[function(require,module,exports){
module.exports=[
	{
		"name": "Item 8",
		"description": "Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans. Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans",
		"link": "http://google.com",
		"image": "https://dl.dropboxusercontent.com/u/6461913/icon-face.png",
		"category": "Category 1",
		"subcategory": "Subcategory 1-3",
		"type": "Small",
		"details": "any=true&count=22&color=white"
	},
	{
		"name": "Item 7",
		"description": "Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans. Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans",
		"link": "http://google.com",
		"image": "https://dl.dropboxusercontent.com/u/6461913/icon-face.png",
		"category": "Category 3",
		"subcategory": "Subcategory 1-2",
		"type": "Small",
		"details": "any=true&count=22&color=white"
	},
	{
		"name": "Item 6",
		"description": "Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans. Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans",
		"link": "http://google.com",
		"image": "https://dl.dropboxusercontent.com/u/6461913/icon-face.png",
		"category": "Category 3",
		"subcategory": "Subcategory 1-1",
		"type": "Small",
		"details": "any=true&count=22&color=white"
	},
	{
		"name": "Item 5",
		"description": "Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans. Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans",
		"link": "http://google.com",
		"image": "https://dl.dropboxusercontent.com/u/6461913/icon-face.png",
		"category": "Category 1",
		"subcategory": "Subcategory 1-1",
		"type": "Small",
		"details": "any=true&count=22&color=white"
	},
	{
		"name": "Item 4",
		"description": "Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans. Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans",
		"link": "http://google.com",
		"image": "https://dl.dropboxusercontent.com/u/6461913/icon-face.png",
		"category": "Category 1",
		"subcategory": "Subcategory 1-1",
		"type": "Small",
		"details": "any=true&count=22&color=white"
	},
	{
		"name": "Item 3",
		"description": "Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans. Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans",
		"link": "http://google.com",
		"image": "https://dl.dropboxusercontent.com/u/6461913/icon-face.png",
		"category": "Category 2",
		"subcategory": "Subcategory 1",
		"type": "Small",
		"details": "any=true&count=22&color=white"
	},
	{
		"name": "Item 2",
		"description": "Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans. Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans",
		"link": "http://google.com",
		"image": "https://dl.dropboxusercontent.com/u/6461913/icon-face.png",
		"category": "Category 2",
		"subcategory": "Subcategory 1",
		"type": "Small",
		"details": "any=true&count=22&color=white"
	},
	{
		"name": "Item 1",
		"description": "Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans. Lorem Ipsum goldan sirum, nas la faltan ne pase se de mercy arive along travans",
		"link": "http://google.com",
		"image": "https://dl.dropboxusercontent.com/u/6461913/icon-face.png",
		"category": "Category 1",
		"subcategory": "Subcategory 1-1",
		"type": "Small",
		"details": "any=true&count=22&color=white"
	}
]
},{}],9:[function(require,module,exports){
var _3Model = require("3vot-model/lib/ajaxless")

var fields = [ "name","subcategories" ];

Category = _3Model.Model.setup("Category", fields);

Category.createFromListing = function(listings){
	var categories = {}
	for (var i = listings.length - 1; i >= 0; i--) {
		var listing = listings[i];

		var category = listing.category;
		var subcategory = listing.subcategory;

		if( !categories[category] ) categories[category] = {name: category, subcategories: []}
		if( categories[category].subcategories.indexOf( subcategory ) == -1 ) categories[category].subcategories.push(subcategory)
	};

	var items = []
	for(i in categories){
		items.push(categories[i])
	}
	Category.refresh(items);

}

module.exports = Category

//CONVERT MARKDOWN TO LINK .replace(/\[([^\]]+)\]\(([^)]+)\)/g, '\$1')
},{"3vot-model/lib/ajaxless":12}],10:[function(require,module,exports){
var fs = require("fs")
var _3Model = require("3vot-model/lib/ajaxless")

var fields = ["name",	"description",	"link",	"image",	"category",	"subcategory",	"type", "details"];

Listing = _3Model.Model.setup("Listing", fields);

Listing.loadFromJSON = function(){
	var json = require("../data/data.json")
	Listing.refresh(json);
}

Listing.loadFromGoogle  = function(){
	var script = document.createElement('script');
	script.src = 'https://spreadsheets.google.com/feeds/list/1Cj_rc5QV6LK2RTGkGZb8c3B04coNFys0Zp9m5KBtkmI/od6/public/values?alt=json-in-script&callback=hooray';
	document.body.appendChild(script);

	window.hooray = function(json) {
		var posts = Listing.parse(json);
		Listing.refresh(posts);
	}
}

Listing.parse = function(json){
	var posts = []
	for (var i = json.feed.entry.length - 1; i >= 0; i--) {
		var post = json.feed.entry[i]
		var obj = {}
		for(attrIndex in fields){
			var attr = fields[attrIndex]
			obj[attr] = getValue(post, "gsx$" + attr)
		}
		posts.push(obj);
	};
	return posts;
}

function getValue(obj,type){
	if(obj[type] && obj[type]["$t"]) return obj[type]["$t"]
	return ""
}

module.exports = Listing

//CONVERT MARKDOWN TO LINK .replace(/\[([^\]]+)\]\(([^)]+)\)/g, '\$1')
},{"../data/data.json":8,"3vot-model/lib/ajaxless":12,"fs":1}],11:[function(require,module,exports){
var Listing = require("./code/models/listing");
var Category = require("./code/models/category");

var CategoryMenu = require("./code/controllers/categoryMenu");
CategoryMenu("menu-item-controller");

var MainList = require("./code/controllers/mainList");
MainList("main-list-controller");

//Listing.loadFromJSON()
Listing.loadFromGoogle()

Listing.bind("refresh", function(){
	Category.createFromListing( Listing.all() );
})

},{"./code/controllers/categoryMenu":2,"./code/controllers/mainList":5,"./code/models/category":9,"./code/models/listing":10}],12:[function(require,module,exports){
(function() {
  var Events, Model, Module, _3Model;

  Events = require("./events");

  Model = require("./model_ajaxless");

  Module = require("./module");

  _3Model = this._3Model = {};

  _3Model.Events = Events;

  _3Model.Module = Module;

  _3Model.Model = Model;

  _3Model.isBlank = Model.isBlank;

  Module.extend.call(_3Model, Events);

  _3Model.Class = Module;

  module.exports = _3Model;

}).call(this);

},{"./events":13,"./model_ajaxless":14,"./module":15}],13:[function(require,module,exports){
(function() {
  var Events, trim,
    __slice = [].slice;

  trim = function(text) {
    var rtrim, _ref;
    rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
        if ((_ref = text === null) != null) {
      _ref;
    } else {
      ({
        "": (text + "").replace(rtrim, "")
      });
    };
    return text;
  };

  Events = {
    bind: function(ev, callback) {
      var calls, evs, name, _i, _len;
      evs = ev.split(' ');
      if (this.hasOwnProperty('_callbacks') && this._callbacks) {
        calls = this._callbacks;
      } else {
        this._callbacks = {};
        calls = this._callbacks;
      }
      for (_i = 0, _len = evs.length; _i < _len; _i++) {
        name = evs[_i];
        calls[name] || (calls[name] = []);
        calls[name].push(callback);
      }
      return this;
    },
    one: function(ev, callback) {
      var handler;
      return this.bind(ev, handler = function() {
        this.unbind(ev, handler);
        return callback.apply(this, arguments);
      });
    },
    trigger: function() {
      var args, callback, ev, list, _i, _len, _ref;
      args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
      ev = args.shift();
      list = this.hasOwnProperty('_callbacks') && ((_ref = this._callbacks) != null ? _ref[ev] : void 0);
      if (!list) {
        return;
      }
      for (_i = 0, _len = list.length; _i < _len; _i++) {
        callback = list[_i];
        if (callback.apply(this, args) === false) {
          break;
        }
      }
      return true;
    },
    listenTo: function(obj, ev, callback) {
      obj.bind(ev, callback);
      this.listeningTo || (this.listeningTo = []);
      this.listeningTo.push({
        obj: obj,
        ev: ev,
        callback: callback
      });
      return this;
    },
    listenToOnce: function(obj, ev, callback) {
      var handler, listeningToOnce;
      listeningToOnce = this.listeningToOnce || (this.listeningToOnce = []);
      obj.bind(ev, handler = function() {
        var i, idx, lt, _i, _len;
        idx = -1;
        for (i = _i = 0, _len = listeningToOnce.length; _i < _len; i = ++_i) {
          lt = listeningToOnce[i];
          if (lt.obj === obj) {
            if (lt.ev === ev && lt.callback === callback) {
              idx = i;
            }
          }
        }
        obj.unbind(ev, handler);
        if (idx !== -1) {
          listeningToOnce.splice(idx, 1);
        }
        return callback.apply(this, arguments);
      });
      listeningToOnce.push({
        obj: obj,
        ev: ev,
        callback: callback,
        handler: handler
      });
      return this;
    },
    stopListening: function(obj, events, callback) {
      var ev, evts, i, idx, listeningTo, lt, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _results;
      if (arguments.length === 0) {
        _ref = [this.listeningTo, this.listeningToOnce];
        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
          listeningTo = _ref[_i];
          if (!listeningTo) {
            continue;
          }
          for (_j = 0, _len1 = listeningTo.length; _j < _len1; _j++) {
            lt = listeningTo[_j];
            lt.obj.unbind(lt.ev, lt.handler || lt.callback);
          }
        }
        this.listeningTo = void 0;
        return this.listeningToOnce = void 0;
      } else if (obj) {
        _ref1 = [this.listeningTo, this.listeningToOnce];
        _results = [];
        for (_k = 0, _len2 = _ref1.length; _k < _len2; _k++) {
          listeningTo = _ref1[_k];
          if (!listeningTo) {
            continue;
          }
          events = events ? events.split(' ') : [void 0];
          _results.push((function() {
            var _l, _len3, _results1;
            _results1 = [];
            for (_l = 0, _len3 = events.length; _l < _len3; _l++) {
              ev = events[_l];
              _results1.push((function() {
                var _m, _ref2, _results2;
                _results2 = [];
                for (idx = _m = _ref2 = listeningTo.length - 1; _ref2 <= 0 ? _m <= 0 : _m >= 0; idx = _ref2 <= 0 ? ++_m : --_m) {
                  lt = listeningTo[idx];
                  if ((!ev) || (ev === lt.ev)) {
                    lt.obj.unbind(lt.ev, lt.handler || lt.callback);
                    if (idx !== -1) {
                      _results2.push(listeningTo.splice(idx, 1));
                    } else {
                      _results2.push(void 0);
                    }
                  } else if (ev) {
                    evts = lt.ev.split(' ');
                    if (~(i = evts.indexOf(ev))) {
                      evts.splice(i, 1);
                      lt.ev = trim(evts.join(' '));
                      _results2.push(lt.obj.unbind(ev, lt.handler || lt.callback));
                    } else {
                      _results2.push(void 0);
                    }
                  } else {
                    _results2.push(void 0);
                  }
                }
                return _results2;
              })());
            }
            return _results1;
          })());
        }
        return _results;
      }
    },
    unbind: function(ev, callback) {
      var cb, evs, i, list, name, _i, _j, _len, _len1, _ref;
      if (arguments.length === 0) {
        this._callbacks = {};
        return this;
      }
      if (!ev) {
        return this;
      }
      evs = ev.split(' ');
      for (_i = 0, _len = evs.length; _i < _len; _i++) {
        name = evs[_i];
        list = (_ref = this._callbacks) != null ? _ref[name] : void 0;
        if (!list) {
          continue;
        }
        if (!callback) {
          delete this._callbacks[name];
          continue;
        }
        for (i = _j = 0, _len1 = list.length; _j < _len1; i = ++_j) {
          cb = list[i];
          if (!(cb === callback)) {
            continue;
          }
          list = list.slice();
          list.splice(i, 1);
          this._callbacks[name] = list;
          break;
        }
      }
      return this;
    }
  };

  Events.on = Events.bind;

  Events.off = Events.unbind;

  module.exports = Events;

}).call(this);

},{}],14:[function(require,module,exports){
(function() {
  var Events, Model, Module, createObject, isArray, isBlank, makeArray,
    __hasProp = {}.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    __slice = [].slice;

  Events = require("./events");

  Module = require("./module");

  Model = (function(_super) {
    __extends(Model, _super);

    Model.extend(Events);

    Model.records = [];

    Model.irecords = {};

    Model.attributes = [];

    Model.host = "";

    Model.headers = [];

    Model.configure = function() {
      var attributes, name;
      name = arguments[0], attributes = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
      this.className = name;
      this.deleteAll();
      if (attributes.length) {
        this.attributes = attributes;
      }
      this.attributes && (this.attributes = makeArray(this.attributes));
      this.attributes || (this.attributes = []);
      this.unbind();
      return this;
    };

    Model.toString = function() {
      return "" + this.className + "(" + (this.attributes.join(", ")) + ")";
    };

    Model.find = function(id) {
      var record;
      record = this.exists(id);
      if (!record) {
        throw new Error("\"" + this.className + "\" model could not find a record for the ID \"" + id + "\"");
      }
      return record;
    };

    Model.exists = function(id) {
      var _ref;
      return (_ref = this.irecords[id]) != null ? _ref.clone() : void 0;
    };

    Model.addRecord = function(record) {
      if (record.id && this.irecords[record.id]) {
        this.irecords[record.id].remove();
      }
      record.id || (record.id = record.cid);
      this.records.push(record);
      this.irecords[record.id] = record;
      return this.irecords[record.cid] = record;
    };

    Model.refresh = function(values, options) {
      var record, records, result, _i, _len;
      if (options == null) {
        options = {};
      }
      if (options.clear) {
        this.deleteAll();
      }
      records = this.fromJSON(values);
      if (!isArray(records)) {
        records = [records];
      }
      for (_i = 0, _len = records.length; _i < _len; _i++) {
        record = records[_i];
        this.addRecord(record);
      }
      this.sort();
      result = this.cloneArray(records);
      this.trigger('refresh', result, options);
      return result;
    };

    Model.select = function(callback) {
      var record, _i, _len, _ref, _results;
      _ref = this.records;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        record = _ref[_i];
        if (callback(record)) {
          _results.push(record.clone());
        }
      }
      return _results;
    };

    Model.findByAttribute = function(name, value) {
      var record, _i, _len, _ref;
      _ref = this.records;
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        record = _ref[_i];
        if (record[name] === value) {
          return record.clone();
        }
      }
      return null;
    };

    Model.findAllByAttribute = function(name, value) {
      return this.select(function(item) {
        return item[name] === value;
      });
    };

    Model.each = function(callback) {
      var record, _i, _len, _ref, _results;
      _ref = this.records;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        record = _ref[_i];
        _results.push(callback(record.clone()));
      }
      return _results;
    };

    Model.all = function() {
      return this.cloneArray(this.records);
    };

    Model.first = function() {
      var _ref;
      return (_ref = this.records[0]) != null ? _ref.clone() : void 0;
    };

    Model.last = function() {
      var _ref;
      return (_ref = this.records[this.records.length - 1]) != null ? _ref.clone() : void 0;
    };

    Model.count = function() {
      return this.records.length;
    };

    Model.deleteAll = function() {
      this.records = [];
      return this.irecords = {};
    };

    Model.destroyAll = function(options) {
      var record, _i, _len, _ref, _results;
      _ref = this.records;
      _results = [];
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        record = _ref[_i];
        _results.push(record.destroy(options));
      }
      return _results;
    };

    Model.update = function(id, atts, options) {
      return this.find(id).updateAttributes(atts, options);
    };

    Model.create = function(atts, options) {
      var record;
      record = new this(atts);
      return record.save(options);
    };

    Model.destroy = function(id, options) {
      return this.find(id).destroy(options);
    };

    Model.change = function(callbackOrParams) {
      if (typeof callbackOrParams === 'function') {
        return this.bind('change', callbackOrParams);
      } else {
        return this.trigger.apply(this, ['change'].concat(__slice.call(arguments)));
      }
    };

    Model.fetch = function(callbackOrParams) {
      if (typeof callbackOrParams === 'function') {
        return this.bind('fetch', callbackOrParams);
      } else {
        return this.trigger.apply(this, ['fetch'].concat(__slice.call(arguments)));
      }
    };

    Model.toJSON = function() {
      return this.records;
    };

    Model.fromJSON = function(objects) {
      var value, _i, _len, _results;
      if (!objects) {
        return;
      }
      if (typeof objects === 'string') {
        objects.replace(/\Id/g, 'id');
        objects = JSON.parse(objects);
      }
      if (isArray(objects)) {
        _results = [];
        for (_i = 0, _len = objects.length; _i < _len; _i++) {
          value = objects[_i];
          if (value.Id) {
            value.id = value.Id;
          }
          _results.push(new this(value));
        }
        return _results;
      } else {
        if (objects.Id) {
          objects.id = objects.Id;
        }
        return new this(objects);
      }
    };

    Model.fromForm = function() {
      var _ref;
      return (_ref = new this).fromForm.apply(_ref, arguments);
    };

    Model.sort = function() {
      if (this.comparator) {
        this.records.sort(this.comparator);
      }
      return this;
    };

    Model.cloneArray = function(array) {
      var value, _i, _len, _results;
      _results = [];
      for (_i = 0, _len = array.length; _i < _len; _i++) {
        value = array[_i];
        _results.push(value.clone());
      }
      return _results;
    };

    Model.idCounter = 0;

    Model.uid = function(prefix) {
      var uid;
      if (prefix == null) {
        prefix = '';
      }
      uid = prefix + this.idCounter++;
      if (this.exists(uid)) {
        uid = this.uid(prefix);
      }
      return uid;
    };

    function Model(atts) {
      Model.__super__.constructor.apply(this, arguments);
      if (atts) {
        this.load(atts);
      }
      this.cid = (atts != null ? atts.cid : void 0) || this.constructor.uid('c-');
    }

    Model.prototype.isNew = function() {
      return !this.exists();
    };

    Model.prototype.isValid = function() {
      return !this.validate();
    };

    Model.prototype.validate = function() {};

    Model.prototype.load = function(atts) {
      var key, value;
      if (atts.id) {
        this.id = atts.id;
      }
      for (key in atts) {
        value = atts[key];
        if (atts.hasOwnProperty(key) && typeof this[key] === 'function') {
          this[key](value);
        } else {
          this[key] = value;
        }
      }
      return this;
    };

    Model.prototype.get = function(attr) {
      return this[attr];
    };

    Model.prototype.set = function(attr, value) {
      return this[attr] = value;
    };

    Model.prototype.attributes = function() {
      var key, result, _i, _len, _ref;
      result = {};
      _ref = this.constructor.attributes;
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        key = _ref[_i];
        if (key in this) {
          if (typeof this[key] === 'function') {
            result[key] = this[key]();
          } else {
            result[key] = this[key];
          }
        }
      }
      if (this.id) {
        result.id = this.id;
      }
      return result;
    };

    Model.prototype.eql = function(rec) {
      return !!(rec && rec.constructor === this.constructor && (rec.cid === this.cid) || (rec.id && rec.id === this.id));
    };

    Model.prototype.save = function(options) {
      var error, record;
      if (options == null) {
        options = {};
      }
      if (options.validate !== false) {
        error = this.validate();
        if (error) {
          this.trigger('error', error);
          return false;
        }
      }
      this.trigger('beforeSave', options);
      record = this.isNew() ? this.create(options) : this.update(options);
      this.stripCloneAttrs();
      this.trigger('save', options);
      return record;
    };

    Model.prototype.stripCloneAttrs = function() {
      var key, value;
      if (this.hasOwnProperty('cid')) {
        return;
      }
      for (key in this) {
        if (!__hasProp.call(this, key)) continue;
        value = this[key];
        if (this.constructor.attributes.indexOf(key) > -1) {
          delete this[key];
        }
      }
      return this;
    };

    Model.prototype.updateAttribute = function(name, value, options) {
      var atts;
      atts = {};
      atts[name] = value;
      return this.updateAttributes(atts, options);
    };

    Model.prototype.updateAttributes = function(atts, options) {
      this.load(atts);
      return this.save(options);
    };

    Model.prototype.changeID = function(id) {
      var records;
      if (id === this.id) {
        return;
      }
      records = this.constructor.irecords;
      records[id] = records[this.id];
      delete records[this.id];
      this.id = id;
      return this.save();
    };

    Model.prototype.remove = function() {
      var i, record, records, _i, _len;
      records = this.constructor.records.slice(0);
      for (i = _i = 0, _len = records.length; _i < _len; i = ++_i) {
        record = records[i];
        if (!(this.eql(record))) {
          continue;
        }
        records.splice(i, 1);
        break;
      }
      this.constructor.records = records;
      delete this.constructor.irecords[this.id];
      return delete this.constructor.irecords[this.cid];
    };

    Model.prototype.destroy = function(options) {
      if (options == null) {
        options = {};
      }
      this.trigger('beforeDestroy', options);
      this.remove();
      this.destroyed = true;
      this.trigger('destroy', options);
      this.trigger('change', 'destroy', options);
      if (this.listeningTo) {
        this.stopListening();
      }
      this.unbind();
      return this;
    };

    Model.prototype.dup = function(newRecord) {
      var atts;
      if (newRecord == null) {
        newRecord = true;
      }
      atts = this.attributes();
      if (newRecord) {
        delete atts.id;
      } else {
        atts.cid = this.cid;
      }
      return new this.constructor(atts);
    };

    Model.prototype.clone = function() {
      return createObject(this);
    };

    Model.prototype.reload = function() {
      var original;
      if (this.isNew()) {
        return this;
      }
      original = this.constructor.find(this.id);
      this.load(original.attributes());
      return original;
    };

    Model.prototype.refresh = function(data) {
      var root;
      root = this.constructor.irecords[this.id];
      root.load(data);
      this.trigger('refresh');
      return this;
    };

    Model.prototype.toJSON = function() {
      return this.attributes();
    };

    Model.prototype.toString = function() {
      return "<" + this.constructor.className + " (" + (JSON.stringify(this)) + ")>";
    };

    Model.prototype.fromForm = function(form) {
      var result;
      result = {};

      /*
      for checkbox in $(form).find('[type=checkbox]:not([value])')
        result[checkbox.name] = $(checkbox).prop('checked')

      for checkbox in $(form).find('[type=checkbox][name$="[]"]')
        name = checkbox.name.replace(/\[\]$/, '')
        result[name] or= []
        result[name].push checkbox.value if $(checkbox).prop('checked')

      for key in $(form).serializeArray()
        result[key.name] or= key.value
       */
      return this.load(result);
    };

    Model.prototype.exists = function() {
      return this.constructor.exists(this.id);
    };

    Model.prototype.update = function(options) {
      var clone, records;
      this.trigger('beforeUpdate', options);
      records = this.constructor.irecords;
      records[this.id].load(this.attributes());
      this.constructor.sort();
      clone = records[this.id].clone();
      clone.trigger('update', options);
      clone.trigger('change', 'update', options);
      return clone;
    };

    Model.prototype.create = function(options) {
      var clone, record;
      this.trigger('beforeCreate', options);
      this.id || (this.id = this.cid);
      record = this.dup(false);
      this.constructor.addRecord(record);
      this.constructor.sort();
      clone = record.clone();
      clone.trigger('create', options);
      clone.trigger('change', 'create', options);
      return clone;
    };

    Model.prototype.bind = function(events, callback) {
      var binder, singleEvent, _fn, _i, _len, _ref;
      this.constructor.bind(events, binder = (function(_this) {
        return function(record) {
          if (record && _this.eql(record)) {
            return callback.apply(_this, arguments);
          }
        };
      })(this));
      _ref = events.split(' ');
      _fn = (function(_this) {
        return function(singleEvent) {
          var unbinder;
          return _this.constructor.bind("unbind", unbinder = function(record, event, cb) {
            if (record && _this.eql(record)) {
              if (event && event !== singleEvent) {
                return;
              }
              if (cb && cb !== callback) {
                return;
              }
              _this.constructor.unbind(singleEvent, binder);
              return _this.constructor.unbind("unbind", unbinder);
            }
          });
        };
      })(this);
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        singleEvent = _ref[_i];
        _fn(singleEvent);
      }
      return this;
    };

    Model.prototype.one = function(events, callback) {
      var handler;
      return this.bind(events, handler = (function(_this) {
        return function() {
          _this.unbind(events, handler);
          return callback.apply(_this, arguments);
        };
      })(this));
    };

    Model.prototype.trigger = function() {
      var args, _ref;
      args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
      args.splice(1, 0, this);
      return (_ref = this.constructor).trigger.apply(_ref, args);
    };

    Model.prototype.listenTo = function() {
      return Events.listenTo.apply(this, arguments);
    };

    Model.prototype.listenToOnce = function() {
      return Events.listenToOnce.apply(this, arguments);
    };

    Model.prototype.stopListening = function() {
      return Events.stopListening.apply(this, arguments);
    };

    Model.prototype.unbind = function(events, callback) {
      var event, _i, _len, _ref, _results;
      if (arguments.length === 0) {
        return this.trigger('unbind');
      } else if (events) {
        _ref = events.split(' ');
        _results = [];
        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
          event = _ref[_i];
          _results.push(this.trigger('unbind', event, callback));
        }
        return _results;
      }
    };

    return Model;

  })(Module);

  Model.prototype.on = Model.prototype.bind;

  Model.prototype.off = Model.prototype.unbind;

  createObject = Object.create || function(o) {
    var Func;
    Func = function() {};
    Func.prototype = o;
    return new Func();
  };

  isArray = function(value) {
    return Object.prototype.toString.call(value) === '[object Array]';
  };

  isBlank = function(value) {
    var key;
    if (!value) {
      return true;
    }
    for (key in value) {
      return false;
    }
    return true;
  };

  makeArray = function(args) {
    return Array.prototype.slice.call(args, 0);
  };

  Model.isBlank = isBlank;

  Model.sub = function(instances, statics) {
    var Result;
    Result = (function(_super) {
      __extends(Result, _super);

      function Result() {
        return Result.__super__.constructor.apply(this, arguments);
      }

      return Result;

    })(this);
    if (instances) {
      Result.include(instances);
    }
    if (statics) {
      Result.extend(statics);
    }
    if (typeof Result.unbind === "function") {
      Result.unbind();
    }
    return Result;
  };

  Model.setup = function(name, attributes) {
    var Instance;
    if (attributes == null) {
      attributes = [];
    }
    Instance = (function(_super) {
      __extends(Instance, _super);

      function Instance() {
        return Instance.__super__.constructor.apply(this, arguments);
      }

      return Instance;

    })(this);
    Instance.configure.apply(Instance, [name].concat(__slice.call(attributes)));
    return Instance;
  };

  Model.host = "";

  if (typeof module !== "undefined" && module !== null) {
    module.exports = Model;
  }

}).call(this);

},{"./events":13,"./module":15}],15:[function(require,module,exports){
(function() {
  var Module, moduleKeywords,
    __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
    __hasProp = {}.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };

  moduleKeywords = ['included', 'extended'];

  Module = (function() {
    Module.include = function(obj) {
      var key, value, _ref;
      if (!obj) {
        throw new Error('include(obj) requires obj');
      }
      for (key in obj) {
        value = obj[key];
        if (__indexOf.call(moduleKeywords, key) < 0) {
          this.prototype[key] = value;
        }
      }
      if ((_ref = obj.included) != null) {
        _ref.apply(this);
      }
      return this;
    };

    Module.extend = function(obj) {
      var key, value, _ref;
      if (!obj) {
        throw new Error('extend(obj) requires obj');
      }
      for (key in obj) {
        value = obj[key];
        if (__indexOf.call(moduleKeywords, key) < 0) {
          this[key] = value;
        }
      }
      if ((_ref = obj.extended) != null) {
        _ref.apply(this);
      }
      return this;
    };

    Module.proxy = function(func) {
      return (function(_this) {
        return function() {
          return func.apply(_this, arguments);
        };
      })(this);
    };

    Module.prototype.proxy = function(func) {
      return (function(_this) {
        return function() {
          return func.apply(_this, arguments);
        };
      })(this);
    };

    function Module() {
      if (typeof this.init === "function") {
        this.init.apply(this, arguments);
      }
    }

    return Module;

  })();

  Module.create = Module.sub = function(instances, statics) {
    var Result;
    Result = (function(_super) {
      __extends(Result, _super);

      function Result() {
        return Result.__super__.constructor.apply(this, arguments);
      }

      return Result;

    })(this);
    if (instances) {
      Result.include(instances);
    }
    if (statics) {
      Result.extend(statics);
    }
    if (typeof Result.unbind === "function") {
      Result.unbind();
    }
    return Result;
  };

  module.exports = Module;

}).call(this);

},{}]},{},[11])


text:
package net.bubble.persistence.app.entities;

/**
 * @author shiwen_xiao<xiaosw@msn.cn>
 * @since 2015年12月23日
 */
public class AccessLog {

	private String access_id;

	private String access_ip;

	private String access_time;

	private int access_computing_time;

	private String access_method;

	private String access_url_id;

	private String terminal_id;

	/**
	 * @return the access_id
	 */
	public String getAccess_id() {
		return access_id;
	}

	/**
	 * @param access_id
	 *            the access_id to set
	 */
	public void setAccess_id(String access_id) {
		this.access_id = access_id;
	}

	/**
	 * @return the access_ip
	 */
	public String getAccess_ip() {
		return access_ip;
	}

	/**
	 * @param access_ip
	 *            the access_ip to set
	 */
	public void setAccess_ip(String access_ip) {
		this.access_ip = access_ip;
	}

	/**
	 * @return the access_time
	 */
	public String getAccess_time() {
		return access_time;
	}

	/**
	 * @param access_time
	 *            the access_time to set
	 */
	public void setAccess_time(String access_time) {
		this.access_time = access_time;
	}

	/**
	 * @return the access_computing_time
	 */
	public int getAccess_computing_time() {
		return access_computing_time;
	}

	/**
	 * @param access_computing_time
	 *            the access_computing_time to set
	 */
	public void setAccess_computing_time(int access_computing_time) {
		this.access_computing_time = access_computing_time;
	}

	/**
	 * @return the access_method
	 */
	public String getAccess_method() {
		return access_method;
	}

	/**
	 * @param access_method the access_method to set
	 */
	public void setAccess_method(String access_method) {
		this.access_method = access_method;
	}

	/**
	 * @return the access_url_id
	 */
	public String getAccess_url_id() {
		return access_url_id;
	}

	/**
	 * @param access_url_id the access_url_id to set
	 */
	public void setAccess_url_id(String access_url_id) {
		this.access_url_id = access_url_id;
	}

	/**
	 * @return the terminal_id
	 */
	public String getTerminal_id() {
		return terminal_id;
	}

	/**
	 * @param terminal_id the terminal_id to set
	 */
	public void setTerminal_id(String terminal_id) {
		this.terminal_id = terminal_id;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "AccessLog [access_id=" + access_id + ", access_ip=" + access_ip + ", access_time=" + access_time
				+ ", access_computing_time=" + access_computing_time + ", access_method=" + access_method + ", access_url_id="
				+ access_url_id + ", terminal_id=" + terminal_id + "]";
	}

}

redpajama_set_name: RedPajamaGithub


text:
namespace {

// The spacing between the key and the value labels in the Details section.
const int kSpacingBetweenKeyAndStartOfValue = 3;
}

AppInfoPanel::AppInfoPanel(Profile* profile, const extensions::Extension* app)
    : profile_(profile), app_(app) {
}

AppInfoPanel::~AppInfoPanel() {
}

void AppInfoPanel::Close() {
  GetWidget()->Close();
}

void AppInfoPanel::OpenLink(const GURL& url) {
  DCHECK(!url.is_empty());
  chrome::NavigateParams params(profile_, url, ui::PAGE_TRANSITION_LINK);
  chrome::Navigate(&params);
}

views::Label* AppInfoPanel::CreateHeading(const base::string16& text) const {
  views::Label* label = new views::Label(text);
  label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
  label->SetFontList(ui::ResourceBundle::GetSharedInstance().GetFontList(
      ui::ResourceBundle::MediumFont));
  return label;
}

views::View* AppInfoPanel::CreateVerticalStack(int child_spacing) const {
  views::View* vertically_stacked_view = new views::View();
  vertically_stacked_view->SetLayoutManager(
      new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, child_spacing));
  return vertically_stacked_view;
}

views::View* AppInfoPanel::CreateVerticalStack() const {
  return CreateVerticalStack(views::kRelatedControlVerticalSpacing);
}

views::View* AppInfoPanel::CreateHorizontalStack(int child_spacing) const {
  views::View* vertically_stacked_view = new views::View();
  vertically_stacked_view->SetLayoutManager(
      new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, child_spacing));
  return vertically_stacked_view;
}

views::View* AppInfoPanel::CreateKeyValueField(views::View* key,
                                               views::View* value) const {
  views::View* horizontal_stack =
      CreateHorizontalStack(kSpacingBetweenKeyAndStartOfValue);
  horizontal_stack->AddChildView(key);
  horizontal_stack->AddChildView(value);
  return horizontal_stack;
}


text:
'''
Zstack IAM2 Virtual ID Checker Factory.

@author: Glody
'''

import zstackwoodpecker.zstack_test.vid_checker.zstack_vid_checker as vid_checker
import zstackwoodpecker.zstack_test.zstack_checker.zstack_db_checker as db_checker
import zstackwoodpecker.header.checker as checker_header
import zstackwoodpecker.test_util as test_util

class VidAttrCheckerFactory(checker_header.CheckerFactory):
    def create_checker(self, test_obj):
        vid_attr_checker_chain = checker_header.CheckerChain()
        checker_dict = {}
        checker_dict[db_checker.zstack_vid_attr_db_checker] = True
        checker_dict[vid_checker.zstack_vid_attr_checker] = True
        vid_attr_checker_chain.add_checker_dict(checker_dict, test_obj)
        test_util.test_logger('Add checker: %s for [user:] %s' % (vid_attr_checker_chain, test_obj.get_vid_option().get_name()))
        return vid_attr_checker_chain

class VidPolicyCheckerFactory(checker_header.CheckerFactory):
    def create_checker(self, test_obj):
        vid_policy_checker_chain = checker_header.CheckerChain()
        checker_dict = {}
        if test_obj.customized != None:
            pass
        else:
            checker_dict[db_checker.zstack_vid_policy_db_checker] = True
        checker_dict[vid_checker.zstack_vid_policy_checker] = True
        vid_policy_checker_chain.add_checker_dict(checker_dict, test_obj)
        test_util.test_logger('Add checker: %s for [user:] %s' % (vid_policy_checker_chain, test_obj.get_vid_option().get_name()))
        return vid_policy_checker_chain


text:
module.exports = function (TAPIC) {
  let _events = new Map();

  function _event(eventName, eventDetail) {
    if (_events.has(eventName)) {
      let callbacks = _events.get(eventName); // gets an array of callback functions
      for (let i = 0; i < callbacks.length; i++) {
        callbacks[i](eventDetail); // runs each and sends them eventDetail as the parameter
      }
    }
  }

  /**
  * Listens for certain events, then runs the callback.
  * @param  {string} eventName The name of the event.
  * @param  {function} callback  What do do when the event happens.
  * @function listen
  */
  TAPIC.listen = function (eventName, callback) {
    if (typeof eventName != 'string') {
      console.error('Invalid parameters. Usage: TAPIC.listen(eventName[, callback]);');
      return;
    }
    if (typeof callback !== 'function') return console.error('Callback needed.');
    if (_events.has(eventName)) { // if there are listeners for eventName
      let value = _events.get(eventName); // get the current array of callbacks
      value.push(callback); // add the new callback
      _events.set(eventName, value); // replace the old callback array
    } else { // if eventName has no listeners
      _events.set(eventName, [callback]);
    }
  };

  /**
  * Emits an event.
  * @param  {string} eventName   The name of the event.
  * @param  {any} eventDetail The parameter to send the callback.
  * @function emit
  */
  TAPIC.emit = function (eventName, eventDetail) {
    if (typeof eventName != 'string') {
      console.error('Invalid parameters. Usage: TAPIC.emit(eventName, eventDetail);');
      return;
    }
    _event(eventName, eventDetail);
  };

  return _event;
};


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/.idea/DiagonalTraverse.iml" filepath="$PROJECT_DIR$/.idea/DiagonalTraverse.iml" />
    </modules>
  </component>
</project>


text:
WebInspector.DebuggerDashboardView = function (representedObject) {
    WebInspector.DashboardView.call(this, representedObject, "debugger");

    WebInspector.debuggerManager.addEventListener(WebInspector.DebuggerManager.Event.ActiveCallFrameDidChange, this._rebuildLocation, this);

    this._navigationBar = new WebInspector.NavigationBar();
    this.element.appendChild(this._navigationBar.element);

    var resumeImage;
    if (WebInspector.Platform.isLegacyMacOS) resumeImage = { src: "Images/Legacy/Resume.svg", width: 16, height: 16 };else resumeImage = { src: "Images/Resume.svg", width: 15, height: 15 };

    var tooltip = WebInspector.UIString("Continue script execution (%s or %s)").format(WebInspector.debuggerSidebarPanel.pauseOrResumeKeyboardShortcut.displayName, WebInspector.debuggerSidebarPanel.pauseOrResumeAlternateKeyboardShortcut.displayName);
    this._debuggerResumeButtonItem = new WebInspector.ActivateButtonNavigationItem("debugger-dashboard-pause", tooltip, tooltip, resumeImage.src, resumeImage.width, resumeImage.height, true);
    this._debuggerResumeButtonItem.activated = true;
    this._debuggerResumeButtonItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._resumeButtonClicked, this);
    this._navigationBar.addNavigationItem(this._debuggerResumeButtonItem);

    var message = this._messageElement = document.createElement("div");
    message.classList.add(WebInspector.DebuggerDashboardView.MessageStyleClassName);
    message.title = message.textContent = WebInspector.UIString("Debugger Paused");
    this.element.appendChild(message);

    var dividerElement = document.createElement("div");
    dividerElement.classList.add(WebInspector.DebuggerDashboardView.DividerStyleClassName);
    this.element.appendChild(dividerElement);

    var locationElement = this._locationElement = document.createElement("div");
    locationElement.classList.add(WebInspector.DebuggerDashboardView.LocationStyleClassName);
    this.element.appendChild(locationElement);

    this._rebuildLocation();
};

WebInspector.DebuggerDashboardView.FunctionIconStyleClassName = WebInspector.CallFrameTreeElement.FunctionIconStyleClassName;
WebInspector.DebuggerDashboardView.EventListenerIconStyleClassName = WebInspector.CallFrameTreeElement.EventListenerIconStyleClassName;

WebInspector.DebuggerDashboardView.IconStyleClassName = "icon";
WebInspector.DebuggerDashboardView.MessageStyleClassName = "message";
WebInspector.DebuggerDashboardView.DividerStyleClassName = "divider";
WebInspector.DebuggerDashboardView.LocationStyleClassName = "location";
WebInspector.DebuggerDashboardView.FunctionNameStyleClassName = "function-name";

WebInspector.DebuggerDashboardView.prototype = {
    constructor: WebInspector.DebuggerDashboardView,
    __proto__: WebInspector.DashboardView.prototype,

    _rebuildLocation: function _rebuildLocation() {
        if (!WebInspector.debuggerManager.activeCallFrame) return;

        this._locationElement.removeChildren();

        var callFrame = WebInspector.debuggerManager.activeCallFrame;
        var functionName = callFrame.functionName || WebInspector.UIString("(anonymous function)");

        var iconClassName = WebInspector.DebuggerDashboardView.FunctionIconStyleClassName;

        // This is more than likely an event listener function with an "on" prefix and it is
        // as long or longer than the shortest event listener name -- "oncut".
        if (callFrame.functionName && callFrame.functionName.startsWith("on") && callFrame.functionName.length >= 5) iconClassName = WebInspector.DebuggerDashboardView.EventListenerIconStyleClassName;

        var iconElement = document.createElement("div");
        iconElement.classList.add(iconClassName);
        this._locationElement.appendChild(iconElement);

        var iconImageElement = document.createElement("img");
        iconImageElement.className = WebInspector.DebuggerDashboardView.IconStyleClassName;
        iconElement.appendChild(iconImageElement);

        var nameElement = document.createElement("div");
        nameElement.appendChild(document.createTextNode(functionName));
        nameElement.classList.add(WebInspector.DebuggerDashboardView.FunctionNameStyleClassName);
        this._locationElement.appendChild(nameElement);

        var sourceCodeLocation = WebInspector.debuggerManager.activeCallFrame.sourceCodeLocation;
        var shouldPreventLinkFloat = true;
        var linkElement = WebInspector.createSourceCodeLocationLink(sourceCodeLocation, shouldPreventLinkFloat);
        this._locationElement.appendChild(linkElement);
    },

    _resumeButtonClicked: function _resumeButtonClicked() {
        WebInspector.debuggerManager.resume();
    }
};


text:
/* @flow */

import React from "react";

type Props = {
  initialVal: string,
  save: Function,
  abort: Function
};

type State = {
  value: string
};

export default class EditCellStr extends React.Component<Props, State> {
  input: ?HTMLInputElement;

  _onKeyPress: (ev: KeyboardEvent) => void;

  constructor(props: Props) {
    super(props);
    this.state = { value: props.initialVal };

    this._onKeyPress = ev => {
      if (ev.keyCode === 13) {
        // <enter>
        this._saveIfChangedOrAbort();
      } else if (ev.keyCode === 27) {
        // <esc>
        this.props.abort();
      }
    };
  }

  render() {
    return (
      <td className="edit-cell-str">
        <input
          type="text"
          className="tv-input native-key-bindings"
          ref={input => {
            this.input = input;
          }}
          value={this.state.value}
          onChange={this._onChange.bind(this)}
          onBlur={this._saveIfChangedOrAbort.bind(this)}
        />
      </td>
    );
  }

  componentDidMount() {
    if (this.input) {
      this.input.addEventListener("keydown", this._onKeyPress);
    }
    if (this.input) {
      this.input.select();
    }
    if (this.input) {
      this.input.focus();
    }
  }

  componentWillUnmount() {
    if (this.input) {
      this.input.removeEventListener("keydown", this._onKeyPress);
    }
  }

  _onChange(ev: any) {
    this.setState({ value: ev.target.value });
  }

  _saveIfChangedOrAbort() {
    if (this._hasChanged()) {
      this.props.save(this.state.value.trim());
    } else {
      this.props.abort();
    }
  }

  _hasChanged() {
    return (
      this.state.value !== this.props.initialVal &&
      this.state.value.trim() !== this.props.initialVal
    );
  }
}


text:
#ifndef AUTH_GKH_SEC_PROT_H_
#define AUTH_GKH_SEC_PROT_H_

/**
 * auth_gkh_sec_prot_register register authenticator GKH protocol to KMP service
 *
 * \param service KMP service
 *
 * \return < 0 failure
 * \return >= 0 success
 */
int8_t auth_gkh_sec_prot_register(kmp_service_t *service);

/**
 * auth_gkh_sec_prot_timing_adjust Adjust retries and timings of the GKH protocol
 *
 * Timing value is a generic number between 0 to 32 that goes from fast and
 * reactive network to low bandwidth and long latency.
 *
 * example value definitions:
 * 0-8 very fast network
 * 9-16 medium network
 * 16-24 slow network
 * 25-32 extremely slow network
 *
 * There is no need to have lots variations in every layer if protocol is not very active in any case.
 *
 * \param timing Timing value.
 *
 * \return < 0 failure
 * \return >= 0 success
 *
 */
int8_t auth_gkh_sec_prot_timing_adjust(uint8_t timing);

#endif /* AUTH_GKH_SEC_PROT_H_ */


text:
using NMF.Collections.Generic;
using NMF.Collections.ObjectModel;
using NMF.Expressions;
using NMF.Expressions.Linq;
using NMF.Models;
using NMF.Models.Collections;
using NMF.Models.Expressions;
using NMF.Models.Meta;
using NMF.Models.Repository;
using NMF.Serialization;
using NMF.Utilities;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using TTC2017.SmartGrids.CIM;
using TTC2017.SmartGrids.CIM.IEC61968.Common;
using TTC2017.SmartGrids.CIM.IEC61970.ControlArea;
using TTC2017.SmartGrids.CIM.IEC61970.Core;
using TTC2017.SmartGrids.CIM.IEC61970.Generation.Production;
using TTC2017.SmartGrids.CIM.IEC61970.Informative.Financial;
using TTC2017.SmartGrids.CIM.IEC61970.Informative.MarketOperations;
using TTC2017.SmartGrids.CIM.IEC61970.Informative.Reservation;
using TTC2017.SmartGrids.CIM.IEC61970.Meas;
using TTC2017.SmartGrids.CIM.IEC61970.Wires;

namespace TTC2017.SmartGrids.CIM.IEC61970.Informative.EnergyScheduling
{

    public class TransmissionRightOfWayLinesCollection : ObservableOppositeOrderedSet<ITransmissionRightOfWay, ILine>
    {

        public TransmissionRightOfWayLinesCollection(ITransmissionRightOfWay parent) :
                base(parent)
        {
        }

        private void OnItemDeleted(object sender, System.EventArgs e)
        {
            this.Remove(((ILine)(sender)));
        }

        protected override void SetOpposite(ILine item, ITransmissionRightOfWay parent)
        {
            if ((parent != null))
            {
                item.Deleted += this.OnItemDeleted;
                item.TransmissionRightOfWay = parent;
            }
            else
            {
                item.Deleted -= this.OnItemDeleted;
                if ((item.TransmissionRightOfWay == this.Parent))
                {
                    item.TransmissionRightOfWay = parent;
                }
            }
        }
    }
}


text:
/*
 * ProjectNameContainer Messages
 *
 * This contains all the text for the ProjectNameContainer component.
 */
import { defineMessages } from 'react-intl';

export default defineMessages({
  header: {
    id: 'app.containers.ProjectNameContainer.header',
    defaultMessage: 'This is ProjectNameContainer container !',
  },
});


text:
/* @test
 * @bug 4302502
 *
 * @summary test basic permission-based access control for a secure rmid
 * @author Bob Scheifler
 *
 * @library ../../../../../testlibrary
 * @build TestLibrary RMID
 * @build AccessControl
 * @run shell classpath.sh main/othervm/timeout=240/policy=security.policy
 * -Djava.protocol.handler.pkgs=net.jini.url AccessControl
 */
import java.io.File;
import java.rmi.ConnectIOException;
import java.rmi.MarshalledObject;
import java.rmi.NotBoundException;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.activation.ActivationDesc;
import java.rmi.activation.ActivationGroupDesc.CommandEnvironment;
import java.rmi.activation.ActivationGroupDesc;
import java.rmi.activation.ActivationGroupID;
import java.rmi.activation.ActivationID;
import java.rmi.activation.ActivationSystem;
import java.rmi.server.UID;
import java.security.PrivilegedAction;
import java.security.PrivilegedExceptionAction;
import java.util.Collection;
import java.util.Collections;
import java.util.Properties;
import javax.security.auth.Subject;
import javax.security.auth.login.LoginContext;
import javax.security.auth.x500.X500Principal;
import net.jini.activation.ActivationExporter;
import net.jini.activation.ActivationGroup;
import net.jini.constraint.*;
import net.jini.core.constraint.*;
import net.jini.export.Exporter;
import net.jini.export.ProxyAccessor;
import net.jini.jeri.BasicILFactory;
import net.jini.jeri.BasicJeriExporter;
import net.jini.jeri.tcp.TcpServerEndpoint;
import net.jini.security.*;

public class AccessControl {
    /** ActivationSystem stub */
    static ActivationSystem sys;
    /** id of created group */
    static ActivationGroupID gid;
    /** Server subject */
    static Subject server;
    static String testsrc = TestParams.testSrc + File.separator;

    static Collection trustCtx = Collections.singleton(
		new BasicMethodConstraints(
		    new InvocationConstraints(
			new InvocationConstraint[]{
			    Integrity.YES,
			    ServerAuthentication.YES,
			    new ServerMinPrincipal(
				new X500Principal("CN=server"))},
			null)));

    public interface Service extends Remote {
	UID inactivate() throws RemoteException;
    }

    public static class Impl implements Service, ProxyAccessor {
	private static ActivationID myAid;
	private static Exporter exp;
	/**
	 * Static so we can tell if the object gets reactivated in the
	 * same VM or in a new VM.
	 */
	private static UID uid = new UID();

	private final Remote proxy;

	Impl(ActivationID aid, MarshalledObject mo)
	    throws Exception
	{
	    myAid = aid;
	    Exporter basicExporter =
		new BasicJeriExporter(TcpServerEndpoint.getInstance(0),
				      new BasicILFactory(), false, true);
	    exp = new ActivationExporter(aid, basicExporter);
	    proxy = exp.export(this);
	}

	public Object getProxy() {
	    return proxy;
	}

	private static class Inactivate extends Thread {
	    public void run() {
		try {
		    for (int i = 5; --i >= 0; ) {
			if (ActivationGroup.inactive(myAid, exp)) {
			    return;
			}
			Thread.sleep(500);
		    }
		} catch (Exception e) {
		    throw new RuntimeException("failed to go inactive", e);
		}
		throw new RuntimeException("failed to go inactive");
	    }
	}

	public UID inactivate() {
	    new Inactivate().start();
	    return uid;
	}
    }

    /**
     * Log in with the given login configuration name and return the subject
     * set read only.
     */
    static Subject getSubject(String name) throws Exception {
	LoginContext ctx = new LoginContext(name);
	ctx.login();
	Subject s = ctx.getSubject();
	s.setReadOnly();
	return s;
    }

    /**
     * Check Client1 permissions, and indirectly check Server permissions
     * for calls between the activation group and rmid.
     */
    public static class AsClient1 implements PrivilegedExceptionAction {
	public Object run() throws Exception {
	    Security.verifyObjectTrust(sys, null, trustCtx);
	    Properties props = new Properties();
	    props.put("javax.net.ssl.trustStore", testsrc + "keystore");
	    props.put("java.security.policy",
		      testsrc + "group.security.policy");
	    props.put("java.security.auth.login.config", testsrc + "login");
	    // can call registerGroup
	    gid = sys.registerGroup(new ActivationGroupDesc(props, null));
	    // can call getActivationGroupDesc
	    ActivationGroupDesc gdesc = sys.getActivationGroupDesc(gid);
	    // cannot call setActivationGroupDesc
	    try {
		sys.setActivationGroupDesc(gid, gdesc);
		throw new RuntimeException(
				   "client1 able to setActivationGroupDesc");
	    } catch (SecurityException e) {
	    }
	    // can call registerObject
	    ActivationID aid =
		sys.registerObject(new ActivationDesc(gid,
						      Impl.class.getName(),
						      null, null));
	    // cannot call getProxyVerifier
	    try {
		Security.verifyObjectTrust(aid, null, trustCtx);
		throw new RuntimeException(
				   "client1 able to verifyObjectTrust");
	    } catch (SecurityException e) {
	    }
	    // can call getActivationDesc
	    ActivationDesc adesc = sys.getActivationDesc(aid);
	    // cannot call setActivationDesc
	    try {
		sys.setActivationDesc(aid, adesc);
		throw new RuntimeException(
				   "client1 able to setActivationDesc");
	    } catch (SecurityException e) {
	    }
	    // can call activate
	    Service svc = (Service) aid.activate(false);
	    // make the service (and hence the group) go inactive
	    UID uid1 = svc.inactivate();
	    // give the service and group time to go inactive
	    Thread.sleep(15000);
	    // check indirectly that group actually went away the first time
	    UID uid2 = svc.inactivate();
	    if (uid1.equals(uid2)) {
		throw new RuntimeException("group did not go inactive");
	    }
	    // can call unregisterObject
	    sys.unregisterObject(aid);
	    // cannot call activeGroup
	    try {
		sys.activeGroup(gid, null, 0);
		throw new RuntimeException("client1 able to activeGroup");
	    } catch (SecurityException e) {
	    }
	    // cannot call unregisterGroup
	    try {
		sys.unregisterGroup(gid);
		throw new RuntimeException("client1 able to unregisterGroup");
	    } catch (SecurityException e) {
	    }
	    // cannot call shutdown
	    try {
		sys.shutdown();
		throw new RuntimeException("client1 able to shutdown");
	    } catch (SecurityException e) {
	    }
	    return null;
	}
    }

    /**
     * Check Client2 permissions.
     */
    public static class AsClient2 implements PrivilegedExceptionAction {
	public Object run() throws Exception {
	    Security.verifyObjectTrust(sys, null, trustCtx);
	    // cannot call registerGroup
	    try {
		sys.registerGroup(new ActivationGroupDesc(null, null));
		throw new RuntimeException("client2 able to registerGroup");
	    } catch (SecurityException e) {
	    }
	    // cannot call getActivationGroupDesc
	    try {
		sys.getActivationGroupDesc(gid);
		throw new RuntimeException(
				   "client2 able to getActivationGroupDesc");
	    } catch (SecurityException e) {
	    }
	    CommandEnvironment env =
		new CommandEnvironment("foobar", new String[]{"-baz"});
	    // can set java program to "foobar" and option "-baz"
	    sys.setActivationGroupDesc(gid,
				       new ActivationGroupDesc(null, env));
	    env = new CommandEnvironment("baz", null);
	    // cannot set java program to "baz"
	    try {
		sys.setActivationGroupDesc(gid,
					   new ActivationGroupDesc(null,
								   env));
		throw new RuntimeException(
		   "client2 able to setActivationGroupDesc with program baz");
	    } catch (SecurityException e) {
	    }
	    // cannot set java program to "foobar" and option "-foobar"
	    env = new CommandEnvironment("foobar", new String[]{"-foobar"});
	    try {
		sys.setActivationGroupDesc(gid,
					   new ActivationGroupDesc(null, env));
		throw new RuntimeException(
		 "client2 able to setActivationGroupDesc with option -foobar");
	    } catch (SecurityException e) {
	    }
	    // can call setActivationGroupDesc to set to default
	    sys.setActivationGroupDesc(gid,
				       new ActivationGroupDesc(null, null));
	    // can call registerObject
	    ActivationID aid =
		sys.registerObject(new ActivationDesc(gid, "Foo", null, null));
	    // cannot call activate
	    try {
		aid.activate(false);
		throw new RuntimeException("client2 able to activate");
	    } catch (SecurityException e) {
	    }
	    // can call getProxyVerifier
	    Security.verifyObjectTrust(aid, null, trustCtx);
	    // can call getActivationDesc
	    ActivationDesc adesc = sys.getActivationDesc(aid);
	    // can call setActivationDesc
	    sys.setActivationDesc(aid, adesc);
	    // can call unregisterObject
	    sys.unregisterObject(aid);
	    // cannot call activeGroup
	    try {
		sys.activeGroup(gid, null, 0);
		throw new RuntimeException("client2 able to activeGroup");
	    } catch (SecurityException e) {
	    }
	    // cannot call unregisterGroup
	    try {
		sys.unregisterGroup(gid);
		throw new RuntimeException("client2 able to unregisterGroup");
	    } catch (SecurityException e) {
	    }
	    // cannot call shutdown
	    try {
		sys.shutdown();
		throw new RuntimeException("client2 able to shutdown");
	    } catch (SecurityException e) {
	    }
	    return null;
	}
    }

    /**
     * Check that anonymous cannot call anything.
     */
    public static class AsNobody implements PrivilegedExceptionAction {
	public Object run() throws Exception {
	    try {
		Security.verifyObjectTrust(sys, null, trustCtx);
		throw new RuntimeException("nobody able to verify trust");
	    } catch (ConnectIOException e) {
	    }
	    try {
		sys.registerGroup(new ActivationGroupDesc(null, null));
		throw new RuntimeException("nobody able to registerGroup");
	    } catch (ConnectIOException e) {
	    }
	    try {
		sys.getActivationGroupDesc(gid);
		throw new RuntimeException(
				   "nobody able to getActivationGroupDesc");
	    } catch (ConnectIOException e) {
	    }
	    try {
		sys.setActivationGroupDesc(gid, new ActivationGroupDesc(null,
									null));
		throw new RuntimeException(
				   "nobody able to setActivationGroupDesc");
	    } catch (ConnectIOException e) {
	    }
	    try {
		sys.registerObject(new ActivationDesc(gid, "Foo", null, null));
		throw new RuntimeException("nobody able to registerObject");
	    } catch (ConnectIOException e) {
	    }
	    try {
		sys.getActivationDesc(null);
		throw new RuntimeException(
				   "nobody able to getActivationDesc");
	    } catch (ConnectIOException e) {
	    }
	    try {
		sys.unregisterObject(null);
		throw new RuntimeException(
				   "nobody able to unregisterObject");
	    } catch (ConnectIOException e) {
	    }
	    try {
		sys.activeGroup(gid, null, 0);
		throw new RuntimeException("nobody able to activeGroup");
	    } catch (ConnectIOException e) {
	    }
	    try {
		sys.unregisterGroup(gid);
		throw new RuntimeException("nobody able to unregisterGroup");
	    } catch (ConnectIOException e) {
	    }
	    try {
		sys.shutdown();
		throw new RuntimeException("nobody able to shutdown");
	    } catch (ConnectIOException e) {
	    }
	    return null;
	}
    }

    /**
     * Check that Server cannot call anything.
     */
    public static class AsServer implements PrivilegedExceptionAction {
	public Object run() throws Exception {
	    Security.verifyObjectTrust(sys, null, trustCtx);
	    try {
		sys.registerGroup(new ActivationGroupDesc(null, null));
		throw new RuntimeException("server able to registerGroup");
	    } catch (SecurityException e) {
	    }
	    try {
		sys.getActivationGroupDesc(gid);
		throw new RuntimeException(
				   "server able to getActivationGroupDesc");
	    } catch (SecurityException e) {
	    }
	    try {
		sys.setActivationGroupDesc(gid, new ActivationGroupDesc(null,
									null));
		throw new RuntimeException(
				   "server able to setActivationGroupDesc");
	    } catch (SecurityException e) {
	    }
	    try {
		sys.registerObject(new ActivationDesc(gid, "Foo", null, null));
		throw new RuntimeException("server able to registerObject");
	    } catch (SecurityException e) {
	    }
	    try {
		sys.getActivationDesc(null);
		throw new RuntimeException(
				   "server able to getActivationDesc");
	    } catch (SecurityException e) {
	    }
	    try {
		sys.unregisterObject(null);
		throw new RuntimeException(
				   "server able to unregisterObject");
	    } catch (SecurityException e) {
	    }
	    try {
		sys.unregisterGroup(gid);
		throw new RuntimeException("server able to unregisterGroup");
	    } catch (SecurityException e) {
	    }
	    return null;
	}
    }

    public static void main(String[] args) throws Exception {
	if (System.getSecurityManager() == null) {
	    System.setSecurityManager(new SecurityManager());
	}
	System.setProperty("java.security.auth.login.config",
			   testsrc + "login");
	System.setProperty("javax.net.ssl.trustStore",
			   testsrc + "keystore");
	server = getSubject("server");
	Subject client1 = getSubject("client1");
	Subject client2 = getSubject("client2");
	RMID.removeLog();
	final RMID rmid = RMID.createRMID(true);
	rmid.addOptions(new String[]{"-Djava.security.auth.login.config=" +
				     testsrc + "login",
				     "-Djavax.net.ssl.trustStore=" +
				     testsrc + "keystore"});
	rmid.slowStart();
	try {
	    sys = ActivationGroup.getSystem();
	    Subject.doAsPrivileged(client1, new AsClient1(), null);
	    Subject.doAsPrivileged(client2, new AsClient2(), null);
	    Subject.doAsPrivileged(null, new AsNobody(), null);
	    Subject.doAsPrivileged(server, new AsServer(), null);
	} finally {
	    Subject.doAsPrivileged(server, new PrivilegedAction() {
		public Object run() {
		    ActivationLibrary.rmidCleanup(rmid);
		    return null;
		}
	    }, null);
	}
    }
}


text:
[//000000001]: # (doctools::toc::export::html \- Documentation tools)
[//000000002]: # (Generated from file 'plugin\.inc' by tcllib/doctools with format 'markdown')
[//000000003]: # (Copyright © 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>)
[//000000004]: # (doctools::toc::export::html\(n\) 0\.1 tcllib "Documentation tools")

 [ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]

# NAME

doctools::toc::export::html \- HTML export plugin

# Table Of Contents

  - [Table Of Contents](#toc)

  - [Synopsis](#synopsis)

  - [Description](#section1)

  - [API](#section2)

  - [Configuration](#section3)

  - [ToC serialization format](#section4)

  - [Bugs, Ideas, Feedback](#section5)

  - [Keywords](#keywords)

  - [Category](#category)

  - [Copyright](#copyright)

# SYNOPSIS

package require Tcl 8\.4
package require doctools::toc::export::html ?0\.1?
package require doctools::text
package require doctools::html
package require doctools::html::cssdefaults

[__[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*](#1)

# DESCRIPTION

This package implements the doctools table of contents export plugin for the
generation of HTML markup\.

This is an internal package of doctools, for use by the higher level management
packages handling tables of contents, especially
__[doctools::toc::export](toc\_export\.md)__, the export manager\.

Using it from a regular interpreter is possible, however only with contortions,
and is not recommended\. The proper way to use this functionality is through the
package __[doctools::toc::export](toc\_export\.md)__ and the export
manager objects it provides\.

# API

The API provided by this package satisfies the specification of the doctoc
export plugin API version 2\.

  - __[export](\.\./\.\./\.\./\.\./index\.md\#export)__ *serial* *configuration*

    This command takes the canonical serialization of a table of contents, as
    specified in section [ToC serialization format](#section4), and
    contained in *serial*, the *configuration*, a dictionary, and generates
    HTML markup encoding the table\. The created string is then returned as the
    result of the command\.

# Configuration

The html export plugin recognizes the following configuration variables and
changes its behaviour as they specify\.

  - string *user*

    This standard configuration variable contains the name of the user running
    the process which invoked the export plugin\. The plugin puts this
    information into the provenance comment at the beginning of the generated
    document\.

  - string *file*

    This standard configuration variable contains the name of the file the table
    of contents came from\. This variable may not be set or contain the empty
    string\. The plugin puts this information, if defined, i\.e\. set and not the
    empty string, into the provenance comment at the beginning of the generated
    document\.

  - dictionary *map*

    This standard configuration variable contains a dictionary mapping from the
    \(symbolic\) document ids in reference entries to the actual filenames and/or
    urls to be used in the output\.

    Document ids without a mapping are used unchanged\.

  - boolean *newlines*

    If this flag is set the plugin will break the generated html code across
    lines, with each markup command on a separate line\.

    If this flag is not set \(the default\), the whole document will be written on
    a single line, with minimum spacing between all elements\.

  - boolean *indented*

    If this flag is set the plugin will indent the markup commands according to
    the structure of indices\. To make this work this also implies that
    __newlines__ is set\.

    If this flag is not set \(the default\), the output is formatted as per the
    value of __newlines__, and no indenting is done\.

  - string *meta*

    This variable is meant to hold a fragment of HTML \(default: empty\)\. The
    fragment it contains will be inserted into the generated output in the
     section of the document, just after the <title> tag\.

  - string *header*

    This variable is meant to hold a fragment of HTML \(default: empty\)\. The
    fragment it contains will be inserted into the generated output just after
    the
 title tag in the body of the document, in the class\.header

'ision\.

  - string *footer*

    This variable is meant to hold a fragment of HTML \(default: empty\)\. The
    fragment it contains will be inserted into the generated output just before
    the  tag, in the class\.footer
'ision\.

  - dictionary *rid*

    The value of this variable \(default: empty\) maps references to the
    identifiers to use as their anchor names\. Each reference __FOO__ not
    found in the dictionary uses __REF\-____FOO__ as anchor, i\.e\. itself
    prefixed with the string __REF\-__\.

  - string *sepline*

    The value of this variable is the string to use for the separator comments
    inserted into the output when the outpout is broken across lines and/or
    indented\. The default string consists of 60 dashes\.

  - string *class\.main*

    This variable contains the class name for the main
'ivision of the
    generated document\. The default is __doctools__\.

  - string *class\.header*

    This variable contains the class name for the header
'ision of the
    generated document\. The default is __toc\-header__\. This division
    contains the document title, the user specified __header__, if any, and
    a visible separator line\.

  - string *class\.title*

    This variable contains the class name for the
 tag enclosing the
    document title\. The default is __toc\-title__\.

  - string *class\.navsep*

    This variable contains the class name for the
 separators in the header
    and footer sections of the generated document\. The default is
    __toc\-navsep__\.

  - string *class\.contents*

    This variable contains the class name for the XXXXX holding the keywords and
    their references in the generated document\. The default is
    __toc\-contents__\.

  - string *class\.ref*

    This variable contains the class name for the table elements which are
    references to other documents\. The default is __toc\-ref__\.

  - string *class\.div*

    This variable contains the class name for the table elements which are
    divisions\. The default is __toc\-div__\.

  - string *class\.footer*

    This variable contains the class name for the footer
'ision of the
    generated document\. The default is __toc\-footer__\. This division
    contains a browser\-visible separator line and the user specified
    __footer__, if any\.

*Note* that this plugin ignores the standard configuration variable
__format__, and its value\.

# ToC serialization format

Here we specify the format used by the doctools v2 packages to serialize tables
of contents as immutable values for transport, comparison, etc\.

We distinguish between *regular* and *canonical* serializations\. While a
table of contents may have more than one regular serialization only exactly one
of them will be *canonical*\.

  - regular serialization

      1. The serialization of any table of contents is a nested Tcl dictionary\.

      1. This dictionary holds a single key, __doctools::toc__, and its
         value\. This value holds the contents of the table of contents\.

      1. The contents of the table of contents are a Tcl dictionary holding the
         title of the table of contents, a label, and its elements\. The relevant
         keys and their values are

           * __title__

             The value is a string containing the title of the table of
             contents\.

           * __label__

             The value is a string containing a label for the table of contents\.

           * __items__

             The value is a Tcl list holding the elements of the table, in the
             order they are to be shown\.

             Each element is a Tcl list holding the type of the item, and its
             description, in this order\. An alternative description would be
             that it is a Tcl dictionary holding a single key, the item type,
             mapped to the item description\.

             The two legal item types and their descriptions are

               + __reference__

                 This item describes a single entry in the table of contents,
                 referencing a single document\. To this end its value is a Tcl
                 dictionary containing an id for the referenced document, a
                 label, and a longer textual description which can be associated
                 with the entry\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the entry\.

                   - __label__

                     The value is a string containing a label for this entry\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __desc__

                     The value is a string containing a longer description for
                     this entry\.

               + __division__

                 This item describes a group of entries in the table of
                 contents, inducing a hierarchy of entries\. To this end its
                 value is a Tcl dictionary containing a label for the group, an
                 optional id to a document for the whole group, and the list of
                 entries in the group\. The relevant keys and their values are

                   - __id__

                     The value is a string containing the id of the document
                     associated with the whole group\. This key is optional\.

                   - __label__

                     The value is a string containing a label for the group\.
                     This string also identifies the entry, and no two entries
                     \(references and divisions\) in the containing list are
                     allowed to have the same label\.

                   - __items__

                     The value is a Tcl list holding the elements of the group,
                     in the order they are to be shown\. This list has the same
                     structure as the value for the keyword __items__ used
                     to describe the whole table of contents, see above\. This
                     closes the recusrive definition of the structure, with
                     divisions holding the same type of elements as the whole
                     table of contents, including other divisions\.

  - canonical serialization

    The canonical serialization of a table of contents has the format as
    specified in the previous item, and then additionally satisfies the
    constraints below, which make it unique among all the possible
    serializations of this table of contents\.

      1. The keys found in all the nested Tcl dictionaries are sorted in
         ascending dictionary order, as generated by Tcl's builtin command
         __lsort \-increasing \-dict__\.

# Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and
other problems\. Please report such in the category *doctools* of the [Tcllib
Trackers](http://core\.tcl\.tk/tcllib/reportlist)\. Please also report any ideas
for enhancements you may have for either package and/or documentation\.

When proposing code changes, please provide *unified diffs*, i\.e the output of
__diff \-u__\.

Note further that *attachments* are strongly preferred over inlined patches\.
Attachments can be made by going to the __Edit__ form of the ticket
immediately after its creation, and then using the left\-most button in the
secondary navigation bar\.

# KEYWORDS

[HTML](\.\./\.\./\.\./\.\./index\.md\#html),
[doctools](\.\./\.\./\.\./\.\./index\.md\#doctools),
[export](\.\./\.\./\.\./\.\./index\.md\#export),
[serialization](\.\./\.\./\.\./\.\./index\.md\#serialization), [table of
contents](\.\./\.\./\.\./\.\./index\.md\#table\_of\_contents),
[toc](\.\./\.\./\.\./\.\./index\.md\#toc)

# CATEGORY

Text formatter plugin

# COPYRIGHT

Copyright © 2009\-2019 Andreas Kupries <andreas\_kupries@users\.sourceforge\.net>


text:
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\Url;
use app\models\Authors;
use yii\helpers\ArrayHelper;
use kartik\datecontrol\DateControl;
?>

    <?php $form = ActiveForm::begin([
        'method' => 'get',
        'options' => ['class' => 'form-inline']
    ]); ?>

        <?= $form->field($searchModel, 'author_id')->dropDownList(
            ArrayHelper::merge( [0=>'Автор'] ,ArrayHelper::map(Authors::find()->all(), 'id', 'fullname')),
            [
                'options' => [
                    'class'=>'form-control',
                    $searchModel->author_id => ['selected' => true]
                ]
            ]
        )->label(false); ?>

        <?= $form->field($searchModel, 'name')->textInput(['placeholder'=>Yii::t('app', 'Book Name')])->label(false) ?>

    <?= $form->field($searchModel, 'date_from')->widget(DateControl::classname(), [
        'saveFormat' => 'php:Y-m-d H:i:s',
        'ajaxConversion'=>true,
        'options' => [
            'pluginOptions' => [
                'autoclose' => true
                ]
            ]
        ])?>

    <?= $form->field($searchModel, 'date_to')->widget(DateControl::classname(), [
        'saveFormat' => 'php:Y-m-d H:i:s',
        'ajaxConversion'=>false,
        'options' => [
            'pluginOptions' => [
                'autoclose' => true
                ]
            ]
        ])?>

    <?= Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
    <?= Html::a(Yii::t('app', 'Clear Filter'), Url::to(['books/index']),['class' => 'btn btn-default']) ?>


text:
namespace biosim {
  namespace math {
    namespace algo {
      // dynamic programming algorithm class; fills the given tensor using the scoring function
      template <class T>
      class dp {
      public:
        // scoring function, taking a tensor and position and returning a score
        using score_function = std::function<T(tensor<T> const &, std::vector<size_t> const &)>;

        // calculates the scores for all positions of the tensor __input using the scoring function and returns it
        tensor<T> calculate(tensor<T> __input, score_function const &__score) {
          tools::mapper<std::vector<size_t>> m(__input.get_mapper_alphabets());
          std::vector<size_t> pos;
          for(size_t i(m.get_min()); i <= m.get_max(); ++i) {
            pos = m.encode(i);
            DEBUG << "Calculating score for tensor(" << tools::to_string(pos) << ")";
            __input(pos) = __score(__input, pos);
          } // while

          return __input;
        } // calculate()
      }; // class dp
    } // namespace algo
  } // namespace math
} // namespace biosim

#endif // math_algo_dp_h


text:
from pychron.options.options_manager import (
    OptionsController,
    ArArCalculationsOptionsManager,
)
from pychron.options.views.views import view
from pychron.pipeline.nodes.base import BaseNode

class ArArCalculationsNode(BaseNode):
    name = "ArArCalculations"

    def run(self, state):
        state.arar_calculation_options = self.options

    def configure(self, pre_run=False, **kw):
        model = ArArCalculationsOptionsManager()
        info = OptionsController(model=model).edit_traits(
            view=view("{} Options".format(self.name)), kind="livemodal"
        )
        if info.result:
            self.options = model.selected_options
            return True

# ============= EOF =============================================


text:
NSString * const AKAddressBookDidDialSIPAddressNotification = @"AKAddressBookDidDialSIPAddress";

// An address book plug-in to dial SIP addresses with Telephone. SIP addresses are emails with a custom label |sip|.
@interface AKAddressBookSIPAddressPlugIn : NSObject

// SIP address that has been dialed last. While Telephone is being launched, several phone numbers can be dialed. We
// handle only the last one.
@property (nonatomic, copy) NSString *lastSIPAddress;

// Full name of the contact that has been dialed last. While Telephone is being launched, several phone numbers can be
// dialed. We handle only the last one.
@property (nonatomic, copy) NSString *lastFullName;

// A Boolean value that determines whether a call should be made after Telephone starts up.
@property (nonatomic, assign) BOOL shouldDial;

- (NSString *)actionProperty;

- (NSString *)titleForPerson:(ABPerson *)person identifier:(NSString *)identifier;

- (void)performActionForPerson:(ABPerson *)person identifier:(NSString *)identifier;

- (BOOL)shouldEnableActionForPerson:(ABPerson *)person identifier:(NSString *)identifier;

@end


text:
/*
 * Legal Notice
 *
 * This document and associated source code (the "Work") is a part of a
 * benchmark specification maintained by the TPC.
 *
 * The TPC reserves all right, title, and interest to the Work as provided
 * under U.S. and international laws, including without limitation all patent
 * and trademark rights therein.
 *
 * No Warranty
 *
 * 1.1 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE INFORMATION
 *     CONTAINED HEREIN IS PROVIDED "AS IS" AND WITH ALL FAULTS, AND THE
 *     AUTHORS AND DEVELOPERS OF THE WORK HEREBY DISCLAIM ALL OTHER
 *     WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY,
 *     INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES,
 *     DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
 *     PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF
 *     WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE.
 *     ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT,
 *     QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT
 *     WITH REGARD TO THE WORK.
 * 1.2 IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THE WORK BE LIABLE TO
 *     ANY OTHER PARTY FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO THE
 *     COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS
 *     OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT,
 *     INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY,
 *     OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT
 *     RELATING TO THE WORK, WHETHER OR NOT SUCH AUTHOR OR DEVELOPER HAD
 *     ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.
 *
 * Contributors
 * - Sergey Vasilevskiy
 */

#ifndef EGEN_TEST_SUITES_STDAFX_H
#define EGEN_TEST_SUITES_STDAFX_H

#define WIN32_LEAN_AND_MEAN     // Exclude rarely-used stuff from Windows headers
#include <stddef.h>
#include <stdio.h>
#include <assert.h>
#include <fstream>
#include <set>
#include <map>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>

//  Include Reference EGen code under RefTPCE namespace.
//
#define TPCE RefTPCE

#include "../../Reference/inc/EGenUtilities_stdafx.h"
#include "../../Reference/inc/EGenTables_stdafx.h"
//#include "../../Reference/inc/EGenBaseLoader_stdafx.h"
#include "../../Reference/inc/EGenGenerateAndLoadBaseOutput.h"
#include "../../Reference/inc/EGenGenerateAndLoadStandardOutput.h"
#include "../../Reference/inc/DriverParamSettings.h"
#include "../../Reference/inc/EGenLogger.h"
#include "../../Reference/inc/CE.h"
#include "../../Reference/inc/DM.h"

#undef TPCE

//  Remove #ifndef checks in includes because they have been defined by Reference includes.
//
#undef EGEN_UTILITIES_STDAFX_H
#undef EGEN_STANDARD_TYPES_H
#undef DATE_TIME_H
#undef RANDOM_H
#undef ERROR_H
#undef TABLE_CONSTS_H
#undef MISC_CONSTS_H
#undef FIXED_MAP_H
#undef FIXED_ARRAY_H
#undef RNGSEEDS_H
#undef EGEN_VERSION_H
#undef MONEY_H

#undef EGEN_TABLES_STDAFX_H
#undef INPUT_FILE_H
#undef INPUT_FILE_NO_WEIGHT_H
#undef FLAT_FILE_H
#undef TABLE_DEFS_H
#undef INPUT_FLAT_FILE_DECLARATIONS_H
#undef SECURITY_FILE_H
#undef COMPANY_FILE_H
#undef COMPANY_COMPETITOR_FILE_H
#undef INPUT_FLAT_FILE_STRUCTURE_H
#undef DRIVER_TYPES_H
#undef BASE_TABLE_H
#undef TABLE_TEMPLATE_H
#undef PERSON_H
#undef CUSTOMER_SELECTION_H
#undef CUSTOMER_TABLE_H
#undef COMPANY_TABLE_H
#undef FINANCIAL_TABLE_H
#undef ADDRESS_TABLE_H
#undef CUSTOMER_ACCOUNTS_AND_PERMISSIONS_TABLE_H
#undef CUSTOMER_TAXRATES_TABLE_H
#undef HOLDINGS_AND_TRADES_TABLE_H
#undef WATCH_LIST_AND_ITEMS_TABLE_H
#undef SECURITY_TABLE_H
#undef DAILY_MARKET_TABLE_H
#undef BROKERS_H
#undef SECTOR_TABLE_H
#undef CHARGE_TABLE_H
#undef EXCHANGE_TABLE_H
#undef COMMISSION_RATE_TABLE_H
#undef INDUSTRY_TABLE_H
#undef STATUS_TYPE_H
#undef TAXRATE_TABLE_H
#undef TRADE_TYPE_TABLE_H
#undef COMPANY_COMPETITOR_TABLE_H
#undef ZIP_CODE_TABLE_H
#undef NEWS_ITEM_AND_XREG_TABLE_H
#undef MEE_SECURITY_H
#undef LAST_TRADE_TABLE_H
#undef TRADE_GEN_H
#undef SECURITY_PRICE_RANGE_H
#undef TRADE_TYPE_IDS_H
#undef SYNCLOCK_H
#undef WIN_ERROR_H

#undef EGEN_GENERATE_AND_LOAD_BASE_OUTPUT_H

#undef EGEN_GENERATE_AND_LOAD_STANDARD_OUTPUT_H

#undef DRIVER_PARAM_SETTINGS_H

#undef EGEN_LOGGER_H
#undef BASE_LOGGER_H
#undef BASE_LOG_FORMATTER_H
#undef EGEN_LOG_FORMATTER_H

#undef CE_H
#undef CE_TXN_INPUT_GENERATOR_H
#undef CE_TXN_MIX_GENERATOR_H
#undef CE_SUT_INTERFACE_H
#undef TXN_HARNESS_STRUCTS_H
#undef MEE_TRADE_REQUEST_ACTIONS_H

#undef DM_H
#undef DM_SUT_INTERFACE_H

//  Include current code being tested. It is included under TPCE (unchanged) namespace.
//
#include "../../../inc/EGenUtilities_stdafx.h"
#include "../../../inc/EGenTables_stdafx.h"
//#include "../../../inc/EGenBaseLoader_stdafx.h"
#include "../../../inc/EGenGenerateAndLoadBaseOutput.h"
#include "../../../inc/EGenGenerateAndLoadStandardOutput.h"
#include "../../../inc/DriverParamSettings.h"
#include "../../../inc/EGenLogger.h"
#include "../../../inc/CE.h"
#include "../../../inc/DM.h"

///////////////////////////////////////////////////
//  Include EGen Test code.
///////////////////////////////////////////////////
#include "EGenTestLoader.h"
#include "EGenTestSUT.h"

#include "EGenTestError.h"
#include "EGenBaseTestSuite.h"
#include "EGenTestSuiteOne.h"
#include "EGenTestSuiteTwo.h"

#endif // EGEN_TEST_SUITES_STDAFX_H