(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
class BoggleBoard | |
def initialize(board) # takes nested array and sets it to board attribute | |
@board = board | |
end | |
def create_word(*coords) # takes multiple arrays (representing individual coordinates), return string of the joined elements at the given coordinates | |
coords.map { |coord| @board[coord.first][coord.last]}.join("") # splat operator '*' let's the method take multiple paramaters as an array | |
end | |
def get_letter(row, col) # takes index of row, index of column; returns letter at coordinate |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#LLDB Basics
A basic overview of lldb for personal reference.
Official documentation can be found here here.
##Command Structure General syntax
<noun> <verb> [-options [option-value]] [argument [argument...]]
pragma solidity ^0.4.11; | |
contract UserManager { | |
address public owner; | |
uint public numUsers = 0; | |
mapping(address => address) private linkedUsers; | |
modifier onlyOwner { | |
require(msg.sender == owner); | |
_; |
pragma solidity ^0.4.11; | |
contract UserManager { | |
address public owner; | |
address[] public users; | |
mapping(address => uint) userIndexes; | |
modifier onlyOwner { | |
require(msg.sender == owner); | |
_; |
Verifying my Blockstack ID is secured with the address 15qE9yMvv9P6q3y1r3b6tTsr98idSWRQjX |
## Overview | |
The simplest structure of a token sale consists of a sale contract and token contract. | |
The sale contract is responsible for such logic including but not limited to: | |
- the duration of the sale (typically in blocks) | |
- the addresses allowed to participate in the sale | |
- the exchange rate of ether to tokens, often as a factor of time | |
- the ether reserve and hard cap amounts | |
The token contract is responsible for such logic including but not limited to: |
I hereby claim:
To claim this, I am signing this object:
pragma solidity 0.4.24; | |
import './SimpleRestrictedToken.sol'; | |
contract MyRestrictedToken is SimpleRestrictedToken { | |
string public name; | |
string public symbol; | |
uint public decimals; | |
uint public totalSupply; | |