This file contains 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.9; | |
contract TopStudents { | |
mapping(address => uint256) public scores; | |
uint256 public activeMaxSize; | |
uint256 public activeLength; | |
mapping(address => address) _activeList; | |
address constant ACTIVE_GUARD = address(1); | |
This file contains 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.10; | |
contract GenerateArray { | |
function getZeroArrayLengthFive() public pure returns(uint256[5] memory) { | |
uint256[5] memory fArray; | |
return fArray; | |
} | |
function getZeroArray(uint256 size) public pure returns(uint256[] memory) { | |
uint256[] memory fArray = new uint256[](size); |
This file contains 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.10; | |
contract Token { | |
string public name; | |
string public symbol; | |
mapping(address => uint256) public balances; | |
constructor(string memory _name, string memory _symbol) public { | |
name = _name; | |
symbol = _symbol; |
This file contains 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.4.22 <0.6.0; | |
contract GetterSetter { | |
uint value; | |
constructor(uint _initValue) public { | |
value = _initValue; | |
} | |
function getValue() public view returns (uint) { |
This file contains 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.9; | |
contract School{ | |
mapping(address => uint256) public scores; | |
mapping(address => address) _nextStudents; | |
uint256 public listSize; | |
address constant GUARD = address(1); | |
constructor() public { |
This file contains 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
{ | |
"executable": "IyEvdXNyL2Jpbi9lbnYgcHl0aG9uMwoKaW1wb3J0IHN5cwoKZGVmIG1haW4oZGF0YSk6CiAgICByZXR1cm4gZGF0YQoKCmlmIF9fbmFtZV9fID09ICJfX21haW5fXyI6CiAgICB0cnk6CiAgICAgICAgcHJpbnQobWFpbigqc3lzLmFyZ3ZbMTpdKSkKICAgIGV4Y2VwdCBFeGNlcHRpb24gYXMgZToKICAgICAgICBwcmludChzdHIoZSksIGZpbGU9c3lzLnN0ZGVycikKICAgICAgICBzeXMuZXhpdCgxKQo=", | |
"calldata": "\"Hello lambda\"", | |
"timeout": 3000 | |
} |
This file contains 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
{ | |
"returncode": 0, | |
"stdout": "Hello lambda\n", | |
"stderr": "" | |
} |
This file contains 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
curl --location --request POST '<your_api_endpoint>' \ | |
--header 'Content-Type: application/json' \ | |
--data-raw '{ | |
"executable": "IyEvdXNyL2Jpbi9lbnYgcHl0aG9uMwoKaW1wb3J0IHN5cwoKZGVmIG1haW4oZGF0YSk6CiAgICByZXR1cm4gZGF0YQoKCmlmIF9fbmFtZV9fID09ICJfX21haW5fXyI6CiAgICB0cnk6CiAgICAgICAgcHJpbnQobWFpbigqc3lzLmFyZ3ZbMTpdKSkKICAgIGV4Y2VwdCBFeGNlcHRpb24gYXMgZToKICAgICAgICBwcmludChzdHIoZSksIGZpbGU9c3lzLnN0ZGVycikKICAgICAgICBzeXMuZXhpdCgxKQo=", | |
"calldata": "\"Hello lambda\"", | |
"timeout": 3000 | |
}' |
This file contains 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
sudo systemctl enable yoda | |
sudo systemctl start yoda |
This file contains 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
[Unit] | |
Description=Yoda Daemon | |
After=network-online.target | |
[Service] | |
User=ubuntu | |
ExecStart=/home/ubuntu/go/bin/yoda r | |
Restart=always | |
RestartSec=3 | |
LimitNOFILE=4096 |
OlderNewer