1
0
Fork 0

Site updated: 2022-05-25 23:27:29

This commit is contained in:
DavidZ 2022-05-25 23:27:31 +10:00
parent 785cdbd547
commit 21a97ca239
112 changed files with 19091 additions and 786 deletions

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -93,7 +107,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -196,12 +210,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -306,6 +314,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -20,7 +20,7 @@
Title
The IKEA ASM Dataset: Und,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -47,6 +47,20 @@ The IKEA ASM Dataset: Und,">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -93,7 +107,7 @@ The IKEA ASM Dataset: Und,">
animation-duration: 1.2s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/library-1602131491.jpg) ">
url('https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/library-1602131491.jpg') ">
</div>
<div class="else">
<p class="animated fadeInDown">
@ -203,25 +217,8 @@ The IKEA ASM Dataset: Und,">
<ul id="audio-list" style="display:none">
<li title='0' data-url='/statics/chengdu.mp3'></li>
</ul>
<div class="post-nav">
<hr>
<div class="post-nav-item">上一篇:<a href="/vidat/" rel="prev"
title="在线视频标注工具 - Vidat">在线视频标注工具 - Vidat
</a></div>
<div class="post-nav-item">下一篇:<a href="/acrylic-not-working/" rel="next"
title="技巧速记Windows 10 透明效果无法正常工作">技巧速记Windows 10 透明效果无法正常工作</a></div>
</div>
@ -233,7 +230,7 @@ The IKEA ASM Dataset: Und,">
data-o='DavidZhang73'
data-a='DavidZhang73'
data-d=''
data-p='https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token'
data-p=''
>留言</div>
@ -248,6 +245,19 @@ The IKEA ASM Dataset: Und,">
<span>凡事都要留几分</span>
<dl>
<dd><a href="https://github.com/DavidZhang73" target="_blank"><span
class=" iconfont icon-github"></span></a></dd>
<dd><a href="https://twitter.com/david731998" target="_blank"><span
class=" iconfont icon-twitter"></span></a></dd>
<dd><a href="https://stackoverflow.com/users/12693553/davidz" target="_blank"><span
class=" iconfont icon-stack-overflow"></span></a></dd>
</dl>
</div>
@ -291,7 +301,7 @@ The IKEA ASM Dataset: Und,">
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -394,12 +404,6 @@ The IKEA ASM Dataset: Und,">
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -504,6 +508,10 @@ The IKEA ASM Dataset: Und,">
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -15,7 +15,7 @@
众所周知SVD(奇异值分解)可以用于最小二乘法求齐次线性方程组$A\vec,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -42,6 +42,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -88,7 +102,7 @@
animation-duration: 1.2s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/idea-1602143497.jpg) ">
url('https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/idea-1602143497.jpg') ">
</div>
<div class="else">
<p class="animated fadeInDown">
@ -213,19 +227,6 @@ $$</p>
<source type="audio/mpeg" src="https://davidz-blog.oss-cn-beijing.aliyuncs.com/music/Delacey - Dream It Possible.mp3">
</audio>
<div class="post-nav">
<hr>
<div class="post-nav-item">上一篇:<a href="/multiline-equation-in-hexo/" rel="prev"
title="技巧速记如何在Hexo中插入多行公式">技巧速记如何在Hexo中插入多行公式
</a></div>
<div class="post-nav-item">下一篇:<a href="/rattle-change-language/" rel="next"
title="技巧速记:更改 Rattle 的语言">技巧速记:更改 Rattle 的语言</a></div>
</div>
@ -237,7 +238,7 @@ $$</p>
data-o='DavidZhang73'
data-a='DavidZhang73'
data-d=''
data-p='https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token'
data-p=''
>留言</div>
@ -252,6 +253,19 @@ $$</p>
<span>凡事都要留几分</span>
<dl>
<dd><a href="https://github.com/DavidZhang73" target="_blank"><span
class=" iconfont icon-github"></span></a></dd>
<dd><a href="https://twitter.com/david731998" target="_blank"><span
class=" iconfont icon-twitter"></span></a></dd>
<dd><a href="https://stackoverflow.com/users/12693553/davidz" target="_blank"><span
class=" iconfont icon-stack-overflow"></span></a></dd>
</dl>
</div>
@ -295,7 +309,7 @@ $$</p>
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -398,12 +412,6 @@ $$</p>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -508,6 +516,10 @@ $$</p>
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -16,7 +16,7 @@
¶Q
一开始我发现 Windows Terminal 的 useAcryli,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -43,6 +43,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -89,7 +103,7 @@
animation-duration: 1.2s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/idea-1602143497.jpg) ">
url('https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/idea-1602143497.jpg') ">
</div>
<div class="else">
<p class="animated fadeInDown">
@ -162,19 +176,6 @@
<source type="audio/mpeg" src="https://davidz-blog.oss-cn-beijing.aliyuncs.com/music/Delacey - Dream It Possible.mp3">
</audio>
<div class="post-nav">
<hr>
<div class="post-nav-item">上一篇:<a href="/IKEA-ASM-Dataset/" rel="prev"
title="宜家家居组装数据集">宜家家居组装数据集
</a></div>
<div class="post-nav-item">下一篇:<a href="/multiline-equation-in-hexo/" rel="next"
title="技巧速记如何在Hexo中插入多行公式">技巧速记如何在Hexo中插入多行公式</a></div>
</div>
@ -186,7 +187,7 @@
data-o='DavidZhang73'
data-a='DavidZhang73'
data-d=''
data-p='https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token'
data-p=''
>留言</div>
@ -201,6 +202,19 @@
<span>凡事都要留几分</span>
<dl>
<dd><a href="https://github.com/DavidZhang73" target="_blank"><span
class=" iconfont icon-github"></span></a></dd>
<dd><a href="https://twitter.com/david731998" target="_blank"><span
class=" iconfont icon-twitter"></span></a></dd>
<dd><a href="https://stackoverflow.com/users/12693553/davidz" target="_blank"><span
class=" iconfont icon-stack-overflow"></span></a></dd>
</dl>
</div>
@ -244,7 +258,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -347,12 +361,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -457,6 +465,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -20,7 +20,7 @@
¶前言
这是 ANU COMP231,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -47,6 +47,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -93,7 +107,7 @@
animation-duration: 1.2s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/截图-1599486510.png) ">
url('https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/截图-1599486510.png') ">
</div>
<div class="else">
<p class="animated fadeInDown">
@ -508,19 +522,6 @@ $$</p>
<source type="audio/mpeg" src="https://davidz-blog.oss-cn-beijing.aliyuncs.com/music/光良 - 童话.mp3">
</audio>
<div class="post-nav">
<hr>
<div class="post-nav-item">上一篇:<a href="/inspur-internship/" rel="prev"
title="浪潮实习">浪潮实习
</a></div>
<div class="post-nav-item">下一篇:<a href="/hello-world/" rel="next"
title="Hello World">Hello World</a></div>
</div>
@ -532,7 +533,7 @@ $$</p>
data-o='DavidZhang73'
data-a='DavidZhang73'
data-d=''
data-p='https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token'
data-p=''
>留言</div>
@ -547,6 +548,19 @@ $$</p>
<span>凡事都要留几分</span>
<dl>
<dd><a href="https://github.com/DavidZhang73" target="_blank"><span
class=" iconfont icon-github"></span></a></dd>
<dd><a href="https://twitter.com/david731998" target="_blank"><span
class=" iconfont icon-twitter"></span></a></dd>
<dd><a href="https://stackoverflow.com/users/12693553/davidz" target="_blank"><span
class=" iconfont icon-stack-overflow"></span></a></dd>
</dl>
</div>
@ -590,7 +604,7 @@ $$</p>
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -693,12 +707,6 @@ $$</p>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -803,6 +811,10 @@ $$</p>
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

21
aplayer/LICENSE Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) DIYgod <diy.d.god@gmail.com> (https://www.anotherhome.net/)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

100
aplayer/README.html Normal file
View File

@ -0,0 +1,100 @@
<p align="center">
<img src="https://ws4.sinaimg.cn/large/006tKfTcgy1fhu01y9uy7j305k04s3yc.jpg" alt="ADPlayer" width="100">
</p>
<h1 align="center">APlayer</h1>
<blockquote>
<p>Wow, such a lovely HTML5 music player</p>
</blockquote>
<p><a href="https://www.npmjs.com/package/aplayer"><img src="https://img.shields.io/npm/v/aplayer.svg?style=flat-square" alt="npm"></a><br>
<a href="https://github.com/MoePlayer/APlayer/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/aplayer.svg?style=flat-square" alt="npm"></a><br>
<a href="https://www.npmjs.com/package/aplayer"><img src="https://img.shields.io/npm/dt/aplayer.svg?style=flat-square" alt="npm"></a><br>
<a href="https://github.com/MoePlayer/APlayer/tree/master/dist"><img src="https://badge-size.herokuapp.com/MoePlayer/APlayer/master/dist/APlayer.min.js?compression=gzip&amp;style=flat-square" alt="size"></a><br>
<a href="https://travis-ci.org/MoePlayer/APlayer"><img src="https://img.shields.io/travis/MoePlayer/APlayer.svg?style=flat-square" alt="Travis"></a><br>
<a href="https://david-dm.org/MoePlayer/APlayer#info=devDependencies"><img src="https://img.shields.io/david/dev/MoePlayer/aplayer.svg?style=flat-square" alt="devDependency Status"></a><br>
<a href="https://github.com/MoePlayer/APlayer#donate"><img src="https://img.shields.io/badge/$-donate-ff69b4.svg?style=flat-square" alt="donate"></a></p>
<h2 id="Introduction"><a class="header-anchor" href="#Introduction"></a>Introduction</h2>
<p><img src="https://i.imgur.com/JDrJXCr.png" alt="image"></p>
<p>APlayer is a lovely HTML5 music player.</p>
<p><strong>APlayer supports:</strong></p>
<ul>
<li>Media formats - MP4 H.264 (AAC or MP3) - WAVE PCM - Ogg Theora Vorbis</li>
<li>Features - Playlist - Lyrics</li>
</ul>
<p>Using APlayer on your project? <a href="https://github.com/MoePlayer/APlayer/issues/79">Let me know!</a></p>
<p><strong><a href="https://aplayer.js.org">Docs</a></strong></p>
<p><strong><a href="https://aplayer.js.org/#/zh-Hans/">中文文档</a></strong></p>
<h2 id="Join-the-Discussion"><a class="header-anchor" href="#Join-the-Discussion"></a>Join the Discussion</h2>
<ul>
<li><a href="https://t.me/adplayer">Telegram Group</a></li>
<li><a href="https://shang.qq.com/wpa/qunwpa?idkey=bf22213ae0028a82e5adf3f286dfd4f01e0997dc9f1dcd8e831a0a85e799be17">QQ Group</a>: 415835947</li>
</ul>
<h2 id="Related-Projects"><a class="header-anchor" href="#Related-Projects"></a>Related Projects</h2>
<h3 id="Plugins"><a class="header-anchor" href="#Plugins"></a>Plugins</h3>
<ul>
<li><a href="https://github.com/zgq354/APlayer-Typecho-Plugin">APlayer-Typecho-Plugin</a>: Typecho</li>
<li><a href="https://github.com/grzhan/hexo-tag-aplayer">hexo-tag-aplayer</a>: Hexo</li>
<li><a href="https://github.com/liwanglin12/Hermit-X">Hermit-X(APlayer for WordPress)</a>: WordPress</li>
<li><a href="https://github.com/kn007/APlayerHandle">APlayerHandle</a>: WordPress</li>
<li><a href="https://github.com/fghrsh/APlayer_for_Z-BlogPHP">APlayer_for_Z-BlogPHP</a>: Z-BlogPHP</li>
<li><a href="https://github.com/sabrinaluo/react-aplayer">react-aplayer</a>: React</li>
<li><a href="https://github.com/SevenOutman/vue-aplayer">Vue-APlayer</a>: Vue</li>
<li><a href="https://github.com/MoeFE/vue-aplayer">vue-aplayer</a>: Vue</li>
<li><a href="https://github.com/Daryl-L/php-aplayer">php-aplayer</a>: PHP</li>
</ul>
<h3 id="Tooling"><a class="header-anchor" href="#Tooling"></a>Tooling</h3>
<ul>
<li><a href="https://github.com/Mashiro-Sorata/APlayer-Controler">APlayer-Controler</a>: controling tool</li>
<li><a href="https://github.com/metowolf/MetingJS">MetingJS</a>: work with Meting music API</li>
<li>Feel free to submit yours in <a href="https://github.com/MoePlayer/APlayer/issues/79"><code>Let me know!</code></a></li>
</ul>
<h2 id="Who-use-APlayer"><a class="header-anchor" href="#Who-use-APlayer"></a>Who use APlayer?</h2>
<ul>
<li><a href="https://www.bilibili.com/">bilibili</a>: 国内知名的视频弹幕网站</li>
<li><a href="https://hacpai.com/">黑客派</a>: 程序员和设计师的聚集地,一个活跃的小众社区</li>
<li><a href="https://zh.wikipedia.org/wiki/CC98%E8%AE%BA%E5%9D%9B">浙江大学 CC98 论坛</a>: 浙江大学校网内规模最大的论坛,中国各大学中较活跃的 BBS 之一</li>
<li><a href="http://jellyrue.com/">Jelly Rue</a>: Jelly Rue, an indie pop-rock band from Tartu.</li>
<li><a href="http://www.opusopus.co/">Opus</a>: An artist-exploration data visualization application</li>
<li><a href="http://www.chinaz.com/15year/index.html">站长之家</a>: 针对中文站点提供资讯、技术、资源、服务</li>
<li><a href="https://www.lovelivesupport.com/">LLSupport</a>: This site provides a lot of information about LoveLive</li>
<li><a href="https://www.lrcgc.com/diy">歌词千寻</a>: 每日更新的 LRC 歌词网站</li>
<li><a href="http://i.oppsu.cn">iSearch</a>: 一个提供 iTunes 搜索,试听,高清专辑封面获取,查看最新音乐动态等综合性平台</li>
<li><a href="https://github.com/MoeFE/Lyric">LRC 歌词编辑器</a>: 一款非常实用的在线 LRC 歌词编辑器</li>
<li><a href="https://aerostatica.ru/">Аэростатика</a></li>
<li><a href="https://healthdig.co">HealthDig</a>: 每天只需两分钟的重点新闻资讯</li>
<li>Feel free to submit yours in <a href="https://github.com/MoePlayer/APlayer/issues/79"><code>Let me know!</code></a></li>
</ul>
<h2 id="Current-Premium-Sponsors"><a class="header-anchor" href="#Current-Premium-Sponsors"></a>Current Premium Sponsors</h2>
<h3 id="Special-Sponsors"><a class="header-anchor" href="#Special-Sponsors"></a>Special Sponsors</h3>
<a href="https://www.dogecloud.com/?ref=dplayer" target="_blank">
<img width="222px" src="https://i.imgur.com/BBKXPAp.png">
</a>
<a href="https://console.upyun.com/register/?invite=BkLZ2Xqob" target="_blank">
<img width="222px" src="https://imgur.com/apG1uKf.png">
</a>
<h3 id="OpenCollective-backers"><a class="header-anchor" href="#OpenCollective-backers"></a>OpenCollective backers</h3>
<p><img src="https://opencollective.com/APlayer/backers.svg?width=890" alt=""></p>
<h2 id="Contributors"><a class="header-anchor" href="#Contributors"></a>Contributors</h2>
<p>This project exists thanks to all the people who contribute.</p>
<p><a href="https://github.com/MoePlayer/APlayer/graphs/contributors"><img src="https://opencollective.com/APlayer/contributors.svg?width=890" /></a></p>
<h2 id="Donate"><a class="header-anchor" href="#Donate"></a>Donate</h2>
<p>APlayer is an MIT licensed open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing.</p>
<h2 id="One-time-Donations"><a class="header-anchor" href="#One-time-Donations"></a>One-time Donations</h2>
<p>We accept donations through these channels:</p>
<ul>
<li><a href="https://www.paypal.me/DIYgod">Paypal</a></li>
<li><a href="https://i.imgur.com/aq6PtWa.png">WeChat Pay</a></li>
<li><a href="https://i.imgur.com/wv1Pj2k.png">Alipay</a></li>
<li>Bitcoin: 13CwQLHzPYm2tewNMSJBeArbbRM5NSmCD1</li>
</ul>
<h2 id="Recurring-Pledges"><a class="header-anchor" href="#Recurring-Pledges"></a>Recurring Pledges</h2>
<p>Recurring pledges come with exclusive perks, e.g. having your name or your company logo listed in the APlayer GitHub repository and this website.</p>
<ul>
<li>Become a backer or sponsor via <a href="https://opencollective.com/aplayer">OpenCollective</a></li>
<li>E-mail us: i#html.love</li>
</ul>
<h2 id="Author"><a class="header-anchor" href="#Author"></a>Author</h2>
<p><strong>APlayer</strong> © <a href="https://github.com/DIYgod">DIYgod</a>, Released under the <a href="./LICENSE">MIT</a> License.<br><br>
Authored and maintained by DIYgod with help from contributors (<a href="https://github.com/DIYgod/APlayer/contributors">list</a>).</p>
<blockquote>
<p><a href="https://diygod.me">Blog</a> · GitHub <a href="https://github.com/DIYgod">@DIYgod</a> · Twitter <a href="https://twitter.com/DIYgod">@DIYgod</a> · Telegram Channel <a href="https://t.me/awesomeDIYgod">@awesomeDIYgod</a></p>
</blockquote>

215
aplayer/demo/demo.js Normal file
View File

@ -0,0 +1,215 @@
const ap1 = new APlayer({
element: document.getElementById('player1'),
mini: false,
autoplay: false,
lrcType: false,
mutex: true,
preload: 'metadata',
audio: [{
name: '光るなら',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
theme: '#ebd0c2'
}]
});
ap1.on('play', function () {
console.log('play');
});
ap1.on('play', function () {
console.log('play play');
});
ap1.on('pause', function () {
console.log('pause');
});
ap1.on('canplay', function () {
console.log('canplay');
});
ap1.on('playing', function () {
console.log('playing');
});
ap1.on('ended', function () {
console.log('ended');
});
ap1.on('error', function () {
console.log('error');
});
const ap2 = new APlayer({
element: document.getElementById('player2'),
mini: true,
autoplay: false,
lrcType: false,
mutex: true,
audio: [{
name: '光るなら',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.lrc',
theme: '#ebd0c2'
}]
});
const ap3 = new APlayer({
element: document.getElementById('player3'),
mini: false,
autoplay: false,
lrcType: 3,
mutex: true,
audio: [{
name: '光るなら',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.lrc',
theme: '#ebd0c2'
}]
});
const ap4 = new APlayer({
element: document.getElementById('player4'),
mini: false,
autoplay: false,
lrcType: false,
mutex: true,
theme: '#ad7a86',
order: 'random',
audio: [{
name: '光るなら',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.lrc',
theme: '#ebd0c2'
}, {
name: 'トリカゴ',
artist: 'XX:me',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.lrc',
theme: '#46718b'
}, {
name: '前前前世',
artist: 'RADWIMPS',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.lrc',
theme: '#505d6b'
}, {
name: '光るなら(HLS)',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hls/hikarunara.m3u8',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
theme: '#ebd0c2',
type: 'hls'
}]
});
const ap5 = new APlayer({
element: document.getElementById('player5'),
mini: false,
autoplay: false,
lrcType: 3,
mutex: true,
theme: '#e9e9e9',
listFolded: false,
listMaxHeight: 80,
audio: [{
name: '光るなら',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.lrc',
}, {
name: 'トリカゴ',
artist: 'XX:me',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.lrc',
}, {
name: '前前前世',
artist: 'RADWIMPS',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.lrc',
}]
});
const colorThief = new ColorThief();
const image = new Image();
const xhr = new XMLHttpRequest();
const setTheme = (index) => {
if (!ap5.list.audios[index].theme) {
xhr.onload = function(){
let coverUrl = URL.createObjectURL(this.response);
image.onload = function(){
let color = colorThief.getColor(image);
ap5.theme(`rgb(${color[0]}, ${color[1]}, ${color[2]})`, index);
URL.revokeObjectURL(coverUrl)
};
image.src = coverUrl;
}
xhr.open('GET', ap5.list.audios[index].cover, true);
xhr.responseType = 'blob';
xhr.send();
}
};
setTheme(ap5.list.index);
ap5.on('listswitch', (data) => {
setTheme(data.index);
});
const ap6 = new APlayer({
element: document.getElementById('player6'),
mutex: true,
audio: [{
name: '光るなら(HLS)',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hls/hikarunara.m3u8',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
theme: '#ebd0c2',
type: 'hls'
}]
});
const ap7 = new APlayer({
element: document.getElementById('player7'),
mutex: true,
audio: [{
name: '光るなら(HLS)',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hls/hikarunara.m3u8',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
theme: '#ebd0c2',
type: 'customHls',
}],
customAudioType: {
'customHls': function (audioElement, audio, player) {
if (Hls.isSupported()) {
const hls = new Hls();
hls.loadSource(audio.url);
hls.attachMedia(audioElement);
}
else if (audioElement.canPlayType('application/x-mpegURL') || audioElement.canPlayType('application/vnd.apple.mpegURL')) {
audioElement.src = audio.url;
}
else {
player.notice('Error: HLS is not supported.');
}
}
}
});
const ap8 = new APlayer({
element: document.getElementById('player8'),
mutex: true,
theme: '#ad7a86',
order: 'random',
lrcType: 3,
fixed: true,
});
$.ajax({
url: 'https://api.i-meto.com/meting/api?server=netease&type=playlist&id=35798529',
success: function (list) {
ap8.list.add(JSON.parse(list));
}
});

110
aplayer/demo/index.html Normal file
View File

@ -0,0 +1,110 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="Refresh" content="0; URL=https://aplayer.js.org/#/zh-Hans/" />
<title>APlayer Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.container {
max-width: 32rem;
margin-left: auto;
margin-right: auto;
margin-bottom: 150px;
}
h1 {
font-size: 54px;
color: #333;
margin: 30px 0 10px;
}
h2 {
font-size: 22px;
color: #555;
}
h3 {
font-size: 24px;
color: #555;
}
hr {
display: block;
width: 7rem;
height: 1px;
margin: 2.5rem 0;
background-color: #eee;
border: 0;
}
a {
color: #08c;
text-decoration: none;
}
p {
font-size: 18px;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/vconsole/dist/vconsole.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/hls.js/dist/hls.min.js"></script>
<script src="APlayer.js"></script>
<script src="https://cdn.jsdelivr.net/npm/color-thief-don@2.0.2/src/color-thief.js"></script>
</head>
<body>
<div class="container">
<h1>APlayer</h1>
<h2>Wow, such a beautiful html5 music player</h2>
<p>Made by <a href="https://www.anotherhome.net/" target="_blank">DIYgod</a>. Available on <a href="https://github.com/DIYgod/APlayer" target="_blank">GitHub</a>. Licensed MIT.</p>
<hr>
<h3>Normal</h3>
<div id="player1"></div>
<p></p>
<button onclick="ap1.play()">ap.play()</button>
<button onclick="ap1.seek(100)">ap.seek(100)</button>
<button onclick="ap1.pause()">ap.pause()</button>
<button onclick="ap1.toggle()">ap.toggle()</button>
<button onclick="ap1.volume(0.1)">ap.volume(0.1)</button>
<button onclick="ap1.addAudio([
{
name: 'あっちゅ~ま青春!',
artist: '七森中☆ごらく部',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yuruyuri.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yuruyuri.jpg'
},
{
name: 'secret base~君がくれたもの~',
artist: '茅野愛衣',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/secretbase.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/secretbase.jpg'
},
{
name: '回レ!雪月花',
artist: '小倉唯',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/snowmoonflowers.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/snowmoonflowers.jpg'
}
])">ap.addAudio(...)</button>
<button onclick="ap1.destroy()">ap.destroy()</button>
<h3>With playlist</h3>
<div id="player4" class="aplayer"></div>
<p></p>
<button onclick="ap4.switchAudio(2)">ap.switchAudio(2)</button>
<h3>With lyrics</h3>
<div id="player3" class="aplayer"></div>
<h3>With playlist and lyrics</h3>
<div id="player5" class="aplayer"></div>
<h3>Narrow</h3>
<div id="player2" class="aplayer"></div>
<h3>HLS</h3>
<div id="player6" class="aplayer"></div>
<div id="player7" class="aplayer"></div>
<div id="player8" class="aplayer"></div>
</div>
<script>
if (/mobile/i.test(window.navigator.userAgent)) {
new VConsole();
}
</script>
<script src="https://cdn.jsdelivr.net/npm/jquery"></script>
<script src="demo.js"></script>
</body>
</html>

2235
aplayer/dist/APlayer.js vendored Normal file

File diff suppressed because it is too large Load Diff

683
aplayer/dist/APlayer.min.css vendored Normal file
View File

