This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HtmlWebPackPlugin = require('html-webpack-plugin'); | |
const autoprefixer = require('autoprefixer'); | |
const path = require('path'); | |
module.exports = { | |
entry: __dirname + "/src/client/index.js", | |
devtool: "cheap-eval-source-map", | |
output: { | |
path: path.resolve(__dirname, 'dist'), | |
filename: 'client.bundle.js', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="shortcut icon" href="favicon.ico" /> | |
<link rel="apple-touch-icon-precomposed" href="apple-touch-icon.png" /> | |
<link rel="msapplication-TileColor" href="#0074ba" /> | |
<link rel="msapplication-TileImage" href="/mstile-144x144.png" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function kmpSearch(str, pattern) { | |
var arr = calculatePrefixTable(pattern); | |
var j = 0; | |
var i = 0; | |
var index = -1; | |
var len = pattern.length; | |
var strLength = str.length; | |
while(i < strLength) { | |
if(str.charAt(i) === pattern.charAt(j)) { | |
i++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deepCopy(source) { | |
return deepCopyHelper(source, {}); | |
} | |
function deepCopyHelper(source, target) { | |
for(let key in source) { | |
const value = source[key]; | |
if(typeof value !== "object") { | |
target[key] = value; | |
} else { |
OlderNewer