(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.
(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.
echo 'Formatting the code base...' | |
godep go fmt $(go list ./... | grep -v /vendor/) | |
echo 'Optimizing the imports...' | |
goimports -w $(go list -f {{.Dir}} ./... | grep -v /vendor/) | |
echo 'Installing dependencies. This might take some time...' | |
godep go install $(go list ./... | grep -v /vendor/) | |
echo "Executing test" |
try { | |
// Set the number of desired winners | |
const NumOfWinners = 10; | |
// Set value to true if you want to allow duplicated users | |
const rules = [{ | |
"key": "allowDuplicatedUsers", | |
"value": false, | |
"message": "Multiple comments per user are not allowed" | |
}]; |
pragma solidity ^0.5.0; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/IERC20.sol"; | |
contract Dice { | |
IERC20 public nativeGameToken; | |
mapping(address => UserBet) private userBets; | |
struct UserBet { |
pragma solidity ^0.5.0; | |
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/IERC20.sol"; | |
contract Dice { | |
IERC20 public nativeGameToken; | |
mapping(address => UserBet) private userBets; | |
struct UserBet { |
// This is a custom fetch function that uses axios to make requests and retries on errors or 502 status codes | |
// Run this file by executing `npx tsx axiosFetchWithRetries.ts` | |
import { Connection } from "@solana/web3.js"; | |
import axios from "axios"; | |
const RETRY_ATTEMPTS = 3; | |
const agent = new https.Agent({ | |
maxSockets: 100, |