Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
XIAOZHUXUEJAVA committed Dec 29, 2023
1 parent 1269b81 commit 3aaacc0
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 17 deletions.
2 changes: 2 additions & 0 deletions data/blog/2023_02_22.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ summary: No Summary
无法理解自己对待异性的态度和想法,我很确定我之前是对一些人造成过麻烦的,或者说是困扰,我内心已在反思,但是故人之心不在。
最后希望自己多一点真诚。
不知道多年之后看到这些文字会是什么感受。

后续: 接近一年之后又回来看这段文字,有些感慨,发生了很多事情,有得有失,所以自己会珍惜目前拥有的吧~
2 changes: 1 addition & 1 deletion data/blog/2023_03_09.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 2023-03-09-总结
date: '2023-03-09'
tags: ['daily']
draft: false
draft: true
summary: Today And Tomorrow
---

Expand Down
2 changes: 1 addition & 1 deletion data/blog/2023_09_30.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 中秋国庆快乐
date: '2023-09-30'
tags: ['daily']
draft: false
draft: true
summary:
---

Expand Down
23 changes: 22 additions & 1 deletion data/blog/BubbleSort.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ draft: false
summary: Bubble Sort
---

Bubble sort is a classic sorting algorithm, and the followings are my implementation in Java, Go and Rust:
Bubble sort is a classic sorting algorithm, and the followings are my implementation in Java, Go, C++ and Rust:

## Implementation in Java

Expand Down Expand Up @@ -123,3 +123,24 @@ fn bubble_sort(numbers: &mut [i32]) {
}

```

## Implementation in C++

```c
void bubbleSortWithFlag(vector<int> &nums) {
for (int i = nums.size() - 1; i > 0; i--) {
bool flag = false;
for (int j = 0; j < i; j++) {
if (nums[j] > nums[j + 1]) {
int temp = nums[j];
nums[j] = nums[j + 1];
nums[j + 1] = temp;
flag = true;
}
}
if (!flag) {
break;
}
}
}
```
2 changes: 1 addition & 1 deletion data/blog/bubble_sort.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 冒泡排序
date: '2022-12-22'
tags: ['java', 'go', 'c++', 'datastructrue']
draft: false
draft: true
summary: Bubble Sort
---

Expand Down
3 changes: 1 addition & 2 deletions data/blog/cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: cpp singlylinkedlist
date: '2022-03-08'
tags: ['c++']
draft: false
draft: true
summary: SinglyLinkedList Example of Cpp
---

Expand Down Expand Up @@ -112,4 +112,3 @@ int main() {
}
```

3 changes: 0 additions & 3 deletions data/blog/go_home.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ draft: false
summary: go home
---


# 回家

2022/12/3,总归是回到了家,接下来是居家隔离。希望阳了的兄弟们也能好好的度过。

总结一句,人生就是这样。
2 changes: 1 addition & 1 deletion data/blog/lovezbr.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 说爱你
date: '2023-10-22'
tags: ['love']
draft: false
draft: true
summary: love
---

Expand Down
2 changes: 1 addition & 1 deletion data/blog/record_a_bug_wsl2_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 记录一个wsl2的BUG
date: '2022-11-24'
tags: ['linux', 'wsl2']
draft: false
draft: true
summary: record a bug in wsl2
---

Expand Down
2 changes: 0 additions & 2 deletions data/blog/record_a_bug_wsl2_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ summary: record a bug in wsl2

3. 重新打开 windows terminal

出现这种情况后,第一时间我是去 bing 搜索,在 csdn 中文社区找到了方案一,此方案虽然对我适用,但是还是会出现这样的问题,于是去 google 上寻找答案

## 方案二

1. 重置网络相关设置,重启相关服务
Expand Down
2 changes: 0 additions & 2 deletions data/blog/record_a_bug_wsl2_3.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,3 @@ bcdedit /set hypervisorlaunchtype auto
经过这 4 个步骤后,我的 WSL2 又可以使用了。

可能出错原因:本人是 Window10 操作系统,在经历一次更新之后便出现了问题, 因此大概率是 windows 的问题。

**终极解决方案: 好好学习挣钱买 mac**
4 changes: 2 additions & 2 deletions data/blog/wsl2_expose_port_to_localhost.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ summary: WSL2 Expose Port To Localhost

这个命令将返回 WSL2 中的 IP 地址。请将该 IP 地址记录下来,稍后会用到。

3. 在 Windows 10 中启动 PowerShell,以管理员身份运行。在 PowerShell 或者 CMD 中,使用以下命令来开放 WSL2 的 9090 端口:
3. 在 Windows 10/11 中启动 PowerShell,以管理员身份运行。在 PowerShell 或者 CMD 中,使用以下命令来开放 WSL2 的 9090 端口:

```
netsh interface portproxy add v4tov4 listenport=9090 listenaddress=0.0.0.0 connectport=9090 connectaddress=<wsl2_ip_address>
```

`<wsl2_ip_address>` 替换为您在上一步中获取的 WSL2 IP 地址。

4. 在 Windows 10 中启动浏览器,并输入以下地址:
4. 在 Windows 10/11 中启动浏览器,并输入以下地址:

```
http://localhost:9090
Expand Down

0 comments on commit 3aaacc0

Please sign in to comment.