This file contains hidden or 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 fb(i) { | |
i > 0 && ( | |
console.log( | |
(!(i%3) && 'Fizz' || '') + | |
(!(i%5) && 'Buzz' || '') || | |
i | |
), fb(i - 1) | |
); | |
} |
This file contains hidden or 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 | |
namespace exercise; | |
class Company { | |
use Xetter; | |
private $name; | |
private $employees = array(); | |
public function __construct() { |
This file contains hidden or 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
$originalPOST = $_POST; | |
$_POST = $data; | |
$this->set_rules($rules); | |
$result = $this->run(); | |
$_POST = $originalPOST; |
This file contains hidden or 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 app = { | |
uid: (function() { | |
var seed = 0; | |
return function() { | |
return seed++; | |
}; | |
})(), | |
create: function(model, opts) { | |
var instance = new app.model[model](opts); | |
This file contains hidden or 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 express = require("express"); | |
var request = require("request"); | |
var app = express.createServer(express.logger(), express.bodyParser()); | |
app.get("/batch", function(req, res) { | |
if(!req.param("data")) return; | |
var data = req.param("data"); | |
var callback = req.param("callback") || 'callback'; |
This file contains hidden or 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 Foo { | |
public function __construct() { | |
$this->bar = function() { | |
echo 'Hello World!'; | |
}; | |
} | |
} | |
This file contains hidden or 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 MyList { | |
private $list = array(); | |
public function __construct() { | |
$this->list = func_get_args(); | |
} | |
public function add($value) { |
This file contains hidden or 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 | |
// Constants may only evaluate to scalar values | |
define('MY_CONSTANT', function() {}); | |
class Foo { | |
// Parse error: syntax error, unexpected T_FUNCTION | |
const IS_GET = function() {}; | |
// Parse error: syntax error, unexpected T_FUNCTION | |
private $foo = function() {}; |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Animaciones en Canvas - Utilizando videos</title> | |
</head> | |
<body> | |
<video loop controls id="video"> | |
<source src="cat.webm" type='video/webm; codecs="vp8, vorbis"' /> | |
<source src="cat.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> |
This file contains hidden or 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 Color = hug() | |
Color('#set')('init', function($self, r, g, b) { | |
$self | |
('#set')('r', r) | |
('#set')('g', g) | |
('#set')('b', b) | |
}) | |
Color('#set')('+', function($self, another) { |