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
find ./ \( -name "*.php" \) -print0 | xargs -0 -n 1 php -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
<p>After last year's F1 2014 arrived a bit late to the party, it feels like barely any time at all <a title="F1 2015 System Requirements" href="http://www.game-debate.com/games/index.php?g_id=20564&game=F1%202015" target="_self">F1 2015</a> has shown off. Codemaster's simulation racer is back for another crack at the world's second fastest sports (Badminton bizarrely takes the top spot), this time taking a generational leap with a swish looking new version of the Ego game engine. </p><p>As we all know, ideal barometer of visual loveliness is how good the rain and puddles look, something we actively despise in real life, and F1 2015 comes up trumps with its authentic weather effects. I've never had the pleasure of driving a Formula 1 car but these in-game screens certainly seem like the real deal. Which is just as well, because Codemasters is claiming F1 2015 is going to be the most authentic game in the series yet. <br><img expandable="true" src="../blog/images/_id1433499726_343178_6.jpg" width="575" height=" |
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
<?php | |
function partial_function() { | |
$applied_args = func_get_args(); | |
return function() use($applied_args) { | |
return call_user_func_array('call_user_func', array_merge($applied_args, func_get_args())); | |
}; | |
} | |
function foo($a, $b, $c) { | |
echo "a: {$a} b: {$b} c: {$c}\n"; |
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
<?php | |
class Placeholder{} | |
function curry(callable $func, ... $curriedArgs) { | |
return function(...$fulfillment) use ($func, $curriedArgs) { | |
return $func(...array_merge(array_map(function($arg) use ($fulfillment) { | |
if ($arg instanceof Placeholder) | |
return array_shift($fulfillment); | |
return $arg; | |
}, $curriedArgs), $fulfillment)); | |
}; |
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 Placeholder{} | |
function curry(callable $fn,...$start) { | |
return function (...$args) use ($fn, $start){ | |
$apply = array_merge($start,$args); | |
$apply = array_map(function($v) use(&$args){ | |
if ($v instanceof Placeholder) | |
return array_shift($args); | |
return $v; | |
},$apply); |
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($){ | |
$(document).ready(function(){ | |
$('.player').click(function(e){ | |
var posX = $(this).offset().left, | |
posY = $(this).offset().top, | |
x = e.pageX - posX | |
y = e.pageY - posY | |
percentX = x / $(this).width() * 100, | |
percentY = y / $(this).height() * 100; | |
$.post('http://82.38.95.234:8080/',{x:percentX,y:percentY},function(){ |
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
<?php | |
function transpose($matrix) { | |
return (new _)->map(function ($v, $k, $z, $matrix) { | |
return array_column($matrix, $k); | |
}, $matrix[0], $matrix); | |
} |
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
<?php | |
function transposeC($matrix) { | |
return array_map( | |
(new _)->curry(function ($v, $k, $matrix) { | |
return array_column($matrix, $k); | |
}, (new _), (new _), $matrix), | |
$matrix[0], array_keys($matrix[0])); | |
} |
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
var _ = (function(){ | |
function _(){} | |
_.prototype.compose = function(){ | |
var args = Array.prototype.slice.call(arguments); | |
return args.reduce(function(f,g){ | |
return function(){ | |
return f(g.apply(this,arguments)); | |
}; | |
}); | |
}; |
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
Accessibility | |
Hello, I'm Adrian, a web developer helping on the Kitnic project. | |
We have been working hard to ensure the platform is a responsible web citizen: | |
Responsive design for mobile clients | |
Ensuring the platform caters to smart phones and tablets | |
Accessible content even with JavaScript disabled | |
This is useful for services like the Internet Archive, Google Translate and more |