Public Npm Packages
npm install <package-name>
From Git
npm install git+ssh://[email protected]:npm/cli.git#v1.0.27
npm install git+ssh://[email protected]:npm/cli#pull/273
npm install git+ssh://[email protected]:npm/cli#semver:^5.0
Public Npm Packages
npm install <package-name>
From Git
npm install git+ssh://[email protected]:npm/cli.git#v1.0.27
npm install git+ssh://[email protected]:npm/cli#pull/273
npm install git+ssh://[email protected]:npm/cli#semver:^5.0
contract EtherStore { | |
uint256 public withdrawalLimit = 1 ether; | |
mapping(address => uint256) public lastWithdrawTime; | |
mapping(address => uint256) public balances; | |
function depositFunds() external payable { | |
balances[msg.sender] += msg.value; | |
} |
contract TimeLock { | |
mapping(address => uint) public balances; | |
mapping(address => uint) public lockTime; | |
function deposit() external payable { | |
balances[msg.sender] += msg.value; | |
lockTime[msg.sender] = now + 1 weeks; | |
} |
contract EtherGame { | |
uint public payoutMileStone1 = 3 ether; | |
uint public mileStone1Reward = 2 ether; | |
uint public payoutMileStone2 = 5 ether; | |
uint public mileStone2Reward = 3 ether; | |
uint public finalMileStone = 10 ether; | |
uint public finalReward = 5 ether; | |
mapping(address => uint) redeemableEther; |
// library contract - calculates Fibonacci-like numbers | |
contract FibonacciLib { | |
// initializing the standard Fibonacci sequence | |
uint public start; | |
uint public calculatedFibNumber; | |
// modify the zeroth number in the sequence | |
function setStart(uint _start) public { | |
start = _start; | |
} |
contract Wallet is WalletEvents { | |
... | |
// METHODS | |
// gets called when no other function matches | |
function() payable { | |
// just being sent some cash? | |
if (msg.value > 0) |
func snippetViewHandler(app *application) http.HandlerFunc { | |
return func(w http.ResponseWriter, r *http.Request) { | |
id, err := strconv.Atoi(r.PathValue("id")) | |
if err != nil || id < 1 { | |
app.clientError(w, http.StatusNotFound) | |
return | |
} | |
s, err := app.snippets.Get(id) |
package main | |
import ( | |
"crypto/md5" | |
"fmt" | |
"sort" | |
"strconv" | |
) | |
// ConsistentHashing represents the structure for consistent hashing |
version: '3.8' | |
services: | |
mysql: | |
image: mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: localdocker | |
MYSQL_USER: user | |
MYSQL_PASSWORD: pass |