by Ossi Hanhinen, @ohanhi
with the support of Futurice 💚.
Licensed under CC BY 4.0.
@RunWith(Parameterized::class) | |
class KotlinTest(val paramOne: Int, val paramTwo: String) { | |
companion object { | |
@JvmStatic | |
@Parameterized.Parameters | |
fun data() : Collection<Array<Any>> { | |
return listOf( | |
arrayOf(1, "I"), // First test: (paramOne = 1, paramTwo = "I") | |
arrayOf(1999, "MCMXCIX") // Second test: (paramOne = 1999, paramTwo = "MCMXCIX") |
env: | |
browser: true | |
mocha: true | |
es6: true | |
plugins: | |
- react | |
ecmaFeatures: | |
modules: true |
(still incomplete, covers only the first 16 minutes)
Functional programming and programming with values have proven their usefulness when building all kinds of systems, but they've been hard to apply when building user interfaces.
Object-oriented programming and user interfaces came up at around the same time and went hand in hand ever since. First user interfaces were, e.g., written in Smalltalk (created in 1972 by Alan Kay). This led to the development of the Model-View-Controller paradigm.
<?php | |
$data = <<<'DATA' | |
$program = <<<PROGRAM | |
<?php | |
\$data = <<<'DATA'\n$data\nDATA; | |
$data | |
PROGRAM; | |
echo $program; | |
DATA; |
{ | |
"bitwise" : true, | |
"curly" : true, | |
"eqeqeq" : true, | |
"forin" : true, | |
"immed" : true, | |
"latedef" : true, | |
"newcap" : true, | |
"noarg" : true, | |
"noempty" : true, |
# watch files and rerun phpunit on changes | |
phpunitwait() { | |
while inotifywait $(find $1 -name '*.php'); | |
do | |
clear; | |
phpunit --colors $2; | |
done; | |
} |
<?php | |
$app->get('/robots.txt', function () { | |
return new Response( | |
( | |
(stripos($_SERVER['HTTP_HOST'], 'xiag') !== false) ? | |
"User-agent: *\nDisallow: /\n" : | |
"User-agent: *\n" | |
), |
{ | |
// ================================== // | |
// Yes, VERY srtrict. THIS IS SPARTA! // | |
// ================================== // | |
// == Enforcing Options =============================================== | |
// | |
// These options tell JSHint to be more strict towards your code. Use | |
// them if you want to allow only a safe subset of JavaScript, very | |
// useful when your codebase is shared with a big number of developers |
(function (undefined) { | |
"use strict"; | |
var _ = require("underscore"); | |
module.exports = function (nodeModule, dependencyNameToPathMap) { | |
return _.map(dependencyNameToPathMap, function (path, name) { | |
return ["var ", name, " = require(\"", path, "\");"].join(""); | |
}).concat( | |
_.isFunction(nodeModule) ? |