-
R=1, D=1, S=1: V
-
R=2, D=1, S=1:
- V
- 503 Service Unavailable
-
R=2, D=1, S=2:
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <crypt.h> | |
| #include <shadow.h> | |
| int check_password(const char *plain_password, const char *crypt_password) | |
| { | |
| return strcmp(crypt(plain_password, crypt_password), crypt_password) == 0; |
| #!/bin/sh | |
| # Monitors the remaining battery capacity on a GNU/Linux system, and | |
| # sends a desktop notification if the remaining capacity falls below a | |
| # certain threshold. | |
| WARNING_THRESHOLD=7 # percent | |
| ICON="/usr/share/icons/gnome/scalable/status/battery-low-symbolic.svg" |
| " File: Comment.vim | |
| " | |
| " Purpose: functions to comment/uncomment lines | |
| " | |
| " Author: Ralf Arens <ralf.arens@gmx.de> | |
| " | |
| " Last Modified: 2001-06-06 22:20:23 CEST | |
| " All functions support comment styles, these are: |
| diff --git a/couchjs/c_src/SConscript b/couchjs/c_src/SConscript | |
| index 757e028..0693f60 100644 | |
| --- a/couchjs/c_src/SConscript | |
| +++ b/couchjs/c_src/SConscript | |
| @@ -17,7 +17,10 @@ def require_lib(name): | |
| print 'Could not find required library', name | |
| Exit(1) | |
| -env = Environment(CCFLAGS='-g -O2 -DXP_UNIX') | |
| +env = Environment(CCFLAGS='-g -O2 -DXP_UNIX', |
| diff --git a/test/couch_doc_json_tests.erl b/test/couch_doc_json_tests.erl | |
| index 56587cd..037886f 100644 | |
| --- a/test/couch_doc_json_tests.erl | |
| +++ b/test/couch_doc_json_tests.erl | |
| @@ -17,9 +17,10 @@ | |
| json_doc_test_() -> | |
| + TestCtx = test_util:start_couch(), | |
| { |
In a BigCouch cluster, there are N replicas, who can either be in the state alive or dead. The case of all replicas being alive is defined as the absence of network partitions, i.e., no message is lost. Network partitions are modeled as total failure of one or more replica. For instance, take a set of network partitions P. For each network partition Pi, all replicas that are located in a different network partition than Pi, are defined as dead.
When there's a read or write request, the request first hits one of the replicas, which is referred to as the leader. The leader starts a voting round, i.e., it forwards the request to all replicas. When the leader receives a response from a replica, it's said that the replica has voted. A response may either contain a document version, or some error code indicating e.g. that the document was not found, or the revision number of a newly created document version.
If at least
| #! /bin/sh -e | |
| inotifywait -m -r --exclude "\.swp$" -e modify . | xargs -n 1 -I {} echo "couchapp push" | bash |
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'rest_client' | |
| require 'json' | |
| require 'cgi' | |
| def bye | |
| abort("Usage: #{$0} [view_url]\nExample: #{$0} http://admin:secret@127.0.0.1:5984/db/_design/ddoc/_view/recent-posts") |
| for i in `git fsck --full | grep "dangling commit" | head | grep -o -E "[0-9a-f]+$"`; do git show $i | vim -; done |