This file contains 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
package main | |
import ( | |
"bytes" | |
"encoding/binary" | |
"os" | |
"sync" | |
"fmt" | |
"math/rand" | |
"path/filepath" |
This file contains 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
package flashtext | |
type bytetrie struct { | |
key byte | |
next [256]*bytetrie | |
word string | |
} | |
func NewByteTrie(b byte) *bytetrie { | |
return &bytetrie{ |
This file contains 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 获取网络资源(网址) { | |
return new Promise((解决, 拒绝)=> { | |
var 请求 = new XMLHttpRequest(); | |
请求.open('GET', 网址, true); | |
请求.onload = 括弧=> { | |
if (请求.status === 200) { | |
解决(请求.responseText); | |
} else { | |
拒绝(new Error(请求.statusText)); | |
} |
This file contains 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 获取网络资源(网址) { | |
return new Promise((解决, 拒绝)=> { | |
var 请求 = new XMLHttpRequest(); | |
请求.open('GET', 网址, true); | |
请求.onload = 括弧=> { | |
if (请求.status === 200) { | |
解决(请求.responseText); | |
} else { | |
拒绝(new Error(请求.statusText)); | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"provenance": [], | |
"collapsed_sections": [], | |
"machine_shape": "hm", | |
"authorship_tag": "ABX9TyMK+iTIWvrDxWHWBIXKg3Xw", | |
"include_colab_link": true |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer