Skip to content

Commit 69f0414

Browse files
committed
添加多个图片和文章,更新标签页面
2 parents 5c06817 + d390a35 commit 69f0414

File tree

111 files changed

+13454
-788
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+13454
-788
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "Git 不能提交到 Github"
3+
description: "修改 hosts 修复"
4+
date: 2025-02-25
5+
draft: false
6+
tags: ["Git", "GitHub", "GitHub Pages"]
7+
---
8+
9+
## 故事的开始:一个普通的提交日
10+
11+
某个深夜,我正尝试将更新后的博客内容推送到 GitHub Pages。这本应是常规操作,但终端里突然抛出的错误却打破了平静:
12+
13+
```bash
14+
fatal: unable to access 'https://github.com/Githubtang/Githubtang.github.io.git/': Failed to connect to github.com port 443 after 2354 ms: Couldn't connect to server
15+
```
16+
17+
## 问题分析
18+
19+
这个错误通常是由于网络连接问题引起的,可能是因为 DNS 解析失败或者网络被防火墙阻挡。为了确认问题的原因,我尝试了以下步骤:
20+
21+
1. **检查网络连接**:确保我的电脑可以正常访问互联网。
22+
2. **Ping GitHub**:在终端中运行 `ping github.com`,发现无法解析域名。
23+
24+
## 解决方案:修改 hosts 文件
25+
26+
为了绕过 DNS 解析问题,我决定手动修改 `hosts` 文件,将 GitHub 的域名解析到正确的 IP 地址。以下是具体步骤:
27+
28+
1. **获取 GitHub 的 IP 地址**:
29+
你可以使用在线工具或者命令行工具(如 `nslookup` 或 `ping`)来获取 GitHub 的 IP 地址。例如:
30+
```bash
31+
nslookup github.com
32+
```
33+
34+
2. **编辑 hosts 文件**:
35+
在 Windows 系统中,`hosts` 文件位于 `C:\Windows\System32\drivers\etc\hosts`。使用管理员权限打开该文件,并添加以下内容:
36+
```plaintext
37+
140.82.112.3 github.com
38+
```
39+
40+
3. **保存并关闭 hosts 文件**
41+
42+
## 验证 ##
43+
44+
完成上述步骤后,再次尝试推送代码到 GitHub:
45+
```bash
46+
git push origin master
47+
```
48+
如果一切顺利,代码应该能够成功推送到 GitHub。
49+
50+
## 结论 ##
51+
52+
通过修改 `hosts` 文件,我们可以绕过 DNS 解析问题,直接访问 GitHub 的服务器。这是一种临时解决方案,还是要去检查网络才能治本。
53+
54+
希望这个方法能帮助到遇到类似问题的你。如果有任何疑问,欢迎留言讨论!
21.4 KB
Loading
31.8 KB
Loading
51.5 KB
Loading
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: "使用 MLstudio 运行大模型服务"
3+
description: "本地使用模型:deepseek-r1-distill-llama-8b"
4+
date: 2025-02-19
5+
draft: false
6+
tags: ["MLstudio", "大模型", "深度学习"]
7+
---
8+
9+
## 介绍
10+
11+
MLstudio 是一个强大的工具,用于运行和管理大语言模型。在本文中,我们将介绍如何在本地环境中使用 MLstudio 部署和运行一个预训练的模型:`deepseek-r1-distill-llama-8b`😈
12+
13+
## 环境准备
14+
15+
在开始之前,请确保你已经安装了以下工具:
16+
- MLstudio 客户端
17+
18+
## 下载和部署模型
19+
20+
1. **安装 MLstudio 客户端**
21+
通过以下命令安装 MLstudio 客户端:
22+
```bash
23+
pip install mlstudio
24+
```
25+
或直接去官网下载 [mlstudio地址](https://lmstudio.ai/)
26+
2. **安装 Deepseek 模型**
27+
28+
将模型文件放在lmstudio模型目录下
29+
{{< figure
30+
src="img/下载Deepseek.png"
31+
alt="#"
32+
caption="Photo by [Jr Korpa](https://unsplash.com/@jrkorpa) on [Unsplash](https://unsplash.com/)"
33+
>}}
34+
3. **选择下载好的模型**
35+
{{< figure
36+
src="img/选择模型.png"
37+
alt="#"
38+
caption="Photo by [Jr Korpa](https://unsplash.com/@jrkorpa) on [Unsplash](https://unsplash.com/)"
39+
>}}
40+
4. **运行后台服务**
41+
{{< figure
42+
src="img/启动模型.png"
43+
alt="#"
44+
caption="Photo by [Jr Korpa](https://unsplash.com/@jrkorpa) on [Unsplash](https://unsplash.com/)"
45+
>}}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: "实现Mybatis"
3+
description: "模拟mybatis实现过程"
4+
date: 2025-03-21
5+
draft: false
6+
tags: ["Mybatis", "AOP", "JDK动态代理"]
7+
---
8+
9+
## 介绍
10+
11+
Mybatis 是通过jdk的动态代理和反射来实现mapper的方法构建的
12+
13+
## 环境准备
14+
15+
{{< keywordList >}}
16+
{{< keyword >}} JDK21 {{< /keyword >}}
17+
{{< keyword >}} Maven {{< /keyword >}}
18+
{{< keyword >}} Mysql {{< /keyword >}}
19+
{{< /keywordList>}}
20+
## 下载和部署模型
21+
22+
1. **UserMapper**
23+
```java
24+
public interface UserMapper {
25+
User selectUserById(@Param("id") int id);
26+
27+
User selectByName(@Param("name") String name);
28+
29+
User selectByNameAndAge(@Param("name") String name,@Param("age") int age);
30+
}
31+
```
32+
2. **参数注解 Param**
33+
```java
34+
@Retention(RetentionPolicy.RUNTIME)
35+
@Target(ElementType.PARAMETER)
36+
public @interface Param {
37+
String value();
38+
}
39+
```
40+
3. **表名注解 Table**
41+
```java
42+
@Retention(RetentionPolicy.RUNTIME)
43+
@Target(ElementType.TYPE)
44+
public @interface Table {
45+
String tableName();
46+
}
47+
```
48+
3. **测试**
49+
```java
50+
public class App
51+
{
52+
public static void main(String[] args) {
53+
MySqlSessionFactory mySqlSessionFactory = new MySqlSessionFactory();
54+
UserMapper mapper = mySqlSessionFactory.getMapper(UserMapper.class);
55+
User user = mapper.selectUserById(1);
56+
System.out.println(user);
57+
}
58+
}
59+
```
60+
61+
```Shell
62+
select id,name,age from user where id =?
63+
User(id=1, name=测试1, age=10)
64+
```
65+

public/404.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html>
22
<html lang="zh-cn" dir="ltr" class="scroll-smooth" data-default-appearance="dark"
3-
data-auto-appearance="true"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=10884&amp;path=livereload" data-no-instant defer></script>
3+
data-auto-appearance="true"><head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=2538&amp;path=livereload" data-no-instant defer></script>
44
<meta charset="utf-8" />
55

66
<meta http-equiv="content-language" content="zh-cn" />
@@ -15,7 +15,7 @@
1515

1616

1717

18-
<link rel="canonical" href="http://localhost:10884/404.html" />
18+
<link rel="canonical" href="http://localhost:2538/404.html" />
1919

2020

2121

@@ -67,7 +67,7 @@
6767

6868

6969

70-
<meta property="og:url" content="http://localhost:10884/404.html">
70+
<meta property="og:url" content="http://localhost:2538/404.html">
7171
<meta property="og:site_name" content="Blowfish">
7272
<meta property="og:title" content="404 Page not found">
7373
<meta property="og:description" content="一个强大、轻量级的 Hugo 主题。">
@@ -873,7 +873,7 @@ <h1 class="mb-3 text-4xl font-extrabold">找不到网页 😕</h1>
873873
<div
874874
id="search-wrapper"
875875
class="invisible fixed inset-0 flex h-screen w-screen cursor-default flex-col bg-neutral-500/50 p-4 backdrop-blur-sm dark:bg-neutral-900/50 sm:p-6 md:p-[10vh] lg:p-[12vh]"
876-
data-url="http://localhost:10884/"
876+
data-url="http://localhost:2538/"
877877
style="z-index:500"
878878
>
879879
<div

0 commit comments

Comments
 (0)