Skip to content

Instantly share code, notes, and snippets.

@cloneko
cloneko / README.md
Last active August 29, 2015 14:17 — forked from anonymous/README.md

Usage

$ php worker.php &
$ php worker.php &
$ php worker.php &
$ php worker.php &
$ php worker.php &

$ php client.php

@cloneko
cloneko / odd_even.py
Last active August 29, 2015 14:03 — forked from typosone/odd_even.py
#!/usr/bin/env python3
def isOdd(i):
return False if format(i,'b')[-1] == '0' else True
def isEven(i):
return not isOdd(i)
if __name__ == '__main__':
for x in range(100):
@cloneko
cloneko / odd_even.py
Last active August 29, 2015 14:03 — forked from typosone/odd_even.py
#!/usr/bin/env python3
def isOdd(i):
return False if (i >> 1 << 1) == i else True
def isEven(i):
return not isOdd(i)
if __name__ == '__main__':
for x in range(100):
@cloneko
cloneko / bmi.php
Last active December 28, 2015 05:38 — forked from KimiyukiYamauchi/bmi.php
<?php
function bmi ($height,$mass){
return $mass / pow($height/100,2);
}
function h($str) {
return htmlspecialchars($str, ENT_QUOTES, "UTF-8");
}
?>
<!DOCTYPE html>