@ -0,0 +1,683 @@
.aplayer {
background: #fff;
font-family: Arial, Helvetica, sans-serif;
margin: 5px;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .07), 0 1px 5px 0 rgba(0, 0, 0, .1);
border-radius: 2px;
overflow: hidden;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
line-height: normal;
position: relative
}
.aplayer * {
box-sizing: content-box
}
.aplayer svg {
width: 100%;
height: 100%
}
.aplayer svg circle, .aplayer svg path {
fill: #fff
}
.aplayer.aplayer-withlist .aplayer-info {
border-bottom: 1px solid #e9e9e9
}
.aplayer.aplayer-withlist .aplayer-list {
display: block
}
.aplayer.aplayer-withlist .aplayer-icon-order, .aplayer.aplayer-withlist .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu {
display: inline
}
.aplayer.aplayer-withlrc .aplayer-pic {
height: 90px;
width: 90px
}
.aplayer.aplayer-withlrc .aplayer-info {
margin-left: 90px;
height: 90px;
padding: 10px 7px 0
}
.aplayer.aplayer-withlrc .aplayer-lrc {
display: block
}
.aplayer.aplayer-narrow {
width: 66px
}
.aplayer.aplayer-narrow .aplayer-info, .aplayer.aplayer-narrow .aplayer-list {
display: none
}
.aplayer.aplayer-narrow .aplayer-body, .aplayer.aplayer-narrow .aplayer-pic {
height: 66px;
width: 66px
}
.aplayer.aplayer-fixed {
position: fixed;
bottom: 0;
left: 0;
right: 0;
margin: 0;
z-index: 99;
overflow: visible;
max-width: 400px;
box-shadow: none
}
.aplayer.aplayer-fixed .aplayer-list {
margin-bottom: 65px;
border: 1px solid #eee;
border-bottom: none
}
.aplayer.aplayer-fixed .aplayer-body {
position: fixed;
bottom: 0;
left: 0;
right: 0;
margin: 0;
z-index: 99;
background: #fff;
padding-right: 18px;
transition: all .3s ease;
max-width: 400px
}
.aplayer.aplayer-fixed .aplayer-lrc {
display: block;
position: fixed;
bottom: 10px;
left: 0;
right: 0;
margin: 0;
z-index: 98;
pointer-events: none;
text-shadow: -1px -1px 0 #fff
}
.aplayer.aplayer-fixed .aplayer-lrc:after, .aplayer.aplayer-fixed .aplayer-lrc:before {
display: none
}
.aplayer.aplayer-fixed .aplayer-info {
-webkit-transform: scaleX(1);
transform: scaleX(1);
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
transition: all .3s ease;
border-bottom: none;
border-top: 1px solid #e9e9e9
}
.aplayer.aplayer-fixed .aplayer-info .aplayer-music {
width: calc(100% - 105px)
}
.aplayer.aplayer-fixed .aplayer-miniswitcher {
display: block
}
.aplayer.aplayer-fixed.aplayer-narrow .aplayer-info {
display: block;
-webkit-transform: scaleX(0);
transform: scaleX(0)
}
.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body {
width: 66px!important
}
.aplayer.aplayer-fixed.aplayer-narrow .aplayer-miniswitcher .aplayer-icon {
-webkit-transform: rotateY(0);
transform: rotateY(0)
}
.aplayer.aplayer-fixed .aplayer-icon-back, .aplayer.aplayer-fixed .aplayer-icon-forward, .aplayer.aplayer-fixed .aplayer-icon-lrc, .aplayer.aplayer-fixed .aplayer-icon-play {
display: inline-block
}
.aplayer.aplayer-fixed .aplayer-icon-back, .aplayer.aplayer-fixed .aplayer-icon-forward, .aplayer.aplayer-fixed .aplayer-icon-menu, .aplayer.aplayer-fixed .aplayer-icon-play {
position: absolute;
bottom: 27px;
width: 20px;
height: 20px
}
.aplayer.aplayer-fixed .aplayer-icon-back {
right: 75px
}
.aplayer.aplayer-fixed .aplayer-icon-play {
right: 50px
}
.aplayer.aplayer-fixed .aplayer-icon-forward {
right: 25px
}
.aplayer.aplayer-fixed .aplayer-icon-menu {
right: 0
}
.aplayer.aplayer-arrow .aplayer-icon-loop, .aplayer.aplayer-arrow .aplayer-icon-order, .aplayer.aplayer-mobile .aplayer-icon-volume-down {
display: none
}
.aplayer.aplayer-loading .aplayer-info .aplayer-controller .aplayer-loading-icon {
display: block
}
.aplayer.aplayer-loading .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb {
-webkit-transform: scale(1);
transform: scale(1)
}
.aplayer .aplayer-body {
position: relative
}
.aplayer .aplayer-icon {
width: 15px;
height: 15px;
border: none;
background-color: transparent;
outline: none;
cursor: pointer;
opacity: .8;
vertical-align: middle;
padding: 0;
font-size: 12px;
margin: 0;
display: inline-block
}
.aplayer .aplayer-icon path {
transition: all .2s ease-in-out
}
.aplayer .aplayer-icon-back, .aplayer .aplayer-icon-forward, .aplayer .aplayer-icon-lrc, .aplayer .aplayer-icon-order, .aplayer .aplayer-icon-play {
display: none
}
.aplayer .aplayer-icon-lrc-inactivity svg {
opacity: .4
}
.aplayer .aplayer-icon-forward {
-webkit-transform: rotate(180deg);
transform: rotate(180deg)
}
.aplayer .aplayer-lrc-content {
display: none
}
.aplayer .aplayer-pic {
position: relative;
float: left;
height: 66px;
width: 66px;
background-size: cover;
background-position: 50%;
transition: all .3s ease;
cursor: pointer
}
.aplayer .aplayer-pic:hover .aplayer-button {
opacity: 1
}
.aplayer .aplayer-pic .aplayer-button {
position: absolute;
border-radius: 50%;
opacity: .8;
text-shadow: 0 1px 1px rgba(0, 0, 0, .2);
box-shadow: 0 1px 1px rgba(0, 0, 0, .2);
background: rgba(0, 0, 0, .2);
transition: all .1s ease
}
.aplayer .aplayer-pic .aplayer-button path {
fill: #fff
}
.aplayer .aplayer-pic .aplayer-hide {
display: none
}
.aplayer .aplayer-pic .aplayer-play {
width: 26px;
height: 26px;
border: 2px solid #fff;
bottom: 50%;
right: 50%;
margin: 0 -15px -15px 0
}
.aplayer .aplayer-pic .aplayer-play svg {
position: absolute;
top: 3px;
left: 4px;
height: 20px;
width: 20px
}
.aplayer .aplayer-pic .aplayer-pause {
width: 16px;
height: 16px;
border: 2px solid #fff;
bottom: 4px;
right: 4px
}
.aplayer .aplayer-pic .aplayer-pause svg {
position: absolute;
top: 2px;
left: 2px;
height: 12px;
width: 12px
}
.aplayer .aplayer-info {
margin-left: 66px;
padding: 14px 7px 0 10px;
height: 66px;
box-sizing: border-box
}
.aplayer .aplayer-info .aplayer-music {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin: 0 0 13px 5px;
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
cursor: default;
padding-bottom: 2px;
height: 20px
}
.aplayer .aplayer-info .aplayer-music .aplayer-title {
font-size: 14px
}
.aplayer .aplayer-info .aplayer-music .aplayer-author {
font-size: 12px;
color: #666
}
.aplayer .aplayer-info .aplayer-controller {
position: relative;
display: flex
}
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap {
margin: 0 0 0 5px;
padding: 4px 0;
cursor: pointer!important;
flex: 1
}
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap:hover .aplayer-bar .aplayer-played .aplayer-thumb {
-webkit-transform: scale(1);
transform: scale(1)
}
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar {
position: relative;
height: 2px;
width: 100%;
background: #cdcdcd
}
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded {
position: absolute;
left: 0;
top: 0;
bottom: 0;
background: #aaa;
height: 2px;
transition: all .5s ease
}
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played {
position: absolute;
left: 0;
top: 0;
bottom: 0;
height: 2px
}
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb {
position: absolute;
top: 0;
right: 5px;
margin-top: -4px;
margin-right: -10px;
height: 10px;
width: 10px;
border-radius: 50%;
cursor: pointer;
transition: all .3s ease-in-out;
-webkit-transform: scale(0);
transform: scale(0)
}
.aplayer .aplayer-info .aplayer-controller .aplayer-time {
position: relative;
right: 0;
bottom: 4px;
height: 17px;
color: #999;
font-size: 11px;
padding-left: 7px
}
.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-time-inner {
vertical-align: middle
}
.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon {
cursor: pointer;
transition: all .2s ease
}
.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon path {
fill: #666
}
.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-loop {
margin-right: 2px
}
.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon:hover path {
fill: #000
}
.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu, .aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-menu, .aplayer .aplayer-info .aplayer-controller .aplayer-time.aplayer-time-narrow .aplayer-icon-mode {
display: none
}
.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap {
position: relative;
display: inline-block;
margin-left: 3px;
cursor: pointer!important
}
.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap:hover .aplayer-volume-bar-wrap {
height: 40px
}
.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap {
position: absolute;
bottom: 15px;
right: -3px;
width: 25px;
height: 0;
z-index: 99;
overflow: hidden;
transition: all .2s ease-in-out
}
.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap.aplayer-volume-bar-wrap-active {
height: 40px
}
.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar {
position: absolute;
bottom: 0;
right: 10px;
width: 5px;
height: 35px;
background: #aaa;
border-radius: 2.5px;
overflow: hidden
}
.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume {
position: absolute;
bottom: 0;
right: 0;
width: 5px;
transition: all .1s ease
}
.aplayer .aplayer-info .aplayer-controller .aplayer-loading-icon {
display: none
}
.aplayer .aplayer-info .aplayer-controller .aplayer-loading-icon svg {
position: absolute;
-webkit-animation: rotate 1s linear infinite;
animation: rotate 1s linear infinite
}
.aplayer .aplayer-lrc {
display: none;
position: relative;
height: 30px;
text-align: center;
overflow: hidden;
margin: -10px 0 7px
}
.aplayer .aplayer-lrc:before {
top: 0;
height: 10%;
background: linear-gradient(180deg, #fff 0, hsla(0, 0%, 100%, 0));
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff", endColorstr="#00ffffff", GradientType=0)
}
.aplayer .aplayer-lrc:after, .aplayer .aplayer-lrc:before {
position: absolute;
z-index: 1;
display: block;
overflow: hidden;
width: 100%;
content: " "
}
.aplayer .aplayer-lrc:after {
bottom: 0;
height: 33%;
background: linear-gradient(180deg, hsla(0, 0%, 100%, 0) 0, hsla(0, 0%, 100%, .8));
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ffffff", endColorstr="#ccffffff", GradientType=0)
}
.aplayer .aplayer-lrc p {
font-size: 12px;
color: #666;
line-height: 16px!important;
height: 16px!important;
padding: 0!important;
margin: 0!important;
transition: all .5s ease-out;
opacity: .4;
overflow: hidden
}
.aplayer .aplayer-lrc p.aplayer-lrc-current {
opacity: 1;
overflow: visible;
height: auto!important;
min-height: 16px
}
.aplayer .aplayer-lrc.aplayer-lrc-hide {
display: none
}
.aplayer .aplayer-lrc .aplayer-lrc-contents {
width: 100%;
transition: all .5s ease-out;
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
cursor: default
}
.aplayer .aplayer-list {
overflow: auto;
transition: all .5s ease;
will-change: height;
display: none;
overflow: hidden
}
.aplayer .aplayer-list.aplayer-list-hide {
max-height: 0!important
}
.aplayer .aplayer-list ol {
list-style-type: none;
margin: 0;
padding: 0;
overflow-y: auto
}
.aplayer .aplayer-list ol::-webkit-scrollbar {
width: 5px
}
.aplayer .aplayer-list ol::-webkit-scrollbar-thumb {
border-radius: 3px;
background-color: #eee
}
.aplayer .aplayer-list ol::-webkit-scrollbar-thumb:hover {
background-color: #ccc
}
.aplayer .aplayer-list ol li {
position: relative;
height: 32px;
line-height: 32px;
padding: 0 15px;
font-size: 12px;
border-top: 1px solid #e9e9e9;
cursor: pointer;
transition: all .2s ease;
overflow: hidden;
margin: 0
}
.aplayer .aplayer-list ol li:first-child {
border-top: none
}
.aplayer .aplayer-list ol li:hover {
background: #efefef
}
.aplayer .aplayer-list ol li.aplayer-list-light {
background: #e9e9e9
}
.aplayer .aplayer-list ol li.aplayer-list-light .aplayer-list-cur {
display: inline-block
}
.aplayer .aplayer-list ol li .aplayer-list-cur {
display: none;
width: 3px;
height: 22px;
position: absolute;
left: 0;
top: 5px;
cursor: pointer
}
.aplayer .aplayer-list ol li .aplayer-list-index {
color: #666;
margin-right: 12px;
cursor: pointer
}
.aplayer .aplayer-list ol li .aplayer-list-author {
color: #666;
float: right;
cursor: pointer
}
.aplayer .aplayer-notice {
opacity: 0;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
font-size: 12px;
border-radius: 4px;
padding: 5px 10px;
transition: all .3s ease-in-out;
overflow: hidden;
color: #fff;
pointer-events: none;
background-color: #f4f4f5;
color: #909399
}
.aplayer .aplayer-miniswitcher {
display: none;
position: absolute;
top: 0;
right: 0;
bottom: 0;
height: 100%;
background: #e6e6e6;
width: 18px;
border-radius: 0 2px 2px 0
}
.aplayer .aplayer-miniswitcher .aplayer-icon {
height: 100%;
width: 100%;
-webkit-transform: rotateY(180deg);
transform: rotateY(180deg);
transition: all .3s ease
}
.aplayer .aplayer-miniswitcher .aplayer-icon path {
fill: #666
}
.aplayer .aplayer-miniswitcher .aplayer-icon:hover path {
fill: #000
}
@-webkit-keyframes aplayer-roll {
0% {
left: 0
}
to {
left: -100%
}
}
@keyframes aplayer-roll {
0% {
left: 0
}
to {
left: -100%
}
}
/*# sourceMappingURL=APlayer.min.css.map*/

1
aplayer/dist/APlayer.min.css.map vendored Normal file

File diff suppressed because one or more lines are too long

2
aplayer/dist/APlayer.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
aplayer/dist/APlayer.min.js.map vendored Normal file

File diff suppressed because one or more lines are too long

623
aplayer/docs/README.html Normal file
View File

@ -0,0 +1,623 @@
<hr>
<h2 id="search-english"><a class="header-anchor" href="#search-english"></a>search: english</h2>
<h1>APlayer</h1>
<p>🍭 Wow, such a beautiful HTML5 music player</p>
<h2 id="Special-Sponsors"><a class="header-anchor" href="#Special-Sponsors"></a>Special Sponsors</h2>
<a href="https://www.dogecloud.com/?ref=dplayer" target="_blank">
<img width="222px" src="https://i.imgur.com/BBKXPAp.png">
</a>
<a href="https://www.upyun.com/" target="_blank">
<img width="222px" src="https://imgur.com/apG1uKf.png">
</a>
<h2 id="Installation"><a class="header-anchor" href="#Installation"></a>Installation</h2>
<p>Using npm:</p>
<pre><code>npm install aplayer --save
</code></pre>
<p>Using Yarn:</p>
<pre><code>yarn add aplayer
</code></pre>
<h2 id="Quick-Start"><a class="header-anchor" href="#Quick-Start"></a>Quick Start</h2>
<div class="aplayer-wrap">
<div id="aplayer2"><button class="docute-button load">Click to load player</div>
</div>
<pre><code class="language-html">&lt;link rel=&quot;stylesheet&quot; href=&quot;APlayer.min.css&quot;&gt;
&lt;div id=&quot;aplayer&quot;&gt;&lt;/div&gt;
&lt;script src=&quot;APlayer.min.js&quot;&gt;&lt;/script&gt;
</code></pre>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('aplayer'),
audio: [{
name: 'name',
artist: 'artist',
url: 'url.mp3',
cover: 'cover.jpg'
}]
});
</code></pre>
<p>Work with module bundler:</p>
<pre><code class="language-js">import 'aplayer/dist/APlayer.min.css';
import APlayer from 'aplayer';
const ap = new APlayer(options);
</code></pre>
<h2 id="Options"><a class="header-anchor" href="#Options"></a>Options</h2>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>container</td>
<td>document.querySelector(.aplayer)</td>
<td>player container</td>
</tr>
<tr>
<td>fixed</td>
<td>false</td>
<td>enable fixed mode, <a href="https://aplayer.js.org/#/home?id=fixed-mode">see more details</a></td>
</tr>
<tr>
<td>mini</td>
<td>false</td>
<td>enable mini mode, <a href="https://aplayer.js.org/#/home?id=mini-mode">see more details</a></td>
</tr>
<tr>
<td>autoplay</td>
<td>false</td>
<td>audio autoplay</td>
</tr>
<tr>
<td>theme</td>
<td>#b7daff</td>
<td>main color</td>
</tr>
<tr>
<td>loop</td>
<td>all</td>
<td>player loop play, values: all, one, none</td>
</tr>
<tr>
<td>order</td>
<td>list</td>
<td>player play order, values: list, random</td>
</tr>
<tr>
<td>preload</td>
<td>auto</td>
<td>values: none, metadata, auto</td>
</tr>
<tr>
<td>volume</td>
<td>0.7</td>
<td>default volume, notice that player will remember user setting, default volume will not work after user set volume themselves</td>
</tr>
<tr>
<td>audio</td>
<td>-</td>
<td>audio info, should be an object or object array</td>
</tr>
<tr>
<td><a href="http://audio.name">audio.name</a></td>
<td>-</td>
<td>audio name</td>
</tr>
<tr>
<td>audio.artist</td>
<td>-</td>
<td>audio artist</td>
</tr>
<tr>
<td>audio.url</td>
<td>-</td>
<td>audio url</td>
</tr>
<tr>
<td>audio.cover</td>
<td>-</td>
<td>audio cover</td>
</tr>
<tr>
<td>audio.lrc</td>
<td>-</td>
<td><a href="https://aplayer.js.org/#/home?id=lrc">see more details</a></td>
</tr>
<tr>
<td>audio.theme</td>
<td>-</td>
<td>main color when switching to this audio, it has priority over the above theme</td>
</tr>
<tr>
<td>audio.type</td>
<td>auto</td>
<td>values: auto, hls, normal or other custom type, <a href="https://aplayer.js.org/#/home?id=mse-support">see more details</a></td>
</tr>
<tr>
<td>customAudioType</td>
<td>-</td>
<td><a href="https://aplayer.js.org/#/home?id=mse-support">see more details</a></td>
</tr>
<tr>
<td>mutex</td>
<td>true</td>
<td>prevent to play multiple player at the same time, pause other players when this player start play</td>
</tr>
<tr>
<td>lrcType</td>
<td>0</td>
<td><a href="https://aplayer.js.org/#/home?id=lrc">see more details</a></td>
</tr>
<tr>
<td>listFolded</td>
<td>false</td>
<td>indicate whether list should folded at first</td>
</tr>
<tr>
<td>listMaxHeight</td>
<td>-</td>
<td>list max height</td>
</tr>
<tr>
<td>storageName</td>
<td>aplayer-setting</td>
<td>localStorage key that store player setting</td>
</tr>
</tbody>
</table>
<p>For example:</p>
<div class="aplayer-wrap">
<div id="aplayer3"><button class="docute-button load">Click to load player</div>
</div>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('player'),
mini: false,
autoplay: false,
theme: '#FADFA3',
loop: 'all',
order: 'random',
preload: 'auto',
volume: 0.7,
mutex: true,
listFolded: false,
listMaxHeight: 90,
lrcType: 3,
audio: [
{
name: 'name1',
artist: 'artist1',
url: 'url1.mp3',
cover: 'cover1.jpg',
lrc: 'lrc1.lrc',
theme: '#ebd0c2'
},
{
name: 'name2',
artist: 'artist2',
url: 'url2.mp3',
cover: 'cover2.jpg',
lrc: 'lrc2.lrc',
theme: '#46718b'
}
]
});
</code></pre>
<h2 id="API"><a class="header-anchor" href="#API"></a>API</h2>
<ul>
<li>
<p><code>APlayer.version</code>: static property, return the version of APlayer</p>
</li>
<li>
<p><code>ap.play()</code>: play audio</p>
</li>
<li>
<p><code>ap.pause()</code>: pause audio</p>
</li>
<li>
<p><code>ap.seek(time: number)</code>: seek to specified time, the unit of time is second</p>
<pre><code class="language-js">ap.seek(100);
</code></pre>
</li>
<li>
<p><code>ap.toggle()</code>: toggle between play and pause</p>
</li>
<li>
<p><code>ap.on(event: string, handler: function)</code>: bind audio and player events, <a href="https://aplayer.js.org/#/home?id=event-binding">see more details</a></p>
</li>
<li>
<p><code>ap.volume(percentage: number, nostorage: boolean)</code>: set audio volume</p>
<pre><code class="language-js">ap.volume(0.1, true);
</code></pre>
</li>
<li>
<p><code>ap.theme(color: string, index: number)</code>: set player theme, the default of index is current audio index</p>
<pre><code class="language-js">ap.theme('#000', 0);
</code></pre>
</li>
<li>
<p><code>ap.setMode(mode: string)</code>: set player mode, the value of mode should be mini or normal</p>
</li>
<li>
<p><code>ap.mode</code>: return current player mode, mini or normal</p>
</li>
<li>
<p><code>ap.notice(text: string, time: number, opacity: number)</code>: show message, the unit of time is millisecond, the default of time is 2000, the default of opacity is 0.8, setting time to 0 can disable notice autohide.</p>
<pre><code class="language-js">ap.notice('Amazing player', 2000, 0.8);
</code></pre>
</li>
<li>
<p><code>ap.skipBack()</code>: skip to previous audio</p>
</li>
<li>
<p><code>ap.skipForward()</code>: skip to next audio</p>
</li>
<li>
<p><code>ap.destroy()</code>: destroy player</p>
</li>
<li>
<p><code>ap.lrc</code></p>
<ul>
<li>
<p><code>ap.lrc.show()</code>: show lrc</p>
</li>
<li>
<p><code>ap.lrc.hide()</code>: hide lrc</p>
</li>
<li>
<p><code>ap.lrc.toggle()</code>: toggle lrc between show and hide</p>
</li>
</ul>
</li>
<li>
<p><code>ap.list</code></p>
<ul>
<li>
<p><code>ap.list.show()</code>: show list</p>
</li>
<li>
<p><code>ap.list.hide()</code>: hide list</p>
</li>
<li>
<p><code>ap.list.toggle()</code>: toggle list between show and hide</p>
</li>
<li>
<p><code>ap.list.add(audios: array | object)</code>: add new audios to the list</p>
</li>
</ul>
<pre><code class="language-js">ap.list.add([{
name: 'name',
artist: 'artist',
url: 'url.mp3',
cover: 'cover.jpg',
lrc: 'lrc.lrc',
theme: '#ebd0c2'
}]);
</code></pre>
<ul>
<li><code>ap.list.remove(index: number)</code>: remove an audio from the list</li>
</ul>
<pre><code class="language-js">ap.list.remove(1);
</code></pre>
<ul>
<li><code>ap.list.switch()</code>: switch to an audio in the list</li>
</ul>
<pre><code class="language-js">ap.list.switch(1);
</code></pre>
<ul>
<li><code>ap.list.clear()</code>: remove all audios from the list</li>
</ul>
</li>
<li>
<p><code>ap.audio</code>: native audio</p>
</li>
<li>
<p><code>ap.audio.currentTime</code>: returns the current playback position</p>
</li>
<li>
<p><code>ap.audio.duration</code>: returns audio total time</p>
</li>
<li>
<p><code>ap.audio.paused</code>: returns whether the audio paused</p>
</li>
<li>
<p>most <a href="http://www.w3schools.com/tags/ref_av_dom.asp">native api</a> are supported</p>
</li>
</ul>
<h2 id="Event-binding"><a class="header-anchor" href="#Event-binding"></a>Event binding</h2>
<p><code>ap.on(event, handler)</code></p>
<pre><code class="language-js">ap.on('ended', function () {
console.log('player ended');
});
</code></pre>
<p>Audio events</p>
<ul>
<li>abort</li>
<li>canplay</li>
<li>canplaythrough</li>
<li>durationchange</li>
<li>emptied</li>
<li>ended</li>
<li>error</li>
<li>loadeddata</li>
<li>loadedmetadata</li>
<li>loadstart</li>
<li>mozaudioavailable</li>
<li>pause</li>
<li>play</li>
<li>playing</li>
<li>progress</li>
<li>ratechange</li>
<li>seeked</li>
<li>seeking</li>
<li>stalled</li>
<li>suspend</li>
<li>timeupdate</li>
<li>volumechange</li>
<li>waiting</li>
</ul>
<p>Player events</p>
<ul>
<li>listshow</li>
<li>listhide</li>
<li>listadd</li>
<li>listremove</li>
<li>listswitch</li>
<li>listclear</li>
<li>noticeshow</li>
<li>noticehide</li>
<li>destroy</li>
<li>lrcshow</li>
<li>lrchide</li>
</ul>
<h2 id="LRC"><a class="header-anchor" href="#LRC"></a>LRC</h2>
<p>We have three ways to pass LRC to APlayer, indicate the way to pass LRC by option <code>lrcType</code>, then put lrc to option <code>audio.lrc</code> or HTML.</p>
<div class="aplayer-wrap">
<div id="aplayer4"><button class="docute-button load">Click to load player</div>
</div>
<h3 id="LRC-file"><a class="header-anchor" href="#LRC-file"></a>LRC file</h3>
<p>The first way, put LRC to a LRC file, LRC file will be loaded when this audio start to play.</p>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('aplayer'),
lrcType: 3,
audio: {
name: 'name',
artist: 'artist',
url: 'demo.mp3',
cover: 'demo.jpg',
lrc: 'lrc.lrc'
}
});
</code></pre>
<h3 id="LRC-string-in-JS"><a class="header-anchor" href="#LRC-string-in-JS"></a>LRC string in JS</h3>
<p>The second way, put LRC to a JS string.</p>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('aplayer'),
lrcType: 1,
audio: {
name: 'name',
artist: 'artist',
url: 'demo.mp3',
cover: 'demo.jpg',
lrc: '[00:00.00]APlayer\n[00:04.01]is\n[00:08.02]amazing'
}
});
</code></pre>
<h3 id="LRC-in-HTML"><a class="header-anchor" href="#LRC-in-HTML"></a>LRC in HTML</h3>
<p>The third way, put LRC to HTML.</p>
<pre><code class="language-html">&lt;link rel=&quot;stylesheet&quot; href=&quot;APlayer.min.css&quot;&gt;
&lt;div id=&quot;player&quot;&gt;
&lt;pre class=&quot;aplayer-lrc-content&quot;&gt;
[00:00.00]APlayer audio1
[00:04.01]is
[00:08.02]amazing
&lt;!-- ... --&gt;
&lt;/pre&gt;
&lt;pre class=&quot;aplayer-lrc-content&quot;&gt;
[00:00.00]APlayer audio2
[00:04.01]is
[00:08.02]amazing
&lt;!-- ... --&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;script src=&quot;APlayer.min.js&quot;&gt;&lt;/script&gt;
</code></pre>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('aplayer'),
lrcType: 2,
audio: [[
{
name: 'name1',
artist: 'artist1',
url: 'url1.mp3',
cover: 'cover1.jpg'
},
{
name: 'name2',
artist: 'artist2',
url: 'url2.mp3',
cover: 'cover2.jpg'
}
]]
});
</code></pre>
<h3 id="LRC-format"><a class="header-anchor" href="#LRC-format"></a>LRC format</h3>
<p>The following LRC format are supported:</p>
<p><code>[mm:ss]APlayer</code></p>
<p><code>[mm:ss.xx]is</code></p>
<p><code>[mm:ss.xxx]amazing</code></p>
<p><code>[mm:ss.xx][mm:ss.xx]APlayer</code></p>
<p><code>[mm:ss.xx]&lt;mm:ss.xx&gt;is</code></p>
<p><code>[mm:ss.xx]amazing[mm:ss.xx]APlayer</code></p>
<h2 id="Playlist"><a class="header-anchor" href="#Playlist"></a>Playlist</h2>
<p>APlayer will show a playlist when it has more than one audio, option <code>listFolded</code> indicates whether list should folded at first, and option <code>listMaxHeight</code> indicates list max height.</p>
<div class="aplayer-wrap">
<div id="aplayer5"><button class="docute-button load">Click to load player</div>
</div>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('player'),
listFolded: false,
listMaxHeight: 90,
lrcType: 3,
audio: [
{
name: 'name1',
artist: 'artist1',
url: 'url1.mp3',
cover: 'cover1.jpg',
lrc: 'lrc1.lrc',
theme: '#ebd0c2'
},
{
name: 'name2',
artist: 'artist2',
url: 'url2.mp3',
cover: 'cover2.jpg',
lrc: 'lrc2.lrc',
theme: '#46718b'
}
]
});
</code></pre>
<h2 id="Fixed-mode"><a class="header-anchor" href="#Fixed-mode"></a>Fixed mode</h2>
<p>APlayer can be fixed to page bottom via fixed mode, fixed mode is a very different mode, enjoy it!</p>
<div class="aplayer-wrap">
<div id="aplayer9"><button class="docute-button load">Click to load player</div>
</div>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('player'),
fixed: true,
audio: [{
name: 'name',
artist: 'artist',
url: 'url.mp3',
cover: 'cover.jpg',
}]
});
</code></pre>
<h2 id="Mini-mode"><a class="header-anchor" href="#Mini-mode"></a>Mini mode</h2>
<p>If you dont have enough space for normal player, mini mode might be your choice.</p>
<p>Please note that mini mode is conflicted with fixed mode.</p>
<div class="aplayer-wrap">
<div id="aplayer6"><button class="docute-button load">Click to load player</div>
</div>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('player'),
mini: true,
audio: [{
name: 'name',
artist: 'artist',
url: 'url.mp3',
cover: 'cover.jpg',
}]
});
</code></pre>
<h2 id="MSE-support"><a class="header-anchor" href="#MSE-support"></a>MSE support</h2>
<h3 id="HLS"><a class="header-anchor" href="#HLS"></a>HLS</h3>
<p>It requires the library <a href="https://github.com/video-dev/hls.js">hls.js</a> and it should be loaded before <code>APlayer.min.js</code>.</p>
<div class="aplayer-wrap">
<div id="aplayer7"><button class="docute-button load">Click to load player</div>
</div>
<pre><code class="language-html">&lt;link rel=&quot;stylesheet&quot; href=&quot;APlayer.min.css&quot;&gt;
&lt;div id=&quot;aplayer&quot;&gt;&lt;/div&gt;
&lt;script src=&quot;hls.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;APlayer.min.js&quot;&gt;&lt;/script&gt;
</code></pre>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('aplayer'),
audio: [{
name: 'HLS',
artist: 'artist',
url: 'url.m3u8',
cover: 'cover.jpg',
type: 'hls'
}]
});
</code></pre>
<pre><code class="language-js">// another way, use customType
const ap = new APlayer({
container: document.getElementById('aplayer'),
audio: [{
name: 'HLS',
artist: 'artist',
url: 'url.m3u8',
cover: 'cover.jpg',
type: 'customHls'
}],
customAudioType: {
'customHls': function (audioElement, audio, player) {
if (Hls.isSupported()) {
const hls = new Hls();
hls.loadSource(audio.url);
hls.attachMedia(audioElement);
}
else if (audioElement.canPlayType('application/x-mpegURL') || audioElement.canPlayType('application/vnd.apple.mpegURL')) {
audioElement.src = audio.url;
}
else {
player.notice('Error: HLS is not supported.');
}
}
}
});
</code></pre>
<h2 id="Self-adapting-theme-according-to-cover"><a class="header-anchor" href="#Self-adapting-theme-according-to-cover"></a>Self-adapting theme according to cover</h2>
<p>It requires the library <a href="https://github.com/lokesh/color-thief/blob/master/src/color-thief.js">color-thief</a>.</p>
<div class="aplayer-wrap">
<div id="aplayer8"><button class="docute-button load">Click to load player</div>
</div>
<pre><code class="language-html">&lt;link rel=&quot;stylesheet&quot; href=&quot;APlayer.min.css&quot;&gt;
&lt;div id=&quot;aplayer&quot;&gt;&lt;/div&gt;
&lt;script src=&quot;APlayer.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;color-thief.js&quot;&gt;&lt;/script&gt;
</code></pre>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('aplayer'),
theme: '#e9e9e9',
audio: [{
name: 'name1',
artist: 'artist1',
url: 'url1.mp3',
cover: 'cover1.jpg'
}, {
name: 'name2',
artist: 'artist2',
url: 'url2.mp3',
cover: 'cover2.jpg'
}]
});
const colorThief = new ColorThief();
const image = new Image();
const xhr = new XMLHttpRequest();
const setTheme = (index) =&gt; {
if (!ap.list.audios[index].theme) {
xhr.onload = function(){
let coverUrl = URL.createObjectURL(this.response);
image.onload = function(){
let color = colorThief.getColor(image);
ap.theme(`rgb(${color[0]}, ${color[1]}, ${color[2]})`, index);
URL.revokeObjectURL(coverUrl)
};
image.src = coverUrl;
}
xhr.open('GET', ap.list.audios[index].cover, true);
xhr.responseType = 'blob';
xhr.send();
}
};
setTheme(ap.list.index);
ap.on('listswitch', (index) =&gt; {
setTheme(index);
});
</code></pre>
<h2 id="CDN"><a class="header-anchor" href="#CDN"></a>CDN</h2>
<ul>
<li><a href="https://www.jsdelivr.com/package/npm/aplayer">jsDelivr</a></li>
<li><a href="https://cdnjs.com/libraries/aplayer">cdnjs</a></li>
<li><a href="https://unpkg.com/aplayer/">unpkg</a></li>
</ul>
<h2 id="FAQ"><a class="header-anchor" href="#FAQ"></a>FAQ</h2>
<h3 id="Why-cant-player-autoplay-in-some-mobile-browsers"><a class="header-anchor" href="#Why-cant-player-autoplay-in-some-mobile-browsers"></a>Why cant player autoplay in some mobile browsers?</h3>
<p>Most mobile browsers forbid audio autoplay, you wont be able to achieve it without hacks.</p>

343
aplayer/docs/config.js Normal file
View File

