-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
311 lines (284 loc) · 29.1 KB
/
index.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<!DOCTYPE html><html lang="en" data-theme="dark"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>Joseph's Blog - Hello World! This is Joseph Weng.</title><meta name="author" content="Joseph Weng"><meta name="copyright" content="Joseph Weng"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#121212"><meta property="og:type" content="website">
<meta property="og:title" content="Joseph's Blog">
<meta property="og:url" content="https://josephweng.com/index.html">
<meta property="og:site_name" content="Joseph's Blog">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://picbed.josephweng.com/img/joseph.jpg">
<meta property="article:author" content="Joseph Weng">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://picbed.josephweng.com/img/joseph.jpg"><link rel="shortcut icon" href="https://picbed.josephweng.com/img/Jlogo2.jpg"><link rel="canonical" href="https://josephweng.com/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//fonts.googleapis.com" crossorigin=""/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css?v=4.13.0"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.1/css/all.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0.33/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Titillium+Web&display=swap" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
root: '/',
algolia: undefined,
localSearch: undefined,
translate: undefined,
noticeOutdate: undefined,
highlight: {"plugin":"highlight.js","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
copy: {
success: 'Copy Successful',
error: 'Copy Error',
noSupport: 'Browser Not Supported'
},
relativeDate: {
homepage: false,
post: false
},
runtime: '',
dateSuffix: {
just: 'Just now',
min: 'minutes ago',
hour: 'hours ago',
day: 'days ago',
month: 'months ago'
},
copyright: undefined,
lightbox: 'fancybox',
Snackbar: undefined,
infinitegrid: {
js: 'https://cdn.jsdelivr.net/npm/@egjs/infinitegrid@4.11.1/dist/infinitegrid.min.js',
buttonText: 'Load More'
},
isPhotoFigcaption: false,
islazyload: false,
isAnchor: false,
percent: {
toc: true,
rightside: false,
},
autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
title: 'Joseph\'s Blog',
isPost: false,
isHome: true,
isHighlightShrink: false,
isToc: false,
postUpdate: '2024-03-26 00:50:44'
}</script><script>(win=>{
win.saveToLocal = {
set: (key, value, ttl) => {
if (ttl === 0) return
const now = Date.now()
const expiry = now + ttl * 86400000
const item = {
value,
expiry
}
localStorage.setItem(key, JSON.stringify(item))
},
get: key => {
const itemStr = localStorage.getItem(key)
if (!itemStr) {
return undefined
}
const item = JSON.parse(itemStr)
const now = Date.now()
if (now > item.expiry) {
localStorage.removeItem(key)
return undefined
}
return item.value
}
}
win.getScript = (url, attr = {}) => new Promise((resolve, reject) => {
const script = document.createElement('script')
script.src = url
script.async = true
script.onerror = reject
script.onload = script.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
script.onload = script.onreadystatechange = null
resolve()
}
Object.keys(attr).forEach(key => {
script.setAttribute(key, attr[key])
})
document.head.appendChild(script)
})
win.getCSS = (url, id = false) => new Promise((resolve, reject) => {
const link = document.createElement('link')
link.rel = 'stylesheet'
link.href = url
if (id) link.id = id
link.onerror = reject
link.onload = link.onreadystatechange = function() {
const loadState = this.readyState
if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
link.onload = link.onreadystatechange = null
resolve()
}
document.head.appendChild(link)
})
const asideStatus = saveToLocal.get('aside-status')
if (asideStatus !== undefined) {
if (asideStatus === 'hide') {
document.documentElement.classList.add('hide-aside')
} else {
document.documentElement.classList.remove('hide-aside')
}
}
const detectApple = () => {
if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
document.documentElement.classList.add('apple')
}
}
detectApple()
})(window)</script><link rel="stylesheet" href="/css/universe.css"><link rel="stylesheet" href="/css/custom.css" media="defer" onload="this.media='all'"><meta name="generator" content="Hexo 7.1.1"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">Loading...</div></div></div><script>(()=>{
const $loadingBox = document.getElementById('loading-box')
const $body = document.body
const preloader = {
endLoading: () => {
$body.style.overflow = ''
$loadingBox.classList.add('loaded')
},
initLoading: () => {
$body.style.overflow = 'hidden'
$loadingBox.classList.remove('loaded')
}
}
preloader.initLoading()
window.addEventListener('load',() => { preloader.endLoading() })
if (false) {
document.addEventListener('pjax:send', () => { preloader.initLoading() })
document.addEventListener('pjax:complete', () => { preloader.endLoading() })
}
})()</script><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://picbed.josephweng.com/img/joseph.jpg" onerror="onerror=null;src='https://picbed.josephweng.com/img/cover/page_not_found.svg'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">Articles</div><div class="length-num">6</div></a><a href="/tags/"><div class="headline">Tags</div><div class="length-num">4</div></a><a href="/categories/"><div class="headline">Categories</div><div class="length-num">0</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/gallery/"><i class="fa-fw fas fa-camera"></i><span> Gallery</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Categories</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header"><nav id="nav"><span id="blog-info"><a href="/" title="Joseph's Blog"><span class="site-name">Joseph's Blog</span></a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/gallery/"><i class="fa-fw fas fa-camera"></i><span> Gallery</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archives</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Categories</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">Joseph's Blog</h1><div id="site-subtitle"><span id="subtitle"></span></div><div id="site_social_icons"><a class="social-icon" href="https://github.com/josephwzx" target="_blank" title="Github"><i class="fab fa-github" style="color: #FFFFFF;"></i></a><a class="social-icon" href="mailto:josephzxw@outlook.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #FFFFFF;"></i></a><a class="social-icon" href="https://linkedin.com/in/josephzxw/" target="_blank" title="LinkedIn"><i class="fab fa-linkedin" style="color: #FFFFFF;"></i></a></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left"><a href="/2024/03/25/introduction/" title="Know About Me!"><img class="post-bg" src="https://picbed.josephweng.com/img/cover/profile.svg" onerror="this.onerror=null;this.src='https://picbed.josephweng.com/img/cover/page_not_found.svg'" alt="Know About Me!"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/03/25/introduction/" title="Know About Me!">Know About Me!</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="fas fa-thumbtack sticky"></i><span class="sticky">sticky</span><span class="article-meta-separator">|</span><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2024-03-25T01:08:18.000Z" title="Created 2024-03-25 01:08:18">2024-03-25</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2024/03/25/introduction/#post-comment"><i class="fa-solid fa-spinner fa-spin"></i></a><span class="article-meta-label"> comments</span></span></div><div class="content">An introduction of Joseph! I am open to work!</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2024/03/14/Capybara-io/" title="Capybara - File I/O layer"><img class="post-bg" src="https://picbed.josephweng.com/img/cover/db_io.svg" onerror="this.onerror=null;this.src='https://picbed.josephweng.com/img/cover/page_not_found.svg'" alt="Capybara - File I/O layer"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/03/14/Capybara-io/" title="Capybara - File I/O layer">Capybara - File I/O layer</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2024-03-14T02:51:40.000Z" title="Created 2024-03-14 02:51:40">2024-03-14</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2024/03/14/Capybara-io/#post-comment"><i class="fa-solid fa-spinner fa-spin"></i></a><span class="article-meta-label"> comments</span></span></div><div class="content">File I/O layer of CapybaraDB</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2024/03/14/Capybara-cmd/" title="Capybara - Command Processing Layer"><img class="post-bg" src="https://picbed.josephweng.com/img/cover/db_cmd.svg" onerror="this.onerror=null;this.src='https://picbed.josephweng.com/img/cover/page_not_found.svg'" alt="Capybara - Command Processing Layer"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/03/14/Capybara-cmd/" title="Capybara - Command Processing Layer">Capybara - Command Processing Layer</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2024-03-14T02:51:04.000Z" title="Created 2024-03-14 02:51:04">2024-03-14</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2024/03/14/Capybara-cmd/#post-comment"><i class="fa-solid fa-spinner fa-spin"></i></a><span class="article-meta-label"> comments</span></span></div><div class="content">Command processing layer of CapybaraDB</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2024/03/09/leetcode-greedy/" title="leetcode notes - greedy"><img class="post-bg" src="https://picbed.josephweng.com/img/cover/code_thinking.svg" onerror="this.onerror=null;this.src='https://picbed.josephweng.com/img/cover/page_not_found.svg'" alt="leetcode notes - greedy"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/03/09/leetcode-greedy/" title="leetcode notes - greedy">leetcode notes - greedy</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2024-03-09T23:15:14.000Z" title="Created 2024-03-09 23:15:14">2024-03-09</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2024/03/09/leetcode-greedy/#post-comment"><i class="fa-solid fa-spinner fa-spin"></i></a><span class="article-meta-label"> comments</span></span></div><div class="content">Leetcode thinking of Greedy</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2024/03/08/docGen-cml/" title="docGen - Command Line Tool"><img class="post-bg" src="https://picbed.josephweng.com/img/cover/docGen.svg" onerror="this.onerror=null;this.src='https://picbed.josephweng.com/img/cover/page_not_found.svg'" alt="docGen - Command Line Tool"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/03/08/docGen-cml/" title="docGen - Command Line Tool">docGen - Command Line Tool</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2024-03-08T01:38:22.000Z" title="Created 2024-03-08 01:38:22">2024-03-08</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2024/03/08/docGen-cml/#post-comment"><i class="fa-solid fa-spinner fa-spin"></i></a><span class="article-meta-label"> comments</span></span></div><div class="content">Command line tool of DocGen</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2024/03/08/docGen-model/" title="docGen - Model Training for Automatic Documentation"><img class="post-bg" src="https://picbed.josephweng.com/img/cover/docGen.svg" onerror="this.onerror=null;this.src='https://picbed.josephweng.com/img/cover/page_not_found.svg'" alt="docGen - Model Training for Automatic Documentation"></a></div><div class="recent-post-info"><a class="article-title" href="/2024/03/08/docGen-model/" title="docGen - Model Training for Automatic Documentation">docGen - Model Training for Automatic Documentation</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2024-03-08T01:02:27.000Z" title="Created 2024-03-08 01:02:27">2024-03-08</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2024/03/08/docGen-model/#post-comment"><i class="fa-solid fa-spinner fa-spin"></i></a><span class="article-meta-label"> comments</span></span></div><div class="content">Model training of DocGen</div></div></div><nav id="pagination"><div class="pagination"><span class="page-number current">1</span></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://picbed.josephweng.com/img/joseph.jpg" onerror="this.onerror=null;this.src='https://picbed.josephweng.com/img/cover/page_not_found.svg'" alt="avatar"/></div><div class="author-info__name">Joseph Weng</div><div class="author-info__description"></div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">Articles</div><div class="length-num">6</div></a><a href="/tags/"><div class="headline">Tags</div><div class="length-num">4</div></a><a href="/categories/"><div class="headline">Categories</div><div class="length-num">0</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/josephwzx"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/josephwzx" target="_blank" title="Github"><i class="fab fa-github" style="color: #FFFFFF;"></i></a><a class="social-icon" href="mailto:josephzxw@outlook.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #FFFFFF;"></i></a><a class="social-icon" href="https://linkedin.com/in/josephzxw/" target="_blank" title="LinkedIn"><i class="fab fa-linkedin" style="color: #FFFFFF;"></i></a></div></div><div class="card-widget card-experience"><div class="item-headline"><i class="fas fa-briefcase"></i><span>Work Experience</span></div><div class="aside-list"><div class="aside-list-item"><div class="experience-logo"><img src="https://picbed.josephweng.com/img/cmu_logo.png" alt="Carnegie Mellon University"/></div><div class="experience-detail"><div class="experience-company">Carnegie Mellon University</div><div class="experience-title">Resarch Assistant</div><div class="experience-duration">Jun 2023 - Current</div><div class="experience-description">Capybara DBMS development and course designing.</div></div></div><div class="aside-list-item"><div class="experience-logo"><img src="https://picbed.josephweng.com/img/igg_logo.jpeg" alt="I Got Games (IGG)"/></div><div class="experience-detail"><div class="experience-company">I Got Games (IGG)</div><div class="experience-title">Software Engineer</div><div class="experience-duration">Jul 2021 - Aug 2021</div><div class="experience-description">Game development and AI solutions for auto testing.</div></div></div></div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>Recent Post</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2024/03/25/introduction/" title="Know About Me!"><img src="https://picbed.josephweng.com/img/cover/profile.svg" onerror="this.onerror=null;this.src='https://picbed.josephweng.com/img/cover/page_not_found.svg'" alt="Know About Me!"/></a><div class="content"><a class="title" href="/2024/03/25/introduction/" title="Know About Me!">Know About Me!</a><time datetime="2024-03-25T01:08:18.000Z" title="Created 2024-03-25 01:08:18">2024-03-25</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2024/03/14/Capybara-io/" title="Capybara - File I/O layer"><img src="https://picbed.josephweng.com/img/cover/db_io.svg" onerror="this.onerror=null;this.src='https://picbed.josephweng.com/img/cover/page_not_found.svg'" alt="Capybara - File I/O layer"/></a><div class="content"><a class="title" href="/2024/03/14/Capybara-io/" title="Capybara - File I/O layer">Capybara - File I/O layer</a><time datetime="2024-03-14T02:51:40.000Z" title="Created 2024-03-14 02:51:40">2024-03-14</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2024/03/14/Capybara-cmd/" title="Capybara - Command Processing Layer"><img src="https://picbed.josephweng.com/img/cover/db_cmd.svg" onerror="this.onerror=null;this.src='https://picbed.josephweng.com/img/cover/page_not_found.svg'" alt="Capybara - Command Processing Layer"/></a><div class="content"><a class="title" href="/2024/03/14/Capybara-cmd/" title="Capybara - Command Processing Layer">Capybara - Command Processing Layer</a><time datetime="2024-03-14T02:51:04.000Z" title="Created 2024-03-14 02:51:04">2024-03-14</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2024/03/09/leetcode-greedy/" title="leetcode notes - greedy"><img src="https://picbed.josephweng.com/img/cover/code_thinking.svg" onerror="this.onerror=null;this.src='https://picbed.josephweng.com/img/cover/page_not_found.svg'" alt="leetcode notes - greedy"/></a><div class="content"><a class="title" href="/2024/03/09/leetcode-greedy/" title="leetcode notes - greedy">leetcode notes - greedy</a><time datetime="2024-03-09T23:15:14.000Z" title="Created 2024-03-09 23:15:14">2024-03-09</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2024/03/08/docGen-cml/" title="docGen - Command Line Tool"><img src="https://picbed.josephweng.com/img/cover/docGen.svg" onerror="this.onerror=null;this.src='https://picbed.josephweng.com/img/cover/page_not_found.svg'" alt="docGen - Command Line Tool"/></a><div class="content"><a class="title" href="/2024/03/08/docGen-cml/" title="docGen - Command Line Tool">docGen - Command Line Tool</a><time datetime="2024-03-08T01:38:22.000Z" title="Created 2024-03-08 01:38:22">2024-03-08</time></div></div></div></div><div class="card-widget" id="card-newest-comments"><div class="item-headline"><i class="fas fa-comment-dots"></i><span>Latest Comments</span></div><div class="aside-list"><span>loading...</span></div></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>Tags</span></div><div class="card-tag-cloud"><a href="/tags/machine-learning/" style="font-size: 1.5em; color: #99a9bf">machine learning</a> <a href="/tags/leetcode/" style="font-size: 1.1em; color: #999">leetcode</a> <a href="/tags/C/" style="font-size: 1.5em; color: #99a9bf">C++</a> <a href="/tags/database/" style="font-size: 1.5em; color: #99a9bf">database</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>Archives</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2024/03/"><span class="card-archive-list-date">March 2024</span><span class="card-archive-list-count">6</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>Info</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">Article :</div><div class="item-count">6</div></div><div class="webinfo-item"><div class="item-name">Total Count :</div><div class="item-count">5.1k</div></div><div class="webinfo-item"><div class="item-name">UV :</div><div class="item-count" id="busuanzi_value_site_uv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">PV :</div><div class="item-count" id="busuanzi_value_site_pv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">Last Update :</div><div class="item-count" id="last-push-date" data-lastPushDate="2024-03-26T00:50:44.153Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">©2024 By Joseph Weng</div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="hide-aside-btn" type="button" title="Toggle between Single-column and Double-column"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="go-up" type="button" title="Back To Top"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js?v=4.13.0"></script><script src="/js/main.js?v=4.13.0"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0.33/dist/fancybox/fancybox.umd.min.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page@5.2.0/instantpage.min.js" type="module"></script><div class="js-pjax"><script>(() => {
const getCommentUrl = () => {
const eleGroup = document.querySelectorAll('#recent-posts .article-title')
let urlArray = []
eleGroup.forEach(i=>{
urlArray.push(i.getAttribute('href'))
})
return urlArray
}
const getCount = () => {
const runTwikoo = () => {
twikoo.getCommentsCount({
envId: 'https://twikoo.josephweng.com/',
region: '',
urls: getCommentUrl(),
includeReply: false
}).then(function (res) {
document.querySelectorAll('#recent-posts .twikoo-count').forEach((item,index) => {
item.textContent = res[index].count
})
}).catch(function (err) {
console.log(err)
})
}
if (typeof twikoo === 'object') {
runTwikoo()
} else {
getScript('https://cdn.jsdelivr.net/npm/twikoo@1.6.31/dist/twikoo.all.min.js').then(runTwikoo)
}
}
window.pjax ? getCount() : window.addEventListener('load', getCount)
})()</script><script>window.typedJSFn = {
init: (str) => {
window.typed = new Typed('#subtitle', Object.assign({
strings: str,
startDelay: 300,
typeSpeed: 150,
loop: true,
backSpeed: 50,
}, {"loop":true}))
},
run: (subtitleType) => {
if (true) {
if (typeof Typed === 'function') {
subtitleType()
} else {
getScript('https://cdn.jsdelivr.net/npm/typed.js@2.1.0/dist/typed.umd.min.js').then(subtitleType)
}
} else {
subtitleType()
}
}
}
</script><script>function subtitleType () {
if (true) {
typedJSFn.init(["Hello, World!","Welcome to Joseph's Blog","Enjoy your stay!"])
} else {
document.getElementById("subtitle").textContent = "Hello, World!"
}
}
typedJSFn.run(subtitleType)</script></div><script>window.addEventListener('load', () => {
const changeContent = (content) => {
if (content === '') return content
content = content.replace(/<img.*?src="(.*?)"?[^\>]+>/ig, '[image]') // replace image link
content = content.replace(/<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi, '[link]') // replace url
content = content.replace(/<pre><code>.*?<\/pre>/gi, '[code]') // replace code
content = content.replace(/<[^>]+>/g,"") // remove html tag
if (content.length > 150) {
content = content.substring(0,150) + '...'
}
return content
}
const getComment = () => {
const runTwikoo = () => {
twikoo.getRecentComments({
envId: 'https://twikoo.josephweng.com/',
region: '',
pageSize: 6,
includeReply: true
}).then(function (res) {
const twikooArray = res.map(e => {
return {
'content': changeContent(e.comment),
'avatar': e.avatar,
'nick': e.nick,
'url': e.url + '#' + e.id,
'date': new Date(e.created).toISOString()
}
})
saveToLocal.set('twikoo-newest-comments', JSON.stringify(twikooArray), 10/(60*24))
generateHtml(twikooArray)
}).catch(function (err) {
const $dom = document.querySelector('#card-newest-comments .aside-list')
$dom.textContent= "Unable to retrieve comments, please check the configuration"
})
}
if (typeof twikoo === 'object') {
runTwikoo()
} else {
getScript('https://cdn.jsdelivr.net/npm/twikoo@1.6.31/dist/twikoo.all.min.js').then(runTwikoo)
}
}
const generateHtml = array => {
let result = ''
if (array.length) {
for (let i = 0; i < array.length; i++) {
result += '<div class=\'aside-list-item\'>'
if (true) {
const name = 'src'
result += `<a href='${array[i].url}' class='thumbnail'><img ${name}='${array[i].avatar}' alt='${array[i].nick}'></a>`
}
result += `<div class='content'>
<a class='comment' href='${array[i].url}' title='${array[i].content}'>${array[i].content}</a>
<div class='name'><span>${array[i].nick} / </span><time datetime="${array[i].date}">${btf.diffDate(array[i].date, true)}</time></div>
</div></div>`
}
} else {
result += 'No comments'
}
let $dom = document.querySelector('#card-newest-comments .aside-list')
$dom && ($dom.innerHTML= result)
window.lazyLoadInstance && window.lazyLoadInstance.update()
window.pjax && window.pjax.refresh($dom)
}
const newestCommentInit = () => {
if (document.querySelector('#card-newest-comments .aside-list')) {
const data = saveToLocal.get('twikoo-newest-comments')
if (data) {
generateHtml(JSON.parse(data))
} else {
getComment()
}
}
}
newestCommentInit()
document.addEventListener('pjax:complete', newestCommentInit)
})</script><canvas id="universe"></canvas><script defer src="/js/universe.js"></script><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1.1.3/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful = true;
POWERMODE.shake = true;
POWERMODE.mobile = false;
document.body.addEventListener('input', POWERMODE);
</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>