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
public function createQuery() { | |
$query = parent::createQuery(); | |
$constraintQuery = new ConstraintedQuery($query); | |
$constraintQuery->setDefaultConstraint( | |
$query->whatever() | |
) | |
return $constraintQuery; | |
} |
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
Some thoughts about what you could cover in a video about eventstore. | |
If you have explained some things already, I'm sorry - even though I watched | |
all your videos, I might oversaw some details or forgot :D | |
- Stream Names | |
-> convention that you have aggregate type - identifier | |
-> what about renaming? | |
- Projections | |
-> you held a talk about that, but some short examples would be nice |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
modal: undefined, | |
show: false, | |
setupModal: function() { | |
var modal = this.$('.modal').modal({ | |
show: this.get('show'), |
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 Hypu; | |
class HypeConverter extends AbstractTypeConverter { | |
protected $sourceTypes = ['pre_13:37_Hype']; | |
protected $targetType = 'post_13:37_Hype'; | |
} |
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 Akii\RememberMe\Security\Authentication\Aspect; | |
use Akii\RememberMe\Security\Authentication\Token\RememberMeToken; | |
use TYPO3\Flow\Annotations as Flow; | |
use TYPO3\Flow\Aop\JoinPointInterface; | |
use TYPO3\Flow\Configuration\ConfigurationManager; | |
use TYPO3\Flow\Http\Cookie; | |
use TYPO3\Flow\Http\Request; | |
use TYPO3\Flow\Http\Response; |
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
def isSorted[A](as: Array[A], ordered: (A,A) => Boolean): Boolean = { | |
if (as.length <= 1) true | |
else { | |
@annotation.tailrec | |
def checkSort(n: Int): Boolean = { | |
if (n >= as.length) true | |
else if (!ordered(as(n - 1), as(n))) false | |
else checkSort(n+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
def dropWhile[A](l: List[A], f: A => Boolean): List[A] = { | |
if (f(l.head)) l | |
else dropWhile(tail(l), f) | |
} |
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
def tail[A](l: List[A]): List[A] = l match { | |
case Nil => Nil | |
case Cons(_, t) => t | |
} |
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
case class ValueObject(property: SomeType) | |
class ValueObject { | |
/** @var SomeType */ | |
protected $property; | |
/** @param SomeType $property | |
public function __construct(SomeType $property) { | |
$this->property = $property; | |
} |