Given a set of documents, each associated with multiple tags, how can I retrieve the documents tagged with an arbitrary set of tags?
My solution
You can do something like this: | |
@target host | |
GET /target => {... "update_seq": X, ...} | |
POST /_replicate {"source": "<source host>/source", "target": "target"} => {...} | |
GET /target/_changes?since=X => { //here are your replicated changes } | |
This last request to /target/_changes will also include any writes to the target database that occurred between the initial GET and /_replicate as well as any writes that occurred after the replication but before the /target/_changes request. If you can only make direct requests against the target database then it is impossible to guarantee an exact answer in the presence of concurrent updates to the target. | |
On the other hand, if you are performing a push replication from a local database or can otherwise afford to request changes from the source after the replication finishes, you can get exactly what you want even in the presence of concurrent updates to the source and/or the target using the response body from the replication request. |
ctrl-z | |
bg | |
touch /tmp/stdout | |
touch /tmp/stderr | |
gdb -p $! | |
# In GDB | |
p dup2(open("/tmp/stdout", 1), 1) | |
p dup2(open("/tmp/stderr", 1), 2) |
Rails.application.routes.draw do | |
get '/(:locale)/products/(:category)/(page/:page).:extension', | |
:to => 'products#index', | |
:as => :products, | |
:constraints => { | |
:locale => /[a-z]{2}/, | |
:category => /.+?/, | |
:page => /\d+/ | |
}, |
// Handles JavaScript history management and callbacks. To use, register a | |
// regexp that matches the history hash with its corresponding callback. | |
window.HashHistory = { | |
// The interval at which the window location is polled. | |
URL_CHECK_INTERVAL : 500, | |
// We need to use an iFrame to save history if we're in an old version of IE. | |
USE_IFRAME : jQuery.browser.msie && jQuery.browser.version < 8, |
So what exactly is in a Sproingg node? | |
------------------------------------- | |
Sproingg is a project to bootstrap a richly featured text communication system over CouchDB using | |
the following apps and CouchDB features collectively referred to as a Sproingg node | |
a) A CouchDB database as message inbox with a CouchDB database URL as an address for sending messages (Reqd) | |
b) A CouchApp that is a forum app (Optional) | |
c) A CouchApp that is a wiki app (Optional) | |
d) A CouchApp blog (Optional) |
tcp_syslog is now a gem : | |
https://github.com/tech-angels/tcp_syslog |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Sproingg</title> | |
<link rel="stylesheet" href="style/main.css" type="text/css"> | |
</head> | |
<body> |
#content | |
.row | |
.third | |
.third | |
.third.last | |
.row | |
.half | |
.half.last | |
.row | |
.fourth |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<link rel="stylesheet" href="http://openlayers.org/dev/theme/default/style.css" type="text/css" /> | |
<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAUXDSXET8IRGdgHP9FpGw5BT-fVzUWGS_eJ2ZLPBO_6yPqTi0vhQKAzahOrduDq0xQk09GR-UP3Jgcg'></script> | |
<script src="http://openlayers.org/api/OpenLayers.js"></script> | |
<script src="http://www.google.com/jsapi?key=ABQIAAAAUXDSXET8IRGdgHP9FpGw5BT-fVzUWGS_eJ2ZLPBO_6yPqTi0vhQKAzahOrduDq0xQk09GR-UP3Jgcg"></script> | |
<script type="text/javascript"> | |
google.load("jquery", '1.4'); | |
google.load("maps", "2.x"); | |
</script> |