duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
| /** | |
| * src/api/http.js | |
| */ | |
| import axios from 'axios' | |
| import qs from 'qs' | |
| /** | |
| * | |
| * parse error response | |
| */ |
| # will not work in all cases, see https://gist.github.com/angelo-v/e0208a18d455e2e6ea3c40ad637aac53#gistcomment-3439904 | |
| function jwt-decode() { | |
| sed 's/\./\n/g' <<< $(cut -d. -f1,2 <<< $1) | base64 --decode | jq | |
| } | |
| JWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ | |
| jwt-decode $JWT |
| const f = (a: any[], b: any[]): any[] => | |
| [].concat(...a.map(a2 => b.map(b2 => [].concat(a2, b2)))); | |
| export const cartesianProduct = (a: any[], b: any[], ...c: any[]) => { | |
| if (!b || b.length === 0) { | |
| return a; | |
| } | |
| const [b2, ...c2] = c; | |
| const fab = f(a, b); | |
| return cartesianProduct(fab, b2, c2); |
| module Main where | |
| import Control.Bind ((=<<)) | |
| import Control.Monad.Aff (Aff(), runAff, later') | |
| import Control.Monad.Eff (Eff()) | |
| import Control.Monad.Eff.Exception (throwException) | |
| import Control.Monad.List.Trans as ListT | |
| import Control.Monad.Trampoline (Trampoline, runTrampoline) | |
| import Data.Array (slice, insertAt, head, singleton) | |
| import Data.Functor ((<$)) |
| var webpack = require('webpack'); | |
| var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
| var path = require('path'); | |
| var folders = { | |
| APP: path.resolve(__dirname, '../app'), | |
| BUILD: path.resolve(__dirname, '../build'), | |
| BOWER: path.resolve(__dirname, '../bower_components'), | |
| NPM: path.resolve(__dirname, '../node_modules') | |
| }; |