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
contract PolyExample { | |
struct Proposal { | |
address token; | |
uint amount; | |
address recipient; | |
uint numApprovedTiers; | |
bool exists; | |
} | |
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
mapping (uint -> uint) monsterIndexArr; | |
uint[] monsterList; | |
// NOTICE: in the uint mapping if nothing is set you get 0 | |
// and that would be the 0 index in the array, so never user 0 index | |
// that's why I pushed the first element in the array at the begining | |
monsterList.push(0); | |
functions add(monsterId) 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
contract BasicAccessControl { | |
address public owner; | |
// address[] public moderators; | |
mapping (address => bool) public moderators; | |
bool public isMaintaining = false; | |
function BasicAccessControl() public { | |
owner = msg.sender; | |
} |
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
#include <stdio.h> | |
int main() { | |
int MAX_ELEMENTS = 25; | |
int X[MAX_ELEMENTS], A[MAX_ELEMENTS], B[MAX_ELEMENTS]; | |
// trazimo od korinika da unese broj od 1 - 25 | |
printf("Unesite koliko elementa zelite da unesete (maksimalno 20): "); |
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
#include <stdio.h> | |
int main() { | |
// praksa je da se ovake konstante stavljaju u promenjivu, gde je kovencija da se ime promenjive pise velikim slovimaa | |
int MAX_ELEMENTS = 20; | |
// napravimo niz od 20 elementa, kaze u zadatku realni brojevi to su float | |
// mogu biti i double ako hoces vecu prezinost | |
float niz[MAX_ELEMENTS]; |
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
0x93cdB0a93Fc36f6a53ED21eCf6305Ab80D06becA |
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
0xf43142d41d92da6B9EbE2CbBd7E661eeee97edB0 |
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
class EventEmitter { | |
constructor() { | |
this.events = {}; | |
} | |
emit(eventName, ...args) { | |
const callback = this.events[eventName]; | |
if(callback) { |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Data.SQLite; | |
namespace SqlLiteTest | |
{ | |
class Program | |
{ |
NewerOlder