pdf预览 jquery.media.js 2024-02-26 20:25:00 https://huaweicloud.csdn.net/639fed54dacf622b8df90495.html 1 2 3 4 <script src="jquery.min.js" type="text/javascript"></script> <script src="jquery.media.js" type="text/javascript"></script> <a class='media' href='url/a.pdf'>预览</a>
Vim 在处理长字符串时变得非常慢 2024-02-26 20:22:00 https://www.coder.work/article/6946837 语法高亮是通过正则表达式定义的,匹配会消耗大量资源,尤其是在长行和大缓冲区上。 1 :syntax off
javascript随机打乱数组 2024-02-26 20:18:00 https://www.coder.work/article/3779797 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 const shuffle = ([...array]) => { let i = 0; let j = 0; let temp = null; for (i = array.length - 1; i > 0; i -= 1) { j = Math.floor(Math.random() * (i + 1)); temp = array[i]; array[i] = array[j]; array[j] = temp; } return array; } id2nos = shuffle(id2nos);