@ -0,0 +1,343 @@
const langs = [
{ title: 'English', path: '/home', matchPath: /^\/(home|ecosystem|support)/ },
{ title: '简体中文', path: '/zh-Hans/', matchPath: /^\/zh-Hans/ },
];
docute.init({
landing: 'landing.html',
title: 'APlayer',
repo: 'DIYgod/APlayer',
twitter: 'DIYgod',
'edit-link': 'https://github.com/MoePlayer/APlayer/tree/master/docs',
nav: {
default: [
{
title: 'Home', path: '/home'
},
{
title: 'Ecosystem', path: '/ecosystem'
},
{
title: 'Support APlayer', path: '/support'
},
{
title: 'Languages', type: 'dropdown', items: langs
}
],
'zh-Hans': [
{
title: '首页', path: '/zh-Hans/'
},
{
title: '生态', path: '/zh-Hans/ecosystem'
},
{
title: '支持 APlayer', path: '/zh-Hans/support'
},
{
title: '选择语言', type: 'dropdown', items: langs
}
],
},
plugins: [
docsearch({
apiKey: '',
indexName: 'aplayer',
tags: ['english', 'zh-Hans'],
url: 'https://aplayer.js.org'
}),
evanyou(),
player()
]
});
function player () {
return function (context) {
context.event.on('landing:updated', function () {
console.log('landing:updated');
clearPlayer();
aplayer0();
aplayer1();
});
context.event.on('content:updated', function () {
console.log('content:updated');
clearPlayer();
for (let i = 0; i < document.querySelectorAll('.load').length; i++) {
document.querySelectorAll('.load')[i].addEventListener('click', function () {
window[this.parentElement.id] && window[this.parentElement.id]();
});
}
});
};
}
function clearPlayer () {
for (let i = 0; i < 10; i++) {
if (window['ap' + i]) {
window['ap' + i].destroy();
}
}
}
function aplayer1 () {
window.ap1 = new APlayer({
container: document.getElementById('aplayer1'),
theme: '#F57F17',
lrcType: 3,
audio: [{
name: '光るなら',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.lrc',
theme: '#ebd0c2'
}, {
name: 'トリカゴ',
artist: 'XX:me',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.lrc',
theme: '#46718b'
}, {
name: '前前前世',
artist: 'RADWIMPS',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.lrc',
theme: '#505d6b'
}]
});
}
function aplayer0 () {
window.ap0 = new APlayer({
container: document.getElementById('aplayer0'),
fixed: true,
lrcType: 3,
audio: [{
name: '前前前世',
artist: 'RADWIMPS',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.lrc',
theme: '#505d6b'
}, {
name: 'トリカゴ',
artist: 'XX:me',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.lrc',
theme: '#46718b'
}, {
name: '光るなら',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.lrc',
theme: '#ebd0c2'
}]
});
}
function aplayer2 () {
window.ap2 = new APlayer({
container: document.getElementById('aplayer2'),
audio: [{
name: '光るなら',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
theme: '#ebd0c2'
}]
});
}
function aplayer3 () {
window.ap3 = new APlayer({
container: document.getElementById('aplayer3'),
mini: false,
autoplay: false,
loop: 'all',
order: 'random',
preload: 'auto',
volume: 0.7,
mutex: true,
listFolded: false,
listMaxHeight: 90,
lrcType: 3,
audio: [{
name: '光るなら',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.lrc',
theme: '#ebd0c2'
}, {
name: 'トリカゴ',
artist: 'XX:me',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.lrc',
theme: '#46718b'
}, {
name: '前前前世',
artist: 'RADWIMPS',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.lrc',
theme: '#505d6b'
}]
});
}
function aplayer4 () {
window.ap4 = new APlayer({
container: document.getElementById('aplayer4'),
lrcType: 3,
audio: [{
name: '光るなら',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.lrc',
theme: '#ebd0c2'
}]
});
}
function aplayer5 () {
window.ap5 = new APlayer({
container: document.getElementById('aplayer5'),
lrcType: 3,
audio: [{
name: '光るなら',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.lrc',
theme: '#ebd0c2'
}, {
name: 'トリカゴ',
artist: 'XX:me',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.lrc',
theme: '#46718b'
}, {
name: '前前前世',
artist: 'RADWIMPS',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.lrc',
theme: '#505d6b'
}]
});
}
function aplayer6 () {
window.ap6 = new APlayer({
container: document.getElementById('aplayer6'),
mini: true,
audio: [{
name: '光るなら',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
theme: '#ebd0c2'
}]
});
}
function aplayer7 () {
window.ap7 = new APlayer({
container: document.getElementById('aplayer7'),
audio: [{
name: '光るなら(HLS)',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hls/hikarunara.m3u8',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
theme: '#ebd0c2',
type: 'hls'
}, {
name: '光るなら',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
theme: '#ebd0c2'
}, {
name: 'トリカゴ',
artist: 'XX:me',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.jpg',
theme: '#46718b'
}, {
name: '前前前世',
artist: 'RADWIMPS',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.jpg',
theme: '#505d6b'
}]
});
}
function aplayer8 () {
window.ap8 = new APlayer({
container: document.getElementById('aplayer8'),
theme: '#e9e9e9',
audio: [{
name: '光るなら',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
}, {
name: 'トリカゴ',
artist: 'XX:me',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.jpg',
}, {
name: '前前前世',
artist: 'RADWIMPS',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.jpg',
}]
});
const colorThief = new ColorThief();
window.ap8.on('switchaudio', function (index) {
if (!window.ap8.options.audio[index].theme) {
colorThief.getColorAsync(window.ap8.options.audio[index].cover, function (color) {
window.ap8.theme(`rgb(${color[0]}, ${color[1]}, ${color[2]})`, index);
});
}
});
}
function aplayer9 () {
window.ap9 = new APlayer({
container: document.getElementById('aplayer9'),
fixed: true,
lrcType: 3,
audio: [{
name: '光るなら',
artist: 'Goose house',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/hikarunara.lrc',
theme: '#ebd0c2'
}, {
name: 'トリカゴ',
artist: 'XX:me',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/darling.lrc',
theme: '#46718b'
}, {
name: '前前前世',
artist: 'RADWIMPS',
url: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.mp3',
cover: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.jpg',
lrc: 'https://cn-south-17-aplayer-46154810.oss.dogecdn.com/yourname.lrc',
theme: '#505d6b'
}]
});
}

View File

@ -0,0 +1,47 @@
<hr>
<h2 id="search-english"><a class="header-anchor" href="#search-english"></a>search: english</h2>
<h1>Ecosystem</h1>
<p>Lets make APlayer better, feel free to submit yours in <a href="https://github.com/MoePlayer/APlayer/issues/79"><code>Let me know!</code></a></p>
<h2 id="Help"><a class="header-anchor" href="#Help"></a>Help</h2>
<h3 id="Joining-the-Discussion"><a class="header-anchor" href="#Joining-the-Discussion"></a>Joining the Discussion</h3>
<ul>
<li><a href="https://t.me/adplayer">Telegram Group</a></li>
<li><a href="https://shang.qq.com/wpa/qunwpa?idkey=bf22213ae0028a82e5adf3f286dfd4f01e0997dc9f1dcd8e831a0a85e799be17">QQ Group</a>: 415835947</li>
</ul>
<h3 id="Creating-issue"><a class="header-anchor" href="#Creating-issue"></a>Creating issue</h3>
<ul>
<li><a href="https://github.com/MoePlayer/APlayer/issues">MoePlayer/APlayer/issues</a></li>
</ul>
<h2 id="Related-Projects"><a class="header-anchor" href="#Related-Projects"></a>Related Projects</h2>
<h3 id="Plugins"><a class="header-anchor" href="#Plugins"></a>Plugins</h3>
<ul>
<li><a href="https://github.com/zgq354/APlayer-Typecho-Plugin">APlayer-Typecho-Plugin</a>: Typecho</li>
<li><a href="https://github.com/grzhan/hexo-tag-aplayer">hexo-tag-aplayer</a>: Hexo</li>
<li><a href="https://github.com/liwanglin12/Hermit-X">Hermit-X(APlayer for WordPress)</a>: WordPress</li>
<li><a href="https://github.com/kn007/APlayerHandle">APlayerHandle</a>: WordPress</li>
<li><a href="https://github.com/fghrsh/APlayer_for_Z-BlogPHP">APlayer_for_Z-BlogPHP</a>: Z-BlogPHP</li>
<li><a href="https://github.com/sabrinaluo/react-aplayer">react-aplayer</a>: React</li>
<li><a href="https://github.com/SevenOutman/vue-aplayer">Vue-APlayer</a>: Vue</li>
<li><a href="https://github.com/MoeFE/vue-aplayer">vue-aplayer</a>: Vue</li>
<li><a href="https://github.com/Daryl-L/php-aplayer">php-aplayer</a>: PHP</li>
</ul>
<h3 id="Tooling"><a class="header-anchor" href="#Tooling"></a>Tooling</h3>
<ul>
<li><a href="https://github.com/Mashiro-Sorata/APlayer-Controler">APlayer-Controler</a>: controling tool</li>
<li><a href="https://github.com/metowolf/MetingJS">MetingJS</a>: work with Meting music API</li>
</ul>
<h2 id="Who-use-APlayer"><a class="header-anchor" href="#Who-use-APlayer"></a>Who use APlayer?</h2>
<ul>
<li><a href="https://www.bilibili.com/">bilibili</a>: 国内知名的视频弹幕网站</li>
<li><a href="https://hacpai.com/">黑客派</a>: 程序员和设计师的聚集地,一个活跃的小众社区</li>
<li><a href="https://zh.wikipedia.org/wiki/CC98%E8%AE%BA%E5%9D%9B">浙江大学CC98论坛</a>: 浙江大学校网内规模最大的论坛中国各大学中较活跃的BBS之一</li>
<li><a href="http://jellyrue.com/">Jelly Rue</a>: Jelly Rue, an indie pop-rock band from Tartu.</li>
<li><a href="http://www.opusopus.co/">Opus</a>: An artist-exploration data visualization application</li>
<li><a href="http://www.chinaz.com/15year/index.html">站长之家</a>: 针对中文站点提供资讯、技术、资源、服务</li>
<li><a href="https://www.lovelivesupport.com/">LLSupport</a>: This site provides a lot of information about LoveLive</li>
<li><a href="https://www.lrcgc.com/diy">歌词千寻</a>: 每日更新的LRC歌词网站</li>
<li><a href="http://i.oppsu.cn">iSearch</a>: 一个提供 iTunes 搜索,试听,高清专辑封面获取,查看最新音乐动态等综合性平台</li>
<li><a href="https://github.com/MoeFE/Lyric">LRC歌词编辑器</a>: 一款非常实用的在线LRC歌词编辑器</li>
<li><a href="https://aerostatica.ru/">Аэростатика</a></li>
<li><a href="https://healthdig.co">HealthDig</a>: 每天只需两分钟的重点新闻资讯</li>
</ul>

49
aplayer/docs/index.html Normal file
View File

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
<title>APlayer</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docute@3.4.12/dist/docute.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docute@3.4.12/dist/theme-github.css" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-48084758-8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-48084758-8');
</script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.10.0/dist/APlayer.min.css">
<script src="https://cdn.jsdelivr.net/npm/hls.js/dist/hls.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/aplayer@1.10.0/dist/APlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/color-thief-don@2.0.2/src/color-thief.js"></script>
<style>
body {
text-rendering: auto;
}
#evanyou-canvas {
z-index: -1 !important;
}
.aplayer-wrap {
max-width: 700px;
margin: 20px 0;
}
.sidebar-toggle {
z-index: 90;
}
</style>
</head>
<body>
<!-- don't remove this part start -->
<div id="app"></div>
<script src="https://cdn.jsdelivr.net/npm/docute@3.4.12/plugins/docsearch.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docute-evanyou/dist/evanyou.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/docute@3.4.12/dist/docute.js"></script>
<script src="./config.js"></script>
<!-- livereload script placeholder -->
<!-- don't remove this part end -->
</body>
</html>

84
aplayer/docs/landing.html Normal file
View File

@ -0,0 +1,84 @@
<h1>APlayer</h1>
<h3>🍭 Wow, such a beautiful HTML5 music player.</h3>
<div class="aplayer-wrap">
<div id="aplayer1"></div>
</div>
<div id="aplayer0"></div>
<div class="landing-buttons">
<a class="landing-button" target="_blank" href="https://github.com/MoePlayer/APlayer">
GitHub
</a>
<a class="landing-button" router-link="/home">
Docs
</a>
</div>
<style>
h1 {
margin: 0;
margin-top: -50px;
font-weight: normal;
font-size: 40px;
letter-spacing: 1px;
}
h3 {
margin-top: 20px;
color: #999;
font-weight: normal;
letter-spacing: 1px;
}
.landing {
padding: 10px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
height: 100%;
-webkit-user-select: none;
user-select: none;
}
.features {
margin-top: 20px;
margin-bottom: 10px;
font-size: 16px;
line-height: 1.7;
}
.landing-button {
border: 1px solid #ccc;
border-radius: 33px;
padding: 10px 30px;
background-color: white;
display: inline-block;
margin-right: 20px;
color: #333;
}
.landing-button:hover {
border-color: #42b983;
color: #42b983;
text-decoration: none;
}
.aplayer-wrap {
width: 600px;
max-width: 100%;
margin: 20px 0 40px;
}
</style>

34
aplayer/docs/support.html Normal file
View File

@ -0,0 +1,34 @@
<hr>
<h2 id="search-english"><a class="header-anchor" href="#search-english"></a>search: english</h2>
<h1>Sponsor APlayer Development</h1>
<p>APlayer is an MIT licensed open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing.</p>
<p>If you run a business and are using APlayer in a revenue-generating product, it makes business sense to sponsor APlayer development: it ensures the project that your product relies on stays healthy and actively maintained.</p>
<p>If you are an individual user and have enjoyed the productivity of using APlayer, consider donating as a sign of appreciation - like buying me coffee once in a while 😃</p>
<p>You can support APlayer development via the following methods:</p>
<h2 id="One-time-Donations"><a class="header-anchor" href="#One-time-Donations"></a>One-time Donations</h2>
<p>We accept donations through these channels:</p>
<ul>
<li><a href="https://www.paypal.me/DIYgod">Paypal</a></li>
<li><a href="https://i.imgur.com/aq6PtWa.png">WeChat Pay</a></li>
<li><a href="https://i.imgur.com/wv1Pj2k.png">Alipay</a></li>
<li>Bitcoin: 13CwQLHzPYm2tewNMSJBeArbbRM5NSmCD1</li>
</ul>
<h2 id="Recurring-Pledges"><a class="header-anchor" href="#Recurring-Pledges"></a>Recurring Pledges</h2>
<p>Recurring pledges come with exclusive perks, e.g. having your name or your company logo listed in the APlayer GitHub repository and this website.</p>
<ul>
<li>Become a backer or sponsor via <a href="https://opencollective.com/aplayer">OpenCollective</a></li>
<li>E-mail us: i#html.love</li>
</ul>
<h2 id="Current-Premium-Sponsors"><a class="header-anchor" href="#Current-Premium-Sponsors"></a>Current Premium Sponsors</h2>
<h3 id="Special-Sponsors"><a class="header-anchor" href="#Special-Sponsors"></a>Special Sponsors</h3>
<a href="https://www.dogecloud.com/?ref=dplayer" target="_blank">
<img width="222px" src="https://i.imgur.com/BBKXPAp.png">
</a>
<a href="https://console.upyun.com/register/?invite=BkLZ2Xqob" target="_blank">
<img width="222px" src="https://imgur.com/apG1uKf.png">
</a>
<h3 id="OpenCollective-backers"><a class="header-anchor" href="#OpenCollective-backers"></a>OpenCollective backers</h3>
<p><img src="https://opencollective.com/APlayer/backers.svg?width=890" alt=""></p>
<h2 id="APlayer-contributors"><a class="header-anchor" href="#APlayer-contributors"></a>APlayer contributors</h2>
<p>This project exists thanks to all the people who contribute.</p>
<p><a href="https://github.com/MoePlayer/APlayer/graphs/contributors"><img src="https://opencollective.com/APlayer/contributors.svg?width=890" /></a></p>

View File

@ -0,0 +1,624 @@
<hr>
<h2 id="nav-zh-Hanssearch-zh-Hans"><a class="header-anchor" href="#nav-zh-Hanssearch-zh-Hans"></a>nav: zh-Hans<br>
search: zh-Hans</h2>
<h1>APlayer</h1>
<p>🍭 Wow, such a beautiful HTML5 music player</p>
<h2 id="特别赞助商"><a class="header-anchor" href="#特别赞助商"></a>特别赞助商</h2>
<a href="https://www.dogecloud.com/?ref=dplayer" target="_blank">
<img width="222px" src="https://i.imgur.com/BBKXPAp.png">
</a>
<a href="https://console.upyun.com/register/?invite=BkLZ2Xqob" target="_blank">
<img width="222px" src="https://imgur.com/apG1uKf.png">
</a>
<h2 id="安装"><a class="header-anchor" href="#安装"></a>安装</h2>
<p>使用 npm:</p>
<pre><code>npm install aplayer --save
</code></pre>
<p>使用 Yarn:</p>
<pre><code>yarn add aplayer
</code></pre>
<h2 id="入门"><a class="header-anchor" href="#入门"></a>入门</h2>
<div class="aplayer-wrap">
<div id="aplayer2"><button class="docute-button load">点击加载播放器</div>
</div>
<pre><code class="language-html">&lt;link rel=&quot;stylesheet&quot; href=&quot;APlayer.min.css&quot;&gt;
&lt;div id=&quot;aplayer&quot;&gt;&lt;/div&gt;
&lt;script src=&quot;APlayer.min.js&quot;&gt;&lt;/script&gt;
</code></pre>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('aplayer'),
audio: [{
name: 'name',
artist: 'artist',
url: 'url.mp3',
cover: 'cover.jpg'
}]
});
</code></pre>
<p>使用模块管理器:</p>
<pre><code class="language-js">import 'APlayer/dist/APlayer.min.css';
import APlayer from 'APlayer';
const ap = new APlayer(options);
</code></pre>
<h2 id="参数"><a class="header-anchor" href="#参数"></a>参数</h2>
<table>
<thead>
<tr>
<th>名称</th>
<th>默认值</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>container</td>
<td>document.querySelector(.aplayer)</td>
<td>播放器容器元素</td>
</tr>
<tr>
<td>fixed</td>
<td>false</td>
<td>开启吸底模式, <a href="https://aplayer.js.org/#/home?id=fixed-mode">详情</a></td>
</tr>
<tr>
<td>mini</td>
<td>false</td>
<td>开启迷你模式, <a href="https://aplayer.js.org/#/home?id=mini-mode">详情</a></td>
</tr>
<tr>
<td>autoplay</td>
<td>false</td>
<td>音频自动播放</td>
</tr>
<tr>
<td>theme</td>
<td>#b7daff</td>
<td>主题色</td>
</tr>
<tr>
<td>loop</td>
<td>all</td>
<td>音频循环播放, 可选值: all, one, none</td>
</tr>
<tr>
<td>order</td>
<td>list</td>
<td>音频循环顺序, 可选值: list, random</td>
</tr>
<tr>
<td>preload</td>
<td>auto</td>
<td>预加载,可选值: none, metadata, auto</td>
</tr>
<tr>
<td>volume</td>
<td>0.7</td>
<td>默认音量,请注意播放器会记忆用户设置,用户手动设置音量后默认音量即失效</td>
</tr>
<tr>
<td>audio</td>
<td>-</td>
<td>音频信息, 应该是一个对象或对象数组</td>
</tr>
<tr>
<td><a href="http://audio.name">audio.name</a></td>
<td>-</td>
<td>音频名称</td>
</tr>
<tr>
<td>audio.artist</td>
<td>-</td>
<td>音频艺术家</td>
</tr>
<tr>
<td>audio.url</td>
<td>-</td>
<td>音频链接</td>
</tr>
<tr>
<td>audio.cover</td>
<td>-</td>
<td>音频封面</td>
</tr>
<tr>
<td>audio.lrc</td>
<td>-</td>
<td><a href="https://aplayer.js.org/#/home?id=lrc">详情</a></td>
</tr>
<tr>
<td>audio.theme</td>
<td>-</td>
<td>切换到此音频时的主题色,比上面的 theme 优先级高</td>
</tr>
<tr>
<td>audio.type</td>
<td>auto</td>
<td>可选值: auto, hls, normal 或其他自定义类型, <a href="https://aplayer.js.org/#/home?id=mse-support">详情</a></td>
</tr>
<tr>
<td>customAudioType</td>
<td>-</td>
<td>自定义类型,<a href="https://aplayer.js.org/#/home?id=mse-support">详情</a></td>
</tr>
<tr>
<td>mutex</td>
<td>true</td>
<td>互斥,阻止多个播放器同时播放,当前播放器播放时暂停其他播放器</td>
</tr>
<tr>
<td>lrcType</td>
<td>0</td>
<td><a href="https://aplayer.js.org/#/home?id=lrc">详情</a></td>
</tr>
<tr>
<td>listFolded</td>
<td>false</td>
<td>列表默认折叠</td>
</tr>
<tr>
<td>listMaxHeight</td>
<td>-</td>
<td>列表最大高度</td>
</tr>
<tr>
<td>storageName</td>
<td>aplayer-setting</td>
<td>存储播放器设置的 localStorage key</td>
</tr>
</tbody>
</table>
<p>例如:</p>
<div class="aplayer-wrap">
<div id="aplayer3"><button class="docute-button load">点击加载播放器</div>
</div>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('player'),
mini: false,
autoplay: false,
theme: '#FADFA3',
loop: 'all',
order: 'random',
preload: 'auto',
volume: 0.7,
mutex: true,
listFolded: false,
listMaxHeight: 90,
lrcType: 3,
audio: [
{
name: 'name1',
artist: 'artist1',
url: 'url1.mp3',
cover: 'cover1.jpg',
lrc: 'lrc1.lrc',
theme: '#ebd0c2'
},
{
name: 'name2',
artist: 'artist2',
url: 'url2.mp3',
cover: 'cover2.jpg',
lrc: 'lrc2.lrc',
theme: '#46718b'
}
]
});
</code></pre>
<h2 id="API"><a class="header-anchor" href="#API"></a>API</h2>
<ul>
<li>
<p><code>APlayer.version</code>: 静态属性, 返回 APlayer 的版本号</p>
</li>
<li>
<p><code>ap.play()</code>: 播放音频</p>
</li>
<li>
<p><code>ap.pause()</code>: 暂停音频</p>
</li>
<li>
<p><code>ap.seek(time: number)</code>: 跳转到特定时间,时间的单位为秒</p>
<pre><code class="language-js">ap.seek(100);
</code></pre>
</li>
<li>
<p><code>ap.toggle()</code>: 切换播放和暂停</p>
</li>
<li>
<p><code>ap.on(event: string, handler: function)</code>: 绑定音频和播放器事件,<a href="https://aplayer.js.org/#/home?id=event-binding">详情</a></p>
</li>
<li>
<p><code>ap.volume(percentage: number, nostorage: boolean)</code>: 设置音频音量</p>
<pre><code class="language-js">ap.volume(0.1, true);
</code></pre>
</li>
<li>
<p><code>ap.theme(color: string, index: number)</code>: 设置播放器主题色, index 默认为当前音频的 index</p>
<pre><code class="language-js">ap.theme('#000', 0);
</code></pre>
</li>
<li>
<p><code>ap.setMode(mode: string)</code>: 设置播放器模式mode 取值应为 mininormal</p>
</li>
<li>
<p><code>ap.mode</code>: 返回播放器当前模式mininormal</p>
</li>
<li>
<p><code>ap.notice(text: string, time: number, opacity: number)</code>: 显示通知,时间的单位为毫秒,默认时间 2000 毫秒,默认透明度 0.8,设置时间为 0 可以取消通知自动隐藏</p>
<pre><code class="language-js">ap.notice('Amazing player', 2000, 0.8);
</code></pre>
</li>
<li>
<p><code>ap.skipBack()</code>: 切换到上一首音频</p>
</li>
<li>
<p><code>ap.skipForward()</code>: 切换到下一首音频</p>
</li>
<li>
<p><code>ap.destroy()</code>: 销毁播放器</p>
</li>
<li>
<p><code>ap.lrc</code></p>
<ul>
<li>
<p><code>ap.lrc.show()</code>: 显示歌词</p>
</li>
<li>
<p><code>ap.lrc.hide()</code>: 隐藏歌词</p>
</li>
<li>
<p><code>ap.lrc.toggle()</code>: 显示/隐藏歌词</p>
</li>
</ul>
</li>
<li>
<p><code>ap.list</code></p>
<ul>
<li>
<p><code>ap.list.show()</code>: 显示播放列表</p>
</li>
<li>
<p><code>ap.list.hide()</code>: 隐藏播放列表</p>
</li>
<li>
<p><code>ap.list.toggle()</code>: 显示/隐藏播放列表</p>
</li>
<li>
<p><code>ap.list.add(audios: array | object)</code>: 添加一个或几个新音频到播放列表</p>
</li>
</ul>
<pre><code class="language-js">ap.list.add([{
name: 'name',
artist: 'artist',
url: 'url.mp3',
cover: 'cover.jpg',
lrc: 'lrc.lrc',
theme: '#ebd0c2'
}]);
</code></pre>
<ul>
<li><code>ap.list.remove(index: number)</code>: 移除播放列表中的一个音频</li>
</ul>
<pre><code class="language-js">ap.list.remove(1);
</code></pre>
<ul>
<li><code>ap.list.switch()</code>: 切换到播放列表里的其他音频</li>
</ul>
<pre><code class="language-js">ap.list.switch(1);
</code></pre>
<ul>
<li><code>ap.list.clear()</code>: 清空播放列表</li>
</ul>
</li>
<li>
<p><code>ap.audio</code>: 原生 audio</p>
</li>
<li>
<p><code>ap.audio.currentTime</code>: 返回音频当前播放时间</p>
</li>
<li>
<p><code>ap.audio.duration</code>: 返回音频总时间</p>
</li>
<li>
<p><code>ap.audio.paused</code>: 返回音频是否暂停</p>
</li>
<li>
<p>支持大多数<a href="http://www.w3schools.com/tags/ref_av_dom.asp">原生audio接口</a></p>
</li>
</ul>
<h2 id="事件绑定"><a class="header-anchor" href="#事件绑定"></a>事件绑定</h2>
<p><code>ap.on(event, handler)</code></p>
<pre><code class="language-js">ap.on('ended', function () {
console.log('player ended');
});
</code></pre>
<p>音频事件</p>
<ul>
<li>abort</li>
<li>canplay</li>
<li>canplaythrough</li>
<li>durationchange</li>
<li>emptied</li>
<li>ended</li>
<li>error</li>
<li>loadeddata</li>
<li>loadedmetadata</li>
<li>loadstart</li>
<li>mozaudioavailable</li>
<li>pause</li>
<li>play</li>
<li>playing</li>
<li>progress</li>
<li>ratechange</li>
<li>seeked</li>
<li>seeking</li>
<li>stalled</li>
<li>suspend</li>
<li>timeupdate</li>
<li>volumechange</li>
<li>waiting</li>
</ul>
<p>播放器事件</p>
<ul>
<li>listshow</li>
<li>listhide</li>
<li>listadd</li>
<li>listremove</li>
<li>listswitch</li>
<li>listclear</li>
<li>noticeshow</li>
<li>noticehide</li>
<li>destroy</li>
<li>lrcshow</li>
<li>lrchide</li>
</ul>
<h2 id="歌词"><a class="header-anchor" href="#歌词"></a>歌词</h2>
<p>我们有三种方式来给 APlayer 传递歌词,使用 <code>lrcType</code> 参数指明使用哪种方式,然后把歌词放到 <code>audio.lrc</code> 参数或者 HTML 里。</p>
<div class="aplayer-wrap">
<div id="aplayer4"><button class="docute-button load">点击加载播放器</div>
</div>
<h3 id="LRC-文件方式"><a class="header-anchor" href="#LRC-文件方式"></a>LRC 文件方式</h3>
<p>第一种方式,把歌词放到 LRC 文件里,音频播放时会加载对应的 LRC 文件。</p>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('aplayer'),
lrcType: 3,
audio: {
name: 'name',
artist: 'artist',
url: 'demo.mp3',
cover: 'demo.jpg',
lrc: 'lrc.lrc'
}
});
</code></pre>
<h3 id="JS-字符串方式"><a class="header-anchor" href="#JS-字符串方式"></a>JS 字符串方式</h3>
<p>第二种方式,把歌词放到 JS 字符串里面。</p>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('aplayer'),
lrcType: 1,
audio: {
name: 'name',
artist: 'artist',
url: 'demo.mp3',
cover: 'demo.jpg',
lrc: '[00:00.00]APlayer\n[00:04.01]is\n[00:08.02]amazing'
}
});
</code></pre>
<h3 id="HTML-方式"><a class="header-anchor" href="#HTML-方式"></a>HTML 方式</h3>
<p>第三种方式,把歌词放到 HTML 里面。</p>
<pre><code class="language-html">&lt;link rel=&quot;stylesheet&quot; href=&quot;APlayer.min.css&quot;&gt;
&lt;div id=&quot;player&quot;&gt;
&lt;pre class=&quot;aplayer-lrc-content&quot;&gt;
[00:00.00]APlayer audio1
[00:04.01]is
[00:08.02]amazing
&lt;!-- ... --&gt;
&lt;/pre&gt;
&lt;pre class=&quot;aplayer-lrc-content&quot;&gt;
[00:00.00]APlayer audio2
[00:04.01]is
[00:08.02]amazing
&lt;!-- ... --&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;script src=&quot;APlayer.min.js&quot;&gt;&lt;/script&gt;
</code></pre>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('aplayer'),
lrcType: 2,
audio: [[
{
name: 'name1',
artist: 'artist1',
url: 'url1.mp3',
cover: 'cover1.jpg'
},
{
name: 'name2',
artist: 'artist2',
url: 'url2.mp3',
cover: 'cover2.jpg'
}
]]
});
</code></pre>
<h3 id="歌词格式"><a class="header-anchor" href="#歌词格式"></a>歌词格式</h3>
<p>支持下面格式的歌词:</p>
<p><code>[mm:ss]APlayer</code></p>
<p><code>[mm:ss.xx]is</code></p>
<p><code>[mm:ss.xxx]amazing</code></p>
<p><code>[mm:ss.xx][mm:ss.xx]APlayer</code></p>
<p><code>[mm:ss.xx]&lt;mm:ss.xx&gt;is</code></p>
<p><code>[mm:ss.xx]amazing[mm:ss.xx]APlayer</code></p>
<h2 id="播放列表"><a class="header-anchor" href="#播放列表"></a>播放列表</h2>
<p>当有多个音频时会 APlayer 会展示一个播放列表,<code>listFolded</code> 参数指明列表是否默认折叠,<code>listMaxHeight</code> 参数指明列表最大高度。</p>
<div class="aplayer-wrap">
<div id="aplayer5"><button class="docute-button load">点击加载播放器</div>
</div>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('player'),
listFolded: false,
listMaxHeight: 90,
lrcType: 3,
audio: [
{
name: 'name1',
artist: 'artist1',
url: 'url1.mp3',
cover: 'cover1.jpg',
lrc: 'lrc1.lrc',
theme: '#ebd0c2'
},
{
name: 'name2',
artist: 'artist2',
url: 'url2.mp3',
cover: 'cover2.jpg',
lrc: 'lrc2.lrc',
theme: '#46718b'
}
]
});
</code></pre>
<h2 id="吸底模式"><a class="header-anchor" href="#吸底模式"></a>吸底模式</h2>
<p>APlayer 可以通过吸底模式固定在页面底部,这种模式跟普通模式有很大不同。</p>
<div class="aplayer-wrap">
<div id="aplayer9"><button class="docute-button load">点击加载播放器</div>
</div>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('player'),
fixed: true,
audio: [{
name: 'name',
artist: 'artist',
url: 'url.mp3',
cover: 'cover.jpg',
}]
});
</code></pre>
<h2 id="迷你模式"><a class="header-anchor" href="#迷你模式"></a>迷你模式</h2>
<p>如果你没有足够空间来放置正常模式的播放器,那么你可以考虑使用迷你模式。</p>
<p>请注意迷你模式与吸底模式冲突。</p>
<div class="aplayer-wrap">
<div id="aplayer6"><button class="docute-button load">点击加载播放器</div>
</div>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('player'),
mini: true,
audio: [{
name: 'name',
artist: 'artist',
url: 'url.mp3',
cover: 'cover.jpg',
}]
});
</code></pre>
<h2 id="MSE-支持"><a class="header-anchor" href="#MSE-支持"></a>MSE 支持</h2>
<h3 id="HLS"><a class="header-anchor" href="#HLS"></a>HLS</h3>
<p>需要在 <code>APlayer.min.js</code> 前面加载 <a href="https://github.com/video-dev/hls.js">hls.js</a></p>
<div class="aplayer-wrap">
<div id="aplayer7"><button class="docute-button load">点击加载播放器</div>
</div>
<pre><code class="language-html">&lt;link rel=&quot;stylesheet&quot; href=&quot;APlayer.min.css&quot;&gt;
&lt;div id=&quot;aplayer&quot;&gt;&lt;/div&gt;
&lt;script src=&quot;hls.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;APlayer.min.js&quot;&gt;&lt;/script&gt;
</code></pre>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('aplayer'),
audio: [{
name: 'HLS',
artist: 'artist',
url: 'url.m3u8',
cover: 'cover.jpg',
type: 'hls'
}]
});
</code></pre>
<pre><code class="language-js">// 另一种方式,使用 customAudioType
const ap = new APlayer({
container: document.getElementById('aplayer'),
audio: [{
name: 'HLS',
artist: 'artist',
url: 'url.m3u8',
cover: 'cover.jpg',
type: 'customHls'
}],
customAudioType: {
'customHls': function (audioElement, audio, player) {
if (Hls.isSupported()) {
const hls = new Hls();
hls.loadSource(audio.url);
hls.attachMedia(audioElement);
}
else if (audioElement.canPlayType('application/x-mpegURL') || audioElement.canPlayType('application/vnd.apple.mpegURL')) {
audioElement.src = audio.url;
}
else {
player.notice('Error: HLS is not supported.');
}
}
}
});
</code></pre>
<h2 id="根据封面自适应主题色"><a class="header-anchor" href="#根据封面自适应主题色"></a>根据封面自适应主题色</h2>
<p>需要额外加载 <a href="https://github.com/lokesh/color-thief/blob/master/src/color-thief.js">color-thief.js</a></p>
<div class="aplayer-wrap">
<div id="aplayer8"><button class="docute-button load">点击加载播放器</div>
</div>
<pre><code class="language-html">&lt;link rel=&quot;stylesheet&quot; href=&quot;APlayer.min.css&quot;&gt;
&lt;div id=&quot;aplayer&quot;&gt;&lt;/div&gt;
&lt;script src=&quot;APlayer.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;color-thief.js&quot;&gt;&lt;/script&gt;
</code></pre>
<pre><code class="language-js">const ap = new APlayer({
container: document.getElementById('aplayer'),
theme: '#e9e9e9',
audio: [{
name: 'name1',
artist: 'artist1',
url: 'url1.mp3',
cover: 'cover1.jpg'
}, {
name: 'name2',
artist: 'artist2',
url: 'url2.mp3',
cover: 'cover2.jpg'
}]
});
const colorThief = new ColorThief();
const image = new Image();
const xhr = new XMLHttpRequest();
const setTheme = (index) =&gt; {
if (!ap.list.audios[index].theme) {
xhr.onload = function(){
let coverUrl = URL.createObjectURL(this.response);
image.onload = function(){
let color = colorThief.getColor(image);
ap.theme(`rgb(${color[0]}, ${color[1]}, ${color[2]})`, index);
URL.revokeObjectURL(coverUrl)
};
image.src = coverUrl;
}
xhr.open('GET', ap.list.audios[index].cover, true);
xhr.responseType = 'blob';
xhr.send();
}
};
setTheme(ap.list.index);
ap.on('listswitch', (index) =&gt; {
setTheme(index);
});
</code></pre>
<h2 id="CDN"><a class="header-anchor" href="#CDN"></a>CDN</h2>
<ul>
<li><a href="https://www.jsdelivr.com/package/npm/aplayer">jsDelivr</a></li>
<li><a href="https://cdnjs.com/libraries/aplayer">cdnjs</a></li>
<li><a href="https://unpkg.com/aplayer/">unpkg</a></li>
</ul>
<h2 id="常见问题"><a class="header-anchor" href="#常见问题"></a>常见问题</h2>
<h3 id="为什么播放器不能在手机上自动播放?"><a class="header-anchor" href="#为什么播放器不能在手机上自动播放?"></a>为什么播放器不能在手机上自动播放?</h3>
<p>大多数移动端浏览器禁止了音频自动播放。</p>

