Skip to content

Instantly share code, notes, and snippets.

<!-- Note: the ID's of your Company records may not be 1 and 2, so adjust accordingly -->
<!-- Odoo 15 -->
<data inherit_id="web.layout">
<xpath expr="//body" position="inside">
<t t-if="request.httprequest.cookies.get('cids') and request.httprequest.cookies.get('cids')[0] == '1'">
<style>.o_main_navbar {background-color: #57596F!important;border-bottom: 0px;}</style></t>
<t t-if="request.httprequest.cookies.get('cids') and request.httprequest.cookies.get('cids')[0] == '2'">
<style>.o_main_navbar {background-color: #6B3C3C!important;border-bottom: 0px;}</style></t>
var els = document.getElementsByClassName("post-template");
if (els.length > 0) {
var navs = document.getElementsByClassName("navbar");
if (navs.length > 0) {
var nav = navs[0];
if (nav.className.match(/\bnavbar-fixed-top\b/)) {
nav.classList.remove("navbar-fixed-top");
}
}
}
./tbnbcli keys add ~/.bnbcli/keys/keys.db
./tbnbcli api-server --chain-id "Binance-Chain-Nile" node tcp://data-seed-pre-0-s1.binance.org:80 --laddr tcp://127.0.0.1:8080 --trust-node
$ curl http://localhost:8080/version
Binance Chain Release: 0.6.0;
$ curl --request GET http://localhost:8080/api/v1/account/tbnb1ke87gxdtsk32kuaqxj6skhhmn79ma89cx2ep4g
couldn't query account. Error: ABCIQuery: Post http://localhost:26657: dial tcp [::1]:26657: connect: connection refused
@Rub3nC
Rub3nC / Array.sol
Created March 22, 2019 18:37
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.6+commit.b259423e.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.7.0;
contract myArray {
function getArraySum(uint[] memory _array) public pure returns (uint sum_) {
sum_ = 0;
for (uint i = 0; i < _array.length; i++) {
sum_ += _array[i];
}
@Rub3nC
Rub3nC / Array.sol
Created March 22, 2019 02:45
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.6+commit.b259423e.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.7.0;
contract myArray {
function getArraySum(uint[] memory _array) public pure returns (uint sum_) {
sum_ = 0;
for (uint i = 0; i < _array.length; i++) {
sum_ += _array[i];
}
@Rub3nC
Rub3nC / Array.sol
Created March 22, 2019 01:58
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.6+commit.b259423e.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.7.0;
contract myArray {
function getArraySum(uint[] memory _array) public pure returns (uint sum_) {
sum_ = 0;
for (uint i = 0; i < _array.length; i++) {
sum_ += _array[i];
}
@Rub3nC
Rub3nC / Array.sol
Created March 22, 2019 01:35
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.6+commit.b259423e.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.7.0;
contract myArray {
function getArraySum(uint[] memory _array) public pure returns (uint sum_) {
sum_ = 0;
for (uint i = 0; i < _array.length; i++) {
sum_ += _array[i];
}
@Rub3nC
Rub3nC / Array.sol
Created March 22, 2019 00:17
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.6+commit.b259423e.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.7.0;
contract myArray {
function getArraySum(uint[] memory _array) public pure returns (uint sum_) {
sum_ = 0;
for (uint i = 0; i < _array.length; i++) {
sum_ += _array[i];
}
@Rub3nC
Rub3nC / Array.sol
Created March 21, 2019 12:42
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.6+commit.b259423e.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.7.0;
contract myArray {
function getArraySum(uint[] memory _array) public pure returns (uint sum_) {
sum_ = 0;
for (uint i = 0; i < _array.length; i++) {
sum_ += _array[i];
}
@Rub3nC
Rub3nC / Ballot.sol
Created March 20, 2019 16:41
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.6+commit.b259423e.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.7.0;
/// @title Voting with delegation.
contract Ballot {
// This declares a new complex type which will
// be used for variables later.
// It will represent a single voter.
struct Voter {
uint weight; // weight is accumulated by delegation
bool voted; // if true, that person already voted