This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @font-face { | |
| font-family: KaTeX_AMS; | |
| src: url(/static/fonts/KaTeX_AMS-Regular.e78e28b.woff2) format("woff2"), url(/static/fonts/KaTeX_AMS-Regular.7f06b4e.woff) format("woff"), url(/static/fonts/KaTeX_AMS-Regular.aaf4eee.ttf) format("truetype"); | |
| font-weight: 400; | |
| font-style: normal | |
| } | |
| @font-face { | |
| font-family: KaTeX_Caligraphic; | |
| src: url(/static/fonts/KaTeX_Caligraphic-Bold.4ec58be.woff2) format("woff2"), url(/static/fonts/KaTeX_Caligraphic-Bold.1e802ca.woff) format("woff"), url(/static/fonts/KaTeX_Caligraphic-Bold.021dd4d.ttf) format("truetype"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "constant": false, | |
| "inputs": [ | |
| { | |
| "name": "newMessage", | |
| "type": "string" | |
| } | |
| ], | |
| "name": "setMessage", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require('fs'); | |
| const ganache = require('ganache-cli'); | |
| const Web3 = require('web3'); | |
| const solc = require('solc'); | |
| const web3 = new Web3(ganache.provider()); | |
| (async function() { | |
| const input = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.5.8; | |
| contract Inbox { | |
| string public message; | |
| constructor(string memory initialMessage) public { | |
| message = initialMessage; | |
| } | |
| function setMessage(string memory newMessage) public { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Error: Transaction has been reverted by the EVM: | |
| { | |
| "transactionHash": "0x87c2b0e842ff22aed985a5cfdb95f9ac09b090de1b2f02f74c0c376f0027a976", | |
| "transactionIndex": 0, | |
| "blockHash": "0xb2f5e0e0c0f3560b3c27e51765833d547b149069e79bf4610659c2408a638d8c", | |
| "blockNumber": 1, | |
| "from": "0xee701ca561a711b218589aac4827e04c7e5a3c0f", | |
| "to": null, | |
| "gasUsed": 299853, | |
| "cumulativeGasUsed": 299853, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var array = [[['a','b','c'],[1,2,3]],[],[['d','e','f','g','h'],[4,5,6,7]]] | |
| function flat(data) { | |
| return data.reduce((r, e) => r.concat(Array.isArray(e) ? flat(e) : e), []) | |
| } | |
| console.log(flat(array)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| window.x = 1; // will controll external variable | |
| (function() { | |
| var a = window.x / 2; // lexical scope, evaluate within external variable | |
| var b = window.x * 2; | |
| window.AAA = function A() { | |
| console.log(a + b); // use lexical variables | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var o = {x: 1} | |
| Object.defineProperty(o, "length", { get: function () { return Object.keys(this).length; } }); | |
| o.length |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mkdir -p p/{1,2,3,4} | |
| touch p/{1,2,3,4}/{package.json,README.md} | |
| rm p/*/package.json |
NewerOlder