This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is an SQL store that (partially) implements: | |
* http://www.w3.org/TR/WebSimpleDB/ | |
* and wraps an SQL database engine based on: | |
* based on http://www.w3.org/TR/webdatabase/ | |
*/ | |
var SQLDatabase = require("./sql-engine").SQLDatabase, | |
first = require("lazy-array").first, | |
AutoTransaction = require("../stores").AutoTransaction, | |
parseQuery = require("../resource-query").parseQuery, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a { text-decoration: none; display: inline; } | |
.feed-title { font-size: 150%; background-color: #eee; padding: 10px; } | |
div.hentry { padding: 10px; border-top: 1px solid #eee; } | |
div.hentry:hover { background-color: #fafafa; } | |
div.nav.sequence { | |
color: #959585; | |
font-size: 80%; | |
font-weight: bold; | |
text-align: center; | |
background-color: #fffee1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.wrap = function(nextApp, options){ | |
return require("jack/cascade").Cascade([ | |
require("jack/static").Static(nextApp, {urls:[""], root:"public"}), | |
require("pintura/jsgi/redirect-root").RedirectRoot( | |
require("./jsgi/iewtf").IEWTF( | |
require("jsgi/class-alias").Handler( | |
nextApp | |
) | |
) | |
, "/legal/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal | |
set SHELL=cmd.exe | |
set PACKAGE_HOME=%~dp0.. | |
call %PACKAGE_HOME%\packages\narwhal\bin\activate.cmd | |
set NARWHAL_PATH=%PACKAGE_HOME% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This module provides querying functionality | |
*/ | |
exports.jsonQueryCompatible = true; | |
var operatorMap = { | |
"=": "eq", | |
"==": "eq", | |
">": "gt", | |
">=": "ge", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"a!=aaa" is sugar for (identical to) "a.ne(aaa)" parses to: | |
[{ | |
property:"a", | |
operator:"ne", | |
values: ["aaa"] | |
}] | |
"a=aaa" is sugar for (identical to) "a.eq(aaa)" parses to: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var parseQuery = require("resource-query").parseQuery; | |
var x = parseQuery("a=b"); | |
var y = parseQuery([{ | |
type: "comparison", | |
comparator: "=", | |
name: "a", | |
value: "b", | |
conjunction: undefined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var pq = require('resource-query').parseQuery | |
JSON.stringify(pq('a>b|(c>d&e<f)|g=d(i&j)')) | |
[ | |
{ | |
"type": "comparison", | |
"comparator": ">", | |
"name": "a", | |
"value": "b" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query: function(query, options) { | |
options = options || {}; | |
// FIXME use facets | |
var defaultRangeLength = config.defaultRangeLength || 25; // TODO get from settings | |
var slice = function() { | |
var length, | |
xquery = ""; | |
if (defaultRangeLength && !(options.start == 0 && options.end == Infinity)) { | |
options.start = options.start || 0; | |
options.end = options.end || Infinity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SecurityError: Error #2122: Security sandbox violation: LoaderInfo.content: http://static.fmpub.net/banners/20100318/4ba2485947dbdTitleTweets_500x250.swf?banner_id=231447&clickTag=http://ad.doubleclick.net/click%3Bh%3Dv8/3965/3/0/%2a/x%3B222941171%3B0-0%3B1%3B21014442%3B599-600/250%3B35995938/36013843/1%3B%3B%7Eokv%3D%3Bsz%3D600x250%3Bfmzid%3D2577%3Btile%3D2%3Bqcseg%3DD%3Bqcseg%3DT%3Bqcseg%3D1213%3Bqcseg%3D1153%3Bqcseg%3D1152%3Bqcseg%3D1151%3Bqcseg%3D1150%3Bqcseg%3D1145%3Bqcseg%3D1144%3Bqcseg%3D982%3Bbsg%3D101163%3B%3B%7Eaopt%3D2/1/8b/0%3B%7Esscs%3D%3fhttp%3A%2F%2Fclk.atdmt.com%2FCNT%2Fgo%2F202528349%2Fdirect%3Bwi.1%3Bhi.1%2F01%2F&clickTAG=http://ad.doubleclick.net/click%3Bh%3Dv8/3965/3/0/%2a/x%3B222941171%3B0-0%3B1%3B21014442%3B599-600/250%3B35995938/36013843/1%3B%3B%7Eokv%3D%3Bsz%3D600x250%3Bfmzid%3D2577%3Btile%3D2%3Bqcseg%3DD%3Bqcseg%3DT%3Bqcseg%3D1213%3Bqcseg%3D1153%3Bqcseg%3D1152%3Bqcseg%3D1151%3Bqcseg%3D1150%3Bqcseg%3D1145%3Bqcseg%3D1144%3Bqcseg%3D982%3Bbsg%3D101163%3B%3B%7Eaopt%3D2/1/8b/0%3B%7Esscs%3D% |