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.24; | |
import "./Ownable.sol";//#A | |
contract SimpleCoin is Ownable { | |
mapping (address => uint256) public coinBalance; | |
mapping (address => mapping (address => uint256)) public allowance; | |
mapping (address => bool) public frozenAccount; | |
address public owner; | |
event Transfer(address indexed from, address indexed to, uint256 value); | |
event FrozenAccount(address target, bool frozen); |
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.18; | |
import "./SimpleCoin.sol";//#A | |
contract ReleasableSimpleCoin is SimpleCoin { //#B | |
bool public released = false;//#C | |
modifier isReleased() { //#D | |
if(!released) { | |
revert(); | |
} |
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.18; | |
contract Ownable { | |
address public owner;//#A | |
constructor() public { | |
owner = msg.sender;//#B | |
} | |
modifier onlyOwner() { | |
require(msg.sender == owner);//#C |
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.24; | |
import "./ReleasableSimpleCoin.sol";//#A | |
import "./Ownable.sol";//#A | |
contract SimpleCrowdsale is Ownable { | |
uint256 public startTime; | |
uint256 public endTime; | |
uint256 public weiTokenPrice; | |
uint256 public weiInvestmentObjective; |
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 elm-reactor to run the server | |
module Helloworld exposing (..) | |
import Html exposing (..) | |
main = | |
text "Hello World" |
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
module Main exposing (..) | |
import Html exposing (..) | |
import Html.Events exposing (..) | |
import Debug exposing (..) | |
type alias Model = | |
{ fullName : String | |
, firstName : String |
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 openpyxl, pprint | |
from datetime import datetime | |
from dateutil import rrule | |
def diff_month(d1, d2): | |
return (d1.year - d2.year) * 12 + d1.month - d2.month | |
print ('Opening workbook ') | |
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
module Main exposing (..) | |
import Html exposing (..) | |
import Html.Events exposing (..) | |
import Http | |
type alias Model = | |
{ rate : String | |
} |
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
module Main exposing (..) | |
import Html exposing (..) | |
import Html.Events exposing (..) | |
type alias Model = | |
{ rate : String | |
} |
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
module Main exposing (..) | |
import Html exposing (..) | |
import Html.Events exposing (..) | |
import Debug exposing (..) | |
type alias Model = | |
{ fullName : String | |
, firstName : String |
NewerOlder