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
// e = 10^21 | |
e := big.NewInt(0).Exp(big.NewInt(10), big.NewInt(21), big.NewInt(0)) | |
d := new(big.Rat) | |
d.SetInt(block.Difficulty) | |
c := new(big.Rat) | |
c.SetFloat64(0.5) | |
// d = diff / 0.5 | |
d.Quo(d, c) | |
// base = floor(d) | |
base.Div(d.Num(), d.Denom()) |
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
rlp = RLP.new | |
rlp << ANYTHING | |
rlp.out |
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
ApplicationWindow { | |
minimumWidth: 500 | |
maximumWidth: 500 | |
maximumHeight: 100 | |
minimumHeight: 100 | |
title: "Ethereum Dice" | |
TextField { | |
id: textField |
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
##### Script | |
a = 100000 | |
b = a | |
if a == b { | |
b = 10000 | |
if b == a { | |
c = 10 | |
} | |
} |
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
out := ethutil.StringToByteFunc(str, func(s string) (ret []byte) { | |
ret = doSomethingWith(s) | |
return | |
}) | |
// == | |
var out []byte | |
if s[0:2] == "0x" { | |
out = fromHex([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
func other() { | |
var b = 10 | |
} | |
func more() { | |
var b = 10 | |
} | |
func main() { | |
var c = 20 |
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
2014/06/20 15:48:07 [CHAIN] Last known block height #3491 | |
2014/06/20 15:48:07 Last block: a403e2df286538b669d5bd63523472920cfc0025a5db57fc483bc761555324a3 | |
2014/06/20 15:48:07 Starting Ethereum v0.5.14 | |
2014/06/20 15:48:07 Ready and accepting connections | |
2014/06/20 15:48:17 [SERV] Added peer (54.72.69.180:30303) 1 / 10 | |
2014/06/20 15:48:17 [PEER] [connected] (outbound) 54.72.69.180:30303 Ethereum(++)/v0.5.11/Release/Linux/g++ [Peer discovery | Block chain relaying | Transaction relaying] | |
2014/06/20 15:48:18 (~) 905f908e764f9d024b9b93abe937ee3e1b0a52c9a099f68892e039d0e119d47a | |
2014/06/20 15:48:18 1408c012810fdc21f9efb5dc3a4553e7795d1007: #0 3667742670000000000000 (+ 100000000000000000) | |
2014/06/20 15:48:18 826e9b89245fa9ad982cedb2f85bd23494142f73: #5 10512205510000000000000 (- 100000000000000000) |
This file has been truncated, but you can view the full file.
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
## 0x591b0bc597f0368a69d5ba618945e86b83e1ccc304b64e13b73c2d7f1ab4f7fd 0x1 ## | |
## 0x06f3851e7ed2c0a9ef51fd444d572b61db124bceab309064b572301b9e06775c 0x2 ## | |
## 0xa60d0075ddd6f89fa70b50ce0644fcd20195dc0be05f9491fcd33d458e10d19e 0x3 ## | |
## 0x1b6a23aef349afd2164029113b24fbdfd95d25979763f1c3fbb7ac3d7b577c3f 0x4 ## | |
## 0x1128ec8377956538f1ab30cec6bc4b94d04d712368c20776774d19752e260547 0x5 ## | |
## 0xcc041de5652f281ce493792533e985586a8023a1f5b558908cff5407c3c0db0f 0x6 ## | |
## 0x4c5a9484bcc11a9ee084a2aacbc9f24666381fca1e503ba9f49ab34835514840 0x7 ## | |
## 0x0adb263ba4d9cece76e5734f28622150a78e5e6c68862752946637b0644de8a0 0x8 ## | |
## 0x1e6536312207df93e64e85ec428eb57a4f5aae7e175a538d0e5725092fdddeb4 0x9 ## | |
## 0xa47f6b81c5033b45a31211b6b86ad8888a0043c0f779272a9b71af9b5e94b856 0xa ## |
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
import QtQuick 2.0 | |
import QtQuick.Controls 1.0; | |
import QtQuick.Layouts 1.0; | |
import QtQuick.Dialogs 1.0; | |
import QtQuick.Window 2.1; | |
import QtQuick.Controls.Styles 1.1 | |
Rectangle { | |
id: root | |
property var title: "JeffCoin" |
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
// C CODE | |
#include "_cgo_export.h" | |
void ACFunction() { | |
printf("ACFunction()\n"); | |
AGoFunction(); | |
} | |
// GO Code | |
package gocallback |
OlderNewer