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
| import React, { Component } from "react"; | |
| import logo from "./logo.svg"; | |
| import "./App.css"; | |
| let count = 1; | |
| const fakeFetch = () => { | |
| return new Promise(resolve => { | |
| setTimeout(() => { | |
| count += 1; |
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
| var request = require('request') | |
| request({ | |
| // will be ignored | |
| method: 'POST', | |
| uri: 'http://portal.ccnu.edu.cn/loginAction.do', | |
| followRedirect: false, | |
| headers: { | |
| "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36" | |
| }, | |
| form: { |
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
| /** | |
| ** Levenshtein distance implemented in JavaScript | |
| ** by zindex | |
| **/ | |
| const Manipulation = { | |
| INSERTION: Symbol('INSERTION'), | |
| DELETION: Symbol('DELETION'), | |
| MATCH: Symbol('MATCH'), | |
| SUBSTITUTION: Symbol('SUBSTITUTION') |
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
| /** | |
| ** Longest common sequence implemented in JavaScript | |
| ** by zindex | |
| **/ | |
| const Manipulation = { | |
| INSERTION: Symbol('INSERTION'), | |
| DELETION: Symbol('DELETION'), | |
| MATCH: Symbol('MATCH') | |
| } |
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
| // utility | |
| function getElementsByClassNameIter(name) { | |
| let results = [] | |
| function testClassName(node) { | |
| if ((new RegExp(name).test(node.className))) | |
| { | |
| results.push(node) | |
| } |
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
| <html> | |
| <head> | |
| <title>image loader</title> | |
| </head> | |
| <style> | |
| body{ | |
| padding: 0; | |
| margin: 0; | |
| } | |
| img{ |