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
function data(array $allowed = []) | |
{ | |
$source = file_get_contents('http://www.koeri.boun.edu.tr/scripts/lst0.asp'); | |
$source = iconv('ISO-8859-9', 'UTF-8', $source); | |
preg_match('/<pre>(.*?)<\/pre>/s', $source, $match); | |
$lines = explode(PHP_EOL, $match[0]); | |
$lines = array_map(function($line) use ($allowed) { |
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 SafeMath { | |
function safeAdd(uint a, uint b) public pure returns (uint c) { | |
c = a + b; | |
require(c >= a); | |
} | |
function safeSub(uint a, uint b) public pure returns (uint c) { | |
require(b <= a); | |
c = a - b; | |
} | |
function safeMul(uint a, uint b) public pure returns (uint c) { |