Skip to content

Instantly share code, notes, and snippets.

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);
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();
}
pragma solidity ^0.4.18;
contract Ownable {
address public owner;//#A
constructor() public {
owner = msg.sender;//#B
}
modifier onlyOwner() {
require(msg.sender == owner);//#C
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;
@ksunair
ksunair / helloworld.elm
Created November 25, 2017 02:47
Hello World Elm Style
-- use elm-reactor to run the server
module Helloworld exposing (..)
import Html exposing (..)
main =
text "Hello World"
module Main exposing (..)
import Html exposing (..)
import Html.Events exposing (..)
import Debug exposing (..)
type alias Model =
{ fullName : String
, firstName : String
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 ')
module Main exposing (..)
import Html exposing (..)
import Html.Events exposing (..)
import Http
type alias Model =
{ rate : String
}
module Main exposing (..)
import Html exposing (..)
import Html.Events exposing (..)
type alias Model =
{ rate : String
}
module Main exposing (..)
import Html exposing (..)
import Html.Events exposing (..)
import Debug exposing (..)
type alias Model =
{ fullName : String
, firstName : String