mirror of
https://github.com/KazooTTT/kazoottt-blog.git
synced 2025-06-23 18:51:31 +08:00
Update docs and sort content
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 可以免费领取tokens的大模型服务
|
||||
date: 2024-06-20
|
||||
date: 2024-06-20T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
@ -13,9 +13,9 @@ finished: true
|
||||
published: true
|
||||
category: 编程-AI
|
||||
slug: free-tokens-large-model-service
|
||||
description:
|
||||
description: 可免费领取tokens的大模型服务于今后8月30日前有以下几家平台可以领取,包括豆包大模型、DeepSeek和SiliconCloud。
|
||||
NotionID-notionnext: 30a20483-ea28-4daf-b8be-155f0e690bc7
|
||||
link-notionnext: https://kazoottt.notion.site/tokens-30a20483ea284dafb8be155f0e690bc7
|
||||
link-notionnext: 'https://kazoottt.notion.site/tokens-30a20483ea284dafb8be155f0e690bc7'
|
||||
rinId: 43
|
||||
---
|
||||
|
||||
|
@ -6,7 +6,12 @@ tags:
|
||||
- 笔记
|
||||
finished: true
|
||||
published: true
|
||||
description: null
|
||||
description: |-
|
||||
我是这个问题的解决方案:
|
||||
|
||||
如何使用Git提交代码,请按照以下步骤操作:
|
||||
首先,开启终端输入git add暂存更改。
|
||||
然后,按下Command+K输入“git commit message”即可成功提交。
|
||||
slug: cursorgit-commit-msg
|
||||
category: 编程-git
|
||||
---
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 已经发布的分支在本地重命名之后如何推送到远程
|
||||
date: 2024-10-16
|
||||
date: 2024-10-16T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
@ -11,7 +11,10 @@ finished: true
|
||||
published: true
|
||||
category: 编程-git
|
||||
slug: rename-published-branch-git
|
||||
description:
|
||||
description: >-
|
||||
要将已经发布的分支在本地重命名并推送到远程,可以按照以下步骤进行:首先使用git branch -m指令重命名本地分支,如果需要可以使用以下命令:git
|
||||
branch -m 旧分支名 新分支名。然后使用git push指令推送重命名后的分支到远程,如果需要使用-u选项,可以设置上游分支,使用git push
|
||||
-u origin 新分支名。最后要删除远程的旧分支,可以使用git push origin --delete 旧分支名。
|
||||
---
|
||||
|
||||
要将已经发布的分支在本地重命名并推送到远程,可以按照以下步骤进行:
|
||||
@ -35,4 +38,4 @@ description:
|
||||
|
||||
```bash
|
||||
git push origin --delete 旧分支名
|
||||
```
|
||||
```
|
||||
|
@ -4,12 +4,20 @@ date: 2024-11-22T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
tags: null
|
||||
tags:
|
||||
- stl
|
||||
- json
|
||||
- vtkjs
|
||||
- 3D模型
|
||||
- 数据转换
|
||||
finished: true
|
||||
published: true
|
||||
category: 编程-vtk.js
|
||||
slug: in-vtkjs-stl-and-json-are-converted-to-each-other
|
||||
description: ''
|
||||
description: >-
|
||||
STL模型可以通过 JavaScript 的 `vtk.js` 库以 JSON 格式进行读写。将 STL 模型读入 JSON 格式的方法是使用
|
||||
`vtkPolyData.toJSON()` 方法,反之,则需要使用 `vtkSTLWriter.newInstance()` 和
|
||||
`writer.getOutputData()` 来生成 STL 模型的文件内容。
|
||||
noteId_x: 15
|
||||
create_time: '2024/11/22 13:35:36'
|
||||
update_time: '2024/11/22 14:40:08'
|
||||
|
@ -8,8 +8,10 @@ description: >-
|
||||
"^0.80.1"。解决此问题的方法是删除node_modules目录,移除该依赖,然后重新安装依赖。
|
||||
rinId: 10
|
||||
finished: true
|
||||
date: 2024-02-07
|
||||
date: 2024-02-07T00:00:00.000Z
|
||||
category: 编程-web3
|
||||
tags:
|
||||
- expo 错误,angular cli,webpack,npm, metro-core
|
||||
---
|
||||
|
||||
# Expo 报错
|
||||
|
@ -6,8 +6,12 @@ description: >-
|
||||
本内容涉及ERC20代币的部署与学习,具体参考GitHub上的meterio/tokenERC20项目,地址为https://github.com/meterio/tokenERC20。
|
||||
rinId: 12
|
||||
finished: true
|
||||
date: 2024-02-07
|
||||
date: 2024-02-07T00:00:00.000Z
|
||||
category: 编程-web3
|
||||
tags:
|
||||
- tokenERC20
|
||||
- 部署
|
||||
- 学习
|
||||
---
|
||||
|
||||
# tokenERC20部署和学习
|
||||
|
@ -8,8 +8,12 @@ description: >-
|
||||
v2的详细解析,为学习和研究Web3提供了丰富的资料。
|
||||
rinId: 13
|
||||
finished: true
|
||||
date: 2024-02-07
|
||||
date: 2024-02-07T00:00:00.000Z
|
||||
category: 编程-web3
|
||||
tags:
|
||||
- 比特币
|
||||
- 以太坊
|
||||
- 区块链
|
||||
---
|
||||
|
||||
# web3资源收集
|
||||
|
@ -1,12 +1,13 @@
|
||||
---
|
||||
title: antd switch组件错误使用案例
|
||||
date: 2024-10-12
|
||||
date: 2024-10-12T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- bug
|
||||
finished: true
|
||||
published: true
|
||||
description:
|
||||
description: >-
|
||||
antd的switch组件错误使用案例:当使用到antd的[switch](https://ant-design.antgroup.com/components/switch-cn)组件时,需要注意其api的使用。典型情况是,将checked状态与mode关联起来,并在mode变化时触发回调,然而,这种写法会导致切换switch时不会触发回调,而是等待-checked状态改变时才触发。正确的方法是使用onClick事件而不是onChange,这样可以让切换switch时触发回调。
|
||||
slug: antd-switch-component-misuse-example
|
||||
category: 编程-前端
|
||||
---
|
||||
|
@ -17,6 +17,44 @@ NotionID-notionnext: 543bfc66-a416-4704-92be-9a93fed191a8
|
||||
link-notionnext: >-
|
||||
https://kazoottt.notion.site/__dirname-is-not-defined-in-ES-module-scope-543bfc66a416470492be9a93fed191a8
|
||||
rinId: 14
|
||||
description: >-
|
||||
# ES Module 问题:__dirname 不定义
|
||||
|
||||
|
||||
在使用
|
||||
TypeScript创建的ESM文件中,遇到__dirname不定义的问题通常是因为使用了module的语法,应该改为ESM的写法。两种解决方法分别是改为module的写法和改为ESM的写法。
|
||||
|
||||
|
||||
## 改为module的写法
|
||||
|
||||
|
||||
在这种方法中需要把import改为require,将后缀从ts改为cts。
|
||||
|
||||
|
||||
但这种方式并不推荐,因为它可能会导致文件相对路径的问题。
|
||||
|
||||
|
||||
## 改为ESM的写法
|
||||
|
||||
|
||||
可以通过利用import.meta.url和fileURLToPath函数,获取当前模块的目录路径来解决__dirname不定义的问题。
|
||||
|
||||
```typescript
|
||||
|
||||
import { fileURLToPath } from "url"
|
||||
|
||||
import path from "path"
|
||||
|
||||
|
||||
// 获取当前模块的目录路径
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
|
||||
const __dirname = path.dirname(__filename)
|
||||
|
||||
```
|
||||
|
||||
这种方法推荐使用,避免了相对路径的问题。
|
||||
---
|
||||
|
||||
# __dirname Is not Defined in ES Module Scope
|
||||
|
@ -4,12 +4,27 @@ date: 2024-11-13T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
tags: null
|
||||
tags:
|
||||
- useSearchParams
|
||||
- React Router
|
||||
- qs
|
||||
- window.location.search
|
||||
finished: true
|
||||
published: true
|
||||
category: 编程-前端
|
||||
slug: search-params
|
||||
description: null
|
||||
description: >-
|
||||
React Router 的 `useSearchParams` Hook 提供了一个内建的 API,允许直接获取查询参数的值,比如 `.get()`,
|
||||
`.set()`, `.append()` 等。该 hook 可以帮助开发者轻松地处理 URL 中的 query parameters。
|
||||
|
||||
|
||||
使用 `qs` 库和 `window.location.search` 的方法也是可以实现解析 query parameters
|
||||
的效果。但需要注意的是,`qs.parse(window.location.search)`
|
||||
会将带有问号的字符串直接返回,而不对其进行处理。在正确的情况下,将需要手动去掉问号,以得到期望的结果。
|
||||
|
||||
|
||||
React Router 的 `useSearchParams` Hook 和 `qs` 库结合使用,可以帮助开发者更容易地管理 URL 中的 query
|
||||
parameters。
|
||||
NotionID-notionnext: 13d55568-fd75-81f5-be1b-e0a4f8137355
|
||||
link-notionnext: 'https://kazoottt.notion.site/search-params-13d55568fd7581f5be1be0a4f8137355'
|
||||
---
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 对于a标签的download属性
|
||||
date: 2024-10-15
|
||||
date: 2024-10-15T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
@ -11,7 +11,7 @@ finished: true
|
||||
published: true
|
||||
category: 编程-前端
|
||||
slug: the-download-attribute-for-the-a-tag
|
||||
description:
|
||||
description: download属性是如何定义的以及注意事项。 不能设置为null,可以直接设置成空串或者null。
|
||||
---
|
||||
|
||||
## 对于a标签的download属性
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 禁止antd modal按下esc关闭弹窗
|
||||
date: 2024-10-15
|
||||
date: 2024-10-15T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
@ -11,7 +11,7 @@ finished: true
|
||||
published: true
|
||||
category: 编程-前端
|
||||
slug: antd-modal-esc-disabled
|
||||
description:
|
||||
description: 解决antd modal 键盘关闭问题:设置modal的keyboard属性为false。
|
||||
---
|
||||
|
||||
参考地址:[Modal: option not to close with cancel key · Issue #22137 · ant-design/ant-design · GitHub](https://github.com/ant-design/ant-design/issues/22137)
|
||||
|
@ -8,7 +8,9 @@ tags:
|
||||
- 浏览器
|
||||
finished: true
|
||||
published: true
|
||||
description: null
|
||||
description: >-
|
||||
这是一个视频错误现象的解决方法介绍。有两种方法可以解除光标浏览的问题:按下F7取消光标浏览,或者进入浏览器设置,
|
||||
disabling辅助功能或无障碍选项。同时,也提到了不推荐的方法,可以通过更改CSS样式来解决问题,但这会降低使用体验。
|
||||
slug: web-pages-also-have-a-flashing-cursor-on-non-input-components
|
||||
category: 编程-前端
|
||||
---
|
||||
|
@ -6,7 +6,31 @@ tags:
|
||||
- bug
|
||||
finished: true
|
||||
published: true
|
||||
description: null
|
||||
description: >-
|
||||
npm run lint:js 和 npm run prettier 成功后, however,出现了一个错误,即Missing script
|
||||
"tsc"。这是因为 package.json 中的脚本中没有定义该命令。解决这个问题可以通过在package.json中添加如下内容来实现:
|
||||
|
||||
|
||||
```
|
||||
|
||||
"scripts": {
|
||||
"tsc": "tsc"
|
||||
},
|
||||
```
|
||||
|
||||
|
||||
或
|
||||
|
||||
|
||||
```
|
||||
|
||||
"scripts": {
|
||||
"tsc": "tsc --noEmit"
|
||||
},
|
||||
```
|
||||
|
||||
|
||||
这两个脚本将为我们提供一个正确的命令,用于执行 TypeScript 编译。
|
||||
slug: npm-run-tsc
|
||||
category: 编程-前端
|
||||
---
|
||||
|
Reference in New Issue
Block a user