A couple of design points:
- OmegaDB itself is not stateful; instead, all configuration resides in the connection object.
| $(".dropdown-toggle").click(function(e) { | |
| var menu = $(this).next('.dropdown-menu'), | |
| mousex = e.pageX + 20, //Get X coodrinates | |
| mousey = e.pageY + 20, //Get Y coordinates | |
| menuWidth = menu.width(), //Find width of tooltip | |
| menuHeight = menu.height(), //Find height of tooltip | |
| menuVisX = $(window).width() - (mousex + menuWidth), //Distance of element from the right edge of viewport | |
| menuVisY = $(window).height() - (mousey + menuHeight); //Distance of element from the bottom of viewport | |
| if (menuVisX < 20) { //If tooltip exceeds the X coordinate of viewport |
| ERROR: Exception while logging to "ConsoleHandler" handler { level: 'DEBUG' }: TypeError: Cannot read property 'setLoggingContext' of null | |
| at Context.<anonymous> (/home/morgul/Development/report-manager/node_modules/omega-logger/lib/context.js:44:19) | |
| at Array.forEach (native) | |
| at Context.message (/home/morgul/Development/report-manager/node_modules/omega-logger/lib/context.js:42:19) | |
| at formatReplacement (/home/morgul/Development/report-manager/node_modules/omega-logger/util/strformat.js:17:27) | |
| at String.replace (native) | |
| at format (/home/morgul/Development/report-manager/node_modules/omega-logger/util/strformat.js:25:25) | |
| at ConsoleHandler.onMessage (/home/morgul/Development/report-manager/node_modules/omega-logger/lib/handlers/console.js:55:17) | |
| at ConsoleHandler.log (/home/morgul/Development/report-manager/node_modules/omega-logger/lib/handlers/base.js:35:14) | |
| at eachHandler (/home/morgul/Development/report-manager/node_modules/omega-logger/logging.js:184:29) |
| #!upstart | |
| description "My Application's description here." | |
| author "Chris Case <[email protected]>" | |
| # Depending on what this is, you mat consider `start on started network-services` | |
| start on startup | |
| # May not need a stop on clause | |
| stop on shutdown |
| { | |
| "baseChar":"cjTQvE9aorvUt1GB", | |
| "conditions":[ | |
| { | |
| "_$id":"eoCoo6ms7FFm5dtI" | |
| }, | |
| { | |
| "_$id":"aByRxFLUW2i7OfX1" | |
| } | |
| ], |
| %%% @doc Tests for the `example' module. | |
| %%% | |
| %%% This uses an as-of-yet unwritten BDD framework for Erlang. | |
| %%% -------------------------------------------------------------------------------------------------------------------- | |
| -module(example_spec). | |
| -include ("bdd.hrl"). | |
| -export([spec/0]). |
| <!-- ng-class style --> | |
| <button class="btn btn-default" ng-keypress="{enter: doStuff, up-arrow: doStuff2}">Activate Me!</button> | |
| <!-- dual attribtues --> | |
| <button class="btn-default" ng-keypress="doStuff" key="up-arrow">Activate Me!</button> |
| class atom(object): | |
| """An implementation of the atom concept, inspired by Erlang. | |
| Modified from here: http://www.me.net.nz/blog/atoms-slash-symbols-in-python/ | |
| """ | |
| def __init__(self, a): | |
| self._a = intern(a) | |
| def __eq__(self, other): |
| // Example client interface | |
| var socket = SocketFramework.connect("http://localhost:3000"); | |
| // Listen for the some event | |
| socket.on('some event', function(data) { | |
| console.log('got data:', data); | |
| }); | |
| // Listen for an event that expects a reply |
| // --------------------------------------------------------------------------------------------------------------------- | |
| // Testing OrderBy on a joined model | |
| // | |
| // @module orderby_test.js | |
| // --------------------------------------------------------------------------------------------------------------------- | |
| var util = require('util'); | |
| var thinky = require('thinky')({ db: 'orderby_test' }); | |
| var r = thinky.r; |