This JSON object... Check it out.
{ "slogan": "Simplicity is the key to our values", "theAnswer": 42, "isAwake": true, "shoppingList: [ "water",
$(function() { | |
var contentArea = '#content-area'; | |
// Look at all unordered lists and label them as allImages if appropriate | |
$(contentArea + ' ul').each(function(index) { | |
var list = this; | |
$(this).children('li').each(function(index) { | |
// @todo Someone could make this test more bullet proof. | |
if($(this).html().substr(0, 4) != "<img") { | |
list.isNotCarousel = true; |
var BufferedReader = require ("buffered-reader") | |
var BufferedWriter = require ("buffered-writer") | |
var $ = require ("jquery") | |
var targetFile = "target.txt" | |
var sourceFile = "source.txt" | |
var linesArray = [] | |
var transform = function (line) { | |
// your transform here | |
return line; |
<!DOCTYPE html> | |
<! -- | |
A very basic example in Javascript of how to attach a file to a CouchDB document. This will work wether or not the Document ID you define exists. | |
Log in at /_utils, upload this file to a document, and then view it for your own uploader. See the code for comments. ajaxSubmit() is the magic that attaches | |
as long as the Couch Doc exists because you can't submit a new Couch Document with an attachment. | |
by @rjsteinert http://rjsteinert.com | |
--> | |
<html xmlns="http://www.w3.org/1999/xhtml"> |
// With Javascript, create a new file and send it to a CouchDB database as an attachment of a Document | |
// Code inspired by "NEW TRICKS IN XMLHTTPREQUEST2" by Eric Bidelman | |
// http://www.html5rocks.com/en/tutorials/file/xhr2/ | |
/* | |
* There are two ways of accomplishing this. The first way will always result in a filename of "blob", which is | |
* bummer. The second way you will be able to name the file what you want. Note that these examples | |
* assume you have the ID of the database, the ID of the Document, and the most recent revision hash of that Document. | |
*/ |
function (key, values, rereduce) { | |
var min = Infinity | |
for (var i = 0; i < values.length; i++) { | |
if (typeof values[i] == 'number') { | |
min = Math.min(values[i], min) | |
} | |
} | |
return min |
const int numReadings = 10; | |
int readings[numReadings]; | |
int index = 0; | |
int total = 0; | |
int average = 0; | |
int led = 9; | |
int inputPin = A0; | |
void setup() |
<?php | |
session_start(); | |
error_reporting(1); | |
// A handy library for talking to CouchDB (https://github.com/dready92/PHP-on-Couch). | |
// You could use another library to make pure HTTP calls but sometimes using this couch library is just easier because | |
// it is very concise. | |
require_once 'couch.php'; | |
require_once 'couchClient.php'; |
This JSON object... Check it out.
{ "slogan": "Simplicity is the key to our values", "theAnswer": 42, "isAwake": true, "shoppingList: [ "water",
CREATE TABLE "main_exerciselog" ( | |
"signed_version" integer NOT NULL, | |
"user_id" varchar(32), | |
"complete" bool NOT NULL, | |
"deleted" bool NOT NULL DEFAULT 0, | |
"completion_timestamp" datetime, | |
"counter" integer NOT NULL, | |
"zone_fallback_id" varchar(32), | |
"signature" varchar(360) NOT NULL, | |
"signed_by_id" varchar(32), |
{ | |
"slug": "" | |
"path": "/" | |
"children": [ | |
{ | |
"slug":"foo", | |
"path":"/foo" | |
"children": [ | |
{}, | |
{}, |