View File

@ -0,0 +1,47 @@
<hr>
<h2 id="nav-zh-Hanssearch-zh-Hans"><a class="header-anchor" href="#nav-zh-Hanssearch-zh-Hans"></a>nav: zh-Hans<br>
search: zh-Hans</h2>
<h1>生态</h1>
<p>让 APlayer 变得更好,请随意在 <a href="https://github.com/MoePlayer/APlayer/issues/79"><code>Let me know!</code></a> 提交你的项目和产品</p>
<h2 id="帮助"><a class="header-anchor" href="#帮助"></a>帮助</h2>
<h3 id="参与讨论"><a class="header-anchor" href="#参与讨论"></a>参与讨论</h3>
<ul>
<li><a href="https://t.me/adplayer">Telegram 群</a></li>
<li><a href="https://shang.qq.com/wpa/qunwpa?idkey=bf22213ae0028a82e5adf3f286dfd4f01e0997dc9f1dcd8e831a0a85e799be17">QQ 群</a>: 415835947</li>
</ul>
<h3 id="提交-issue"><a class="header-anchor" href="#提交-issue"></a>提交 issue</h3>
<ul>
<li><a href="https://github.com/MoePlayer/APlayer/issues">MoePlayer/APlayer/issues</a></li>
</ul>
<h2 id="相关项目"><a class="header-anchor" href="#相关项目"></a>相关项目</h2>
<h3 id="插件"><a class="header-anchor" href="#插件"></a>插件</h3>
<ul>
<li><a href="https://github.com/zgq354/APlayer-Typecho-Plugin">APlayer-Typecho-Plugin</a>: Typecho</li>
<li><a href="https://github.com/grzhan/hexo-tag-aplayer">hexo-tag-aplayer</a>: Hexo</li>
<li><a href="https://github.com/liwanglin12/Hermit-X">Hermit-X(APlayer for WordPress)</a>: WordPress</li>
<li><a href="https://github.com/kn007/APlayerHandle">APlayerHandle</a>: WordPress</li>
<li><a href="https://github.com/fghrsh/APlayer_for_Z-BlogPHP">APlayer_for_Z-BlogPHP</a>: Z-BlogPHP</li>
<li><a href="https://github.com/sabrinaluo/react-aplayer">react-aplayer</a>: React</li>
<li><a href="https://github.com/SevenOutman/vue-aplayer">Vue-APlayer</a>: Vue</li>
<li><a href="https://github.com/MoeFE/vue-aplayer">vue-aplayer</a>: Vue</li>
<li><a href="https://github.com/Daryl-L/php-aplayer">php-aplayer</a>: PHP</li>
</ul>
<h3 id="工具"><a class="header-anchor" href="#工具"></a>工具</h3>
<ul>
<li><a href="https://github.com/Mashiro-Sorata/APlayer-Controler">APlayer-Controler</a>: controling tool</li>
<li><a href="https://github.com/metowolf/MetingJS">MetingJS</a>: work with Meting music API</li>
</ul>
<h2 id="谁在用-APlayer"><a class="header-anchor" href="#谁在用-APlayer"></a>谁在用 APlayer?</h2>
<ul>
<li><a href="https://www.bilibili.com/">bilibili</a>: 国内知名的视频弹幕网站</li>
<li><a href="https://hacpai.com/">黑客派</a>: 程序员和设计师的聚集地,一个活跃的小众社区</li>
<li><a href="https://zh.wikipedia.org/wiki/CC98%E8%AE%BA%E5%9D%9B">浙江大学CC98论坛</a>: 浙江大学校网内规模最大的论坛中国各大学中较活跃的BBS之一</li>
<li><a href="http://jellyrue.com/">Jelly Rue</a>: Jelly Rue, an indie pop-rock band from Tartu.</li>
<li><a href="http://www.opusopus.co/">Opus</a>: An artist-exploration data visualization application</li>
<li><a href="http://www.chinaz.com/15year/index.html">站长之家</a>: 针对中文站点提供资讯、技术、资源、服务</li>
<li><a href="https://www.lovelivesupport.com/">LLSupport</a>: This site provides a lot of information about LoveLive</li>
<li><a href="https://www.lrcgc.com/diy">歌词千寻</a>: 每日更新的LRC歌词网站</li>
<li><a href="http://i.oppsu.cn">iSearch</a>: 一个提供 iTunes 搜索,试听,高清专辑封面获取,查看最新音乐动态等综合性平台</li>
<li><a href="https://github.com/MoeFE/Lyric">LRC歌词编辑器</a>: 一款非常实用的在线LRC歌词编辑器</li>
<li><a href="https://aerostatica.ru/">Аэростатика</a></li>
</ul>

View File

@ -0,0 +1,35 @@
<hr>
<h2 id="nav-zh-Hanssearch-zh-Hans"><a class="header-anchor" href="#nav-zh-Hanssearch-zh-Hans"></a>nav: zh-Hans<br>
search: zh-Hans</h2>
<h1>赞助 APlayer 的研发</h1>
<p>APlayer 是采用 MIT 许可的开源项目,使用完全免费。 但是随着项目规模的增长,也需要有相应的资金支持才能持续项目的维护的开发。</p>
<p>如果你是企业经营者并且将 APlayer 用在商业产品中,那么赞助 APlayer 有商业上的益处:可以让你的产品所依赖的框架保持健康并得到积极的维护。</p>
<p>如果你是个人开发者并且享受 APlayer 带来的高开发效率,可以用捐助来表示你的谢意 —— 比如偶尔给我买杯咖啡 😃</p>
<p>你可以通过下列的方法来赞助 APlayer 的开发。</p>
<h2 id="一次性赞助"><a class="header-anchor" href="#一次性赞助"></a>一次性赞助</h2>
<p>我们通过以下方式接受赞助:</p>
<ul>
<li><a href="https://i.imgur.com/aq6PtWa.png">微信支付</a></li>
<li><a href="https://i.imgur.com/wv1Pj2k.png">支付宝</a></li>
<li><a href="https://www.paypal.me/DIYgod">Paypal</a></li>
<li>比特币: 13CwQLHzPYm2tewNMSJBeArbbRM5NSmCD1</li>
</ul>
<h2 id="周期性赞助"><a class="header-anchor" href="#周期性赞助"></a>周期性赞助</h2>
<p>周期性赞助可以获得额外的回报,比如你的名字或你的公司 logo 会出现在 APlayer 的 GitHub 仓库和现在我们的官网中。</p>
<ul>
<li>通过 <a href="https://opencollective.com/aplayer">OpenCollective</a> 赞助成为 backer 或 sponsor</li>
<li>给我们发邮件联系赞助事宜: i#html.love</li>
</ul>
<h2 id="当前的顶级赞助商"><a class="header-anchor" href="#当前的顶级赞助商"></a>当前的顶级赞助商</h2>
<h3 id="特别赞助商"><a class="header-anchor" href="#特别赞助商"></a>特别赞助商</h3>
<a href="https://www.dogecloud.com/?ref=dplayer" target="_blank">
<img width="222px" src="https://i.imgur.com/BBKXPAp.png">
</a>
<a href="https://console.upyun.com/register/?invite=BkLZ2Xqob" target="_blank">
<img width="222px" src="https://imgur.com/apG1uKf.png">
</a>
<h3 id="OpenCollective-backers"><a class="header-anchor" href="#OpenCollective-backers"></a>OpenCollective backers</h3>
<p><img src="https://opencollective.com/APlayer/backers.svg?width=890" alt=""></p>
<h2 id="APlayer-贡献者"><a class="header-anchor" href="#APlayer-贡献者"></a>APlayer 贡献者</h2>
<p>感谢所有贡献者。</p>
<p><a href="https://github.com/MoePlayer/APlayer/graphs/contributors"><img src="https://opencollective.com/APlayer/contributors.svg?width=890" /></a></p>

1
aplayer/package.json Normal file
View File

@ -0,0 +1 @@
{"name":"aplayer","version":"1.10.1","description":"Wow, such a beautiful html5 music player","main":"dist/APlayer.min.js","style":"dist/APlayer.min.css","scripts":{"start":"npm run dev","build":"cross-env NODE_ENV=production webpack --config webpack/prod.config.js --progress --display-error-details --colors","dev":"cross-env NODE_ENV=development webpack-dev-server --config webpack/dev.config.js --watch --colors","test":"eslint src webpack","format":"eslint \"**/*.js\" --fix && prettier \"**/*.{js,json,md}\" --write","format:staged":"eslint \"**/*.js\" --fix && pretty-quick --staged --verbose --pattern \"**/*.{js,json,md}\"","format:check":"eslint \"**/*.js\" && prettier-check \"**/*.{js,json,md}\""},"files":["dist"],"repository":{"url":"git+https://github.com/DIYgod/APlayer.git","type":"git"},"keywords":["player","music","html5"],"gitHooks":{"pre-commit":"npm run format:staged"},"author":"DIYgod","license":"MIT","bugs":{"url":"https://github.com/DIYgod/APlayer/issues"},"homepage":"https://github.com/DIYgod/APlayer#readme","devDependencies":{"@babel/core":"^7.6.0","@babel/preset-env":"^7.4.5","@vuepress/plugin-back-to-top":"1.7.1","@vuepress/plugin-google-analytics":"1.7.1","@vuepress/plugin-pwa":"1.7.1","art-template":"4.13.2","art-template-loader":"1.4.3","autoprefixer":"^9.6.1","babel-loader":"^8.0.6","cross-env":"^7.0.0","css-loader":"^5.0.0","cssnano":"^4.1.10","eslint":"^7.0.0","eslint-config-prettier":"^6.3.0","eslint-loader":"^4.0.0","eslint-plugin-prettier":"^3.1.1","exports-loader":"^1.0.0","file-loader":"^6.0.0","git-revision-webpack-plugin":"^3.0.3","mini-css-extract-plugin":"1.3.0","node-sass":"^5.0.0","postcss-loader":"^3.0.0","prettier":"^2.0.1","prettier-check":"^2.0.0","pretty-quick":"^3.0.0","sass-loader":"^10.0.0","strip-loader":"^0.1.2","style-loader":"^2.0.0","svg-inline-loader":"0.8.2","template-string-optimize-loader":"^3.0.0","url-loader":"^4.0.0","vuepress":"1.7.1","webpack":"^4.40.2","webpack-cli":"3.3.12","webpack-dev-server":"^3.8.1","yorkie":"^2.0.0"},"dependencies":{"balloon-css":"^1.0.3","promise-polyfill":"8.2.0","smoothscroll":"0.4.0"}}

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32">
<path d="M4 16c0-6.6 5.4-12 12-12s12 5.4 12 12c0 1.2-0.8 2-2 2s-2-0.8-2-2c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8c1.2 0 2 0.8 2 2s-0.8 2-2 2c-6.6 0-12-5.4-12-12z"></path>
</svg>

After

Width:  |  Height:  |  Size: 253 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 29 32">
<path d="M9.333 9.333h13.333v4l5.333-5.333-5.333-5.333v4h-16v8h2.667v-5.333zM22.667 22.667h-13.333v-4l-5.333 5.333 5.333 5.333v-4h16v-8h-2.667v5.333z"></path>
</svg>

After

Width:  |  Height:  |  Size: 244 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 29 32">
<path d="M2.667 7.027l1.707-1.693 22.293 22.293-1.693 1.707-4-4h-11.64v4l-5.333-5.333 5.333-5.333v4h8.973l-8.973-8.973v0.973h-2.667v-3.64l-4-4zM22.667 17.333h2.667v5.573l-2.667-2.667v-2.907zM22.667 6.667v-4l5.333 5.333-5.333 5.333v-4h-10.907l-2.667-2.667h13.573z"></path>
</svg>

After

Width:  |  Height:  |  Size: 357 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 33 32">
<path d="M9.333 9.333h13.333v4l5.333-5.333-5.333-5.333v4h-16v8h2.667v-5.333zM22.667 22.667h-13.333v-4l-5.333 5.333 5.333 5.333v-4h16v-8h-2.667v5.333zM17.333 20v-8h-1.333l-2.667 1.333v1.333h2v5.333h2z"></path>
</svg>

After

Width:  |  Height:  |  Size: 294 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32">
<path d="M26.667 5.333h-21.333c-0 0-0.001 0-0.001 0-1.472 0-2.666 1.194-2.666 2.666 0 0 0 0.001 0 0.001v-0 16c0 0 0 0.001 0 0.001 0 1.472 1.194 2.666 2.666 2.666 0 0 0.001 0 0.001 0h21.333c0 0 0.001 0 0.001 0 1.472 0 2.666-1.194 2.666-2.666 0-0 0-0.001 0-0.001v0-16c0-0 0-0.001 0-0.001 0-1.472-1.194-2.666-2.666-2.666-0 0-0.001 0-0.001 0h0zM5.333 16h5.333v2.667h-5.333v-2.667zM18.667 24h-13.333v-2.667h13.333v2.667zM26.667 24h-5.333v-2.667h5.333v2.667zM26.667 18.667h-13.333v-2.667h13.333v2.667z"></path>
</svg>

After

Width:  |  Height:  |  Size: 590 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 22 32">
<path d="M20.8 14.4q0.704 0 1.152 0.48t0.448 1.12-0.48 1.12-1.12 0.48h-19.2q-0.64 0-1.12-0.48t-0.48-1.12 0.448-1.12 1.152-0.48h19.2zM1.6 11.2q-0.64 0-1.12-0.48t-0.48-1.12 0.448-1.12 1.152-0.48h19.2q0.704 0 1.152 0.48t0.448 1.12-0.48 1.12-1.12 0.48h-19.2zM20.8 20.8q0.704 0 1.152 0.48t0.448 1.12-0.48 1.12-1.12 0.48h-19.2q-0.64 0-1.12-0.48t-0.48-1.12 0.448-1.12 1.152-0.48h19.2z"></path>
</svg>

After

Width:  |  Height:  |  Size: 472 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32">
<path d="M0.622 18.334h19.54v7.55l11.052-9.412-11.052-9.413v7.549h-19.54v3.725z"></path>
</svg>

After

Width:  |  Height:  |  Size: 174 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32">
<path d="M22.667 4l7 6-7 6 7 6-7 6v-4h-3.653l-3.76-3.76 2.827-2.827 2.587 2.587h2v-8h-2l-12 12h-6v-4h4.347l12-12h3.653v-4zM2.667 8h6l3.76 3.76-2.827 2.827-2.587-2.587h-4.347v-4z"></path>
</svg>

After

Width:  |  Height:  |  Size: 272 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 17 32">
<path d="M14.080 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048zM2.88 4.8q2.88 0 2.88 2.048v18.24q0 2.112-2.88 2.112t-2.88-2.112v-18.24q0-2.048 2.88-2.048z"></path>
</svg>

After

Width:  |  Height:  |  Size: 288 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 31">
<path d="M15.552 15.168q0.448 0.32 0.448 0.832 0 0.448-0.448 0.768l-13.696 8.512q-0.768 0.512-1.312 0.192t-0.544-1.28v-16.448q0-0.96 0.544-1.28t1.312 0.192z"></path>
</svg>

After

Width:  |  Height:  |  Size: 251 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32">
<path d="M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z"></path>
</svg>

After

Width:  |  Height:  |  Size: 184 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32">
<path d="M25.468 6.947c-0.326-0.172-0.724-0.151-1.030 0.057l-6.438 4.38v-3.553c0-0.371-0.205-0.71-0.532-0.884-0.326-0.172-0.724-0.151-1.030 0.057l-12 8.164c-0.274 0.186-0.438 0.496-0.438 0.827s0.164 0.641 0.438 0.827l12 8.168c0.169 0.115 0.365 0.174 0.562 0.174 0.16 0 0.321-0.038 0.468-0.116 0.327-0.173 0.532-0.514 0.532-0.884v-3.556l6.438 4.382c0.169 0.115 0.365 0.174 0.562 0.174 0.16 0 0.321-0.038 0.468-0.116 0.327-0.173 0.532-0.514 0.532-0.884v-16.333c0-0.371-0.205-0.71-0.532-0.884z"></path>
</svg>

After

Width:  |  Height:  |  Size: 585 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 28 32">
<path d="M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528z"></path>
</svg>

After

Width:  |  Height:  |  Size: 604 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 28 32">
<path d="M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8z"></path>
</svg>

After

Width:  |  Height:  |  Size: 301 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 28 32">
<path d="M13.728 6.272v19.456q0 0.448-0.352 0.8t-0.8 0.32-0.8-0.32l-5.952-5.952h-4.672q-0.48 0-0.8-0.352t-0.352-0.8v-6.848q0-0.48 0.352-0.8t0.8-0.352h4.672l5.952-5.952q0.32-0.32 0.8-0.32t0.8 0.32 0.352 0.8zM20.576 16q0 1.344-0.768 2.528t-2.016 1.664q-0.16 0.096-0.448 0.096-0.448 0-0.8-0.32t-0.32-0.832q0-0.384 0.192-0.64t0.544-0.448 0.608-0.384 0.512-0.64 0.192-1.024-0.192-1.024-0.512-0.64-0.608-0.384-0.544-0.448-0.192-0.64q0-0.48 0.32-0.832t0.8-0.32q0.288 0 0.448 0.096 1.248 0.48 2.016 1.664t0.768 2.528zM25.152 16q0 2.72-1.536 5.056t-4 3.36q-0.256 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.704 0.672-1.056 1.024-0.512 1.376-0.8 1.312-0.96 2.048-2.4t0.736-3.104-0.736-3.104-2.048-2.4q-0.352-0.288-1.376-0.8-0.672-0.352-0.672-1.056 0-0.448 0.32-0.8t0.8-0.352q0.224 0 0.48 0.096 2.496 1.056 4 3.36t1.536 5.056zM29.728 16q0 4.096-2.272 7.552t-6.048 5.056q-0.224 0.096-0.448 0.096-0.48 0-0.832-0.352t-0.32-0.8q0-0.64 0.704-1.056 0.128-0.064 0.384-0.192t0.416-0.192q0.8-0.448 1.44-0.896 2.208-1.632 3.456-4.064t1.216-5.152-1.216-5.152-3.456-4.064q-0.64-0.448-1.44-0.896-0.128-0.096-0.416-0.192t-0.384-0.192q-0.704-0.416-0.704-1.056 0-0.448 0.32-0.8t0.832-0.352q0.224 0 0.448 0.096 3.776 1.632 6.048 5.056t2.272 7.552z"></path>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

706
aplayer/src/css/index.scss Normal file
View File

@ -0,0 +1,706 @@
$aplayer-height: 66px;
$lrc-height: 30px;
$aplayer-height-lrc: $aplayer-height + $lrc-height - 6;
.aplayer {
background: #fff;
font-family: Arial, Helvetica, sans-serif;
margin: 5px;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.07), 0 1px 5px 0 rgba(0, 0, 0, 0.1);
border-radius: 2px;
overflow: hidden;
user-select: none;
line-height: initial;
position: relative;
* {
box-sizing: content-box;
}
svg {
width: 100%;
height: 100%;
path,
circle {
fill: #fff;
}
}
&.aplayer-withlist {
.aplayer-info {
border-bottom: 1px solid #e9e9e9;
}
.aplayer-list {
display: block;
}
.aplayer-info .aplayer-controller .aplayer-time .aplayer-icon.aplayer-icon-menu {
display: inline;
}
.aplayer-icon-order {
display: inline;
}
}
&.aplayer-withlrc {
.aplayer-pic {
height: $aplayer-height-lrc;
width: $aplayer-height-lrc;
}
.aplayer-info {
margin-left: $aplayer-height-lrc;
height: $aplayer-height-lrc;
padding: 10px 7px 0 7px;
}
.aplayer-lrc {
display: block;
}
}
&.aplayer-narrow {
width: $aplayer-height;
.aplayer-info {
display: none;
}
.aplayer-list {
display: none;
}
.aplayer-pic,
.aplayer-body {
height: $aplayer-height;
width: $aplayer-height;
}
}
&.aplayer-fixed {
position: fixed;
bottom: 0;
left: 0;
right: 0;
margin: 0;
z-index: 99;
overflow: visible;
max-width: 400px;
box-shadow: none;
.aplayer-list {
margin-bottom: 65px;
border: 1px solid #eee;
border-bottom: none;
}
.aplayer-body {
position: fixed;
bottom: 0;
left: 0;
right: 0;
margin: 0;
z-index: 99;
background: #fff;
padding-right: 18px;
transition: all 0.3s ease;
max-width: 400px;
}
.aplayer-lrc {
display: block;
position: fixed;
bottom: 10px;
left: 0;
right: 0;
margin: 0;
z-index: 98;
pointer-events: none;
text-shadow: -1px -1px 0 #fff;
&:before,
&:after {
display: none;
}
}
.aplayer-info {
transform: scaleX(1);
transform-origin: 0 0;
transition: all 0.3s ease;
border-bottom: none;
border-top: 1px solid #e9e9e9;
.aplayer-music {
width: calc(100% - 105px);
}
}
.aplayer-miniswitcher {
display: block;
}
&.aplayer-narrow {
.aplayer-info {
display: block;
transform: scaleX(0);
}
.aplayer-body {
width: $aplayer-height !important;
}
.aplayer-miniswitcher .aplayer-icon {
transform: rotateY(0);
}
}
.aplayer-icon-back,
.aplayer-icon-play,
.aplayer-icon-forward,
.aplayer-icon-lrc {
display: inline-block;
}
.aplayer-icon-back,
.aplayer-icon-play,
.aplayer-icon-forward,
.aplayer-icon-menu {
position: absolute;
bottom: 27px;
width: 20px;
height: 20px;
}
.aplayer-icon-back {
right: 75px;
}
.aplayer-icon-play {
right: 50px;
}
.aplayer-icon-forward {
right: 25px;
}
.aplayer-icon-menu {
right: 0;
}
}
&.aplayer-mobile {
.aplayer-icon-volume-down {
display: none;
}
}
&.aplayer-arrow {
.aplayer-icon-order,
.aplayer-icon-loop {
display: none;
}
}
&.aplayer-loading {
.aplayer-info .aplayer-controller .aplayer-loading-icon {
display: block;
}
.aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb {
transform: scale(1);
}
}
.aplayer-body {
position: relative;
}
.aplayer-icon {
width: 15px;
height: 15px;
border: none;
background-color: transparent;
outline: none;
cursor: pointer;
opacity: .8;
vertical-align: middle;
padding: 0;
font-size: 12px;
margin: 0;
display: inline-block;
path {
transition: all .2s ease-in-out;
}
}
.aplayer-icon-order,
.aplayer-icon-back,
.aplayer-icon-play,
.aplayer-icon-forward,
.aplayer-icon-lrc {
display: none;
}
.aplayer-icon-lrc-inactivity {
svg {
opacity: 0.4;
}
}
.aplayer-icon-forward {
transform: rotate(180deg);
}
.aplayer-lrc-content {
display: none;
}
.aplayer-pic {
position: relative;
float: left;
height: $aplayer-height;
width: $aplayer-height;
background-size: cover;
background-position: center;
transition: all 0.3s ease;
cursor: pointer;
&:hover .aplayer-button {
opacity: 1;
}
.aplayer-button {
position: absolute;
border-radius: 50%;
opacity: 0.8;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
background: rgba(0, 0, 0, 0.2);
transition: all 0.1s ease;
path {
fill: #fff;
}
}
.aplayer-hide {
display: none;
}
.aplayer-play {
width: 26px;
height: 26px;
border: 2px solid #fff;
bottom: 50%;
right: 50%;
margin: 0 -15px -15px 0;
svg {
position: absolute;
top: 3px;
left: 4px;
height: 20px;
width: 20px;
}
}
.aplayer-pause {
width: 16px;
height: 16px;
border: 2px solid #fff;
bottom: 4px;
right: 4px;
svg {
position: absolute;
top: 2px;
left: 2px;
height: 12px;
width: 12px;
}
}
}
.aplayer-info {
margin-left: $aplayer-height;
padding: 14px 7px 0 10px;
height: $aplayer-height;
box-sizing: border-box;
.aplayer-music {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin: 0 0 13px 5px;
user-select: text;
cursor: default;
padding-bottom: 2px;
height: 20px;
.aplayer-title {
font-size: 14px;
}
.aplayer-author {
font-size: 12px;
color: #666;
}
}
.aplayer-controller {
position: relative;
display: flex;
.aplayer-bar-wrap {
margin: 0 0 0 5px;
padding: 4px 0;
cursor: pointer !important;
flex: 1;
&:hover {
.aplayer-bar .aplayer-played .aplayer-thumb {
transform: scale(1);
}
}
.aplayer-bar {
position: relative;
height: 2px;
width: 100%;
background: #cdcdcd;
.aplayer-loaded {
position: absolute;
left: 0;
top: 0;
bottom: 0;
background: #aaa;
height: 2px;
transition: all 0.5s ease;
}
.aplayer-played {
position: absolute;
left: 0;
top: 0;
bottom: 0;
height: 2px;
.aplayer-thumb {
position: absolute;
top: 0;
right: 5px;
margin-top: -4px;
margin-right: -10px;
height: 10px;
width: 10px;
border-radius: 50%;
cursor: pointer;
transition: all .3s ease-in-out;
transform: scale(0);
}
}
}
}
.aplayer-time {
position: relative;
right: 0;
bottom: 4px;
height: 17px;
color: #999;
font-size: 11px;
padding-left: 7px;
.aplayer-time-inner {
vertical-align: middle;
}
.aplayer-icon {
cursor: pointer;
transition: all 0.2s ease;
path {
fill: #666;
}
&.aplayer-icon-loop {
margin-right: 2px;
}
&:hover {
path {
fill: #000;
}
}
&.aplayer-icon-menu {
display: none;
}
}
&.aplayer-time-narrow {
.aplayer-icon-mode {
display: none;
}
.aplayer-icon-menu {
display: none;
}
}
}
.aplayer-volume-wrap {
position: relative;
display: inline-block;
margin-left: 3px;
cursor: pointer !important;
&:hover .aplayer-volume-bar-wrap {
height: 40px;
}
.aplayer-volume-bar-wrap {
position: absolute;
bottom: 15px;
right: -3px;
width: 25px;
height: 0;
z-index: 99;
overflow: hidden;
transition: all .2s ease-in-out;
&.aplayer-volume-bar-wrap-active {
height: 40px;
}
.aplayer-volume-bar {
position: absolute;
bottom: 0;
right: 10px;
width: 5px;
height: 35px;
background: #aaa;
border-radius: 2.5px;
overflow: hidden;
.aplayer-volume {
position: absolute;
bottom: 0;
right: 0;
width: 5px;
transition: all 0.1s ease;
}
}
}
}
.aplayer-loading-icon {
display: none;
svg {
position: absolute;
animation: rotate 1s linear infinite;
}
}
}
}
.aplayer-lrc {
display: none;
position: relative;
height: $lrc-height;
text-align: center;
overflow: hidden;
margin: -10px 0 7px;
&:before {
position: absolute;
top: 0;
z-index: 1;
display: block;
overflow: hidden;
width: 100%;
height: 10%;
content: ' ';
background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%);
background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#00ffffff',GradientType=0 );
}
&:after {
position: absolute;
bottom: 0;
z-index: 1;
display: block;
overflow: hidden;
width: 100%;
height: 33%;
content: ' ';
background: -moz-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 100%);
background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,0.8) 100%);
background: linear-gradient(to bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,0.8) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ccffffff',GradientType=0 );
}
p {
font-size: 12px;
color: #666;
line-height: 16px !important;
height: 16px !important;
padding: 0 !important;
margin: 0 !important;
transition: all 0.5s ease-out;
opacity: 0.4;
overflow: hidden;
&.aplayer-lrc-current {
opacity: 1;
overflow: visible;
height: initial !important;
min-height: 16px;
}
}
&.aplayer-lrc-hide {
display: none;
}
.aplayer-lrc-contents {
width: 100%;
transition: all 0.5s ease-out;
user-select: text;
cursor: default;
}
}
.aplayer-list {
overflow: auto;
transition: all 0.5s ease;
will-change: height;
display: none;
overflow: hidden;
list-style-type: none;
margin: 0;
padding: 0;
overflow-y: auto;
&::-webkit-scrollbar {
width: 5px;
}
&::-webkit-scrollbar-thumb {
border-radius: 3px;
background-color: #eee;
}
&::-webkit-scrollbar-thumb:hover {
background-color: #ccc;
}
li {
position: relative;
height: 32px;
line-height: 32px;
padding: 0 15px;
font-size: 12px;
border-top: 1px solid #e9e9e9;
cursor: pointer;
transition: all 0.2s ease;
overflow: hidden;
margin: 0;
&:first-child {
border-top: none;
}
&:hover {
background: #efefef;
}
&.aplayer-list-light {
background: #e9e9e9;
.aplayer-list-cur {
display: inline-block;
}
}
.aplayer-list-cur {
display: none;
width: 3px;
height: 22px;
position: absolute;
left: 0;
top: 5px;
cursor: pointer;
}
.aplayer-list-index {
color: #666;
margin-right: 12px;
cursor: pointer;
}
.aplayer-list-author {
color: #666;
float: right;
cursor: pointer;
}
}
}
.aplayer-notice {
opacity: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 12px;
border-radius: 4px;
padding: 5px 10px;
transition: all .3s ease-in-out;
overflow: hidden;
color: #fff;
pointer-events: none;
background-color: #f4f4f5;
color: #909399;
}
.aplayer-miniswitcher {
display: none;
position: absolute;
top: 0;
right: 0;
bottom: 0;
height: 100%;
background: #e6e6e6;
width: 18px;
border-radius: 0 2px 2px 0;
.aplayer-icon {
height: 100%;
width: 100%;
transform: rotateY(180deg);
transition: all 0.3s ease;
path {
fill: #666;
}
&:hover {
path {
fill: #000;
}
}
}
}
}
@keyframes aplayer-roll {
0%{left:0}
100%{left: -100%}
}
@keyframes rotate {
0% {
transform: rotate(0)
}
100% {
transform: rotate(360deg)
}
}

