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 | |
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 | |
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 | |
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 | |
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 | |
namespace Assoa\Patterns\Singleton; | |
use Assoa\Patterns\IPattern; | |
use Assoa\Patterns\Proxy\Proxy; | |
use PhpParser\Node\Arg; | |
use PhpParser\Node\Expr\Assign; | |
use PhpParser\Node\Expr\BinaryOp\Identical; | |
use PhpParser\Node\Expr\ConstFetch; | |
use PhpParser\Node\Expr\New_; |
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 | |
namespace Assoa\Yo; | |
class Yo_Singleton_95e46b35_8481_466e_b493_f7443d7bf7ee extends Yo | |
{ | |
private static $subjectInstance; | |
function __construct() | |
{ | |
$args = func_get_args(); |
OlderNewer