- request for creating(updating) a project(per store) in karte
- embed js code in html header
[APP_PUBLIC_KEY]
&[APP_PRIVATE_KEY]
would be sent from karte.io per app.
// require co | |
var co = require('co') | |
, Gate = require('co-gate') | |
, fs = require('fs'); | |
co(function *(){ | |
// create gate | |
var gate = new Gate() | |
, val = undefined; |
var co = function(fn){ | |
// callback | |
var done = function(val){ | |
// yieldに値を流し込む | |
gen.next(val); | |
} | |
// make a generator | |
var gen = fn(done); | |
// start | |
gen.next(); |
var co = function(fn){ | |
function is_gen(obj) { | |
return obj && obj.constructor && 'GeneratorFunctionPrototype' == obj.constructor.name; | |
} | |
return function(done){ | |
var gen = fn; | |
if(typeof gen == 'function') | |
gen = gen(); |
mixin with(val) | |
<!-- ko with: !{val} --> | |
block | |
<!-- /ko --> | |
mixin if(val) | |
<!-- ko if: !{val} --> | |
block | |
<!-- /ko --> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<script type="text/javascript"> | |
'use strict'; | |
var a, b, c, e, f, fnc; | |
a = function(){ |
原題:Dynamo: Amazon’s Highly Available Key-value Store
原文: Amazon's Dynamo - All Things Distributed (PDF Version)
This article is translated by @ono_matope. Please contact me if any problem.
codes = {} | |
def convert(tag): | |
return codes.setdefault(tag, 1 << codes.length) | |
def desc(node): | |
for child in node.childs: | |
child_code = convert(child.tag) | |
child.code = child_code | node.code |
// Node.h | |
class Node { | |
String name; //id | |
Node** children; | |
Node* parent; | |
int numOfChildren; | |
String* nameList; | |
int layernum; |