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
.background-slider { | |
position: absolute; | |
top:0; | |
left:0; | |
z-index: -1; | |
height:100%; | |
width:100%; | |
background-size: cover; | |
background-position: center; | |
} |
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
.background-slider { | |
position: absolute; | |
top:0; | |
left:0; | |
z-index: -1; | |
height:100%; | |
width:100%; | |
background-size: cover; | |
background-position: center; | |
} |
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 shiftArray(n,k,a){ | |
var remainingAfterLeftShifts = (n - k) > 0 ? n - k : k - n; | |
var tailStartIndex = n - remainingAfterLeftShifts; | |
var tail = a.slice(tailStartIndex, n); | |
var head = a.slice(0, tailStartIndex); | |
var shifted = tail.concat(head); | |
return shifted.join().replace(/,/g," "); | |
} |
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 singletonize(\Closure $func) | |
{ | |
$singled = new class($func) | |
{ | |
// Hold the class instance. | |
private static $instance = null; | |
public function __construct($func = null) | |
{ | |
if (self::$instance === null) { |
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 ClassThatMarksDateOfInstantiation | |
{ | |
private $dob; | |
public function __construct() | |
{ | |
$this->dob = new \DateTimeImmutable; | |
} | |
public function getDob() | |
{ |
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 | |
namespace Assoa\Parser; | |
use PhpParser\Node; | |
use PhpParser\Node\Stmt\Class_; | |
use Assoa\Commands\BuilderCommand; | |
use PhpParser\NodeVisitorAbstract; | |
use Assoa\Parser\INodeVisitorFactory; | |
use PhpParser\Node\Stmt\ClassMethod; |
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 | |
namespace Assoa\Patterns\Proxy; | |
use Assoa\Parser\INodeVisitorFactory; | |
use Assoa\Parser\ProxyNodeVisitorFactory; | |
use Assoa\Patterns\IPattern; | |
use Assoa\Patterns\Pattern; | |
use InvalidArgumentException; | |
use PhpParser\NodeTraverser; | |
use PhpParser\Node\Expr\Assign; |
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 Yo{ | |
public $yo; | |
public function __construct(){ | |
echo $this->yo; | |
} | |
public function hein(string $what){ | |
$this->yo = $what; | |
} |
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 | |
require "./vendor/autoload.php"; | |
use Assoa\Yo\Yo; | |
use Assoa\Loader\Loader; | |
use PhpParser\NodeDumper; | |
use Assoa\PatternFactories\ProxyFactory; | |
Loader::setLoader(require ("./vendor/autoload.php")); |
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 | |
namespace Assoa\Yo; | |
class Yo_Proxy_02e38a51_a0bc_4c1a_b9ee_77a6fceea0da extends Yo | |
{ | |
function __construct() | |
{ | |
$args = func_get_args(); | |
$this->{'subjectInstance'} = new Yo(...$args); |
OlderNewer