(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/* | |
Copyright (c) 2011 Andrei Mackenzie | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
function dataURItoBlob(dataURI, callback) { | |
// convert base64 to raw binary data held in a string | |
// doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this | |
var byteString = atob(dataURI.split(',')[1]); | |
// separate out the mime component | |
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0] | |
// write the bytes of the string to an ArrayBuffer | |
var ab = new ArrayBuffer(byteString.length); |
public enum Cacheability | |
{ | |
NoCache, | |
Private, | |
Public, | |
} |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.
In that post I talked about 3 main reasons for moving from require.js to webpack:
Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
/* | |
SEO Service for Updating Title, Meta Tags, Etc. | |
*/ | |
import { Injectable } from '@angular/core'; | |
import { Title } from '@angular/platform-browser'; | |
import { getDOM } from '@angular/platform-browser/src/dom/dom_adapter'; | |
@Injectable() |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Logging; | |
using WebApp2.Middlewares; |
(function() { | |
function hideEvertyhingAround($el) { | |
const $parent = $el.parentElement; | |
$parent.style.transition = 'background-color 150ms ease-in'; | |
$parent.style.backgroundColor = 'white'; | |
$parent.childNodes.forEach($child => { | |
if($child !== $el && $child.style) { |
First, we need to define interfaces with which we will work:
export interface Interceptable<T extends Interceptor<any, any>> {
addInterceptor(interceptor: T): Interceptable<T>;
removeInterceptor(interceptor: T): Interceptable<T>;
clearInterceptors(interceptors?: T[]): Interceptable<T>;
}
export interface Interceptor<T, D> {