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
Hey <b>there</b>! |
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
/* | |
Diesel Price Peg | |
This contract keeps in storage a reference | |
to the Diesel Price in USD | |
*/ | |
pragma solidity ^0.4.0; | |
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; |
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
function findEXIFinJPEG(file) { | |
var dataView = new DataView(file); | |
if (debug) console.log("Got file of length " + file.byteLength); | |
if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) { | |
if (debug) console.log("Not a valid JPEG"); | |
return false; // not a valid jpeg | |
} | |
var offset = 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
0x9f228abf67b56cf4d60fb5e83b8b0719dc7b222f |
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
0x435Fef83140602E770c0C1a1A2ba4Cb56eF5Cca1 |
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
FROM ubuntu:14.04 | |
MAINTAINER Oraclize "info@oraclize.it" | |
COPY script.sh /tmp/ | |
CMD /bin/bash /tmp/script.sh |
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
function strConcat(string _a, string _b, string _c, string _d, string _e, string _f, string _g) internal returns (string) { | |
bytes memory _ba = bytes(_a); | |
bytes memory _bb = bytes(_b); | |
bytes memory _bc = bytes(_c); | |
bytes memory _bd = bytes(_d); | |
bytes memory _be = bytes(_e); | |
bytes memory _bf = bytes(_f); | |
bytes memory _bg = bytes(_g); | |
string memory abcdefg = new string(_ba.length + _bb.length + _bc.length + _bd.length + _be.length + _bf.length + _bg.length); | |
bytes memory babcdefg = bytes(abcdefg); |
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
contract LCS { | |
function toLowerCase(string _in){// returns (string){ | |
bytes memory _out_b = bytes(_in); | |
byte tmp; | |
for (uint i=0; i<_out_b.length; i++){ | |
tmp = _out_b[i]; | |
if (tmp < 91) _out_b[i] = byte(int(tmp)+32); | |
} | |
//return string(_out_b); | |
} |