(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/** | |
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript | |
* https://gist.github.com/faisalman | |
* | |
* Copyright 2012-2015, Faisalman <[email protected]> | |
* Licensed under The MIT License | |
* http://www.opensource.org/licenses/mit-license | |
*/ | |
(function(){ |
var db = mongoose.connect('mongodb://localhost:27017/DB'); | |
// In middleware | |
app.use(function (req, res, next) { | |
// action after response | |
var afterResponse = function() { | |
logger.info({req: req}, "End request"); | |
// any other clean ups |
$bitcoind getinfo | |
{ | |
"version" : 99900, | |
"protocolversion" : 70002, | |
"walletversion" : 60000, | |
"balance" : 15.74900000, | |
"blocks" : 226032, | |
"timeoffset" : -4, | |
"connections" : 9, |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/bin/sh | |
set -e | |
set -x | |
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3) | |
do | |
npm -g install "$package" | |
done |
--- | |
- name: Initial Odroid Setup | |
hosts: odroids-local | |
user: root | |
vars: | |
- root_password: 'HASHED ROOT PASSWORD HERE' | |
- <YOUR USER>_password: 'USER PASSSWORD HERE' | |
tasks: | |
- name: Change root password |
/* | |
Basically "web3" comes from Mist, | |
but "Web3" CAN come from the dapp. | |
A Dapp has 3 ways to use web3. | |
2. and 3. would work when in Mist and outside. | |
*/ | |
// 1. simply use, web3 comes already defined |
/*eslint-disable no-console, no-var */ | |
import express from 'express' | |
import webpack from 'webpack' | |
import webpackDevMiddleware from 'webpack-dev-middleware' | |
import WebpackConfig from './webpack.config' | |
import path from 'path' | |
const app = express() | |
if (process.env.NODE_ENV === 'development') { |
A description of known problems in Satoshi Nakamoto's paper, "Bitcoin: A Peer-to-Peer Electronic Cash System", as well as notes on terminology changes and how Bitcoin's implementation differs from that described in the paper.
The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power.
Suppose you're writing a contract which involves a huge amount of participants. As an example, think of an online, blockchain-based Trading-Card Game with tournaments. How would you program a playCard
function? You might be thinking of something like this:
function playCard(uint player, uint card){
...
else if (card == PROFESSOR_OAK){
// shuffles the player's hand on his deck
shuffleHand(player)