Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
JQiue committed Mar 1, 2024
1 parent 46515ee commit cf5b471
Show file tree
Hide file tree
Showing 43 changed files with 1,742 additions and 1,223 deletions.
28 changes: 25 additions & 3 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { viteBundler } from '@vuepress/bundler-vite';
import { defineUserConfig } from 'vuepress';
import theme from './theme';
import { MeiliSearchPlugin } from './vuepress-plugin-meilisearch/index';
import { viteBundler } from '@vuepress/bundler-vite';
import { pwaPlugin } from 'vuepress-plugin-pwa2';
import theme from './theme.ts';
import { MeiliSearchPlugin } from './vuepress-plugin-meilisearch/index.ts';

const app = defineUserConfig({
bundler: viteBundler(),
Expand All @@ -23,6 +24,27 @@ const app = defineUserConfig({
'adaf72e2a6d6f428ec465bc786ec41de868bbd5f1997e89ba2299e9566c88213',
index: 'jinqiu-wang',
}),
pwaPlugin({
favicon: '/favicon.ico',
themeColor: '#5c92d1',
cacheHTML: true,
cachePic: true,
maxSize: 40000,
maxPicSize: 5000,
apple: {
icon: '/assets/icon/appleIcon152.png',
statusBarColor: 'black',
},
msTile: {
image: '/assets/icon/msIcon144.png',
color: '#ffffff',
},
manifest: {
id: '/',
scope: '/',
start_url: '/',
},
}),
],
shouldPrefetch: false,
});
Expand Down
30 changes: 15 additions & 15 deletions docs/.vuepress/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const zh = navbar([
{ text: 'C', icon: 'c', link: '/c/' },
{ text: 'Java', icon: 'java', link: '/java/' },
{ text: 'JavaScript', icon: 'javascript', link: '/js/' },
{ text: 'TypeScript', icon: 'typescript', link: '/js/typescript/' },
{ text: 'TypeScript', icon: 'typescript', link: '/js/typescript' },
{ text: 'Python', icon: 'python', link: '/python/' },
{ text: 'Rust', icon: 'rust', link: '/rust/' },
],
Expand All @@ -41,27 +41,27 @@ export const zh = navbar([
icon: 'framework',
prefix: '/framework/',
children: [
{ text: 'Vue', icon: 'vue', link: 'vue/' },
{ text: 'React', icon: 'react', link: 'react/' },
{ text: 'Express', icon: 'express', link: 'express/' },
{ text: 'Koa', icon: 'koa', link: 'koa/' },
{ text: 'React Native', icon: 'react', link: 'reactnative/' },
{ text: 'Electron', icon: 'electron', link: 'electron/' },
{ text: 'Tauri', icon: 'tauri', link: 'tauri/' },
{ text: 'Vue', icon: 'vue', link: 'vue' },
{ text: 'React', icon: 'react', link: 'react' },
{ text: 'Express', icon: 'express', link: 'express' },
{ text: 'Koa', icon: 'koa', link: 'koa' },
{ text: 'React Native', icon: 'react', link: 'reactnative' },
{ text: 'Electron', icon: 'electron', link: 'electron' },
{ text: 'Tauri', icon: 'tauri', link: 'tauri' },
],
},
{
text: '基础学科',
prefix: '/subject/',
icon: 'kemu',
children: [
{ text: '英语', icon: 'yingyu', link: 'english/' },
{ text: '数学', icon: 'math', link: 'math/' },
{ text: '物理', icon: 'physics', link: 'physics/' },
{ text: '化学', icon: 'chemistry', link: 'chemistry/' },
{ text: '生物', icon: 'biology', link: 'biology/' },
{ text: '历史', icon: 'history', link: 'history/' },
{ text: '逻辑学', icon: 'logic', link: 'logic/' },
{ text: '英语', icon: 'yingyu', link: 'english' },
{ text: '数学', icon: 'math', link: 'math' },
{ text: '物理', icon: 'physics', link: 'physics' },
{ text: '化学', icon: 'chemistry', link: 'chemistry' },
{ text: '生物', icon: 'biology', link: 'biology' },
{ text: '历史', icon: 'history', link: 'history' },
{ text: '逻辑学', icon: 'logic', link: 'logic' },
{
text: '经济和金融',
icon: 'economics-finance',
Expand Down
37 changes: 6 additions & 31 deletions docs/.vuepress/sidebar.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
import { sidebar } from 'vuepress-theme-hope';

export const zh = sidebar({
'/about': [''],
'/about': 'structure',
'/composition/': 'structure',
'/operating-system/': ['', 'windows', 'linux'],
'/compiler/': 'structure',
'/network/': [''],
'/ai/': ['', 'dl'],
'/network/': 'structure',
'/ai/': 'structure',
'/c/': 'structure',
'/java/': [
'',
'syntax',
'class',
'ds',
'interface',
'generics',
'error',
'multitasking',
'standard',
],
'/java/': 'structure',
'/js/': [
'',
'syntax',
Expand Down Expand Up @@ -67,30 +57,15 @@ export const zh = sidebar({
'multitasking',
'macro',
'async',
'owner-borrowing-lifecycle',
'ownership',
'module',
'unsafe',
'standard',
'libraries',
'performance',
'practice',
],
'/ds-algorithm/': [
'',
'array',
'linkedlist',
'stack',
'queue',
'string',
'tree',
'graph',
'other',
'recursion',
'find',
'sort',
'random',
'think',
],
'/ds-algorithm/': 'structure',
'/database/': ['', 'sql', 'nosql'],
'/html-css/': [
'',
Expand Down
29 changes: 4 additions & 25 deletions docs/.vuepress/theme.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hopeTheme } from 'vuepress-theme-hope';
import * as navbar from './navbar';
import * as sidebar from './sidebar';
import { updatetime } from './updatetime';
import * as navbar from './navbar.ts';
import * as sidebar from './sidebar.ts';
import { updatetime } from './updatetime.ts';

export default hopeTheme({
hostname: 'https://jinqiu.wang/',
Expand Down Expand Up @@ -74,7 +74,7 @@ export default hopeTheme({
blog: {},
comment: {
provider: 'Waline',
serverURL: 'https://waline.jinqiu.wang/',
serverURL: 'https://waline.jinqiu.wang',
},
mdEnhance: {
katex: true,
Expand All @@ -87,26 +87,5 @@ export default hopeTheme({
echarts: true,
tabs: true,
},
pwa: {
favicon: '/favicon.ico',
themeColor: '#5c92d1',
cacheHTML: true,
cachePic: true,
maxSize: 40000,
maxPicSize: 5000,
apple: {
icon: '/assets/icon/appleIcon152.png',
statusBarColor: 'black',
},
msTile: {
image: '/assets/icon/msIcon144.png',
color: '#ffffff',
},
manifest: {
id: '/',
scope: '/',
start_url: '/',
},
},
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</template>

<script setup lang="ts">
import { query, currentIndex, hits, hideModal, showModal } from '../global';
import { query, currentIndex, hits, hideModal, showModal } from '../global.ts';
const handleInput = () => {
showModal();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
import { ref, watch } from 'vue';
import { MeiliSearch } from 'meilisearch'
import keywordMark from 'keyword-mark';
import { currentIndex, modalVisible, query, isLoading, hits, canHide } from '../global';
import { pluginOptions } from '../define';
import { currentIndex, modalVisible, query, isLoading, hits, canHide } from '../global.ts';
import { pluginOptions } from '../define.ts';
const client = new MeiliSearch({
host: pluginOptions.HOST,
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/vuepress-plugin-meilisearch/client/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineClientConfig } from '@vuepress/client';
import { defineClientConfig } from 'vuepress/client';
import Index from './index.vue';

export default defineClientConfig({
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/vuepress-plugin-meilisearch/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getDirname, path } from '@vuepress/utils';
import { getDirname, path } from 'vuepress/utils';

interface PluginOptions {
host: string;
Expand Down
2 changes: 1 addition & 1 deletion docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const Person = {
+ Docker
+ [正则表达式](/sundry/regex/)

> 全站预估为 363312 字,可花 1211 字/分)分钟浏览完成,本人周产 3000 字左右的垃圾。到 100 万字时开始减少产出,浓缩质量
> 全站预估为 383652 字,可花 1278 字/分)分钟浏览完成,本人周产 3000 字左右的垃圾。到 100 万字时开始减少产出,浓缩质量
## 错误更正

Expand Down
18 changes: 9 additions & 9 deletions docs/ds-algorithm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ endADT

**大 O 表示法**应运而生,它表示的是数据规模 n 对应的时间复杂度,仅仅是粗略的估算,帮助短时间内了解一个算法的复杂度,而不再需要具体的测试

符 号 | 名 称
---|---
O(1) | 常数的
O(log(n)) | 对数的
O((log(n))c) | 对数多项式的
O(n) | 线性的
O(n^2^) | 二次的
O(n^c^) | 多项式的
O(c^n^) | 指数的
| 符 号 | 名 称 |
| ------------ | ------------ |
| O(1) | 常数的 |
| O(log(n)) | 对数的 |
| O((log(n))c) | 对数多项式的 |
| O(n) | 线性的 |
| O(n^2^) | 二次的 |
| O(n^c^) | 多项式的 |
| O(c^n^) | 指数的 |

`increment`是一个时间复杂度为 O(1) 的算法,无论执行多少次,`increment`的性能都是一样的,{1} 总是执行一次即可完成

Expand Down
1 change: 1 addition & 0 deletions docs/ds-algorithm/array.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: 数组
category: 数据结构与算法
article: false
order: 1
---

几乎所有的编程语言都原生支持数组类型,因为数组是最简单的内存数据结构,大多数编程语言的数组只能允许存储同一类型的值,少部分语言(JavaScript)允许任意类型的元素。并且大多数语言的数组长度是固定的,无法动态改变,少部分语言的数组长度是可以动态改变的
Expand Down
1 change: 1 addition & 0 deletions docs/ds-algorithm/find.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: 查找
category: 数据结构与算法
article: false
order: 10
---

在一些数据元素中,通过一定的方法找出与给定关键字相同的数据元素的过程
Expand Down
1 change: 1 addition & 0 deletions docs/ds-algorithm/graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title:
category: 数据结构与算法
article: false
order: 7
---

图是网络结构的抽象模型,学习图是重要的,因为任何二元关系都可以用图来表示。任何社交网络,例如 Facebook、Twitter 和 Google+,都可以用图来表示,还可以使用图来表示道路、航班以及通信
Expand Down
1 change: 1 addition & 0 deletions docs/ds-algorithm/linkedlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: 链表
category: 数据结构与算法
article: false
order: 2
---

存储多个元素,数组是最常见的数据结构,几乎每种语言都实现了数组,这很方便。但是它有一个很严重的缺点,插入和删除的成本都非常高,可能需要移动大量的元素
Expand Down
38 changes: 38 additions & 0 deletions docs/ds-algorithm/math.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: 数学算法
category: 数据结构与算法
article: false
---

## 判断素数

```rust
/* 判断方法:质数无法被比它小的数整除 (n>3) */
pub fn is_prime(number: i128) {
if number <= 1 {
return false;
}
if number <= 3 && number > 1 {
return true;
}
for n in 2..number {
if number % n == 0 {
return false;
}
}
return true;
}
```

## 最大公约数

```rust
/* 欧几里得算法(辗转相除法):gcb(a, b)==(b, a mod b) */
pub fn gcb(a: i32, b: i32) -> i32 {
if a % b == 0 {
b
} else {
gcb(b, a % b)
}
}
```
1 change: 1 addition & 0 deletions docs/ds-algorithm/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: 其它结构
category: 数据结构与算法
tag: [集合, 字典, 哈希表]
article: false
order: 8
---

## 集合
Expand Down
1 change: 1 addition & 0 deletions docs/ds-algorithm/queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: 队列
category: 数据结构与算法
article: false
order: 4
---

队列和栈类似,但是采用的是先进先出原则,只能从尾部添加新元素,并从顶部移除元素
Expand Down
1 change: 1 addition & 0 deletions docs/ds-algorithm/random.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: 随机
category: 数据结构与算法
article: false
order: 12
---

将有序的变成无序的过程
Expand Down
1 change: 1 addition & 0 deletions docs/ds-algorithm/recursion.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: 递归和回溯
category: 数据结构与算法
article: false
order: 9
---

递归是一种解决问题的方法,它从解决问题的各个小部分开始,直到解决最初的大问题。递归通常涉及函数调用自身,如果没有基线条件,会不断地递归下去,所以每个递归都有一个不再递归调用的条件,防止无限递归
Expand Down
1 change: 1 addition & 0 deletions docs/ds-algorithm/sort.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: 排序
category: 数据结构与算法
article: false
order: 11
---

排序即是将一组“无序”的变成有序的过程
Expand Down
1 change: 1 addition & 0 deletions docs/ds-algorithm/stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title:
category: 数据结构与算法
article: false
order: 3
---

栈只是一种特殊的线性表,它是线性表的一种具体形式,也就是必须通过顺序表或链表来实现它,但是它在操作上有一些特殊的要求和限制,只能在一端进行操作。对于栈来说,表尾称之为栈顶,而表头称之为栈底。新的元素总是靠近栈顶,旧的元素总是靠近栈底,栈就像弹夹一样,最先压进去的子弹一定是最后出来的,所以它遵循先进后出或后进先出的原则,即 LIFO(Last In First Out)。往栈中添加元素的操作,叫做入栈,从栈中移除元素的操作,叫做出栈
Expand Down
1 change: 1 addition & 0 deletions docs/ds-algorithm/string.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title:
category: 数据结构与算法
article: false
order: 5
---

在计算机上处理非数值的工作越来越多,于是引入了对字符的处理,就有了字符串的概念,那么串就是由零个或多个字符组成的线性表,是的,它是一种内容受限的线性表
Expand Down
Loading

0 comments on commit cf5b471

Please sign in to comment.