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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
/** | |
* @title Storage | |
* @dev Store & retrieve value in a variable | |
*/ | |
contract Storage { |
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.7.0 <0.8.0; | |
contract Rahul { | |
struct PoliceStation{ | |
uint id; | |
} | |
struct Police{ | |
address addr; | |
uint station; |
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
--[[ | |
A simple Lua Parser + Interpreter using | |
LPegLabel(https://github.com/sqmedeiros/lpeglabel) | |
with an error recovery mechanism for the following | |
grammer. | |
Program -> (Cmd | Exp)* | |
Cmd -> var = Exp | |
Exp -> Exp + Term | Exp - Term | Term | |
Term -> Term * Factor | Term / Factor | Factor |
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; | |
// Solidity Version 0.4.22 <0.6.0 | |
// 0xbc848c44a72D878aA935CccFe3e307c4e2DB0146 head | |
// 0x3184b6541c82fAa56B9d2360E2953d89f1Db8d82 Chairperson | |
// Election contract | |
contract Elections{ | |
/////////////////////////////////////////////////////////////////////////////////////// |
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; | |
// Solidity Version 0.4.22 <0.6.0 | |
// 0xbc848c44a72D878aA935CccFe3e307c4e2DB0146 head | |
// 0x3184b6541c82fAa56B9d2360E2953d89f1Db8d82 Chairperson | |
// Election contract | |
contract Elections{ | |
/////////////////////////////////////////////////////////////////////////////////////// |
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
""" | |
Techinical Intern Basic Test - Imgtranslate.com | |
There are 3 zip files hosted at http://staging.imgtranslate.com:9999/ with names a.zip b.zip and c.zip. | |
They each contain text files with sentences on new lines. | |
You are required to write a program that: | |
1. Downloads them | |
2. Unzips them |
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; | |
// Solidity Version 0.4.22 <0.6.0 | |
// 0xbc848c44a72D878aA935CccFe3e307c4e2DB0146 head | |
// 0x3184b6541c82fAa56B9d2360E2953d89f1Db8d82 Chairperson | |
// Election contract | |
contract Elections{ | |
/////////////////////////////////////////////////////////////////////////////////////// |
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; | |
// Solidity Version 0.4.22 <0.6.0 | |
// 0xbc848c44a72D878aA935CccFe3e307c4e2DB0146 head | |
// 0x3184b6541c82fAa56B9d2360E2953d89f1Db8d82 Chairperson | |
// Election contract | |
contract Elections{ | |
/////////////////////////////////////////////////////////////////////////////////////// |
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; | |
// Solidity Version 0.4.22 <0.6.0 | |
// 0xbc848c44a72D878aA935CccFe3e307c4e2DB0146 head | |
// 0x3184b6541c82fAa56B9d2360E2953d89f1Db8d82 Chairperson | |
// Election contract | |
contract Elections{ | |
/////////////////////////////////////////////////////////////////////////////////////// |
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; | |
// Solidity Version 0.4.22 <0.6.0 | |
// Election contract | |
contract Elections{ | |
// Events | |
event AddedParty(uint id); | |
event PartyVotes(uint votes); | |