/
404.html
161 lines (142 loc) · 13.1 KB
/
404.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html><html lang="en" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Page not found | george16886's blog</title><meta name="keywords" content="Leetcode,Solution,leetcode-practice,leetcode-cpp,Notes,cpp,cplusplus,Markdown,Cheatsheet,筆記,哩叩,哩哩叩叩,教學,解答,解題過程,生活隨想,思路,想法,技術隨筆,心情隨筆,人生感言,政治隨筆,生活隨筆,隨筆,學習筆記,台灣,範例,examples,Taiwan,Visual-Studio-Code,Ubuntu,ubuntu1604,leetcode-solution,solutions,george16886,Cheat-sheet,nothing-but-everything,leetcode-C++,C++"><meta name="author" content="george16886,george16886@gmail.com"><meta name="copyright" content="george16886"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><meta name="description" content="nothing but everything"><meta property="og:type" content="website"><meta property="og:title" content="george16886's blog"><meta property="og:url" content="https://george16886.github.io/404.html"><meta property="og:site_name" content="george16886's blog"><meta property="og:description" content="nothing but everything"><meta property="og:locale" content="en_US"><meta property="og:image" content="https://i.imgur.com/tV625Tob.jpg"><meta property="article:author" content="george16886"><meta property="article:tag" content="Leetcode,Solution,leetcode-practice,leetcode-cpp,Notes,cpp,cplusplus,Markdown,Cheatsheet,筆記,哩叩,哩哩叩叩,教學,解答,解題過程,生活隨想,思路,想法,技術隨筆,心情隨筆,人生感言,政治隨筆,生活隨筆,隨筆,學習筆記,台灣,範例,examples,Taiwan,Visual-Studio-Code,Ubuntu,ubuntu1604,leetcode-solution,solutions,george16886,Cheat-sheet,nothing-but-everything,leetcode-C++,C++"><meta name="twitter:card" content="summary"><meta name="twitter:image" content="https://i.imgur.com/tV625Tob.jpg"><meta property="fb:app_id" content="fb-root"><link rel="shortcut icon" href="/favicon.ico"><link rel="canonical" href="https://george16886.github.io/404"><link rel="preconnect" href="//cdn.jsdelivr.net"><link rel="preconnect" href="//www.google-analytics.com" crossorigin="crossorigin"><link rel="preconnect" href="//fonts.googleapis.com" crossorigin="crossorigin"><link rel="preconnect" href="//busuanzi.ibruce.info"><link rel="manifest" href="/manifest.json"><link rel="apple-touch-icon" sizes="180x180" href="/uploads/images/icons/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/uploads/images/icons/icon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/uploads/images/icons/icon-16x16.png"><link rel="mask-icon" href="/uploads/images/icons/safari-pinned-tab.svg" color="#5bbad5"><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.10.5/dist/instantsearch.min.css"><script src="https://cdn.jsdelivr.net/npm/instantsearch.js@2.10.5/dist/instantsearch.min.js" defer></script><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><script>(adsbygoogle=window.adsbygoogle||[]).push({google_ad_client:"ca-pub-1734139800191103",enable_page_level_ads:"false"})</script><script async src="https://www.googletagmanager.com/gtag/js?id=UA-100797243-6"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","UA-100797243-6")</script><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Josefin+Sans"><script>var GLOBAL_CONFIG = {
root: '/',
hexoversion: '5.1.1',
algolia: {"appId":"Y7QQSP8NGZ","apiKey":"c9720bca2cc337ec36ccca5011e61471","indexName":"george16886","hits":{"per_page":6},"languages":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}.","hits_stats":"${hits} results found in ${time} ms"}},
localSearch: undefined,
translate: {"defaultEncoding":1,"translateDelay":0,"msgToTraditionalChinese":"簡","msgToSimplifiedChinese":"繁"},
noticeOutdate: {"limitDay":30,"position":"top","message_title":"Article validity tips","message_prev":"This article was created","message_mid":"days ago and","message_next":"days since the last update, some information might be outdated."},
highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true},
copy: {
success: 'Copy successfully',
error: 'Copy error',
noSupport: 'The browser does not support'
},
relativeDate: {
homepage: false,
post: false
},
runtime: 'days',
date_suffix: {
just: 'Just',
min: 'minutes ago',
hour: 'hours ago',
day: 'days ago',
month: 'months ago'
},
copyright: {"limitCount":50,"languages":{"author":"Author: george16886","link":"Link: ","source":"Source: george16886's blog","info":"Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source."}},
ClickShowText: undefined,
lightbox: 'mediumZoom',
Snackbar: {"chs_to_cht":"Traditional Chinese Activated Manually","cht_to_chs":"Simplified Chinese Activated Manually","day_to_night":"Dark Mode Activated Manually","night_to_day":"Light Mode Activated Manually","config_set":"Page Configurations Set","config_unset":"Page Configuration Mode","bgLight":"#49b1f5","bgDark":"#2d3035","position":"bottom-left"},
justifiedGallery: {
js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
},
isPhotoFigcaption: false,
islazyload: false,
isanchor: false
};
var saveToLocal = {
set: function setWithExpiry(key, value, ttl) {
const now = new Date()
const expiryDay = ttl * 86400000
const item = {
value: value,
expiry: now.getTime() + expiryDay,
}
localStorage.setItem(key, JSON.stringify(item))
},
get: function getWithExpiry(key) {
const itemStr = localStorage.getItem(key)
if (!itemStr) {
return undefined
}
const item = JSON.parse(itemStr)
const now = new Date()
if (now.getTime() > item.expiry) {
localStorage.removeItem(key)
return undefined
}
return item.value
}
}</script><script id="config_change">var GLOBAL_CONFIG_SITE={isPost:!1,isHome:!1,isHighlightShrink:!1,isSidebar:!1,postUpdate:"2021-02-08 17:01:46",postCreate:"2021-02-08 17:01:46"}</script><noscript><style type="text/css">#nav{opacity:1}.justified-gallery img{opacity:1}#post-meta time,#recent-posts time{display:inline!important}</style></noscript><script>var activateDarkMode=function(){document.documentElement.setAttribute("data-theme","dark"),null!==document.querySelector('meta[name="theme-color"]')&&document.querySelector('meta[name="theme-color"]').setAttribute("content","#0d0d0d")},activateLightMode=function(){document.documentElement.setAttribute("data-theme","light"),null!==document.querySelector('meta[name="theme-color"]')&&document.querySelector('meta[name="theme-color"]').setAttribute("content","#ffffff")},autoChangeMode="1",t=saveToLocal.get("theme");if("1"===autoChangeMode){var isDarkMode=window.matchMedia("(prefers-color-scheme: dark)").matches,isLightMode=window.matchMedia("(prefers-color-scheme: light)").matches,isNotSpecified=window.matchMedia("(prefers-color-scheme: no-preference)").matches,hasNoSupport=!isDarkMode&&!isLightMode&&!isNotSpecified;if(void 0===t){if(isLightMode)activateLightMode();else if(isDarkMode)activateDarkMode();else if(isNotSpecified||hasNoSupport){var now=new Date,hour=now.getHours(),isNight=hour<=6||18<=hour;isNight?activateDarkMode():activateLightMode()}window.matchMedia("(prefers-color-scheme: dark)").addListener(function(e){void 0===saveToLocal.get("theme")&&(e.matches?activateDarkMode():activateLightMode())})}else"light"===t?activateLightMode():activateDarkMode()}else"2"===autoChangeMode?(isNight=(hour=(now=new Date).getHours())<=6||18<=hour,void 0===t?isNight?activateDarkMode():activateLightMode():"light"===t?activateLightMode():activateDarkMode()):"dark"===t?activateDarkMode():"light"===t&&activateLightMode()</script><link rel="stylesheet" href="/css/george16886.min.css"><meta name="generator" content="Hexo 5.1.1"></head><body><div id="web_bg" data-type="color"></div><div id="error-wrap"><div class="error-content"><div class="error-img" style="background-image:url(https://i.imgur.com/UCDv6uM.gif)"></div><div class="error-info"><h1 class="error_title">404</h1><div class="error_subtitle">Page Not Found</div><a class="button--animated" href="/"><i class="fas fa-rocket"></i>Go back home</a></div></div></div><div class="search-dialog" id="algolia-search"><div class="search-dialog__title" id="algolia-search-title">Algolia</div><div id="algolia-input-panel"><div id="algolia-search-input"></div></div><hr><div id="algolia-search-results"><div id="algolia-hits"></div><div id="algolia-pagination"></div><div id="algolia-stats"></div></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div><div><script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://cdn.jsdelivr.net/npm/medium-zoom/dist/medium-zoom.min.js"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script src="/js/search/algolia.js"></script><div class="js-pjax"><script>document.getElementsByClassName("mermaid").length&&(window.mermaidJsLoad?mermaid.init():$.getScript("https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js",function(){window.mermaidJsLoad=!0,mermaid.initialize({theme:"dark"})}))</script><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><script src="https://cdn.jsdelivr.net/npm/blueimp-md5@2.17.0/js/md5.min.js"></script><script>window.addEventListener('load', () => {
const changeContent = (content) => {
if (content === '') return content
content = content.replace(/<[^>]+>/g,"") // remove html tag
content = content.replace(/(http(s?):)([/|.|\w|\s|-])*\.(?:jpg|jpeg|gif|png|webp)/g, '') // remove image link
content = content.replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi, '') // remove url
if (content.length > 150) {
content = content.substring(0,150) + '...'
}
return content
}
const getIcon = (icon, mail) => {
if (icon) return icon
let defaultIcon = ''
let iconUrl = `https://gravatar.loli.net/avatar/${md5(mail.toLowerCase()) + defaultIcon}`
return iconUrl
}
const generateHtml = array => {
let result = ''
for (let i = 0; i < array.length; i++) {
result += '<div class=\'aside-list-item\'>'
if (false) {
result += `<a href='${array[i].url}' class="thumbnail"><img src='${getIcon(array[i].avatar, array[i].mail)}' alt='${array[i].nick}'></a>`
}
result += `<div class='content'>
<a class='comment' href='${array[i].url}'>${array[i].content}</a>
<div class='name'><span>${array[i].nick}</span><time> / ${btf.diffDate(array[i].date, true)}</time></div>
</div></div>`
}
let $dom = document.querySelector('#card-newest-comments .aside-list')
$dom.innerHTML= result
window.pjax && window.pjax.refresh($dom)
}
const getValineData = () => {
let serverURL = ''
if (false) {
serverURL = ''
} else {
serverURL = 'https://g0LQ386P.api.lncldglobal.com'
}
var settings = {
"url": `${serverURL}/1.1/classes/Comment?limit=3&order=-createdAt`,
"method": "GET",
"timeout": 0,
"headers": {
"X-LC-Id": 'g0LQ386PSE684M2izSs3C7Yt-MdYXbMMI',
"X-LC-Key": 'MfXWslyjNtanXuIcFjxoqtNC',
"Content-Type": "application/json"
},
}
$.ajax(settings).done((response) => {
var valineArray = []
response.results.forEach((e)=>{
valineArray.push({
'avatar': e.QQAvatar,
'content': changeContent(e.comment),
'mail': e.mail,
'nick': e.nick,
'url': e.url,
'date': e.createdAt,
})
})
saveToLocal.set('leancloud-newest-comments', JSON.stringify(valineArray), 10/(60*24))
generateHtml(valineArray)
}).fail(()=>{
const $dom = document.querySelector('#card-newest-comments .aside-list')
$dom.innerHTML= "Unable to get the data, please make sure the settings are correct."
})
}
const newestCommentInit = () => {
if (document.querySelector('#card-newest-comments .aside-list')) {
const data = saveToLocal.get('leancloud-newest-comments')
if (data) {
generateHtml(JSON.parse(data))
} else {
getValineData()
}
}
}
newestCommentInit()
document.addEventListener('pjax:complete', newestCommentInit)
})</script></div></body></html>