(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {
| function createStore (reducers) { | |
| var state = reducers() | |
| const store = { | |
| dispatch: (action) => { | |
| state = reducers(state, action) | |
| }, | |
| getState: () => { | |
| return state | |
| } | |
| } |
(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {
| var uniqueArray = function(arrArg) { | |
| return arrArg.filter(function(elem, pos,arr) { | |
| return arr.indexOf(elem) == pos; | |
| }); | |
| }; | |
| var uniqEs6 = (arrArg) => { | |
| return arrArg.filter((elem, pos, arr) => { | |
| return arr.indexOf(elem) == pos; | |
| }); |
Website:
http://prediction.io
Install Guide:
http://docs.prediction.io/installation/install-predictionio-on-linux.html
| var http = require('http'); | |
| var path = require('path'); | |
| var fs = require('fs'); | |
| var AUDIOFILE = "./audio.ogg"; | |
| function serveWithRanges(request, response, content) { | |
| var range = request.headers.range; | |
| var total = content.length; | |
| var parts = range.replace(/bytes=/, "").split("-"); |