Skip to content

Instantly share code, notes, and snippets.

@takashi
takashi / DAICO.md
Last active January 23, 2018 09:07
DAICOについて(邦訳)

下記はDAOの利点を複雑さとリスクを最小限に抑えた形で取り入れ、ICOのモデルを改善するためのアイデアです。

https://ethresear.ch/uploads/default/optimized/1X/d422da54d200e5dc8e119de3a65ec885a542b4c3_1_500x249.png

アイデアは次のとおりです。DAICOコントラクトは、プロジェクトの資金調達を希望する単一の開発チームによって発行されます。 DAICO コントラクトは 「寄付モード(contribution mode)」から開始されます。このモード中は誰でもがDAICOコントラクトに対してETHを寄付し、対価としてトークンを受け取ることができます。これはキャップ付きセール、キャップなしセール、ダッチオークション形式、Interactive Coin Offering、KYCベースのパーソナルなキャップ付きセール、または他の、開発チームが選択するどのような仕組みでも良い。 寄付ができる期間が終わると、ETHを寄付することはできなくなり、そのタイミングでのトークンの残高が設定され、またこのタイミングからトークンが売買可能にすることができます。

寄付期間のあと、コントラクトはゼロで初期化された1つの主要なステート、tap (単位: wei / sec)を持ちます。 tapは開発チームがコントラクトから取り出せる1秒あたりの金額を決定します。これは以下の用に実装できます:

@justinwoo
justinwoo / using-rxjs-instead-of-flux-with-react.md
Last active October 21, 2023 10:16
Using RxJS instead of Flux with React to organize data flow

Reposted from Qiita

For almost a year now, I've been using this "flux" architecture to organize my React applications and to work on other people's projects, and its popularity has grown quite a lot, to the point where it shows up on job listings for React and a lot of people get confused about what it is.

Why I'm tired of using and teaching flux

There are a billion explainations on the internet, so I'll skip explaining the parts. Instead, let's cut to the chase -- the main parts I hate about flux are the Dispatcher and the Store's own updating mechanism.

If you use a setup similar to the examples in facebook/flux, and you use flux.Dispatcher, you probably have this kind of flow:

@roman01la
roman01la / web-worker-cors.js
Created September 9, 2014 17:26
Cross-origin solution for loading WebWorker
var xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.onload = function() {
if (xhr.status === 200) {
var workerSrcBlob, workerBlobURL;
workerSrcBlob = new Blob([xhr.responseText], { type: 'text/javascript' });
workerBlobURL = window.URL.createObjectURL(workerSrcBlob);
var worker = new Worker(workerBlobURL);
@pietbrauer
pietbrauer / MD5.swift
Created August 10, 2014 16:59
NSString & NSData to MD5
import Foundation
extension NSData {
func MD5() -> NSString {
let digestLength = Int(CC_MD5_DIGEST_LENGTH)
let md5Buffer = UnsafeMutablePointer<CUnsignedChar>.alloc(digestLength)
CC_MD5(bytes, CC_LONG(length), md5Buffer)
var output = NSMutableString(capacity: Int(CC_MD5_DIGEST_LENGTH * 2))
for i in 0..<digestLength {
@PGMY
PGMY / iOSLib.md
Last active December 11, 2017 06:26
iOSで使えるライブラリなリポジトリまとめ
@alotaiba
alotaiba / google_speech2text.md
Created February 3, 2012 13:20
Google Speech To Text API

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English