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
#!/bin/bash | |
EVENT_NAME="LOpSoc's \\emph{The Mikado}" | |
HANDLE=`mktemp crew.XXXXXX` | |
NUM_COLUMN_PAIRS=8 | |
NUM_COLUMNS=`echo "${NUM_COLUMN_PAIRS} * 2" | bc` | |
EXTRA_ROWS=10 | |
COLUMN_STYLE="|l|" |
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.8; | |
contract gasException { | |
A a; | |
event print (uint _value); | |
function () { | |
print(msg.gas); | |
while(msg.gas > 22115) { | |
continue; | |
} |
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.8; | |
contract raceCondition { | |
mapping (address => uint) balances; | |
event print (uint _value); | |
function sendCoin (address to, uint amount) { | |
if(balances[msg.sender] >= amount) { |
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.8; | |
contract MutexBug { | |
bool functionCalled = false; | |
event print(uint _data); | |
modifier onlyOnce { | |
if(functionCalled == true) { | |
throw; |
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.8; | |
contract Reentrant { | |
mapping (address => uint) balances; | |
function deposit() payable { | |
balances[msg.sender] += msg.value; | |
} | |
function withdraw(uint amount) { |
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.2; | |
contract A{ | |
bool lock=false; | |
B b; | |
function f () { | |
if(!lock) { | |
b.g(); | |
} else throw; | |
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.2; | |
contract EvaluationOrder { | |
uint flag; | |
uint[] flags; | |
function EvaluationOrder(){ | |
flag=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.4.2; | |
contract ModifierTest { | |
modifier preventFunction { | |
return; | |
_; | |
} | |
function test() preventFunction returns (uint) { | |
return 4; | |
} | |
} |
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
#!/usr/bin/python3 | |
# A simple ring buffer with delay | |
import sys | |
offset=3 | |
buffer = [0]*10 | |
def lines(): | |
"Returns a generator that gives lines form stdin" | |
while True: | |
line=sys.stdin.buffer.readline() |
NewerOlder