27
aplayer/src/js/bar.js Normal file
View File

@ -0,0 +1,27 @@
class Bar {
constructor(template) {
this.elements = {};
this.elements.volume = template.volume;
this.elements.played = template.played;
this.elements.loaded = template.loaded;
}
/**
* Update progress
*
* @param {String} type - Point out which bar it is
* @param {Number} percentage
* @param {String} direction - Point out the direction of this bar, Should be height or width
*/
set(type, percentage, direction) {
percentage = Math.max(percentage, 0);
percentage = Math.min(percentage, 1);
this.elements[type].style[direction] = percentage * 100 + '%';
}
get(type, direction) {
return parseFloat(this.elements[type].style[direction]) / 100;
}
}
export default Bar;

View File

@ -0,0 +1,164 @@
import utils from './utils';
import Icons from './icons';
class Controller {
constructor(player) {
this.player = player;
this.initPlayButton();
this.initPlayBar();
this.initOrderButton();
this.initLoopButton();
this.initMenuButton();
if (!utils.isMobile) {
this.initVolumeButton();
}
this.initMiniSwitcher();
this.initSkipButton();
this.initLrcButton();
}
initPlayButton() {
this.player.template.pic.addEventListener('click', () => {
this.player.toggle();
});
}
initPlayBar() {
const thumbMove = (e) => {
let percentage = ((e.clientX || e.changedTouches[0].clientX) - this.player.template.barWrap.getBoundingClientRect().left) / this.player.template.barWrap.clientWidth;
percentage = Math.max(percentage, 0);
percentage = Math.min(percentage, 1);
this.player.bar.set('played', percentage, 'width');
this.player.lrc && this.player.lrc.update(percentage * this.player.duration);
this.player.template.ptime.innerHTML = utils.secondToTime(percentage * this.player.duration);
};
const thumbUp = (e) => {
document.removeEventListener(utils.nameMap.dragEnd, thumbUp);
document.removeEventListener(utils.nameMap.dragMove, thumbMove);
let percentage = ((e.clientX || e.changedTouches[0].clientX) - this.player.template.barWrap.getBoundingClientRect().left) / this.player.template.barWrap.clientWidth;
percentage = Math.max(percentage, 0);
percentage = Math.min(percentage, 1);
this.player.bar.set('played', percentage, 'width');
this.player.seek(percentage * this.player.duration);
this.player.disableTimeupdate = false;
};
this.player.template.barWrap.addEventListener(utils.nameMap.dragStart, () => {
this.player.disableTimeupdate = true;
document.addEventListener(utils.nameMap.dragMove, thumbMove);
document.addEventListener(utils.nameMap.dragEnd, thumbUp);
});
}
initVolumeButton() {
this.player.template.volumeButton.addEventListener('click', () => {
if (this.player.audio.muted) {
this.player.volume(this.player.audio.volume, true);
} else {
this.player.audio.muted = true;
this.player.switchVolumeIcon();
this.player.bar.set('volume', 0, 'height');
}
});
const thumbMove = (e) => {
let percentage = 1 - ((e.clientY || e.changedTouches[0].clientY) - this.player.template.volumeBar.getBoundingClientRect().top) / this.player.template.volumeBar.clientHeight;
percentage = Math.max(percentage, 0);
percentage = Math.min(percentage, 1);
this.player.volume(percentage);
};
const thumbUp = (e) => {
this.player.template.volumeBarWrap.classList.remove('aplayer-volume-bar-wrap-active');
document.removeEventListener(utils.nameMap.dragEnd, thumbUp);
document.removeEventListener(utils.nameMap.dragMove, thumbMove);
let percentage = 1 - ((e.clientY || e.changedTouches[0].clientY) - this.player.template.volumeBar.getBoundingClientRect().top) / this.player.template.volumeBar.clientHeight;
percentage = Math.max(percentage, 0);
percentage = Math.min(percentage, 1);
this.player.volume(percentage);
};
this.player.template.volumeBarWrap.addEventListener(utils.nameMap.dragStart, () => {
this.player.template.volumeBarWrap.classList.add('aplayer-volume-bar-wrap-active');
document.addEventListener(utils.nameMap.dragMove, thumbMove);
document.addEventListener(utils.nameMap.dragEnd, thumbUp);
});
}
initOrderButton() {
this.player.template.order.addEventListener('click', () => {
if (this.player.options.order === 'list') {
this.player.options.order = 'random';
this.player.template.order.innerHTML = Icons.orderRandom;
} else if (this.player.options.order === 'random') {
this.player.options.order = 'list';
this.player.template.order.innerHTML = Icons.orderList;
}
});
}
initLoopButton() {
this.player.template.loop.addEventListener('click', () => {
if (this.player.list.audios.length > 1) {
if (this.player.options.loop === 'one') {
this.player.options.loop = 'none';
this.player.template.loop.innerHTML = Icons.loopNone;
} else if (this.player.options.loop === 'none') {
this.player.options.loop = 'all';
this.player.template.loop.innerHTML = Icons.loopAll;
} else if (this.player.options.loop === 'all') {
this.player.options.loop = 'one';
this.player.template.loop.innerHTML = Icons.loopOne;
}
} else {
if (this.player.options.loop === 'one' || this.player.options.loop === 'all') {
this.player.options.loop = 'none';
this.player.template.loop.innerHTML = Icons.loopNone;
} else if (this.player.options.loop === 'none') {
this.player.options.loop = 'all';
this.player.template.loop.innerHTML = Icons.loopAll;
}
}
});
}
initMenuButton() {
this.player.template.menu.addEventListener('click', () => {
this.player.list.toggle();
});
}
initMiniSwitcher() {
this.player.template.miniSwitcher.addEventListener('click', () => {
this.player.setMode(this.player.mode === 'mini' ? 'normal' : 'mini');
});
}
initSkipButton() {
this.player.template.skipBackButton.addEventListener('click', () => {
this.player.skipBack();
});
this.player.template.skipForwardButton.addEventListener('click', () => {
this.player.skipForward();
});
this.player.template.skipPlayButton.addEventListener('click', () => {
this.player.toggle();
});
}
initLrcButton() {
this.player.template.lrcButton.addEventListener('click', () => {
if (this.player.template.lrcButton.classList.contains('aplayer-icon-lrc-inactivity')) {
this.player.template.lrcButton.classList.remove('aplayer-icon-lrc-inactivity');
this.player.lrc && this.player.lrc.show();
} else {
this.player.template.lrcButton.classList.add('aplayer-icon-lrc-inactivity');
this.player.lrc && this.player.lrc.hide();
}
});
}
}
export default Controller;

62
aplayer/src/js/events.js Normal file
View File

@ -0,0 +1,62 @@
class Events {
constructor() {
this.events = {};
this.audioEvents = [
'abort',
'canplay',
'canplaythrough',
'durationchange',
'emptied',
'ended',
'error',
'loadeddata',
'loadedmetadata',
'loadstart',
'mozaudioavailable',
'pause',
'play',
'playing',
'progress',
'ratechange',
'seeked',
'seeking',
'stalled',
'suspend',
'timeupdate',
'volumechange',
'waiting',
];
this.playerEvents = ['destroy', 'listshow', 'listhide', 'listadd', 'listremove', 'listswitch', 'listclear', 'noticeshow', 'noticehide', 'lrcshow', 'lrchide'];
}
on(name, callback) {
if (this.type(name) && typeof callback === 'function') {
if (!this.events[name]) {
this.events[name] = [];
}
this.events[name].push(callback);
}
}
trigger(name, data) {
if (this.events[name] && this.events[name].length) {
for (let i = 0; i < this.events[name].length; i++) {
this.events[name][i](data);
}
}
}
type(name) {
if (this.playerEvents.indexOf(name) !== -1) {
return 'player';
} else if (this.audioEvents.indexOf(name) !== -1) {
return 'audio';
}
console.error(`Unknown event name: ${name}`);
return null;
}
}
export default Events;

35
aplayer/src/js/icons.js Normal file
View File

@ -0,0 +1,35 @@
import play from '../assets/play.svg';
import pause from '../assets/pause.svg';
import volumeUp from '../assets/volume-up.svg';
import volumeDown from '../assets/volume-down.svg';
import volumeOff from '../assets/volume-off.svg';
import orderRandom from '../assets/order-random.svg';
import orderList from '../assets/order-list.svg';
import menu from '../assets/menu.svg';
import loopAll from '../assets/loop-all.svg';
import loopOne from '../assets/loop-one.svg';
import loopNone from '../assets/loop-none.svg';
import loading from '../assets/loading.svg';
import right from '../assets/right.svg';
import skip from '../assets/skip.svg';
import lrc from '../assets/lrc.svg';
const Icons = {
play: play,
pause: pause,
volumeUp: volumeUp,
volumeDown: volumeDown,
volumeOff: volumeOff,
orderRandom: orderRandom,
orderList: orderList,
menu: menu,
loopAll: loopAll,
loopOne: loopOne,
loopNone: loopNone,
loading: loading,
right: right,
skip: skip,
lrc: lrc,
};
export default Icons;

7
aplayer/src/js/index.js Normal file
View File

@ -0,0 +1,7 @@
import '../css/index.scss';
import APlayer from './player';
/* global APLAYER_VERSION GIT_HASH */
console.log(`${'\n'} %c APlayer v${APLAYER_VERSION} ${GIT_HASH} %c http://aplayer.js.org ${'\n'}`, 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');
export default APlayer;

195
aplayer/src/js/list.js Normal file
View File

@ -0,0 +1,195 @@
import tplListItem from '../template/list-item.art';
import utils from './utils';
import smoothScroll from 'smoothscroll';
class List {
constructor(player) {
this.player = player;
this.index = 0;
this.audios = this.player.options.audio;
this.showing = true;
this.player.template.list.style.height = `${Math.min(this.player.template.list.scrollHeight, this.player.options.listMaxHeight)}px`;
this.bindEvents();
}
bindEvents() {
this.player.template.list.addEventListener('click', (e) => {
let target;
if (e.target.tagName.toUpperCase() === 'LI') {
target = e.target;
} else {
target = e.target.parentElement;
}
const audioIndex = parseInt(target.getElementsByClassName('aplayer-list-index')[0].innerHTML) - 1;
if (audioIndex !== this.index) {
this.switch(audioIndex);
this.player.play();
} else {
this.player.toggle();
}
});
}
show() {
this.showing = true;
this.player.template.list.scrollTop = this.index * 33;
this.player.template.list.style.height = `${Math.min(this.player.template.list.scrollHeight, this.player.options.listMaxHeight)}px`;
this.player.events.trigger('listshow');
}
hide() {
this.showing = false;
this.player.template.list.style.height = `${Math.min(this.player.template.list.scrollHeight, this.player.options.listMaxHeight)}px`;
setTimeout(() => {
this.player.template.list.style.height = '0px';
this.player.events.trigger('listhide');
}, 0);
}
toggle() {
if (this.showing) {
this.hide();
} else {
this.show();
}
}
add(audios) {
this.player.events.trigger('listadd', {
audios: audios,
});
if (Object.prototype.toString.call(audios) !== '[object Array]') {
audios = [audios];
}
audios.map((item) => {
item.name = item.name || item.title || 'Audio name';
item.artist = item.artist || item.author || 'Audio artist';
item.cover = item.cover || item.pic;
item.type = item.type || 'normal';
return item;
});
const wasSingle = !(this.audios.length > 1);
const wasEmpty = this.audios.length === 0;
this.player.template.list.innerHTML += tplListItem({
theme: this.player.options.theme,
audio: audios,
index: this.audios.length + 1,
});
this.audios = this.audios.concat(audios);
if (wasSingle && this.audios.length > 1) {
this.player.container.classList.add('aplayer-withlist');
}
this.player.randomOrder = utils.randomOrder(this.audios.length);
this.player.template.listCurs = this.player.container.querySelectorAll('.aplayer-list-cur');
this.player.template.listCurs[this.audios.length - 1].style.backgroundColor = audios.theme || this.player.options.theme;
if (wasEmpty) {
if (this.player.options.order === 'random') {
this.switch(this.player.randomOrder[0]);
} else {
this.switch(0);
}
}
}
remove(index) {
this.player.events.trigger('listremove', {
index: index,
});
if (this.audios[index]) {
if (this.audios.length > 1) {
const list = this.player.container.querySelectorAll('.aplayer-list li');
list[index].remove();
this.audios.splice(index, 1);
this.player.lrc && this.player.lrc.remove(index);
if (index === this.index) {
if (this.audios[index]) {
this.switch(index);
} else {
this.switch(index - 1);
}
}
if (this.index > index) {
this.index--;
}
for (let i = index; i < list.length; i++) {
list[i].getElementsByClassName('aplayer-list-index')[0].textContent = i;
}
if (this.audios.length === 1) {
this.player.container.classList.remove('aplayer-withlist');
}
this.player.template.listCurs = this.player.container.querySelectorAll('.aplayer-list-cur');
} else {
this.clear();
}
}
}
switch(index) {
this.player.events.trigger('listswitch', {
index: index,
});
if (typeof index !== 'undefined' && this.audios[index]) {
this.index = index;
const audio = this.audios[this.index];
// set html
this.player.template.pic.style.backgroundImage = audio.cover ? `url('${audio.cover}')` : '';
this.player.theme(this.audios[this.index].theme || this.player.options.theme, this.index, false);
this.player.template.title.innerHTML = audio.name;
this.player.template.author.innerHTML = audio.artist ? ' - ' + audio.artist : '';
const light = this.player.container.getElementsByClassName('aplayer-list-light')[0];
if (light) {
light.classList.remove('aplayer-list-light');
}
this.player.container.querySelectorAll('.aplayer-list li')[this.index].classList.add('aplayer-list-light');
smoothScroll(this.index * 33, 500, null, this.player.template.list);
this.player.setAudio(audio);
this.player.lrc && this.player.lrc.switch(this.index);
this.player.lrc && this.player.lrc.update(0);
// set duration time
if (this.player.duration !== 1) {
// compatibility: Android browsers will output 1 at first
this.player.template.dtime.innerHTML = utils.secondToTime(this.player.duration);
}
}
}
clear() {
this.player.events.trigger('listclear');
this.index = 0;
this.player.container.classList.remove('aplayer-withlist');
this.player.pause();
this.audios = [];
this.player.lrc && this.player.lrc.clear();
this.player.audio.src = '';
this.player.template.list.innerHTML = '';
this.player.template.pic.style.backgroundImage = '';
this.player.theme(this.player.options.theme, this.index, false);
this.player.template.title.innerHTML = 'No audio';
this.player.template.author.innerHTML = '';
this.player.bar.set('loaded', 0, 'width');
this.player.template.dtime.innerHTML = utils.secondToTime(0);
}
}
export default List;

143
aplayer/src/js/lrc.js Normal file
View File

@ -0,0 +1,143 @@
import tplLrc from '../template/lrc.art';
class Lrc {
constructor(options) {
this.container = options.container;
this.async = options.async;
this.player = options.player;
this.parsed = [];
this.index = 0;
this.current = [];
}
show() {
this.player.events.trigger('lrcshow');
this.player.template.lrcWrap.classList.remove('aplayer-lrc-hide');
}
hide() {
this.player.events.trigger('lrchide');
this.player.template.lrcWrap.classList.add('aplayer-lrc-hide');
}
toggle() {
if (this.player.template.lrcWrap.classList.contains('aplayer-lrc-hide')) {
this.show();
} else {
this.hide();
}
}
update(currentTime = this.player.audio.currentTime) {
if (this.index > this.current.length - 1 || currentTime < this.current[this.index][0] || (!this.current[this.index + 1] || currentTime >= this.current[this.index + 1][0])) {
for (let i = 0; i < this.current.length; i++) {
if (currentTime >= this.current[i][0] && (!this.current[i + 1] || currentTime < this.current[i + 1][0])) {
this.index = i;
this.container.style.transform = `translateY(${-this.index * 16}px)`;
this.container.style.webkitTransform = `translateY(${-this.index * 16}px)`;
this.container.getElementsByClassName('aplayer-lrc-current')[0].classList.remove('aplayer-lrc-current');
this.container.getElementsByTagName('p')[i].classList.add('aplayer-lrc-current');
}
}
}
}
switch(index) {
if (!this.parsed[index]) {
if (!this.async) {
if (this.player.list.audios[index].lrc) {
this.parsed[index] = this.parse(this.player.list.audios[index].lrc);
} else {
this.parsed[index] = [['00:00', 'Not available']];
}
} else {
this.parsed[index] = [['00:00', 'Loading']];
const xhr = new XMLHttpRequest();
xhr.onreadystatechange = () => {
if (index === this.player.list.index && xhr.readyState === 4) {
if ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304) {
this.parsed[index] = this.parse(xhr.responseText);
} else {
this.player.notice(`LRC file request fails: status ${xhr.status}`);
this.parsed[index] = [['00:00', 'Not available']];
}
this.container.innerHTML = tplLrc({
lyrics: this.parsed[index],
});
this.update(0);
this.current = this.parsed[index];
}
};
const apiurl = this.player.list.audios[index].lrc;
xhr.open('get', apiurl, true);
xhr.send(null);
}
}
this.container.innerHTML = tplLrc({
lyrics: this.parsed[index],
});
this.current = this.parsed[index];
this.update(0);
}
/**
* Parse lrc, suppose multiple time tag
*
* @param {String} lrc_s - Format:
* [mm:ss]lyric
* [mm:ss.xx]lyric
* [mm:ss.xxx]lyric
* [mm:ss.xx][mm:ss.xx][mm:ss.xx]lyric
* [mm:ss.xx]<mm:ss.xx>lyric
*
* @return {String} [[time, text], [time, text], [time, text], ...]
*/
parse(lrc_s) {
if (lrc_s) {
lrc_s = lrc_s.replace(/([^\]^\n])\[/g, (match, p1) => p1 + '\n[');
const lyric = lrc_s.split('\n');
let lrc = [];
const lyricLen = lyric.length;
for (let i = 0; i < lyricLen; i++) {
// match lrc time
const lrcTimes = lyric[i].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g);
// match lrc text
const lrcText = lyric[i]
.replace(/.*\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g, '')
.replace(/<(\d{2}):(\d{2})(\.(\d{2,3}))?>/g, '')
.replace(/^\s+|\s+$/g, '');
if (lrcTimes) {
// handle multiple time tag
const timeLen = lrcTimes.length;
for (let j = 0; j < timeLen; j++) {
const oneTime = /\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/.exec(lrcTimes[j]);
const min2sec = oneTime[1] * 60;
const sec2sec = parseInt(oneTime[2]);
const msec2sec = oneTime[4] ? parseInt(oneTime[4]) / ((oneTime[4] + '').length === 2 ? 100 : 1000) : 0;
const lrcTime = min2sec + sec2sec + msec2sec;
lrc.push([lrcTime, lrcText]);
}
}
}
// sort by time
lrc = lrc.filter((item) => item[1]);
lrc.sort((a, b) => a[0] - b[0]);
return lrc;
} else {
return [];
}
}
remove(index) {
this.parsed.splice(index, 1);
}
clear() {
this.parsed = [];
this.container.innerHTML = '';
}
}
export default Lrc;

45
aplayer/src/js/options.js Normal file
View File

@ -0,0 +1,45 @@
export default (options) => {
// default options
const defaultOption = {
container: options.element || document.getElementsByClassName('aplayer')[0],
mini: options.narrow || options.fixed || false,
fixed: false,
autoplay: false,
mutex: true,
lrcType: options.showlrc || options.lrc || 0,
preload: 'metadata',
theme: '#b7daff',
loop: 'all',
order: 'list',
volume: 0.7,
listFolded: options.fixed,
listMaxHeight: options.listmaxheight || 250,
audio: options.music || [],
storageName: 'aplayer-setting',
};
for (const defaultKey in defaultOption) {
if (defaultOption.hasOwnProperty(defaultKey) && !options.hasOwnProperty(defaultKey)) {
options[defaultKey] = defaultOption[defaultKey];
}
}
options.listMaxHeight = parseFloat(options.listMaxHeight);
if (Object.prototype.toString.call(options.audio) !== '[object Array]') {
options.audio = [options.audio];
}
options.audio.map((item) => {
item.name = item.name || item.title || 'Audio name';
item.artist = item.artist || item.author || 'Audio artist';
item.cover = item.cover || item.pic;
item.type = item.type || 'normal';
return item;
});
if (options.audio.length <= 1 && options.loop === 'one') {
options.loop = 'all';
}
return options;
};

491
aplayer/src/js/player.js Normal file
View File

