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!
| using System; | |
| using System.Text; | |
| using System.Text.RegularExpressions; | |
| using System.IO; | |
| namespace KlerksSoft | |
| { | |
| public static class TextFileEncodingDetector | |
| { | |
| /* |
| //... | |
| import { Router, NavigationEnd } from '@angular/router'; | |
| //... | |
| declare var ga : any; | |
| //.. | |
| constructor(private router : Router ) { | |
| router.events.filter(e => e instanceof NavigationEnd).subscribe( (n:NavigationEnd) => { |
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!
(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.
| /* image rotate javascript */ | |
| /* This script and many more are available free online at | |
| The JavaScript Source!! http://javascript.internet.com | |
| Created by: Benoit Asselin | http://www.ab-d.fr */ | |
| function rotate(p_deg) { | |
| if(document.getElementById('canvas')) { | |
| /* | |
| Ok!: Firefox 2, Safari 3, Opera 9.5b2 |
| var app = require('express').createServer() | |
| var io = require('socket.io').listen(app); | |
| var fs = require('fs'); | |
| app.listen(8008); | |
| // routing | |
| app.get('/', function (req, res) { | |
| res.sendfile(__dirname + '/chat.html'); | |
| }); |
| <script src="/socket.io/socket.io.js"></script> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> | |
| <script type="text/javascript"> | |
| var my_username = ''; | |
| function send_individual_msg(id) | |
| { | |
| //alert(id); | |
| //alert(my_username); | |
| socket.emit('check_user', my_username, id); | |
| //socket.emit('msg_user', id, my_username, prompt("Type your message:")); |
| const stream = require('stream') | |
| const cache = new Map() // you might wanna use an lru here | |
| function createCacheStream (url) { | |
| const buf = [] | |
| return stream.Transform({ | |
| transform: function (data, enc, cb) { | |
| buffer.push(data) | |
| cb(null, data) | |
| }, |
| package auth | |
| import ( | |
| "context" | |
| "net/http" | |
| "strings" | |
| "google.golang.org/grpc/metadata" | |
| "github.com/andela/micro-api-gateway/pb/authorization" |
| <div class="row"> | |
| <div class="col-md-3"> | |
| <h3>Select files</h3> | |
| <input type="file" #fileInput multiple (change)="addToQueue()" /> | |
| </div> | |
| <div class="col-md-9"> | |
| <h3>Upload queue</h3> | |
| <table class="table-headed table-striped"> |