Stop! This text is only interesting for you if you...
- Like popping alerts in weird situations
- Miss CSS expressions as much as we do
- Have an unhealthy obsession for markup porn
import { Actions, ofType } from '@ngrx/effects'; | |
import { ActionCreator } from '@ngrx/store'; | |
import { TypedAction } from '@ngrx/store/src/models'; | |
import { Observable, of } from 'rxjs'; | |
import { catchError, map, switchMap } from 'rxjs/operators'; | |
/** | |
* It will automatically strip the actions `type` field away before forwarding it | |
* to the httpCall. This way no accidental type fields are sent anywhere. | |
* |
// The dispatcher has no dependencies. It is a simple event emitter | |
var dispatcher = { | |
listeners: [], | |
emit: function(name, meta) { | |
this.listeners.forEach(function(listener) { | |
listener({ | |
name: name, | |
payload: meta | |
}) | |
}) |
<?php | |
function sass_darken($hex, $percent) { | |
preg_match('/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i', $hex, $primary_colors); | |
str_replace('%', '', $percent); | |
$color = "#"; | |
for($i = 1; $i <= 3; $i++) { | |
$primary_colors[$i] = hexdec($primary_colors[$i]); | |
$primary_colors[$i] = round($primary_colors[$i] * (100-($percent*2))/100); | |
$color .= str_pad(dechex($primary_colors[$i]), 2, '0', STR_PAD_LEFT); | |
} |