@ -0,0 +1,491 @@
import Promise from 'promise-polyfill';
import utils from './utils';
import Icons from './icons';
import handleOption from './options';
import Template from './template';
import Bar from './bar';
import Storage from './storage';
import Lrc from './lrc';
import Controller from './controller';
import Timer from './timer';
import Events from './events';
import List from './list';
const instances = [];
class APlayer {
/**
* APlayer constructor function
*
* @param {Object} options - See README
* @constructor
*/
constructor(options) {
this.options = handleOption(options);
this.container = this.options.container;
this.paused = true;
this.playedPromise = Promise.resolve();
this.mode = 'normal';
this.randomOrder = utils.randomOrder(this.options.audio.length);
this.container.classList.add('aplayer');
if (this.options.lrcType && !this.options.fixed) {
this.container.classList.add('aplayer-withlrc');
}
if (this.options.audio.length > 1) {
this.container.classList.add('aplayer-withlist');
}
if (utils.isMobile) {
this.container.classList.add('aplayer-mobile');
}
this.arrow = this.container.offsetWidth <= 300;
if (this.arrow) {
this.container.classList.add('aplayer-arrow');
}
// save lrc
if (this.options.lrcType === 2 || this.options.lrcType === true) {
const lrcEle = this.container.getElementsByClassName('aplayer-lrc-content');
for (let i = 0; i < lrcEle.length; i++) {
if (this.options.audio[i]) {
this.options.audio[i].lrc = lrcEle[i].innerHTML;
}
}
}
this.template = new Template({
container: this.container,
options: this.options,
randomOrder: this.randomOrder,
});
if (this.options.fixed) {
this.container.classList.add('aplayer-fixed');
this.template.body.style.width = this.template.body.offsetWidth - 18 + 'px';
}
if (this.options.mini) {
this.setMode('mini');
this.template.info.style.display = 'block';
}
if (this.template.info.offsetWidth < 200) {
this.template.time.classList.add('aplayer-time-narrow');
}
if (this.options.lrcType) {
this.lrc = new Lrc({
container: this.template.lrc,
async: this.options.lrcType === 3,
player: this,
});
}
this.events = new Events();
this.storage = new Storage(this);
this.bar = new Bar(this.template);
this.controller = new Controller(this);
this.timer = new Timer(this);
this.list = new List(this);
this.initAudio();
this.bindEvents();
if (this.options.order === 'random') {
this.list.switch(this.randomOrder[0]);
} else {
this.list.switch(0);
}
// autoplay
if (this.options.autoplay) {
this.play();
}
instances.push(this);
}
initAudio() {
this.audio = document.createElement('audio');
this.audio.preload = this.options.preload;
for (let i = 0; i < this.events.audioEvents.length; i++) {
this.audio.addEventListener(this.events.audioEvents[i], (e) => {
this.events.trigger(this.events.audioEvents[i], e);
});
}
this.volume(this.storage.get('volume'), true);
}
bindEvents() {
this.on('play', () => {
if (this.paused) {
this.setUIPlaying();
}
});
this.on('pause', () => {
if (!this.paused) {
this.setUIPaused();
}
});
this.on('timeupdate', () => {
if (!this.disableTimeupdate) {
this.bar.set('played', this.audio.currentTime / this.duration, 'width');
this.lrc && this.lrc.update();
const currentTime = utils.secondToTime(this.audio.currentTime);
if (this.template.ptime.innerHTML !== currentTime) {
this.template.ptime.innerHTML = currentTime;
}
}
});
// show audio time: the metadata has loaded or changed
this.on('durationchange', () => {
if (this.duration !== 1) {
// compatibility: Android browsers will output 1 at first
this.template.dtime.innerHTML = utils.secondToTime(this.duration);
}
});
// Can seek now
this.on('loadedmetadata', () => {
this.seek(0);
if (!this.paused) {
this.audio.play();
}
});
// show audio loaded bar: to inform interested parties of progress downloading the media
this.on('canplay', () => {
const percentage = this.audio.buffered.length ? this.audio.buffered.end(this.audio.buffered.length - 1) / this.duration : 0;
this.bar.set('loaded', percentage, 'width');
});
this.on('progress', () => {
const percentage = this.audio.buffered.length ? this.audio.buffered.end(this.audio.buffered.length - 1) / this.duration : 0;
this.bar.set('loaded', percentage, 'width');
});
// audio download error: an error occurs
let skipTime;
this.on('error', () => {
if (this.list.audios.length > 1) {
this.notice('An audio error has occurred, player will skip forward in 2 seconds.');
skipTime = setTimeout(() => {
this.skipForward();
if (!this.paused) {
this.play();
}
}, 2000);
} else if (this.list.audios.length === 1) {
this.notice('An audio error has occurred.');
}
});
this.events.on('listswitch', () => {
skipTime && clearTimeout(skipTime);
});
// multiple audio play
this.on('ended', () => {
if (this.options.loop === 'none') {
if (this.options.order === 'list') {
if (this.list.index < this.list.audios.length - 1) {
this.list.switch((this.list.index + 1) % this.list.audios.length);
this.play();
} else {
this.list.switch((this.list.index + 1) % this.list.audios.length);
this.pause();
}
} else if (this.options.order === 'random') {
if (this.randomOrder.indexOf(this.list.index) < this.randomOrder.length - 1) {
this.list.switch(this.nextIndex());
this.play();
} else {
this.list.switch(this.nextIndex());
this.pause();
}
}
} else if (this.options.loop === 'one') {
this.list.switch(this.list.index);
this.play();
} else if (this.options.loop === 'all') {
this.skipForward();
this.play();
}
});
}
setAudio(audio) {
if (this.hls) {
this.hls.destroy();
this.hls = null;
}
let type = audio.type;
if (this.options.customAudioType && this.options.customAudioType[type]) {
if (Object.prototype.toString.call(this.options.customAudioType[type]) === '[object Function]') {
this.options.customAudioType[type](this.audio, audio, this);
} else {
console.error(`Illegal customType: ${type}`);
}
} else {
if (!type || type === 'auto') {
if (/m3u8(#|\?|$)/i.exec(audio.url)) {
type = 'hls';
} else {
type = 'normal';
}
}
if (type === 'hls') {
if (window.Hls.isSupported()) {
this.hls = new window.Hls();
this.hls.loadSource(audio.url);
this.hls.attachMedia(this.audio);
} else if (this.audio.canPlayType('application/x-mpegURL') || this.audio.canPlayType('application/vnd.apple.mpegURL')) {
this.audio.src = audio.url;
} else {
this.notice('Error: HLS is not supported.');
}
} else if (type === 'normal') {
this.audio.src = audio.url;
}
}
}
theme(color = this.list.audios[this.list.index].theme || this.options.theme, index = this.list.index, isReset = true) {
if (isReset) {
this.list.audios[index] && (this.list.audios[index].theme = color);
}
this.template.listCurs[index] && (this.template.listCurs[index].style.backgroundColor = color);
if (index === this.list.index) {
this.template.pic.style.backgroundColor = color;
this.template.played.style.background = color;
this.template.thumb.style.background = color;
this.template.volume.style.background = color;
}
}
seek(time) {
time = Math.max(time, 0);
time = Math.min(time, this.duration);
this.audio.currentTime = time;
this.bar.set('played', time / this.duration, 'width');
this.template.ptime.innerHTML = utils.secondToTime(time);
}
get duration() {
return isNaN(this.audio.duration) ? 0 : this.audio.duration;
}
setUIPlaying() {
if (this.paused) {
this.paused = false;
this.template.button.classList.remove('aplayer-play');
this.template.button.classList.add('aplayer-pause');
this.template.button.innerHTML = '';
setTimeout(() => {
this.template.button.innerHTML = Icons.pause;
}, 100);
this.template.skipPlayButton.innerHTML = Icons.pause;
}
this.timer.enable('loading');
if (this.options.mutex) {
for (let i = 0; i < instances.length; i++) {
if (this !== instances[i]) {
instances[i].pause();
}
}
}
}
play() {
this.setUIPlaying();
const playPromise = this.audio.play();
if (playPromise) {
playPromise.catch((e) => {
console.warn(e);
if (e.name === 'NotAllowedError') {
this.setUIPaused();
}
});
}
}
setUIPaused() {
if (!this.paused) {
this.paused = true;
this.template.button.classList.remove('aplayer-pause');
this.template.button.classList.add('aplayer-play');
this.template.button.innerHTML = '';
setTimeout(() => {
this.template.button.innerHTML = Icons.play;
}, 100);
this.template.skipPlayButton.innerHTML = Icons.play;
}
this.container.classList.remove('aplayer-loading');
this.timer.disable('loading');
}
pause() {
this.setUIPaused();
this.audio.pause();
}
switchVolumeIcon() {
if (this.volume() >= 0.95) {
this.template.volumeButton.innerHTML = Icons.volumeUp;
} else if (this.volume() > 0) {
this.template.volumeButton.innerHTML = Icons.volumeDown;
} else {
this.template.volumeButton.innerHTML = Icons.volumeOff;
}
}
/**
* Set volume
*/
volume(percentage, nostorage) {
percentage = parseFloat(percentage);
if (!isNaN(percentage)) {
percentage = Math.max(percentage, 0);
percentage = Math.min(percentage, 1);
this.bar.set('volume', percentage, 'height');
if (!nostorage) {
this.storage.set('volume', percentage);
}
this.audio.volume = percentage;
if (this.audio.muted) {
this.audio.muted = false;
}
this.switchVolumeIcon();
}
return this.audio.muted ? 0 : this.audio.volume;
}
/**
* bind events
*/
on(name, callback) {
this.events.on(name, callback);
}
/**
* toggle between play and pause
*/
toggle() {
if (this.template.button.classList.contains('aplayer-play')) {
this.play();
} else if (this.template.button.classList.contains('aplayer-pause')) {
this.pause();
}
}
// abandoned
switchAudio(index) {
this.list.switch(index);
}
// abandoned
addAudio(audios) {
this.list.add(audios);
}
// abandoned
removeAudio(index) {
this.list.remove(index);
}
/**
* destroy this player
*/
destroy() {
instances.splice(instances.indexOf(this), 1);
this.pause();
this.container.innerHTML = '';
this.audio.src = '';
this.timer.destroy();
this.events.trigger('destroy');
}
setMode(mode = 'normal') {
this.mode = mode;
if (mode === 'mini') {
this.container.classList.add('aplayer-narrow');
} else if (mode === 'normal') {
this.container.classList.remove('aplayer-narrow');
}
}
notice(text, time = 2000, opacity = 0.8) {
this.template.notice.innerHTML = text;
this.template.notice.style.opacity = opacity;
if (this.noticeTime) {
clearTimeout(this.noticeTime);
}
this.events.trigger('noticeshow', {
text: text,
});
if (time) {
this.noticeTime = setTimeout(() => {
this.template.notice.style.opacity = 0;
this.events.trigger('noticehide');
}, time);
}
}
prevIndex() {
if (this.list.audios.length > 1) {
if (this.options.order === 'list') {
return this.list.index - 1 < 0 ? this.list.audios.length - 1 : this.list.index - 1;
} else if (this.options.order === 'random') {
const index = this.randomOrder.indexOf(this.list.index);
if (index === 0) {
return this.randomOrder[this.randomOrder.length - 1];
} else {
return this.randomOrder[index - 1];
}
}
} else {
return 0;
}
}
nextIndex() {
if (this.list.audios.length > 1) {
if (this.options.order === 'list') {
return (this.list.index + 1) % this.list.audios.length;
} else if (this.options.order === 'random') {
const index = this.randomOrder.indexOf(this.list.index);
if (index === this.randomOrder.length - 1) {
return this.randomOrder[0];
} else {
return this.randomOrder[index + 1];
}
}
} else {
return 0;
}
}
skipBack() {
this.list.switch(this.prevIndex());
}
skipForward() {
this.list.switch(this.nextIndex());
}
static get version() {
/* global APLAYER_VERSION */
return APLAYER_VERSION;
}
}
export default APlayer;

24
aplayer/src/js/storage.js Normal file
View File

@ -0,0 +1,24 @@
import utils from './utils';
class Storage {
constructor(player) {
this.storageName = player.options.storageName;
this.data = JSON.parse(utils.storage.get(this.storageName));
if (!this.data) {
this.data = {};
}
this.data.volume = this.data.volume || player.options.volume;
}
get(key) {
return this.data[key];
}
set(key, value) {
this.data[key] = value;
utils.storage.set(this.storageName, JSON.stringify(this.data));
}
}
export default Storage;

View File

@ -0,0 +1,62 @@
import Icons from './icons';
import tplPlayer from '../template/player.art';
class Template {
constructor(options) {
this.container = options.container;
this.options = options.options;
this.randomOrder = options.randomOrder;
this.init();
}
init() {
let cover = '';
if (this.options.audio.length) {
if (this.options.order === 'random') {
cover = this.options.audio[this.randomOrder[0]].cover;
} else {
cover = this.options.audio[0].cover;
}
}
this.container.innerHTML = tplPlayer({
options: this.options,
icons: Icons,
cover: cover,
getObject: (obj) => obj,
});
this.lrc = this.container.querySelector('.aplayer-lrc-contents');
this.lrcWrap = this.container.querySelector('.aplayer-lrc');
this.ptime = this.container.querySelector('.aplayer-ptime');
this.info = this.container.querySelector('.aplayer-info');
this.time = this.container.querySelector('.aplayer-time');
this.barWrap = this.container.querySelector('.aplayer-bar-wrap');
this.button = this.container.querySelector('.aplayer-button');
this.body = this.container.querySelector('.aplayer-body');
this.list = this.container.querySelector('.aplayer-list');
this.listCurs = this.container.querySelectorAll('.aplayer-list-cur');
this.played = this.container.querySelector('.aplayer-played');
this.loaded = this.container.querySelector('.aplayer-loaded');
this.thumb = this.container.querySelector('.aplayer-thumb');
this.volume = this.container.querySelector('.aplayer-volume');
this.volumeBar = this.container.querySelector('.aplayer-volume-bar');
this.volumeButton = this.container.querySelector('.aplayer-time button');
this.volumeBarWrap = this.container.querySelector('.aplayer-volume-bar-wrap');
this.loop = this.container.querySelector('.aplayer-icon-loop');
this.order = this.container.querySelector('.aplayer-icon-order');
this.menu = this.container.querySelector('.aplayer-icon-menu');
this.pic = this.container.querySelector('.aplayer-pic');
this.title = this.container.querySelector('.aplayer-title');
this.author = this.container.querySelector('.aplayer-author');
this.dtime = this.container.querySelector('.aplayer-dtime');
this.notice = this.container.querySelector('.aplayer-notice');
this.miniSwitcher = this.container.querySelector('.aplayer-miniswitcher');
this.skipBackButton = this.container.querySelector('.aplayer-icon-back');
this.skipForwardButton = this.container.querySelector('.aplayer-icon-forward');
this.skipPlayButton = this.container.querySelector('.aplayer-icon-play');
this.lrcButton = this.container.querySelector('.aplayer-icon-lrc');
}
}
export default Template;

67
aplayer/src/js/timer.js Normal file
View File

@ -0,0 +1,67 @@
class Timer {
constructor(player) {
this.player = player;
window.requestAnimationFrame = (() =>
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(callback) {
window.setTimeout(callback, 1000 / 60);
})();
this.types = ['loading'];
this.init();
}
init() {
this.types.forEach((item) => {
this[`init${item}Checker`]();
});
}
initloadingChecker() {
let lastPlayPos = 0;
let currentPlayPos = 0;
let bufferingDetected = false;
this.loadingChecker = setInterval(() => {
if (this.enableloadingChecker) {
// whether the audio is buffering
currentPlayPos = this.player.audio.currentTime;
if (!bufferingDetected && currentPlayPos === lastPlayPos && !this.player.audio.paused) {
this.player.container.classList.add('aplayer-loading');
bufferingDetected = true;
}
if (bufferingDetected && currentPlayPos > lastPlayPos && !this.player.audio.paused) {
this.player.container.classList.remove('aplayer-loading');
bufferingDetected = false;
}
lastPlayPos = currentPlayPos;
}
}, 100);
}
enable(type) {
this[`enable${type}Checker`] = true;
if (type === 'fps') {
this.initfpsChecker();
}
}
disable(type) {
this[`enable${type}Checker`] = false;
}
destroy() {
this.types.forEach((item) => {
this[`enable${item}Checker`] = false;
this[`${item}Checker`] && clearInterval(this[`${item}Checker`]);
});
}
}
export default Timer;

55
aplayer/src/js/utils.js Normal file
View File

@ -0,0 +1,55 @@
const isMobile = /mobile/i.test(window.navigator.userAgent);
const utils = {
/**
* Parse second to time string
*
* @param {Number} second
* @return {String} 00:00 or 00:00:00
*/
secondToTime: (second) => {
const add0 = (num) => (num < 10 ? '0' + num : '' + num);
const hour = Math.floor(second / 3600);
const min = Math.floor((second - hour * 3600) / 60);
const sec = Math.floor(second - hour * 3600 - min * 60);
return (hour > 0 ? [hour, min, sec] : [min, sec]).map(add0).join(':');
},
isMobile: isMobile,
storage: {
set: (key, value) => {
localStorage.setItem(key, value);
},
get: (key) => localStorage.getItem(key),
},
nameMap: {
dragStart: isMobile ? 'touchstart' : 'mousedown',
dragMove: isMobile ? 'touchmove' : 'mousemove',
dragEnd: isMobile ? 'touchend' : 'mouseup',
},
/**
* get random order, using FisherYates shuffle
*/
randomOrder: (length) => {
function shuffle(arr) {
for (let i = arr.length - 1; i >= 0; i--) {
const randomIndex = Math.floor(Math.random() * (i + 1));
const itemAtIndex = arr[randomIndex];
arr[randomIndex] = arr[i];
arr[i] = itemAtIndex;
}
return arr;
}
return shuffle(
[...Array(length)].map(function(item, i) {
return i;
})
);
},
};
export default utils;

View File

@ -0,0 +1,8 @@
{{each audio}}
<li>
<span class="aplayer-list-cur" style="background-color: {{ $value.theme || theme }};"></span>
<span class="aplayer-list-index">{{ $index + index }}</span>
<span class="aplayer-list-title">{{ $value.name }}</span>
<span class="aplayer-list-author">{{ $value.artist }}</span>
</li>
{{/each}}

View File

@ -0,0 +1,3 @@
{{each lyrics}}
<p{{ if $index === 0 }} class="aplayer-lrc-current"{{ /if }}>{{$value[1]}}</p>
{{/each}}

View File

@ -0,0 +1,145 @@
{{ if !options.fixed }}
<div class="aplayer-body">
<div class="aplayer-pic" style="{{ if cover }}background-image: url(&quot;{{ cover }}&quot;);{{ /if }}background-color: {{ options.theme }};">
<div class="aplayer-button aplayer-play">{{@ icons.play }}</div>
</div>
<div class="aplayer-info">
<div class="aplayer-music">
<span class="aplayer-title">No audio</span>
<span class="aplayer-author"></span>
</div>
<div class="aplayer-lrc">
<div class="aplayer-lrc-contents" style="transform: translateY(0); -webkit-transform: translateY(0);"></div>
</div>
<div class="aplayer-controller">
<div class="aplayer-bar-wrap">
<div class="aplayer-bar">
<div class="aplayer-loaded" style="width: 0"></div>
<div class="aplayer-played" style="width: 0; background: {{ options.theme }};">
<span class="aplayer-thumb" style="background: {{ options.theme }};">
<span class="aplayer-loading-icon">{{@ icons.loading }}</span>
</span>
</div>
</div>
</div>
<div class="aplayer-time">
<span class="aplayer-time-inner">
<span class="aplayer-ptime">00:00</span> / <span class="aplayer-dtime">00:00</span>
</span>
<span class="aplayer-icon aplayer-icon-back">
{{@ icons.skip }}
</span>
<span class="aplayer-icon aplayer-icon-play">
{{@ icons.play }}
</span>
<span class="aplayer-icon aplayer-icon-forward">
{{@ icons.skip }}
</span>
<div class="aplayer-volume-wrap">
<button type="button" class="aplayer-icon aplayer-icon-volume-down">
{{@ icons.volumeDown }}
</button>
<div class="aplayer-volume-bar-wrap">
<div class="aplayer-volume-bar">
<div class="aplayer-volume" style="height: 80%; background: {{ options.theme }};"></div>
</div>
</div>
</div>
<button type="button" class="aplayer-icon aplayer-icon-order">
{{ if options.order === 'list' }}{{@ icons.orderList }}{{ else if options.order === 'random' }}{{@ icons.orderRandom }}{{ /if }}
</button>
<button type="button" class="aplayer-icon aplayer-icon-loop">
{{ if options.loop === 'one' }}{{@ icons.loopOne }}{{ else if options.loop === 'all' }}{{@ icons.loopAll }}{{ else if options.loop === 'none' }}{{@ icons.loopNone }}{{ /if }}
</button>
<button type="button" class="aplayer-icon aplayer-icon-menu">
{{@ icons.menu }}
</button>
<button type="button" class="aplayer-icon aplayer-icon-lrc">
{{@ icons.lrc }}
</button>
</div>
</div>
</div>
<div class="aplayer-notice"></div>
<div class="aplayer-miniswitcher"><button class="aplayer-icon">{{@ icons.right }}</button></div>
</div>
<ol class="aplayer-list{{ if options.listFolded }} aplayer-list-hide{{ /if }}">
{{ include './list-item.art' getObject({
theme: options.theme,
audio: options.audio,
index: 1
}) }}
</ol>
{{ else }}
<ol class="aplayer-list{{ if options.listFolded }} aplayer-list-hide{{ /if }}">
{{ include './list-item.art' getObject({
theme: options.theme,
audio: options.audio,
index: 1
}) }}
</ol>
<div class="aplayer-body">
<div class="aplayer-pic" style="{{ if cover }}background-image: url(&quot;{{ cover }}&quot;);{{ /if }}background-color: {{ options.theme }};">
<div class="aplayer-button aplayer-play">{{@ icons.play }}</div>
</div>
<div class="aplayer-info" style="display: none;">
<div class="aplayer-music">
<span class="aplayer-title">No audio</span>
<span class="aplayer-author"></span>
</div>
<div class="aplayer-controller">
<div class="aplayer-bar-wrap">
<div class="aplayer-bar">
<div class="aplayer-loaded" style="width: 0"></div>
<div class="aplayer-played" style="width: 0; background: {{ options.theme }};">
<span class="aplayer-thumb" style="background: {{ options.theme }};">
<span class="aplayer-loading-icon">{{@ icons.loading }}</span>
</span>
</div>
</div>
</div>
<div class="aplayer-time">
<span class="aplayer-time-inner">
<span class="aplayer-ptime">00:00</span> / <span class="aplayer-dtime">00:00</span>
</span>
<span class="aplayer-icon aplayer-icon-back">
{{@ icons.skip }}
</span>
<span class="aplayer-icon aplayer-icon-play">
{{@ icons.play }}
</span>
<span class="aplayer-icon aplayer-icon-forward">
{{@ icons.skip }}
</span>
<div class="aplayer-volume-wrap">
<button type="button" class="aplayer-icon aplayer-icon-volume-down">
{{@ icons.volumeDown }}
</button>
<div class="aplayer-volume-bar-wrap">
<div class="aplayer-volume-bar">
<div class="aplayer-volume" style="height: 80%; background: {{ options.theme }};"></div>
</div>
</div>
</div>
<button type="button" class="aplayer-icon aplayer-icon-order">
{{ if options.order === 'list' }}{{@ icons.orderList }}{{ else if options.order === 'random' }}{{@ icons.orderRandom }}{{ /if }}
</button>
<button type="button" class="aplayer-icon aplayer-icon-loop">
{{ if options.loop === 'one' }}{{@ icons.loopOne }}{{ else if options.loop === 'all' }}{{@ icons.loopAll }}{{ else if options.loop === 'none' }}{{@ icons.loopNone }}{{ /if }}
</button>
<button type="button" class="aplayer-icon aplayer-icon-menu">
{{@ icons.menu }}
</button>
<button type="button" class="aplayer-icon aplayer-icon-lrc">
{{@ icons.lrc }}
</button>
</div>
</div>
</div>
<div class="aplayer-notice"></div>
<div class="aplayer-miniswitcher"><button class="aplayer-icon">{{@ icons.right }}</button></div>
</div>
<div class="aplayer-lrc">
<div class="aplayer-lrc-contents" style="transform: translateY(0); -webkit-transform: translateY(0);"></div>
</div>
{{/if}}

View File

@ -0,0 +1,115 @@
const path = require('path');
const webpack = require('webpack');
const GitRevisionPlugin = require('git-revision-webpack-plugin');
const gitRevisionPlugin = new GitRevisionPlugin();
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
module.exports = {
mode: 'development',
devtool: 'cheap-module-source-map',
entry: {
APlayer: './src/js/index.js',
},
output: {
path: path.resolve(__dirname, '..', 'dist'),
filename: '[name].js',
library: '[name]',
libraryTarget: 'umd',
libraryExport: 'default',
umdNamedDefine: true,
publicPath: '/',
},
resolve: {
modules: ['node_modules'],
extensions: ['.js', '.scss'],
},
module: {
strictExportPresence: true,
rules: [
{
test: /\.js$/,
use: [
{
loader: 'babel-loader',
options: {
cacheDirectory: true,
presets: ['@babel/preset-env'],
},
},
],
},
{
test: /\.scss$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
importLoaders: 1,
},
},
{
loader: 'postcss-loader',
options: {
plugins: [autoprefixer, cssnano],
},
},
'sass-loader',
],
},
{
test: /\.(png|jpg)$/,
loader: 'url-loader',
options: {
limit: 40000,
},
},
{
test: /\.svg$/,
loader: 'svg-inline-loader',
},
{
test: /\.art$/,
loader: 'art-template-loader',
},
],
},
devServer: {
compress: true,
contentBase: path.resolve(__dirname, '..', 'demo'),
clientLogLevel: 'none',
quiet: false,
open: true,
historyApiFallback: {
disableDotRule: true,
},
watchOptions: {
ignored: /node_modules/,
},
},
plugins: [
new webpack.DefinePlugin({
APLAYER_VERSION: `"${require('../package.json').version}"`,
GIT_HASH: JSON.stringify(gitRevisionPlugin.version()),
}),
],
node: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
},
performance: {
hints: false,
},
};

View File

@ -0,0 +1,100 @@
const path = require('path');
const webpack = require('webpack');
const GitRevisionPlugin = require('git-revision-webpack-plugin');
const gitRevisionPlugin = new GitRevisionPlugin();
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
module.exports = {
mode: 'production',
bail: true,
devtool: 'source-map',
entry: {
APlayer: './src/js/index.js',
},
output: {
path: path.resolve(__dirname, '..', 'dist'),
filename: '[name].min.js',
library: '[name]',
libraryTarget: 'umd',
libraryExport: 'default',
umdNamedDefine: true,
publicPath: '/',
},
resolve: {
modules: ['node_modules'],
extensions: ['.js', '.scss'],
},
module: {
strictExportPresence: true,
rules: [
{
test: /\.js$/,
use: [
'template-string-optimize-loader',
{
loader: 'babel-loader',
options: {
cacheDirectory: true,
presets: ['@babel/preset-env'],
},
},
],
},
{
test: /\.scss$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
importLoaders: 1,
},
},
{
loader: 'postcss-loader',
options: {
plugins: [autoprefixer, cssnano],
},
},
'sass-loader',
],
},
{
test: /\.(png|jpg)$/,
loader: 'url-loader',
options: {
limit: 40000,
},
},
{
test: /\.svg$/,
loader: 'svg-inline-loader',
},
{
test: /\.art$/,
loader: 'art-template-loader',
},
],
},
plugins: [
new webpack.DefinePlugin({
APLAYER_VERSION: `"${require('../package.json').version}"`,
GIT_HASH: JSON.stringify(gitRevisionPlugin.version()),
}),
],
node: {
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
},
};

