This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"constant": true, | |
"inputs": [], | |
"name": "current_external_block", | |
"outputs": [ | |
{ | |
"name": "", | |
"type": "uint256" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"constant": true, | |
"inputs": [], | |
"name": "current_external_block", | |
"outputs": [ | |
{ | |
"name": "", | |
"type": "uint256" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bluebird = require('bluebird'); | |
const Web3 = require('web3'); | |
const _ = require('lodash'); | |
const bbRetry = require('bluebird-retry'); | |
const { env } = require('../libs/env-utils'); | |
const config = require('../config/contracts')[env]; | |
const { add0x, buildContract } = require('../libs/eth-helper'); | |
const web3 = new Web3(new Web3.providers.HttpProvider(config.rpcAddr)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const config = require('./config'); | |
const LineByLineReader = require('line-by-line'); | |
const lr = new LineByLineReader(config.dictionary.path); | |
const Redis = require('redis'); | |
let redis = Redis.createClient(config.redis.url); | |
let multi = redis.multi(); | |
const sha3 = require('solidity-sha3').default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.0; | |
//////////////////////////////////////////////////////////// | |
// This is an example contract hacked together at a meetup. | |
// It is by far not complete and only used to show some | |
// features of Solidity. | |
//////////////////////////////////////////////////////////// | |
contract queue | |
{ | |
Queue requests; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.cpp | |
// merge | |
// | |
// Created by 元飞 朱 on 16/6/15. | |
// Copyright © 2016年 yuanfei. All rights reserved. | |
// | |
#include <iostream> | |
#include <cassert> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Question: to build a binary tree, with specific input format: | |
# input: | |
# 2 3 4 (2, 3, 4 is the index of a node) | |
# 3 7 8 | |
# 8 1 a | |
# 2 | |
# / \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def atof(s, base): | |
def ctoi(ch): | |
ch = ch.lower() | |
if ch <= '9' and ch >= '0': | |
return ord(ch) - ord('0') | |
elif ch >= 'a' and ch <= 'z': | |
return ord(ch) - ord('a') + 10 | |
else: | |
raise Exception('argument error: char %s is not a valid numeric symbol' % ch) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"auth.py": { | |
"comment": [ | |
], | |
"code": [ | |
"Web server" | |
], | |
"all": [ | |
"Web server" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"app.py": { | |
"comment": [ | |
], | |
"code": [ | |
], | |
"all": [ | |
"Unit test" |
NewerOlder