9868
aplayer/yarn.lock Normal file

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -459,7 +473,7 @@ Sys.setenv(LANG=&quot;en&quot;)
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -562,12 +576,6 @@ Sys.setenv(LANG=&quot;en&quot;)
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -672,6 +680,10 @@ Sys.setenv(LANG=&quot;en&quot;)
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -459,7 +473,7 @@ Sys.setenv(LANG=&quot;en&quot;)
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -562,12 +576,6 @@ Sys.setenv(LANG=&quot;en&quot;)
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -672,6 +680,10 @@ Sys.setenv(LANG=&quot;en&quot;)
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -459,7 +473,7 @@ Sys.setenv(LANG=&quot;en&quot;)
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -562,12 +576,6 @@ Sys.setenv(LANG=&quot;en&quot;)
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -672,6 +680,10 @@ Sys.setenv(LANG=&quot;en&quot;)
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -459,7 +473,7 @@ Sys.setenv(LANG=&quot;en&quot;)
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -562,12 +576,6 @@ Sys.setenv(LANG=&quot;en&quot;)
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -672,6 +680,10 @@ Sys.setenv(LANG=&quot;en&quot;)
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -459,7 +473,7 @@ Sys.setenv(LANG=&quot;en&quot;)
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -562,12 +576,6 @@ Sys.setenv(LANG=&quot;en&quot;)
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -672,6 +680,10 @@ Sys.setenv(LANG=&quot;en&quot;)
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -459,7 +473,7 @@ Sys.setenv(LANG=&quot;en&quot;)
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -562,12 +576,6 @@ Sys.setenv(LANG=&quot;en&quot;)
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -672,6 +680,10 @@ Sys.setenv(LANG=&quot;en&quot;)
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -459,7 +473,7 @@ Sys.setenv(LANG=&quot;en&quot;)
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -562,12 +576,6 @@ Sys.setenv(LANG=&quot;en&quot;)
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -672,6 +680,10 @@ Sys.setenv(LANG=&quot;en&quot;)
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -459,7 +473,7 @@ Sys.setenv(LANG=&quot;en&quot;)
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -562,12 +576,6 @@ Sys.setenv(LANG=&quot;en&quot;)
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -672,6 +680,10 @@ Sys.setenv(LANG=&quot;en&quot;)
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -459,7 +473,7 @@ Sys.setenv(LANG=&quot;en&quot;)
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -562,12 +576,6 @@ Sys.setenv(LANG=&quot;en&quot;)
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -672,6 +680,10 @@ Sys.setenv(LANG=&quot;en&quot;)
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -17,7 +17,7 @@
记得我最早的时候用 Visual Studio 写了第一个 Hel,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -44,6 +44,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -90,7 +104,7 @@
animation-duration: 1.2s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/windows-terminal-1599486124.png) ">
url('https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/windows-terminal-1599486124.png') ">
</div>
<div class="else">
<p class="animated fadeInDown">
@ -326,19 +340,6 @@
<source type="audio/mpeg" src="https://davidz-blog.oss-cn-beijing.aliyuncs.com/music/李荣浩 - 麻雀.mp3">
</audio>
<div class="post-nav">
<hr>
<div class="post-nav-item">上一篇:<a href="/windows-package-manager-scoop/" rel="prev"
title="Windows 包管理器 - Scoop">Windows 包管理器 - Scoop
</a></div>
<div class="post-nav-item">下一篇:<a href="/inspur-internship/" rel="next"
title="浪潮实习">浪潮实习</a></div>
</div>
@ -350,7 +351,7 @@
data-o='DavidZhang73'
data-a='DavidZhang73'
data-d=''
data-p='https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token'
data-p=''
>留言</div>
@ -365,6 +366,19 @@
<span>凡事都要留几分</span>
<dl>
<dd><a href="https://github.com/DavidZhang73" target="_blank"><span
class=" iconfont icon-github"></span></a></dd>
<dd><a href="https://twitter.com/david731998" target="_blank"><span
class=" iconfont icon-twitter"></span></a></dd>
<dd><a href="https://stackoverflow.com/users/12693553/davidz" target="_blank"><span
class=" iconfont icon-stack-overflow"></span></a></dd>
</dl>
</div>
@ -408,7 +422,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -511,12 +525,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -621,6 +629,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -172,12 +186,12 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>闲来无聊,在家折腾 DevOps第一步当然是部署一个 Jenkins 啦,然而一顿操作猛如虎,插件一个都下载不下来,总不能给 Jenkins 加个代理吧,所以有了下面这一通折腾。</p>
<h2 id="原因"><a class="header-anchor" href="#原因"></a>原因</h2>
<p></p>
<p>根据经验,国外这些软件下载失败基本上都是因为链接不上服务器,换个源就好了。所以简单百度,找到大量相关教程,换了<a href="https://mirrors.tuna.tsinghua.edu.cn/" target="_blank" rel="noopener">清华源</a>在内的四五个镜像源,均无效。</p>
<p>这就非常奇怪了,所以我打开了清华源的<a href="https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json" target="_blank" rel="noopener">update-center.json</a>,仔细看了看,发现了蹊跷之处。原来,这个文件里面基本上所有插件的链接都指...</p>
<p>这就非常奇怪了,所以我打开了清华源的<a href="https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json" target="_blank" rel="noopener">update-center.json</a>,仔细看了看,发现了蹊跷之处。原来,这个文件里面基本上所有插...</p>
<span class="read-more"><a href="/jenkins-update-solution-inside-gfw/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -241,16 +255,16 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>2020 年开年不顺2019 新型冠状病毒肺炎爆发,从年三十居家隔离到了正月十五,没想到自己的服务器也”感染“上了病毒 - Kinsing(进程的名字,姑且这样称呼)。</p>
<h2 id="发现"><a class="header-anchor" href="#发现"></a>发现</h2>
<p></p>
<p>偶然看了看服务器状态,发现 CPU 占用一直保持在 100%上下,有些蹊跷。</p>
<p>难道是我的博客访问量<s>暴增</s>???那是当然不可能的,然后我去看了看<a href="https://github.com/portainer/portainer" target="_blank" rel="noopener">Portainer</a>看了看,果然,</p>
<p></p>
<p>这个随机名称的容器就是 Kinsing 基于 Ubuntu 的容器CPU 占用 100%。</p>
<p></p>
<p>简单看了看容器里面的进程表,...</p>
<p>简单看了看容器里...</p>
<span class="read-more"><a href="/kinsing-virus/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -280,7 +294,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -383,12 +397,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -493,6 +501,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -171,12 +185,11 @@
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<p>众所周知SVD(奇异值分解)可以用于最小二乘法求齐次线性方程组$A\vec{x}=\vec{0}$的解。我看了很多资料,大多使用数学公式推导,得出结论。但是,曾经线性代数差点挂科的我,总觉得有些蹊跷。想了两天,终于有了一些感性的认知(不一定是对的😂),赶紧记录下来。</p>
<h2 id="矩阵有何意义"><a class="header-anchor" href="#矩阵有何意义"></a>矩阵有何意义</h2>
<p>按照我的理解,一个矩阵的实际意义是对应一个线性变换,这个变换可以理解为瞬间运动。例如,一个旋转矩阵,</p>
<p>$$<br>
A=\begin{bmatrix}<br>
cos\theta &amp; sin\theta \\\<br>
-...</p>
cos\theta &amp; sin\theta...</p>
<span class="read-more"><a href="/SVD-for-homogeneous-linear-equation/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -221,7 +234,7 @@ cos\theta &amp; sin\theta \\\<br>
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -324,12 +337,6 @@ cos\theta &amp; sin\theta \\\<br>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -434,6 +441,10 @@ cos\theta &amp; sin\theta \\\<br>
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -172,17 +186,17 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<blockquote>
<p>屋漏更遭连夜雨,船迟又遇打头风。</p>
</blockquote>
<p>刚刚处理完 Docker 里面的“病毒”,又发现自己的笔记本被安装了监控软件,身后一阵凉风。</p>
<h2 id="发现"><a class="header-anchor" href="#发现"></a>发现</h2>
<blockquote>
<p>事发突然,因为影响我开发,所以也没有来得及截图。</p>
</blockquote>
<p>为了使用 WSL2 里面的 Docker我加入了 <code>Windows 预览体验计划 - 慢</code>,把系统升级到了 Windows 10 2004。结果怪事就出现了——基本上所有的命令行都会在执行前显示一个错误。</p>
<pre><code class="language-shell">ANOMALY: use of REX.w is meaningless (default...</code></pre>
<pre><code class="language-shell">ANOMALY: use of REX.w is meaningless...</code></pre>
<span class="read-more"><a href="/inspur-ip-guard-uninstallation/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -246,13 +260,13 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>到了期末都说要找个实习的工作,我也跟个风😂。</p>
<p>我是主要是在<a href="https://www.shixiseng.com/" target="_blank" rel="noopener">实习僧</a>上找的(就当免费做个广告吧),我住在美丽的泉城济南,<s>这个地方好就好在</s>,咳咳咳,我大概填了填简历,可能是没啥亮点,投了三四家都不要我😢。</p>
<p>我分析原因大概有以下几条:</p>
<ol>
<li>我最喜欢最熟练的语言是 Python但是现在国内的环境Python 很少作为 Web 的后端,主要是用在机器学习(大数据分析,量化交易之类的)方面。济南大多数都是 Java 和 Cpp 岗。</li>
<li>我个人没有参加过 acm 之类的比赛,除了几个项目...</li></ol>
<li>我个人没有参加过 acm 之类的比赛,除了几...</li></ol>
<span class="read-more"><a href="/inspur-internship/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -282,7 +296,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -385,12 +399,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -495,6 +503,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -172,7 +186,7 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="简介"><a class="header-anchor" href="#简介"></a>简介</h2>
<table>
<thead>
<tr>
@ -195,7 +209,7 @@
</tr>
<tr>
<td style="text-align:center">Code</td>
<td style="text-align:center"><a href="https://github.com/IkeaASM/IKEA_ASM_Dataset" target="_blank" rel="noopener">https://github.com/IkeaASM/IKEA_ASM_Dataset...</a></td></tr></tbody></table>
<td style="text-align:center"><a href="https://github.com/IkeaASM/IKEA_ASM_Dataset" target="_blank" rel="noopener">https://github.com/IkeaASM/IKEA_ASM_Datase...</a></td></tr></tbody></table>
<span class="read-more"><a href="/IKEA-ASM-Dataset/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -240,7 +254,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -343,12 +357,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -453,6 +461,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -223,7 +237,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -326,12 +340,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -436,6 +444,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -172,11 +186,11 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="简介"><a class="header-anchor" href="#简介"></a>简介</h2>
<p><a href="https://github.com/anucvml/vidat" target="_blank" rel="noopener">Github</a> | <a href="http://users.cecs.anu.edu.au/~sgould/vidat/" target="_blank" rel="noopener">Host1 ANU</a> | <a href="https://vidat.davidz.cn/" target="_blank" rel="noopener">Host2 本站</a> | <a href="http://users.cecs.anu.edu.au/~sgould/vidatproto/" target="_blank" rel="noopener">Prototype ANU</a> | <a href="https://vidat.davidz.cn/?video=needinput.mp4&amp;annotation=needinput.json" target="_blank" rel="noopener">Demo</a></p>
<p>Vidat(VIDeo Annotation Tool)是我本科毕业设计的一部分,即设计实现一个开源的在线(浏览器内)视频标注工具,目前已经实现了四种标注功能,插值标注,导入导出等。</p>
<p>项目基于<a href="https://cn.vuejs.org/" target="_blank" rel="noopener">Vue.js</a><a href="https://quasar.dev/" target="_blank" rel="noopener">Quasar</a>开发。</p>
<h2 id="功能"><a class="header-anchor" href="#功能"></a>功能</h2>
<h3 id="Object"><a class="header-anchor" href="#Object"></a>Object</h3>
<p>使用矩形标注目标。</p>
<p></p>
@ -185,8 +199,7 @@
<p></p>
<h3 id="Skeleton"><a class="header-anchor" href="#Skeleton"></a>Skeleton</h3>
<p>使用自定义的骨骼模型标注目标。</p>
<p></p>
<h3 id="Action"><a class="header-anchor" href="#Action"></a>Action...</h3>
...
<span class="read-more"><a href="/vidat/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -250,9 +263,9 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>计算机这个专业,有很多报告要做。在山威的时候,报告格式没有什么限制 WordPDF 都可以,那个时候我开始使用 Markdown 作为我的排版工具,因为实在是没有时间经历去研究 Word 的各种高级功能(<s>主要是懒</s>。Markdown 十分简单,易学,在<a href="https://github.com" target="_blank" rel="noopener">Github</a>等计算机专业相关平台使用也非常广泛,还可以通过各种模板快速生成<strong>好看</strong><strong>美观</strong><strong>专业</strong>的文档。</p>
<p>后来到了澳国立,老师教授们开始极力鼓吹 Latex 和 PDF基本上算是软性要求我们使用 Latex 编写,还规定了衬线...</p>
<p>后来到了澳国立,老师教授们开始极力鼓吹 Latex 和 PDF基本上算是软性要求我们使用 Latex 编写,还规定...</p>
<span class="read-more"><a href="/write-latex-report-with-markdown/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -301,17 +314,17 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>一直以来作为开发者Windows 相较于 Linux 都缺少两样重要的工具,</p>
<ol>
<li><strong>好用</strong>的 Shell - 现在可以用 PowerShell Core 或者 WSL 暂时代替。</li>
<li><strong>好用</strong>的包管理器 - 在开发时 C/Cpp 的库可以用<a href="https://github.com/microsoft/vcpkg" target="_blank" rel="noopener">VCPKG</a>,而日常使用的软件就可以使用本文的主角<a href="https://github.com/lukesampson/scoop" target="_blank" rel="noopener">Scoop</a> 了。</li>
</ol>
<h2 id="安装"><a class="header-anchor" href="#安装"></a>安装</h2>
<blockquote>
<p>按照官网的<a href="https://github.com/lukesampson/scoop/wiki/Quick-Start" target="_blank" rel="noopener">教程</a>,只能使用 PowerShell 而不是 CMD 进行安装。</p>
</blockquote>
<pre><code class="language-powershell"># 指定 Scoop 的安装路径,之后安装的 APP 会安装在 path/to/scoop/apps...</code></pre>
<pre><code class="language-powershell"># 指定 Scoop 的安装路径,之后安装的 APP 会安装在 path/to/scoop...</code></pre>
<span class="read-more"><a href="/windows-package-manager-scoop/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -360,7 +373,7 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="回顾"><a class="header-anchor" href="#回顾"></a>回顾</h2>
<p></p>
<p>记得我最早的时候用 Visual Studio 写了第一个 Hello World 程序,激动的点运行,出来个黑框一闪就过去了,啥也没看到。</p>
<p></p>
@ -369,7 +382,7 @@
<p>后来上了大学终于在 Ubuntu 上见到了 bash完全改变了我对 Shell 的认知。</p>
<p>傻傻分不清 Shell 和 Terminal 的我,激动的打开 Git 自带的 bash它却长成了这样。</p>
<p></p>
<p>一番优化之后也不是不能用,...</p>
<p>一番优化之后也不是不...</p>
<span class="read-more"><a href="/beauty-is-productivity-windows-terminal/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -399,7 +412,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -502,12 +515,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -612,6 +619,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -176,10 +190,10 @@
<p><strong>敬告</strong></p>
<div style="color: red">本博客仅供参考,请不要抄袭。</div>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>这是 ANU <a href="http://courses.cecs.anu.edu.au/courses/COMP2310/" target="_blank" rel="noopener">COMP2310</a>的第一次大作业,历时一个月左右,也是这个学期我写的最认真的一次作业,所以在博客搭建伊始,我先把这个记录下来。</p>
<p>根据<a href="https://davidz-blog.oss-cn-beijing.aliyuncs.com/asset/Assignment1.pdf" target="_blank" rel="noopener">Assignment 1 PDF</a>中的描述,大概的意思就是在三维空间中有许多的<code></code>,具有速度和加速度(都是三维向量),而且不管是否加速,都会消耗一定的能量,当然加速也会加快能量的消耗。然后就是有一个或多个<code>能量球</code>,当然也是在运动中的,同样具有速度和加速度。当<code></code><code>能量球</code>靠近的时候,<code></code>够获取到<code>能量...</code></p>
<h2 id="问题"><a class="header-anchor" href="#问题"></a>问题</h2>
<p>根据<a href="https://davidz-blog.oss-cn-beijing.aliyuncs.com/asset/Assignment1.pdf" target="_blank" rel="noopener">Assignment 1 PDF</a>中的描述,大概的意思就是在三维空间中有许多的<code></code>,具有速度和加速度(都是三维向量),而且不管是否加速,都会消耗一定的能量,当然加速也会加快能量的消耗。然后就是有一个或多个<code>能量球</code>,当然也是在运动中的,同样具有速度和加速度。当<code></code><code>能量球</code>靠近的时候,<code></code>能...</p>
<span class="read-more"><a href="/anu-comp2310-assignment1/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -224,7 +238,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -327,12 +341,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -437,6 +445,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -172,7 +186,7 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="Q"><a class="header-anchor" href="#Q"></a>Q</h2>
<p>一开始我发现 <a href="https://github.com/microsoft/terminal" target="_blank" rel="noopener">Windows Terminal</a><code>useAcrylic</code> 选项无效github 之后发现 <a href="https://github.com/microsoft/terminal/issues/1414" target="_blank" rel="noopener">Acrylic transparency not working</a>,这个 Issue 里面有好几个描述的和我一样,不仅仅是 Windows Terminal很多系统的透明特效也都不工作。</p>
<p>原来Windows Terminal 是使用 <a href="https://www.microsoft.com/design/fluent/#/" target="_blank" rel="noopener">Fluent Design</a> 里面的 Acrylic 效果实现的透明,所以说,这个问题是个系统层面的,而不是 Windows Terminal...</p>
@ -238,7 +252,7 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="Q"><a class="header-anchor" href="#Q"></a>Q</h2>
<p>我在博客中写公式的时候使用双斜线<code>\\</code>来代表换行,效果是这样的,</p>
<p>$$<br>
\begin{bmatrix}<br>
@ -254,7 +268,7 @@ cos\theta &amp; sin\theta \\
$$
</code></pre>
<p>那么如何插入多行公式呢?</p>
<h2 id="A"><a class="header-anchor" href="#A"></a>A</h2>
<p>根据<a href="https://github.com/gcushen/hugo-academic/issues/291#issuecomment-334746889" target="_blank" rel="noopener">Multiple...</a></p>
<span class="read-more"><a href="/multiline-equation-in-hexo/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -304,9 +318,9 @@ $$
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="Q"><a class="header-anchor" href="#Q"></a>Q</h2>
<p>如何把Rattle的语言设置成英文从而避免显示<code>XXX</code></p>
<h2 id="A"><a class="header-anchor" href="#A"></a>A</h2>
<p><code>R_HOME/etc/Rprofile.site</code>的最后添加,</p>
<pre><code class="language-R">Sys.setenv(LANG=&quot;en&quot;)
</code></pre>
@ -340,7 +354,7 @@ $$
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -443,12 +457,6 @@ $$
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -553,6 +561,10 @@ $$
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -93,7 +107,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -196,12 +210,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -306,6 +314,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -11,6 +11,20 @@
--code-gradient-dark: #afcafd;
--maxwidth: 1284px;
}
@font-face {
font-family: 'Roboto Mono';
font-style: normal;
font-weight: regular;
src: url("//lib.baomitu.com/fonts/roboto-mono/roboto-mono-regular.eot"); /* IE9 Compat Modes */
src: local('Roboto Mono'), local('RobotoMono-Normal'), url("//lib.baomitu.com/fonts/roboto-mono/roboto-mono-regular.eot?#iefix") format('embedded-opentype'), url("//lib.baomitu.com/fonts/roboto-mono/roboto-mono-regular.woff2") format('woff2'), url("//lib.baomitu.com/fonts/roboto-mono/roboto-mono-regular.woff") format('woff'), url("//lib.baomitu.com/fonts/roboto-mono/roboto-mono-regular.ttf") format('truetype'), url("//lib.baomitu.com/fonts/roboto-mono/roboto-mono-regular.svg#RobotoMono") format('svg'); /* Legacy iOS */
}
@font-face {
font-family: 'Rubik';
font-style: normal;
font-weight: regular;
src: url("//lib.baomitu.com/fonts/rubik/rubik-regular.eot"); /* IE9 Compat Modes */
src: local('Rubik'), local('Rubik-Normal'), url("//lib.baomitu.com/fonts/rubik/rubik-regular.eot?#iefix") format('embedded-opentype'), url("//lib.baomitu.com/fonts/rubik/rubik-regular.woff2") format('woff2'), url("//lib.baomitu.com/fonts/rubik/rubik-regular.woff") format('woff'), url("//lib.baomitu.com/fonts/rubik/rubik-regular.ttf") format('truetype'), url("//lib.baomitu.com/fonts/rubik/rubik-regular.svg#Rubik") format('svg'); /* Legacy iOS */
}
.gradient-text {
background: var(--primary) !important;
background: -webkit-linear-gradient(to right, var(--primary), var(--secondary), var(--dark)) !important;
@ -362,11 +376,11 @@ audio {
background-size: 75px 32px;
background-repeat: no-repeat;
background-position: center center;
-webkit-mask-box-image: url("../img/logo.png");
-webkit-mask-box-image: url("../img/logo.svg");
background-color: #fff;
width: 75px;
height: 32px;
mask-image: url("../img/logo.png");
mask-image: url("../img/logo.svg");
mask-size: contain;
transition: background-color 0.5s ease-in-out;
}

View File

@ -16,7 +16,7 @@
哈哈哈,这是一个经典的测试页面。
一直以来都想拥有一个自己的博客从Word,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -43,6 +43,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -89,7 +103,7 @@
animation-duration: 1.2s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(/img/cover.jpg) ">
url('/') ">
</div>
<div class="else">
<p class="animated fadeInDown">
@ -168,16 +182,6 @@
<source type="audio/mpeg" src="https://davidz-blog.oss-cn-beijing.aliyuncs.com/music/Delacey - Dream It Possible.mp3">
</audio>
<div class="post-nav">
<hr>
<div class="post-nav-item">上一篇:<a href="/anu-comp2310-assignment1/" rel="prev"
title="ANU COMP2310(2019) Assignment 1">ANU COMP2310(2019) Assignment 1
</a></div>
</div>
@ -189,7 +193,7 @@
data-o='DavidZhang73'
data-a='DavidZhang73'
data-d=''
data-p='https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token'
data-p=''
>留言</div>
@ -204,6 +208,19 @@
<span>凡事都要留几分</span>
<dl>
<dd><a href="https://github.com/DavidZhang73" target="_blank"><span
class=" iconfont icon-github"></span></a></dd>
<dd><a href="https://twitter.com/david731998" target="_blank"><span
class=" iconfont icon-twitter"></span></a></dd>
<dd><a href="https://stackoverflow.com/users/12693553/davidz" target="_blank"><span
class=" iconfont icon-stack-overflow"></span></a></dd>
</dl>
</div>
@ -240,7 +257,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -343,12 +360,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -453,6 +464,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

6
img/logo.svg Normal file
View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 256">
<path
id="path"
class="path"
d="M25.36 38.8L77.72 38.8Q110.5 38.8 127.44 60.71Q144.6 82.62 144.6 128.03Q144.6 173.18 127.44 195.09Q110.5 217 77.72 217L25.36 217Q13.04 217 13.04 202.48L13.04 53.32Q13.04 38.8 25.36 38.8ZM39 73.12L39 182.68Q39 185.85 41.86 185.85L77.72 185.85Q99.28 185.85 108.96 172.12Q118.64 158.39 118.64 127.77Q118.64 97.14 108.96 83.68Q99.5 69.95 77.72 69.95L41.86 69.95Q39 69.95 39 73.12ZM261.2 73.65L214.12 217L185.52 217L237.66 58.6Q241.84 45.93 249.32 40.91Q257.02 35.63 268.9 35.63Q280.56 35.63 288.04 40.91Q295.74 45.93 299.7 58.6L349.86 217L321.04 217L275.94 73.65Q273.96 67.58 268.68 67.58Q263.4 67.58 261.2 73.65ZM373.4 38.8L402 38.8L447.1 182.15Q449.08 188.22 454.36 188.22Q459.42 188.22 461.62 182.15L508.92 38.8L537.74 38.8L485.38 197.2Q481.2 209.87 473.5 215.15Q466.02 220.17 454.36 220.17Q443.36 220.17 435.22 215.42Q427.3 210.4 423.12 197.2L373.4 38.8ZM592.74 38.8L618.7 38.8L618.7 217L592.74 217L592.74 38.8ZM699.88 38.8L752.24 38.8Q785.02 38.8 801.96 60.71Q819.12 82.62 819.12 128.03Q819.12 173.18 801.96 195.09Q785.02 217 752.24 217L699.88 217Q687.56 217 687.56 202.48L687.56 53.32Q687.56 38.8 699.88 38.8ZM713.52 73.12L713.52 182.68Q713.52 185.85 716.38 185.85L752.24 185.85Q773.8 185.85 783.48 172.12Q793.16 158.39 793.16 127.77Q793.16 97.14 783.48 83.68Q774.02 69.95 752.24 69.95L716.38 69.95Q713.52 69.95 713.52 73.12ZM878.08 38.8L975.54 38.8Q993.36 38.8 1002.38 49.1Q1011.62 59.13 1011.62 77.87Q1011.62 93.18 1005.68 103.48Q999.74 113.51 987.86 119.58L906.9 161.03Q903.38 162.88 901.4 166.31Q899.42 169.74 899.42 174.23Q899.42 179.51 902.06 182.68Q904.92 185.85 910.42 185.85L1008.32 185.85L1008.32 217L908.66 217Q890.84 217 881.82 206.97Q872.8 196.67 872.8 177.93Q872.8 162.62 878.74 152.58Q884.68 142.29 896.78 136.22L977.3 94.77Q985 91.07 985 81.57Q985 76.29 982.14 73.12Q979.5 69.95 973.78 69.95L878.08 69.95L878.08 38.8Z"></path>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -172,11 +186,11 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="简介"><a class="header-anchor" href="#简介"></a>简介</h2>
<p><a href="https://github.com/anucvml/vidat" target="_blank" rel="noopener">Github</a> | <a href="http://users.cecs.anu.edu.au/~sgould/vidat/" target="_blank" rel="noopener">Host1 ANU</a> | <a href="https://vidat.davidz.cn/" target="_blank" rel="noopener">Host2 本站</a> | <a href="http://users.cecs.anu.edu.au/~sgould/vidatproto/" target="_blank" rel="noopener">Prototype ANU</a> | <a href="https://vidat.davidz.cn/?video=needinput.mp4&amp;annotation=needinput.json" target="_blank" rel="noopener">Demo</a></p>
<p>Vidat(VIDeo Annotation Tool)是我本科毕业设计的一部分,即设计实现一个开源的在线(浏览器内)视频标注工具,目前已经实现了四种标注功能,插值标注,导入导出等。</p>
<p>项目基于<a href="https://cn.vuejs.org/" target="_blank" rel="noopener">Vue.js</a><a href="https://quasar.dev/" target="_blank" rel="noopener">Quasar</a>开发。</p>
<h2 id="功能"><a class="header-anchor" href="#功能"></a>功能</h2>
<h3 id="Object"><a class="header-anchor" href="#Object"></a>Object</h3>
<p>使用矩形标注目标。</p>
<p></p>
@ -185,8 +199,7 @@
<p></p>
<h3 id="Skeleton"><a class="header-anchor" href="#Skeleton"></a>Skeleton</h3>
<p>使用自定义的骨骼模型标注目标。</p>
<p></p>
<h3 id="Action"><a class="header-anchor" href="#Action"></a>Action...</h3>
...
<span class="read-more"><a href="/vidat/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -250,7 +263,7 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="简介"><a class="header-anchor" href="#简介"></a>简介</h2>
<table>
<thead>
<tr>
@ -273,7 +286,7 @@
</tr>
<tr>
<td style="text-align:center">Code</td>
<td style="text-align:center"><a href="https://github.com/IkeaASM/IKEA_ASM_Dataset" target="_blank" rel="noopener">https://github.com/IkeaASM/IKEA_ASM_Dataset...</a></td></tr></tbody></table>
<td style="text-align:center"><a href="https://github.com/IkeaASM/IKEA_ASM_Dataset" target="_blank" rel="noopener">https://github.com/IkeaASM/IKEA_ASM_Datase...</a></td></tr></tbody></table>
<span class="read-more"><a href="/IKEA-ASM-Dataset/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -322,7 +335,7 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="Q"><a class="header-anchor" href="#Q"></a>Q</h2>
<p>一开始我发现 <a href="https://github.com/microsoft/terminal" target="_blank" rel="noopener">Windows Terminal</a><code>useAcrylic</code> 选项无效github 之后发现 <a href="https://github.com/microsoft/terminal/issues/1414" target="_blank" rel="noopener">Acrylic transparency not working</a>,这个 Issue 里面有好几个描述的和我一样,不仅仅是 Windows Terminal很多系统的透明特效也都不工作。</p>
<p>原来Windows Terminal 是使用 <a href="https://www.microsoft.com/design/fluent/#/" target="_blank" rel="noopener">Fluent Design</a> 里面的 Acrylic 效果实现的透明,所以说,这个问题是个系统层面的,而不是 Windows Terminal...</p>
@ -373,7 +386,7 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="Q"><a class="header-anchor" href="#Q"></a>Q</h2>
<p>我在博客中写公式的时候使用双斜线<code>\\</code>来代表换行,效果是这样的,</p>
<p>$$<br>
\begin{bmatrix}<br>
@ -389,7 +402,7 @@ cos\theta &amp; sin\theta \\
$$
</code></pre>
<p>那么如何插入多行公式呢?</p>
<h2 id="A"><a class="header-anchor" href="#A"></a>A</h2>
<p>根据<a href="https://github.com/gcushen/hugo-academic/issues/291#issuecomment-334746889" target="_blank" rel="noopener">Multiple...</a></p>
<span class="read-more"><a href="/multiline-equation-in-hexo/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -438,12 +451,11 @@ $$
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<p>众所周知SVD(奇异值分解)可以用于最小二乘法求齐次线性方程组$A\vec{x}=\vec{0}$的解。我看了很多资料,大多使用数学公式推导,得出结论。但是,曾经线性代数差点挂科的我,总觉得有些蹊跷。想了两天,终于有了一些感性的认知(不一定是对的😂),赶紧记录下来。</p>
<h2 id="矩阵有何意义"><a class="header-anchor" href="#矩阵有何意义"></a>矩阵有何意义</h2>
<p>按照我的理解,一个矩阵的实际意义是对应一个线性变换,这个变换可以理解为瞬间运动。例如,一个旋转矩阵,</p>
<p>$$<br>
A=\begin{bmatrix}<br>
cos\theta &amp; sin\theta \\\<br>
-...</p>
cos\theta &amp; sin\theta...</p>
<span class="read-more"><a href="/SVD-for-homogeneous-linear-equation/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -492,9 +504,9 @@ cos\theta &amp; sin\theta \\\<br>
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="Q"><a class="header-anchor" href="#Q"></a>Q</h2>
<p>如何把Rattle的语言设置成英文从而避免显示<code>XXX</code></p>
<h2 id="A"><a class="header-anchor" href="#A"></a>A</h2>
<p><code>R_HOME/etc/Rprofile.site</code>的最后添加,</p>
<pre><code class="language-R">Sys.setenv(LANG=&quot;en&quot;)
</code></pre>
@ -547,12 +559,12 @@ cos\theta &amp; sin\theta \\\<br>
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>闲来无聊,在家折腾 DevOps第一步当然是部署一个 Jenkins 啦,然而一顿操作猛如虎,插件一个都下载不下来,总不能给 Jenkins 加个代理吧,所以有了下面这一通折腾。</p>
<h2 id="原因"><a class="header-anchor" href="#原因"></a>原因</h2>
<p></p>
<p>根据经验,国外这些软件下载失败基本上都是因为链接不上服务器,换个源就好了。所以简单百度,找到大量相关教程,换了<a href="https://mirrors.tuna.tsinghua.edu.cn/" target="_blank" rel="noopener">清华源</a>在内的四五个镜像源,均无效。</p>
<p>这就非常奇怪了,所以我打开了清华源的<a href="https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json" target="_blank" rel="noopener">update-center.json</a>,仔细看了看,发现了蹊跷之处。原来,这个文件里面基本上所有插件的链接都指...</p>
<p>这就非常奇怪了,所以我打开了清华源的<a href="https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json" target="_blank" rel="noopener">update-center.json</a>,仔细看了看,发现了蹊跷之处。原来,这个文件里面基本上所有插...</p>
<span class="read-more"><a href="/jenkins-update-solution-inside-gfw/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -601,9 +613,9 @@ cos\theta &amp; sin\theta \\\<br>
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>计算机这个专业,有很多报告要做。在山威的时候,报告格式没有什么限制 WordPDF 都可以,那个时候我开始使用 Markdown 作为我的排版工具,因为实在是没有时间经历去研究 Word 的各种高级功能(<s>主要是懒</s>。Markdown 十分简单,易学,在<a href="https://github.com" target="_blank" rel="noopener">Github</a>等计算机专业相关平台使用也非常广泛,还可以通过各种模板快速生成<strong>好看</strong><strong>美观</strong><strong>专业</strong>的文档。</p>
<p>后来到了澳国立,老师教授们开始极力鼓吹 Latex 和 PDF基本上算是软性要求我们使用 Latex 编写,还规定了衬线...</p>
<p>后来到了澳国立,老师教授们开始极力鼓吹 Latex 和 PDF基本上算是软性要求我们使用 Latex 编写,还规定...</p>
<span class="read-more"><a href="/write-latex-report-with-markdown/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -652,17 +664,17 @@ cos\theta &amp; sin\theta \\\<br>
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<blockquote>
<p>屋漏更遭连夜雨,船迟又遇打头风。</p>
</blockquote>
<p>刚刚处理完 Docker 里面的“病毒”,又发现自己的笔记本被安装了监控软件,身后一阵凉风。</p>
<h2 id="发现"><a class="header-anchor" href="#发现"></a>发现</h2>
<blockquote>
<p>事发突然,因为影响我开发,所以也没有来得及截图。</p>
</blockquote>
<p>为了使用 WSL2 里面的 Docker我加入了 <code>Windows 预览体验计划 - 慢</code>,把系统升级到了 Windows 10 2004。结果怪事就出现了——基本上所有的命令行都会在执行前显示一个错误。</p>
<pre><code class="language-shell">ANOMALY: use of REX.w is meaningless (default...</code></pre>
<pre><code class="language-shell">ANOMALY: use of REX.w is meaningless...</code></pre>
<span class="read-more"><a href="/inspur-ip-guard-uninstallation/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -711,16 +723,16 @@ cos\theta &amp; sin\theta \\\<br>
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>2020 年开年不顺2019 新型冠状病毒肺炎爆发,从年三十居家隔离到了正月十五,没想到自己的服务器也”感染“上了病毒 - Kinsing(进程的名字,姑且这样称呼)。</p>
<h2 id="发现"><a class="header-anchor" href="#发现"></a>发现</h2>
<p></p>
<p>偶然看了看服务器状态,发现 CPU 占用一直保持在 100%上下,有些蹊跷。</p>
<p>难道是我的博客访问量<s>暴增</s>???那是当然不可能的,然后我去看了看<a href="https://github.com/portainer/portainer" target="_blank" rel="noopener">Portainer</a>看了看,果然,</p>
<p></p>
<p>这个随机名称的容器就是 Kinsing 基于 Ubuntu 的容器CPU 占用 100%。</p>
<p></p>
<p>简单看了看容器里面的进程表,...</p>
<p>简单看了看容器里...</p>
<span class="read-more"><a href="/kinsing-virus/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -752,7 +764,7 @@ cos\theta &amp; sin\theta \\\<br>
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -855,12 +867,6 @@ cos\theta &amp; sin\theta \\\<br>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -965,6 +971,10 @@ cos\theta &amp; sin\theta \\\<br>
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -17,7 +17,7 @@
到了期末都说要找个实习的工作,我也跟个风😂。
我是主要是在实习僧上,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -44,6 +44,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -90,7 +104,7 @@
animation-duration: 1.2s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/langchao-1599636307.jpg) ">
url('https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/langchao-1599636307.jpg') ">
</div>
<div class="else">
<p class="animated fadeInDown">
@ -341,19 +355,6 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib/)
<source type="audio/mpeg" src="https://davidz-blog.oss-cn-beijing.aliyuncs.com/music/戴荃 - 青山白云.mp3">
</audio>
<div class="post-nav">
<hr>
<div class="post-nav-item">上一篇:<a href="/beauty-is-productivity-windows-terminal/" rel="prev"
title="颜值是第一生产力 - Windows Terminal">颜值是第一生产力 - Windows Terminal
</a></div>
<div class="post-nav-item">下一篇:<a href="/anu-comp2310-assignment1/" rel="next"
title="ANU COMP2310(2019) Assignment 1">ANU COMP2310(2019) Assignment 1</a></div>
</div>
@ -365,7 +366,7 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib/)
data-o='DavidZhang73'
data-a='DavidZhang73'
data-d=''
data-p='https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token'
data-p=''
>留言</div>
@ -380,6 +381,19 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib/)
<span>凡事都要留几分</span>
<dl>
<dd><a href="https://github.com/DavidZhang73" target="_blank"><span
class=" iconfont icon-github"></span></a></dd>
<dd><a href="https://twitter.com/david731998" target="_blank"><span
class=" iconfont icon-twitter"></span></a></dd>
<dd><a href="https://stackoverflow.com/users/12693553/davidz" target="_blank"><span
class=" iconfont icon-stack-overflow"></span></a></dd>
</dl>
</div>
@ -423,7 +437,7 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib/)
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -526,12 +540,6 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib/)
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -636,6 +644,10 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib/)
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -19,7 +19,7 @@
刚刚处理完 Docker 里面,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -46,6 +46,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -92,7 +106,7 @@
animation-duration: 1.2s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/langchao-1599636307.jpg) ">
url('https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/langchao-1599636307.jpg') ">
</div>
<div class="else">
<p class="animated fadeInDown">
@ -266,19 +280,6 @@ C:\WINDOWS\SysWOW64\drivers
<source type="audio/mpeg" src="https://davidz-blog.oss-cn-beijing.aliyuncs.com/music/莫文蔚 - 阴天.mp3">
</audio>
<div class="post-nav">
<hr>
<div class="post-nav-item">上一篇:<a href="/write-latex-report-with-markdown/" rel="prev"
title="使用 Markdown 编写基于 Latex 的报告">使用 Markdown 编写基于 Latex 的报告
</a></div>
<div class="post-nav-item">下一篇:<a href="/kinsing-virus/" rel="next"
title=""寄生"于 Docker 的病毒 - Kinsing">"寄生"于 Docker 的病毒 - Kinsing</a></div>
</div>
@ -290,7 +291,7 @@ C:\WINDOWS\SysWOW64\drivers
data-o='DavidZhang73'
data-a='DavidZhang73'
data-d=''
data-p='https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token'
data-p=''
>留言</div>
@ -305,6 +306,19 @@ C:\WINDOWS\SysWOW64\drivers
<span>凡事都要留几分</span>
<dl>
<dd><a href="https://github.com/DavidZhang73" target="_blank"><span
class=" iconfont icon-github"></span></a></dd>
<dd><a href="https://twitter.com/david731998" target="_blank"><span
class=" iconfont icon-twitter"></span></a></dd>
<dd><a href="https://stackoverflow.com/users/12693553/davidz" target="_blank"><span
class=" iconfont icon-stack-overflow"></span></a></dd>
</dl>
</div>
@ -348,7 +362,7 @@ C:\WINDOWS\SysWOW64\drivers
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -451,12 +465,6 @@ C:\WINDOWS\SysWOW64\drivers
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -561,6 +569,10 @@ C:\WINDOWS\SysWOW64\drivers
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -16,7 +16,7 @@
¶前言
闲来无聊,在家折腾 DevOps第一步当然是部署一个 Jenkin,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -43,6 +43,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -89,7 +103,7 @@
animation-duration: 1.2s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/下载超时-1599485061.png) ">
url('https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/下载超时-1599485061.png') ">
</div>
<div class="else">
<p class="animated fadeInDown">
@ -185,19 +199,6 @@
<source type="audio/mpeg" src="https://davidz-blog.oss-cn-beijing.aliyuncs.com/music/陈奕迅 - 红玫瑰.mp3">
</audio>
<div class="post-nav">
<hr>
<div class="post-nav-item">上一篇:<a href="/rattle-change-language/" rel="prev"
title="技巧速记:更改 Rattle 的语言">技巧速记:更改 Rattle 的语言
</a></div>
<div class="post-nav-item">下一篇:<a href="/write-latex-report-with-markdown/" rel="next"
title="使用 Markdown 编写基于 Latex 的报告">使用 Markdown 编写基于 Latex 的报告</a></div>
</div>
@ -209,7 +210,7 @@
data-o='DavidZhang73'
data-a='DavidZhang73'
data-d=''
data-p='https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token'
data-p=''
>留言</div>
@ -224,6 +225,19 @@
<span>凡事都要留几分</span>
<dl>
<dd><a href="https://github.com/DavidZhang73" target="_blank"><span
class=" iconfont icon-github"></span></a></dd>
<dd><a href="https://twitter.com/david731998" target="_blank"><span
class=" iconfont icon-twitter"></span></a></dd>
<dd><a href="https://stackoverflow.com/users/12693553/davidz" target="_blank"><span
class=" iconfont icon-stack-overflow"></span></a></dd>
</dl>
</div>
@ -267,7 +281,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -370,12 +384,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -480,6 +488,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

1
js/Meting.min.js vendored Normal file
View File

@ -0,0 +1 @@
'use strict';console.log('\n %c MetingJS v1.2.0 %c https://github.com/metowolf/MetingJS \n','color: #fadfa3; background: #030307; padding:5px 0;','background: #fadfa3; padding:5px 0;');var aplayers=[],loadMeting=function(){function a(a,b){var c={container:a,audio:b,mini:null,fixed:null,autoplay:!1,mutex:!0,lrcType:3,listFolded:!1,preload:'auto',theme:'#2980b9',loop:'all',order:'list',volume:null,listMaxHeight:null,customAudioType:null,storageName:'metingjs'};if(b.length){b[0].lrc||(c.lrcType=0);var d={};for(var e in c){var f=e.toLowerCase();(a.dataset.hasOwnProperty(f)||a.dataset.hasOwnProperty(e)||null!==c[e])&&(d[e]=a.dataset[f]||a.dataset[e]||c[e],('true'===d[e]||'false'===d[e])&&(d[e]='true'==d[e]))}aplayers.push(new APlayer(d))}}var b='https://api.i-meto.com/meting/api?server=:server&type=:type&id=:id&r=:r';'undefined'!=typeof meting_api&&(b=meting_api);for(var f=0;f<aplayers.length;f++)try{aplayers[f].destroy()}catch(a){console.log(a)}aplayers=[];for(var c=document.querySelectorAll('.aplayer'),d=function(){var d=c[e],f=d.dataset.id;if(f){var g=d.dataset.api||b;g=g.replace(':server',d.dataset.server),g=g.replace(':type',d.dataset.type),g=g.replace(':id',d.dataset.id),g=g.replace(':auth',d.dataset.auth),g=g.replace(':r',Math.random());var h=new XMLHttpRequest;h.onreadystatechange=function(){if(4===h.readyState&&(200<=h.status&&300>h.status||304===h.status)){var b=JSON.parse(h.responseText);a(d,b)}},h.open('get',g,!0),h.send(null)}else if(d.dataset.url){var i=[{name:d.dataset.name||d.dataset.title||'Audio name',artist:d.dataset.artist||d.dataset.author||'Audio artist',url:d.dataset.url,cover:d.dataset.cover||d.dataset.pic,lrc:d.dataset.lrc,type:d.dataset.type||'auto'}];a(d,i)}},e=0;e<c.length;e++)d()};document.addEventListener('DOMContentLoaded',loadMeting,!1);

33
js/loadaplayer.js Normal file
View File

@ -0,0 +1,33 @@
var aplayerconf = "<!-- 我使用的APlayer本体 -->"
aplayerconf += "<div class=\"aplayer\" "
aplayerconf += "data-id=\"" + musiclist + "\" "
aplayerconf += "data-server=\"netease\" "
aplayerconf += "data-type=\"playlist\" "
aplayerconf += "data-fixed=\"true\" "
aplayerconf += "data-autoplay=\"false\" "
aplayerconf += "data-order=\"random\" "
aplayerconf += "data-volume=\"0.55\" "
aplayerconf += "data-preload=\"true\""
aplayerconf += "data-mutex=\"true\""
aplayerconf += "</div>"
aplayerconf += "<!--如果将本体放在body里面导致页面加载出现问题请尝试放到body体后面-->"
function removelrc() {
//检测是否存在歌词按钮
if (!document.querySelector(".aplayer-icon-lrc"))
return;
else
{
//触发以后立刻移除监听
document.removeEventListener("DOMNodeInserted",removelrc);
//稍作延时保证触发函数时存在按钮
setTimeout(function() {
//以触发按钮的方式隐藏歌词,防止在点击显示歌词按钮时需要点击两次才能出现的问题
document.querySelector(".aplayer-icon-lrc").click();
}, 1);
// console.log("success");
return;
}
}
document.addEventListener('DOMNodeInserted', removelrc)

View File

@ -16,7 +16,7 @@
¶前言
2020 年开年不顺2019 新型冠状病毒肺炎爆发,从年三十居家隔,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -43,6 +43,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -89,7 +103,7 @@
animation-duration: 1.2s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/netdata-1599485973.png) ">
url('https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/netdata-1599485973.png') ">
</div>
<div class="else">
<p class="animated fadeInDown">
@ -187,19 +201,6 @@
<source type="audio/mpeg" src="https://davidz-blog.oss-cn-beijing.aliyuncs.com/music/汪苏泷 _ BY2 - 有点甜.mp3">
</audio>
<div class="post-nav">
<hr>
<div class="post-nav-item">上一篇:<a href="/inspur-ip-guard-uninstallation/" rel="prev"
title="卸载浪潮安装的 IP-GUARD 监控软件">卸载浪潮安装的 IP-GUARD 监控软件
</a></div>
<div class="post-nav-item">下一篇:<a href="/windows-package-manager-scoop/" rel="next"
title="Windows 包管理器 - Scoop">Windows 包管理器 - Scoop</a></div>
</div>
@ -211,7 +212,7 @@
data-o='DavidZhang73'
data-a='DavidZhang73'
data-d=''
data-p='https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token'
data-p=''
>留言</div>
@ -226,6 +227,19 @@
<span>凡事都要留几分</span>
<dl>
<dd><a href="https://github.com/DavidZhang73" target="_blank"><span
class=" iconfont icon-github"></span></a></dd>
<dd><a href="https://twitter.com/david731998" target="_blank"><span
class=" iconfont icon-twitter"></span></a></dd>
<dd><a href="https://stackoverflow.com/users/12693553/davidz" target="_blank"><span
class=" iconfont icon-stack-overflow"></span></a></dd>
</dl>
</div>
@ -269,7 +283,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -372,12 +386,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -482,6 +490,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -18,7 +18,7 @@
$$
,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -45,6 +45,20 @@ $$
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -91,7 +105,7 @@ $$
animation-duration: 1.2s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/idea-1602143497.jpg) ">
url('https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/idea-1602143497.jpg') ">
</div>
<div class="else">
<p class="animated fadeInDown">
@ -189,19 +203,6 @@ $$
<source type="audio/mpeg" src="https://davidz-blog.oss-cn-beijing.aliyuncs.com/music/Delacey - Dream It Possible.mp3">
</audio>
<div class="post-nav">
<hr>
<div class="post-nav-item">上一篇:<a href="/acrylic-not-working/" rel="prev"
title="技巧速记Windows 10 透明效果无法正常工作">技巧速记Windows 10 透明效果无法正常工作
</a></div>
<div class="post-nav-item">下一篇:<a href="/SVD-for-homogeneous-linear-equation/" rel="next"
title="想法速记SVD求齐次线性方程组 Ax=0 的解">想法速记SVD求齐次线性方程组 Ax=0 的解</a></div>
</div>
@ -213,7 +214,7 @@ $$
data-o='DavidZhang73'
data-a='DavidZhang73'
data-d=''
data-p='https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token'
data-p=''
>留言</div>
@ -228,6 +229,19 @@ $$
<span>凡事都要留几分</span>
<dl>
<dd><a href="https://github.com/DavidZhang73" target="_blank"><span
class=" iconfont icon-github"></span></a></dd>
<dd><a href="https://twitter.com/david731998" target="_blank"><span
class=" iconfont icon-twitter"></span></a></dd>
<dd><a href="https://stackoverflow.com/users/12693553/davidz" target="_blank"><span
class=" iconfont icon-stack-overflow"></span></a></dd>
</dl>
</div>
@ -271,7 +285,7 @@ $$
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -374,12 +388,6 @@ $$
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -484,6 +492,10 @@ $$
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -172,17 +186,17 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>一直以来作为开发者Windows 相较于 Linux 都缺少两样重要的工具,</p>
<ol>
<li><strong>好用</strong>的 Shell - 现在可以用 PowerShell Core 或者 WSL 暂时代替。</li>
<li><strong>好用</strong>的包管理器 - 在开发时 C/Cpp 的库可以用<a href="https://github.com/microsoft/vcpkg" target="_blank" rel="noopener">VCPKG</a>,而日常使用的软件就可以使用本文的主角<a href="https://github.com/lukesampson/scoop" target="_blank" rel="noopener">Scoop</a> 了。</li>
</ol>
<h2 id="安装"><a class="header-anchor" href="#安装"></a>安装</h2>
<blockquote>
<p>按照官网的<a href="https://github.com/lukesampson/scoop/wiki/Quick-Start" target="_blank" rel="noopener">教程</a>,只能使用 PowerShell 而不是 CMD 进行安装。</p>
</blockquote>
<pre><code class="language-powershell"># 指定 Scoop 的安装路径,之后安装的 APP 会安装在 path/to/scoop/apps...</code></pre>
<pre><code class="language-powershell"># 指定 Scoop 的安装路径,之后安装的 APP 会安装在 path/to/scoop...</code></pre>
<span class="read-more"><a href="/windows-package-manager-scoop/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -246,17 +260,17 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>一直以来作为开发者Windows 相较于 Linux 都缺少两样重要的工具,</p>
<ol>
<li><strong>好用</strong>的 Shell - 现在可以用 PowerShell Core 或者 WSL 暂时代替。</li>
<li><strong>好用</strong>的包管理器 - 在开发时 C/Cpp 的库可以用<a href="https://github.com/microsoft/vcpkg" target="_blank" rel="noopener">VCPKG</a>,而日常使用的软件就可以使用本文的主角<a href="https://github.com/lukesampson/scoop" target="_blank" rel="noopener">Scoop</a> 了。</li>
</ol>
<h2 id="安装"><a class="header-anchor" href="#安装"></a>安装</h2>
<blockquote>
<p>按照官网的<a href="https://github.com/lukesampson/scoop/wiki/Quick-Start" target="_blank" rel="noopener">教程</a>,只能使用 PowerShell 而不是 CMD 进行安装。</p>
</blockquote>
<pre><code class="language-powershell"># 指定 Scoop 的安装路径,之后安装的 APP 会安装在 path/to/scoop/apps...</code></pre>
<pre><code class="language-powershell"># 指定 Scoop 的安装路径,之后安装的 APP 会安装在 path/to/scoop...</code></pre>
<span class="read-more"><a href="/windows-package-manager-scoop/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -305,7 +319,7 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="回顾"><a class="header-anchor" href="#回顾"></a>回顾</h2>
<p></p>
<p>记得我最早的时候用 Visual Studio 写了第一个 Hello World 程序,激动的点运行,出来个黑框一闪就过去了,啥也没看到。</p>
<p></p>
@ -314,7 +328,7 @@
<p>后来上了大学终于在 Ubuntu 上见到了 bash完全改变了我对 Shell 的认知。</p>
<p>傻傻分不清 Shell 和 Terminal 的我,激动的打开 Git 自带的 bash它却长成了这样。</p>
<p></p>
<p>一番优化之后也不是不能用,...</p>
<p>一番优化之后也不是不...</p>
<span class="read-more"><a href="/beauty-is-productivity-windows-terminal/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -363,13 +377,13 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>到了期末都说要找个实习的工作,我也跟个风😂。</p>
<p>我是主要是在<a href="https://www.shixiseng.com/" target="_blank" rel="noopener">实习僧</a>上找的(就当免费做个广告吧),我住在美丽的泉城济南,<s>这个地方好就好在</s>,咳咳咳,我大概填了填简历,可能是没啥亮点,投了三四家都不要我😢。</p>
<p>我分析原因大概有以下几条:</p>
<ol>
<li>我最喜欢最熟练的语言是 Python但是现在国内的环境Python 很少作为 Web 的后端,主要是用在机器学习(大数据分析,量化交易之类的)方面。济南大多数都是 Java 和 Cpp 岗。</li>
<li>我个人没有参加过 acm 之类的比赛,除了几个项目...</li></ol>
<li>我个人没有参加过 acm 之类的比赛,除了几...</li></ol>
<span class="read-more"><a href="/inspur-internship/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -422,10 +436,10 @@
<p><strong>敬告</strong></p>
<div style="color: red">本博客仅供参考,请不要抄袭。</div>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>这是 ANU <a href="http://courses.cecs.anu.edu.au/courses/COMP2310/" target="_blank" rel="noopener">COMP2310</a>的第一次大作业,历时一个月左右,也是这个学期我写的最认真的一次作业,所以在博客搭建伊始,我先把这个记录下来。</p>
<p>根据<a href="https://davidz-blog.oss-cn-beijing.aliyuncs.com/asset/Assignment1.pdf" target="_blank" rel="noopener">Assignment 1 PDF</a>中的描述,大概的意思就是在三维空间中有许多的<code></code>,具有速度和加速度(都是三维向量),而且不管是否加速,都会消耗一定的能量,当然加速也会加快能量的消耗。然后就是有一个或多个<code>能量球</code>,当然也是在运动中的,同样具有速度和加速度。当<code></code><code>能量球</code>靠近的时候,<code></code>够获取到<code>能量...</code></p>
<h2 id="问题"><a class="header-anchor" href="#问题"></a>问题</h2>
<p>根据<a href="https://davidz-blog.oss-cn-beijing.aliyuncs.com/asset/Assignment1.pdf" target="_blank" rel="noopener">Assignment 1 PDF</a>中的描述,大概的意思就是在三维空间中有许多的<code></code>,具有速度和加速度(都是三维向量),而且不管是否加速,都会消耗一定的能量,当然加速也会加快能量的消耗。然后就是有一个或多个<code>能量球</code>,当然也是在运动中的,同样具有速度和加速度。当<code></code><code>能量球</code>靠近的时候,<code></code>能...</p>
<span class="read-more"><a href="/anu-comp2310-assignment1/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -437,7 +451,7 @@
<div class="post-cover animated fadeIn" style="
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(/img/welcome-cover.jpg);">
url();">
</div>
<div class="else">
<p class="animated fadeInDown">
@ -510,7 +524,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -613,12 +627,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -723,6 +731,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -18,7 +18,7 @@
¶A
在R_,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -45,6 +45,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -91,7 +105,7 @@
animation-duration: 1.2s;
background-image:
radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0.65), #100e17),
url(https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/idea-1602143497.jpg) ">
url('https://davidz-blog.oss-cn-beijing.aliyuncs.com/img/idea-1602143497.jpg') ">
</div>
<div class="else">
<p class="animated fadeInDown">
@ -164,19 +178,6 @@
<source type="audio/mpeg" src="https://davidz-blog.oss-cn-beijing.aliyuncs.com/music/Delacey - Dream It Possible.mp3">
</audio>
<div class="post-nav">
<hr>
<div class="post-nav-item">上一篇:<a href="/SVD-for-homogeneous-linear-equation/" rel="prev"
title="想法速记SVD求齐次线性方程组 Ax=0 的解">想法速记SVD求齐次线性方程组 Ax=0 的解
</a></div>
<div class="post-nav-item">下一篇:<a href="/jenkins-update-solution-inside-gfw/" rel="next"
title="墙内 Jenkins 插件下载的一种解决方案">墙内 Jenkins 插件下载的一种解决方案</a></div>
</div>
@ -188,7 +189,7 @@
data-o='DavidZhang73'
data-a='DavidZhang73'
data-d=''
data-p='https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token'
data-p=''
>留言</div>
@ -203,6 +204,19 @@
<span>凡事都要留几分</span>
<dl>
<dd><a href="https://github.com/DavidZhang73" target="_blank"><span
class=" iconfont icon-github"></span></a></dd>
<dd><a href="https://twitter.com/david731998" target="_blank"><span
class=" iconfont icon-twitter"></span></a></dd>
<dd><a href="https://stackoverflow.com/users/12693553/davidz" target="_blank"><span
class=" iconfont icon-stack-overflow"></span></a></dd>
</dl>
</div>
@ -246,7 +260,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -349,12 +363,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -459,6 +467,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

BIN
statics/chengdu.mp3 Normal file

Binary file not shown.

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -172,11 +186,11 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="简介"><a class="header-anchor" href="#简介"></a>简介</h2>
<p><a href="https://github.com/anucvml/vidat" target="_blank" rel="noopener">Github</a> | <a href="http://users.cecs.anu.edu.au/~sgould/vidat/" target="_blank" rel="noopener">Host1 ANU</a> | <a href="https://vidat.davidz.cn/" target="_blank" rel="noopener">Host2 本站</a> | <a href="http://users.cecs.anu.edu.au/~sgould/vidatproto/" target="_blank" rel="noopener">Prototype ANU</a> | <a href="https://vidat.davidz.cn/?video=needinput.mp4&amp;annotation=needinput.json" target="_blank" rel="noopener">Demo</a></p>
<p>Vidat(VIDeo Annotation Tool)是我本科毕业设计的一部分,即设计实现一个开源的在线(浏览器内)视频标注工具,目前已经实现了四种标注功能,插值标注,导入导出等。</p>
<p>项目基于<a href="https://cn.vuejs.org/" target="_blank" rel="noopener">Vue.js</a><a href="https://quasar.dev/" target="_blank" rel="noopener">Quasar</a>开发。</p>
<h2 id="功能"><a class="header-anchor" href="#功能"></a>功能</h2>
<h3 id="Object"><a class="header-anchor" href="#Object"></a>Object</h3>
<p>使用矩形标注目标。</p>
<p></p>
@ -185,8 +199,7 @@
<p></p>
<h3 id="Skeleton"><a class="header-anchor" href="#Skeleton"></a>Skeleton</h3>
<p>使用自定义的骨骼模型标注目标。</p>
<p></p>
<h3 id="Action"><a class="header-anchor" href="#Action"></a>Action...</h3>
...
<span class="read-more"><a href="/vidat/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -254,10 +267,10 @@
<p><strong>敬告</strong></p>
<div style="color: red">本博客仅供参考,请不要抄袭。</div>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>这是 ANU <a href="http://courses.cecs.anu.edu.au/courses/COMP2310/" target="_blank" rel="noopener">COMP2310</a>的第一次大作业,历时一个月左右,也是这个学期我写的最认真的一次作业,所以在博客搭建伊始,我先把这个记录下来。</p>
<p>根据<a href="https://davidz-blog.oss-cn-beijing.aliyuncs.com/asset/Assignment1.pdf" target="_blank" rel="noopener">Assignment 1 PDF</a>中的描述,大概的意思就是在三维空间中有许多的<code></code>,具有速度和加速度(都是三维向量),而且不管是否加速,都会消耗一定的能量,当然加速也会加快能量的消耗。然后就是有一个或多个<code>能量球</code>,当然也是在运动中的,同样具有速度和加速度。当<code></code><code>能量球</code>靠近的时候,<code></code>够获取到<code>能量...</code></p>
<h2 id="问题"><a class="header-anchor" href="#问题"></a>问题</h2>
<p>根据<a href="https://davidz-blog.oss-cn-beijing.aliyuncs.com/asset/Assignment1.pdf" target="_blank" rel="noopener">Assignment 1 PDF</a>中的描述,大概的意思就是在三维空间中有许多的<code></code>,具有速度和加速度(都是三维向量),而且不管是否加速,都会消耗一定的能量,当然加速也会加快能量的消耗。然后就是有一个或多个<code>能量球</code>,当然也是在运动中的,同样具有速度和加速度。当<code></code><code>能量球</code>靠近的时候,<code></code>能...</p>
<span class="read-more"><a href="/anu-comp2310-assignment1/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -288,7 +301,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -391,12 +404,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -501,6 +508,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -176,10 +190,10 @@
<p><strong>敬告</strong></p>
<div style="color: red">本博客仅供参考,请不要抄袭。</div>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>这是 ANU <a href="http://courses.cecs.anu.edu.au/courses/COMP2310/" target="_blank" rel="noopener">COMP2310</a>的第一次大作业,历时一个月左右,也是这个学期我写的最认真的一次作业,所以在博客搭建伊始,我先把这个记录下来。</p>
<p>根据<a href="https://davidz-blog.oss-cn-beijing.aliyuncs.com/asset/Assignment1.pdf" target="_blank" rel="noopener">Assignment 1 PDF</a>中的描述,大概的意思就是在三维空间中有许多的<code></code>,具有速度和加速度(都是三维向量),而且不管是否加速,都会消耗一定的能量,当然加速也会加快能量的消耗。然后就是有一个或多个<code>能量球</code>,当然也是在运动中的,同样具有速度和加速度。当<code></code><code>能量球</code>靠近的时候,<code></code>够获取到<code>能量...</code></p>
<h2 id="问题"><a class="header-anchor" href="#问题"></a>问题</h2>
<p>根据<a href="https://davidz-blog.oss-cn-beijing.aliyuncs.com/asset/Assignment1.pdf" target="_blank" rel="noopener">Assignment 1 PDF</a>中的描述,大概的意思就是在三维空间中有许多的<code></code>,具有速度和加速度(都是三维向量),而且不管是否加速,都会消耗一定的能量,当然加速也会加快能量的消耗。然后就是有一个或多个<code>能量球</code>,当然也是在运动中的,同样具有速度和加速度。当<code></code><code>能量球</code>靠近的时候,<code></code>能...</p>
<span class="read-more"><a href="/anu-comp2310-assignment1/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -225,7 +239,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -328,12 +342,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -438,6 +446,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -172,7 +186,7 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="简介"><a class="header-anchor" href="#简介"></a>简介</h2>
<table>
<thead>
<tr>
@ -195,7 +209,7 @@
</tr>
<tr>
<td style="text-align:center">Code</td>
<td style="text-align:center"><a href="https://github.com/IkeaASM/IKEA_ASM_Dataset" target="_blank" rel="noopener">https://github.com/IkeaASM/IKEA_ASM_Dataset...</a></td></tr></tbody></table>
<td style="text-align:center"><a href="https://github.com/IkeaASM/IKEA_ASM_Dataset" target="_blank" rel="noopener">https://github.com/IkeaASM/IKEA_ASM_Datase...</a></td></tr></tbody></table>
<span class="read-more"><a href="/IKEA-ASM-Dataset/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -241,7 +255,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -344,12 +358,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -454,6 +462,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -172,13 +186,13 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>到了期末都说要找个实习的工作,我也跟个风😂。</p>
<p>我是主要是在<a href="https://www.shixiseng.com/" target="_blank" rel="noopener">实习僧</a>上找的(就当免费做个广告吧),我住在美丽的泉城济南,<s>这个地方好就好在</s>,咳咳咳,我大概填了填简历,可能是没啥亮点,投了三四家都不要我😢。</p>
<p>我分析原因大概有以下几条:</p>
<ol>
<li>我最喜欢最熟练的语言是 Python但是现在国内的环境Python 很少作为 Web 的后端,主要是用在机器学习(大数据分析,量化交易之类的)方面。济南大多数都是 Java 和 Cpp 岗。</li>
<li>我个人没有参加过 acm 之类的比赛,除了几个项目...</li></ol>
<li>我个人没有参加过 acm 之类的比赛,除了几...</li></ol>
<span class="read-more"><a href="/inspur-internship/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -224,7 +238,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -327,12 +341,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -437,6 +445,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -172,7 +186,7 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="简介"><a class="header-anchor" href="#简介"></a>简介</h2>
<table>
<thead>
<tr>
@ -195,7 +209,7 @@
</tr>
<tr>
<td style="text-align:center">Code</td>
<td style="text-align:center"><a href="https://github.com/IkeaASM/IKEA_ASM_Dataset" target="_blank" rel="noopener">https://github.com/IkeaASM/IKEA_ASM_Dataset...</a></td></tr></tbody></table>
<td style="text-align:center"><a href="https://github.com/IkeaASM/IKEA_ASM_Dataset" target="_blank" rel="noopener">https://github.com/IkeaASM/IKEA_ASM_Datase...</a></td></tr></tbody></table>
<span class="read-more"><a href="/IKEA-ASM-Dataset/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -241,7 +255,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -344,12 +358,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -454,6 +462,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -172,16 +186,16 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>2020 年开年不顺2019 新型冠状病毒肺炎爆发,从年三十居家隔离到了正月十五,没想到自己的服务器也”感染“上了病毒 - Kinsing(进程的名字,姑且这样称呼)。</p>
<h2 id="发现"><a class="header-anchor" href="#发现"></a>发现</h2>
<p></p>
<p>偶然看了看服务器状态,发现 CPU 占用一直保持在 100%上下,有些蹊跷。</p>
<p>难道是我的博客访问量<s>暴增</s>???那是当然不可能的,然后我去看了看<a href="https://github.com/portainer/portainer" target="_blank" rel="noopener">Portainer</a>看了看,果然,</p>
<p></p>
<p>这个随机名称的容器就是 Kinsing 基于 Ubuntu 的容器CPU 占用 100%。</p>
<p></p>
<p>简单看了看容器里面的进程表,...</p>
<p>简单看了看容器里...</p>
<span class="read-more"><a href="/kinsing-virus/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -227,7 +241,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -330,12 +344,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -440,6 +448,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -172,11 +186,11 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="简介"><a class="header-anchor" href="#简介"></a>简介</h2>
<p><a href="https://github.com/anucvml/vidat" target="_blank" rel="noopener">Github</a> | <a href="http://users.cecs.anu.edu.au/~sgould/vidat/" target="_blank" rel="noopener">Host1 ANU</a> | <a href="https://vidat.davidz.cn/" target="_blank" rel="noopener">Host2 本站</a> | <a href="http://users.cecs.anu.edu.au/~sgould/vidatproto/" target="_blank" rel="noopener">Prototype ANU</a> | <a href="https://vidat.davidz.cn/?video=needinput.mp4&amp;annotation=needinput.json" target="_blank" rel="noopener">Demo</a></p>
<p>Vidat(VIDeo Annotation Tool)是我本科毕业设计的一部分,即设计实现一个开源的在线(浏览器内)视频标注工具,目前已经实现了四种标注功能,插值标注,导入导出等。</p>
<p>项目基于<a href="https://cn.vuejs.org/" target="_blank" rel="noopener">Vue.js</a><a href="https://quasar.dev/" target="_blank" rel="noopener">Quasar</a>开发。</p>
<h2 id="功能"><a class="header-anchor" href="#功能"></a>功能</h2>
<h3 id="Object"><a class="header-anchor" href="#Object"></a>Object</h3>
<p>使用矩形标注目标。</p>
<p></p>
@ -185,8 +199,7 @@
<p></p>
<h3 id="Skeleton"><a class="header-anchor" href="#Skeleton"></a>Skeleton</h3>
<p>使用自定义的骨骼模型标注目标。</p>
<p></p>
<h3 id="Action"><a class="header-anchor" href="#Action"></a>Action...</h3>
...
<span class="read-more"><a href="/vidat/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -232,7 +245,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -335,12 +348,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -445,6 +452,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

View File

@ -12,7 +12,7 @@
<meta name="keywords" content="Developer, Python, C++, JavaScript, Java,">
<meta name="description" content="DavidZ&#39;s Blog,">
<meta name="author" content="DavidZ">
<link rel="alternative" href="atom.xml" title="Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.png">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1429596_nzgqgvnmkjb.css">
@ -39,6 +39,20 @@
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/font-awesome/css/font-awesome.min.css">
<script>var musiclist = ""</script>
<script src="/js/loadaplayer.js"></script>
<!-- 引用依赖 -->
<link rel="stylesheet" href="/aplayer/dist/APlayer.min.css">
<script src="/aplayer/dist/APlayer.min.js"></script>
<script src="/js/Meting.min.js"></script>
<meta name="generator" content="Hexo 6.2.0"><!-- hexo-inject:begin --><!-- hexo-inject:end --></head>
@ -172,12 +186,12 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>闲来无聊,在家折腾 DevOps第一步当然是部署一个 Jenkins 啦,然而一顿操作猛如虎,插件一个都下载不下来,总不能给 Jenkins 加个代理吧,所以有了下面这一通折腾。</p>
<h2 id="原因"><a class="header-anchor" href="#原因"></a>原因</h2>
<p></p>
<p>根据经验,国外这些软件下载失败基本上都是因为链接不上服务器,换个源就好了。所以简单百度,找到大量相关教程,换了<a href="https://mirrors.tuna.tsinghua.edu.cn/" target="_blank" rel="noopener">清华源</a>在内的四五个镜像源,均无效。</p>
<p>这就非常奇怪了,所以我打开了清华源的<a href="https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json" target="_blank" rel="noopener">update-center.json</a>,仔细看了看,发现了蹊跷之处。原来,这个文件里面基本上所有插件的链接都指...</p>
<p>这就非常奇怪了,所以我打开了清华源的<a href="https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json" target="_blank" rel="noopener">update-center.json</a>,仔细看了看,发现了蹊跷之处。原来,这个文件里面基本上所有插...</p>
<span class="read-more"><a href="/jenkins-update-solution-inside-gfw/" title="查看全文" class="posttitle">查看全文</a>
<b class="iconfont icon-arrow-right- gradient-text"></b></span>
@ -241,16 +255,16 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>2020 年开年不顺2019 新型冠状病毒肺炎爆发,从年三十居家隔离到了正月十五,没想到自己的服务器也”感染“上了病毒 - Kinsing(进程的名字,姑且这样称呼)。</p>
<h2 id="发现"><a class="header-anchor" href="#发现"></a>发现</h2>
<p></p>
<p>偶然看了看服务器状态,发现 CPU 占用一直保持在 100%上下,有些蹊跷。</p>
<p>难道是我的博客访问量<s>暴增</s>???那是当然不可能的,然后我去看了看<a href="https://github.com/portainer/portainer" target="_blank" rel="noopener">Portainer</a>看了看,果然,</p>
<p></p>
<p>这个随机名称的容器就是 Kinsing 基于 Ubuntu 的容器CPU 占用 100%。</p>
<p></p>
<p>简单看了看容器里面的进程表,...</p>
<p>简单看了看容器里...</p>
<span class="read-more"><a href="/kinsing-virus/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -299,13 +313,13 @@
<blockquote>
<p>原创发表于 <a href="https://blog.davidz.cn">DavidZ Blog</a>,遵循 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" target="_blank" rel="noopener">CC 4.0 BY-NC-SA</a> 版权协议,转载请附上原文出处链接及本声明。</p>
</blockquote>
<h2 id="前言"><a class="header-anchor" href="#前言"></a>前言</h2>
<p>到了期末都说要找个实习的工作,我也跟个风😂。</p>
<p>我是主要是在<a href="https://www.shixiseng.com/" target="_blank" rel="noopener">实习僧</a>上找的(就当免费做个广告吧),我住在美丽的泉城济南,<s>这个地方好就好在</s>,咳咳咳,我大概填了填简历,可能是没啥亮点,投了三四家都不要我😢。</p>
<p>我分析原因大概有以下几条:</p>
<ol>
<li>我最喜欢最熟练的语言是 Python但是现在国内的环境Python 很少作为 Web 的后端,主要是用在机器学习(大数据分析,量化交易之类的)方面。济南大多数都是 Java 和 Cpp 岗。</li>
<li>我个人没有参加过 acm 之类的比赛,除了几个项目...</li></ol>
<li>我个人没有参加过 acm 之类的比赛,除了几...</li></ol>
<span class="read-more"><a href="/inspur-internship/" title="查看全文" class="posttitle">查看全文</a> <b class="iconfont icon-arrow-right- gradient-text"></b></span>
</div>
@ -336,7 +350,7 @@
<span class="gradient-text">
<a href="https://github.com/TriDiamond/hexo-theme-obsidian" title="Obsidian" target="_blank" rel="noopener">Obsidian</a>
</span>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="v1.4.7" target="_blank" rel="noopener">v1.4.7</a></small>
<small><a href="https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md" title="vundefined" target="_blank" rel="noopener">vundefined</a></small>
</br>
鲁ICP备
@ -439,12 +453,6 @@
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/shell/shell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/python/python.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/cmake/cmake.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/powershell/powershell.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/codemirror@5.45.0/mode/yaml/yaml.min.js"></script>
<script src="/js/busuanzi.min.js"></script>
@ -549,6 +557,10 @@
<!-- 引用依赖 -->
<script>document.write(aplayerconf)</script>
</html>

Some files were not shown because too many files have changed in this diff Show More