mirror of
https://github.com/KazooTTT/kazoottt-blog-v2.git
synced 2025-06-24 19:21:31 +08:00
Update docs and sort content
This commit is contained in:
56
src/content/note/141.环形链表.md
Normal file
56
src/content/note/141.环形链表.md
Normal file
@ -0,0 +1,56 @@
|
||||
---
|
||||
title: 141.环形链表
|
||||
date: 2023-09-12T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 算法
|
||||
- 链表
|
||||
- leetcode
|
||||
platform: leetcode
|
||||
number: 141
|
||||
leetcode-url: 'https://leetcode.cn/problems/linked-list-cycle/'
|
||||
toAstro: true
|
||||
slug: 141-ring-chained-tables
|
||||
description: >-
|
||||
该内容描述了一个用于检测链表中是否存在环的算法。算法通过使用两个指针,一个慢指针和一个快指针,在链表中移动。如果链表中存在环,快指针最终会追上慢指针;否则,快指针会先到达链表的末尾。算法首先检查链表的头节点是否为空或其下一个节点是否为空,如果是,则返回false,表示没有环。然后,算法进入一个循环,每次循环中慢指针前进一步,快指针前进两步。如果快指针变为null或其下一个节点为null,则返回false,表示没有环。如果循环中快指针与慢指针相遇,则返回true,表示链表中存在环。
|
||||
date_created: 2025-01-04T03:44:53.000Z
|
||||
date_modified: 2025-02-19T03:44:14.000Z
|
||||
---
|
||||
|
||||
# 141.环形链表
|
||||
|
||||
```ts
|
||||
/*
|
||||
* @lc app=leetcode.cn id=141 lang=typescript
|
||||
*
|
||||
* [141] 环形链表
|
||||
*/
|
||||
|
||||
// @lc code=start
|
||||
/**
|
||||
* Definition for singly-linked list.
|
||||
* class ListNode {
|
||||
* val: number
|
||||
* next: ListNode | null
|
||||
* constructor(val?: number, next?: ListNode | null) {
|
||||
* this.val = (val===undefined ? 0 : val)
|
||||
* this.next = (next===undefined ? null : next)
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
|
||||
function hasCycle(head: ListNode | null): boolean {
|
||||
if (head === null || head.next === null) return false
|
||||
let slow = head
|
||||
let fast = head.next
|
||||
while (slow !== fast) {
|
||||
if (fast === null || fast.next === null) return false
|
||||
slow = slow.next
|
||||
fast = fast.next.next
|
||||
}
|
||||
return true
|
||||
}
|
||||
// @lc code=end
|
||||
```
|
||||
|
||||

|
16
src/content/note/142.环形链表-ii.md
Normal file
16
src/content/note/142.环形链表-ii.md
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
title: 142.环形链表-ii
|
||||
date: 2023-09-13T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 算法
|
||||
platform: leetcode
|
||||
leetcode-url: 'https://leetcode.cn/problems/linked-list-cycle-ii/description/'
|
||||
toAstro: true
|
||||
slug: 142-ring-linked-tables-ii
|
||||
description: 题目“142.环形链表-ii”指的是一个关于数据结构中环形链表的问题,特别是针对环形链表中特定节点的查找或操作问题。
|
||||
date_created: 2025-01-04T03:44:53.000Z
|
||||
date_modified: 2025-02-19T03:44:14.000Z
|
||||
---
|
||||
|
||||
# 142.环形链表 -ii
|
@ -1,19 +1,17 @@
|
||||
---
|
||||
title: 2023-02-11 星期六
|
||||
title: '2023-02-11'
|
||||
slug: diary-2023-02-11
|
||||
date: 2023-02-11T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
published: true
|
||||
description: >-
|
||||
2023年2月11日星期六,菜单包括外婆菜炒蛋搭配土豆箜饭,饮料为冰糖加柠檬片。当天的计划包括使用tailwind编写样式,学习Photoshop或Figma操作以制作视频封面模板,以及进行AI
|
||||
Hanser的相关工作。
|
||||
rinId: 22
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-02-11 星期六
|
||||
|
23
src/content/note/2023-02-21.md
Normal file
23
src/content/note/2023-02-21.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
title: '2023-02-21'
|
||||
slug: diary-2023-02-21
|
||||
date: 2023-02-21T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
description: >-
|
||||
在2023年2月21日的内容中,讨论了数组元素索引为何从0开始编号的问题。根据地址计算公式,索引实际上代表了内存地址的偏移量,首个元素的地址偏移量为0,因此索引从0开始是合理的。文章中还提供了一张图示,进一步解释了这一概念。
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-02-21 星期二
|
||||
|
||||
## 数组
|
||||
|
||||
[4.1. 数组(Array) - Hello 算法 (hello-algo.com)](<https://www.hello-algo.com/chapter_array_and_linkedlist/array/#411>)
|
||||
**为什么数组元素索引从 0 开始编号?** 根据地址计算公式,**索引本质上表示的是内存地址偏移量**,首个元素的地址偏移量是 0 ,那么索引是 0 也就很自然了。
|
||||
|
||||

|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 2023-09-08 星期五
|
||||
title: '2023-09-08'
|
||||
slug: diary-2023-09-08
|
||||
date: 2023-09-08T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
@ -7,13 +7,11 @@ tags:
|
||||
- 日记
|
||||
- 歌词
|
||||
- hanser
|
||||
published: true
|
||||
description: 2023年9月8日星期五的记录中提到了一段关于直播的内容,强调不需要背负任何负担,只需带着空行囊和彼此即可。
|
||||
rinId: 24
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-09-08 星期五
|
||||
|
@ -1,17 +1,15 @@
|
||||
---
|
||||
title: 2023-09-09 星期六
|
||||
title: '2023-09-09'
|
||||
slug: diary-2023-09-09
|
||||
date: 2023-09-09T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
published: true
|
||||
description: 2023年9月9日星期六的日程安排包括已完成的项目升级和游泳,以及待完成的nextjs+node运行时脚本测试。
|
||||
rinId: 25
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-09-09 星期六
|
||||
|
@ -1,18 +1,16 @@
|
||||
---
|
||||
title: 2023-09-10 星期日
|
||||
title: '2023-09-10'
|
||||
slug: diary-2023-09-10
|
||||
date: 2023-09-10T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
published: true
|
||||
description: >-
|
||||
2023年9月10日,某博客讨论了其支持的模板语法,指出虽然功能丰富,但使用起来感觉不够灵活且学习成本较高。文章中提出疑问,低代码是否是一种高效但可能过于简化的编程方式。
|
||||
rinId: 26
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-09-10 星期日
|
||||
|
@ -1,19 +1,17 @@
|
||||
---
|
||||
title: 2023-09-12 星期二
|
||||
title: '2023-09-12'
|
||||
slug: diary-2023-09-12
|
||||
date: 2023-09-12T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
- 健身
|
||||
published: true
|
||||
description: >-
|
||||
今天的任务包括完成多项链表相关的编程题目,其中已完成的有“86.分隔链表”和“141.环形链表”,未完成的有“142.环形链表-ii”和“160.相交链表”。此外,已完成的任务还包括在Obsidian中链接外部代码文件。健身方面,进行了跑步、椭圆机和器械锻炼,并计划下次带拖鞋以便洗完澡后直接穿回家。
|
||||
rinId: 27
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-09-12 星期二
|
||||
@ -24,9 +22,9 @@ date_modified: 2025-01-22T05:39:24.000Z
|
||||
## 今天要做的事情
|
||||
|
||||
- [ ] 刷题回顾
|
||||
- [x] [86.分隔链表](https://notes.kazoottt.top/03-领域/编程/算法/记录/86.分隔链表)
|
||||
- [x] [141.环形链表](https://notes.kazoottt.top/03-领域/编程/算法/记录/141.环形链表)
|
||||
- [ ] [142.环形链表-ii](https://notes.kazoottt.top/03-领域/编程/算法/记录/142.环形链表-ii)
|
||||
- [x] [86.分隔链表](/notes/86-separated-chained-tables)
|
||||
- [x] [141.环形链表](/notes/141-ring-chained-tables)
|
||||
- [ ] [142.环形链表-ii](/notes/142-ring-linked-tables-ii)
|
||||
- [ ] [[160.相交链表]]
|
||||
- [x] [[obsidian链接外部代码文件]]
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
---
|
||||
title: 2023-09-13 星期三
|
||||
title: '2023-09-13'
|
||||
slug: diary-2023-09-13
|
||||
date: 2023-09-13T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
- todo
|
||||
published: true
|
||||
description: >-
|
||||
On September 13, 2023, the individual focused on several tasks including
|
||||
reviewing coding problems, specifically completing the "141.环形链表" and planning
|
||||
@ -24,7 +23,7 @@ description: >-
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-09-13 星期三
|
||||
@ -35,19 +34,19 @@ date_modified: 2025-01-22T05:39:24.000Z
|
||||
## 今天要做的事情
|
||||
|
||||
- [ ] 刷题回顾
|
||||
- [x] [141.环形链表](https://notes.kazoottt.top/03-领域/编程/算法/记录/141.环形链表)
|
||||
- [ ] [142.环形链表-ii](https://notes.kazoottt.top/03-领域/编程/算法/记录/142.环形链表-ii)
|
||||
- [x] [141.环形链表](/notes/141-ring-chained-tables)
|
||||
- [ ] [142.环形链表-ii](/notes/142-ring-linked-tables-ii)
|
||||
- [ ] [[160.相交链表]]
|
||||
|
||||
## 打卡
|
||||
|
||||
wakatime 数据:
|
||||

|
||||

|
||||
|
||||
## React-noiton-x
|
||||
|
||||
今天一直在看 react-noiton-x 的问题,因为博客里依赖了这个库的搜索接口,而该接口虽然在源代码里更新了,但是最新一次打包是二月份
|
||||

|
||||

|
||||
|
||||
所以尝试自己从源代码打包一份,然后新发一个版本给自己使用。
|
||||
|
||||
@ -64,12 +63,12 @@ wakatime 数据:
|
||||
|
||||
然后继续折腾了一下博客,接入了 sentry,
|
||||
之前的 giscus 评论区的样式是比较怪异的(即使切换了主题,背景色还是白色),今天做成适配的了。不过这个切换有些生硬,后续要加个过渡
|
||||

|
||||

|
||||
|
||||
## 健身
|
||||
|
||||
状态不好,没去健身房,在家踩了椭圆机,3-11 档阻力交叉 30 分钟
|
||||
|
||||
=、= 感觉该换手表了,突然发现这个手表表盘市场都不兼容了
|
||||

|
||||

|
||||

|
||||

|
||||
|
@ -1,18 +1,17 @@
|
||||
---
|
||||
title: 2023-09-14 星期四
|
||||
title: '2023-09-14'
|
||||
slug: diary-2023-09-14
|
||||
date: 2023-09-14T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
published: true
|
||||
description: >-
|
||||
今天是2023年9月14日,星期四。今天的计划包括打卡和健身。健身内容包括跑步20分钟和使用器械30分钟,虽然9点去健身房时间有点紧张。此外,已经下单了一款新手表,预计下周五到货。感觉自己的背部似乎直了一些。还提到了一种快速获取telegram
|
||||
chatId并实现消息通知的方法。
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-09-14 星期四
|
||||
|
@ -1,16 +1,15 @@
|
||||
---
|
||||
title: 2023-09-15 星期五
|
||||
title: '2023-09-15'
|
||||
slug: diary-2023-09-15
|
||||
date: 2023-09-15T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
published: true
|
||||
description: 2023年9月15日星期五的日程包括修复notion-blog中vercel og的问题,并进行打卡记录。
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-09-15 星期五
|
||||
@ -22,4 +21,4 @@ date_modified: 2025-01-22T05:39:24.000Z
|
||||
|
||||
## 打卡
|
||||
|
||||
[修复了notion-blog中vercel og的问题](https://notes.kazoottt.top/05-临时/01-草稿箱/修复了notion-blog中vercel og的问题)
|
||||
[修复了notion-blog中vercel og的问题](/notes/fixed-issue-with-vercel-og-in-notion-blog)
|
||||
|
@ -1,18 +1,17 @@
|
||||
---
|
||||
title: 2023-09-17 星期日
|
||||
title: '2023-09-17'
|
||||
slug: diary-2023-09-17
|
||||
date: 2023-09-17T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
- 健身
|
||||
published: true
|
||||
description: >-
|
||||
2023年9月17日,个人日记记录了当天的活动和任务。白天主要在休息,晚上进行了健身活动,包括30分钟的椭圆机训练和30分钟的器械训练。健身后回家泡脚,并在此期间编写了一个油猴脚本,用于直播间管理增强,已完成弹窗样式修改和response拦截及第一页数据填充,后续计划实现滚动加载后的数据填充。此外,还记录了两个待处理的事项:屏蔽推特黄推和使用shot.so进行图片美化。
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-09-17 星期日
|
||||
@ -32,7 +31,7 @@ date_modified: 2025-01-22T05:39:24.000Z
|
||||
|
||||
一边泡脚一边写了一个油猴脚本,具体如下。
|
||||
|
||||
[直播间管理增强脚本](https://notes.kazoottt.top/05-临时/01-草稿箱/直播间管理增强脚本)
|
||||
[直播间管理增强脚本](/notes/live-streaming-room-management-enhancement-script)
|
||||
今日完成:
|
||||
|
||||
弹窗样式修改
|
||||
@ -40,7 +39,7 @@ response 拦截 + 第一页数据填充
|
||||
后面要做的事:
|
||||
|
||||
实现滚动加载后,填充对应的数据
|
||||

|
||||

|
||||
|
||||
## Inbox
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
---
|
||||
title: 2023-09-24 星期日
|
||||
title: '2023-09-24'
|
||||
slug: diary-2023-09-24
|
||||
date: 2023-09-24T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
- 翻译
|
||||
published: true
|
||||
description: >-
|
||||
今天的任务包括翻译YouTube视频《Monorepos - How the Pros Scale Huge Software Projects //
|
||||
Turborepo vs
|
||||
@ -14,7 +13,7 @@ description: >-
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-09-24 星期日
|
||||
@ -26,6 +25,6 @@ date_modified: 2025-01-22T05:39:24.000Z
|
||||
|
||||
## 打卡
|
||||
|
||||
[Monorepos - How the Pros Scale Huge Software Projects // Turborepo vs Nx](https://www.youtube.com/watch?v=9iU_IE6vnJ8) 的翻译然后 [投稿](https://www.bilibili.com/video/BV1uz4y1V7cb/?spm_id_from=..search-card.all.click&vd_source=729e6f70ca3cee328ccece68cb2bbd30)
|
||||
[Monorepos - How the Pros Scale Huge Software Projects // Turborepo vs Nx](<https://www.youtube.com/watch?v=9iU_IE6vnJ8>) 的翻译然后 [投稿](<https://www.bilibili.com/video/BV1uz4y1V7cb/?spm_id_from=..search-card.all.click&vd_source=729e6f70ca3cee328ccece68cb2bbd30>)
|
||||
|
||||
## Inbox
|
||||
|
@ -1,17 +1,16 @@
|
||||
---
|
||||
title: 2023-10-06 星期五
|
||||
title: '2023-10-06'
|
||||
slug: diary-2023-10-06
|
||||
date: 2023-10-06T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
published: true
|
||||
description: >-
|
||||
今天的任务包括给手表充电和录制关于如何使用MessAuto和iMessage实现iPhone和mac信息同步及自动复制验证码的视频,并计划将视频发布到B站和小红书上。
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-10-06 星期五
|
||||
|
26
src/content/note/2023-10-07.md
Normal file
26
src/content/note/2023-10-07.md
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
title: '2023-10-07'
|
||||
slug: diary-2023-10-07
|
||||
date: 2023-10-07T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
description: 2023年10月7日星期六的计划包括国庆期间的厦门和杭州旅行,以及当天的打卡和待办事项。
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-10-07 星期六
|
||||
|
||||
<!-- start of weread -->
|
||||
<!-- end of weread -->
|
||||
|
||||
## 今天要做的事情
|
||||
|
||||
[2023 国庆厦门和杭州之行](/posts/national-day-trip-to-xiamen-and-hangzhoupicture-bed-version)
|
||||
|
||||
## 打卡
|
||||
|
||||
## Inbox
|
@ -1,16 +1,15 @@
|
||||
---
|
||||
title: 2023-10-10 星期二
|
||||
title: '2023-10-10'
|
||||
slug: diary-2023-10-10
|
||||
date: 2023-10-10T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
published: true
|
||||
description: 今天的计划包括阅读vite文档,并进行打卡和处理inbox事项。
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-10-10 星期二
|
||||
@ -20,7 +19,7 @@ date_modified: 2025-01-22T05:39:24.000Z
|
||||
|
||||
## 今天要做的事情
|
||||
|
||||
[从零开始阅读vite文档](https://notes.kazoottt.top/05-临时/01-草稿箱/从零开始阅读vite文档)
|
||||
[从零开始阅读vite文档](/notes/reading-vite-documentation-from-scratch)
|
||||
|
||||
## 打卡
|
||||
|
||||
|
@ -1,16 +1,15 @@
|
||||
---
|
||||
title: 2023-10-18 星期三
|
||||
title: '2023-10-18'
|
||||
slug: diary-2023-10-18
|
||||
date: 2023-10-18T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
published: true
|
||||
description: 今天的日程包括图片上传测试和打卡活动,同时有一个待处理的inbox事项。
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-10-18 星期三
|
||||
|
26
src/content/note/2023-10-19.md
Normal file
26
src/content/note/2023-10-19.md
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
title: '2023-10-19'
|
||||
slug: diary-2023-10-19
|
||||
date: 2023-10-19T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
description: 2023年10月19日星期四的日程包括发布xlsx util工具包,该工具能够根据输入的列索引返回如A、B等实际列名。此外,还包括打卡和处理inbox事项。
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-10-19 星期四
|
||||
|
||||
<!-- start of weread -->
|
||||
<!-- end of weread -->
|
||||
|
||||
## 今天要做的事情
|
||||
|
||||
xlsx util 发包,实现输入列的索引,输出 A B 这样真实的列名
|
||||
|
||||
## 打卡
|
||||
|
||||
## Inbox
|
@ -1,16 +1,15 @@
|
||||
---
|
||||
title: 2023-10-21 星期六
|
||||
title: '2023-10-21'
|
||||
slug: diary-2023-10-21
|
||||
date: 2023-10-21T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
published: true
|
||||
description: 2023年10月21日星期六的日程安排包括打卡和处理inbox事务。具体打卡内容通过一张图片展示,而inbox的具体内容未详细说明。
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-10-21 星期六
|
||||
@ -22,6 +21,6 @@ date_modified: 2025-01-22T05:39:24.000Z
|
||||
|
||||
## 打卡
|
||||
|
||||

|
||||

|
||||
|
||||
## Inbox
|
||||
|
@ -1,16 +1,15 @@
|
||||
---
|
||||
title: 2023-10-22 星期日
|
||||
title: '2023-10-22'
|
||||
slug: diary-2023-10-22
|
||||
date: 2023-10-22T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
published: true
|
||||
description: 今天的计划包括防抖技术的学习和打卡任务,同时还有待处理的邮件。
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-10-22 星期日
|
||||
@ -20,7 +19,7 @@ date_modified: 2025-01-22T05:39:24.000Z
|
||||
|
||||
## 今天要做的事情
|
||||
|
||||
[防抖](https://notes.kazoottt.top/05-临时/01-草稿箱/防抖)
|
||||
[防抖](/notes/anti-shake)
|
||||
|
||||
## 打卡
|
||||
|
||||
|
28
src/content/note/2023-10-28.md
Normal file
28
src/content/note/2023-10-28.md
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
title: '2023-10-28'
|
||||
slug: diary-2023-10-28
|
||||
date: 2023-10-28T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
description: >-
|
||||
Today's schedule includes learning from the dom-to-image topic, with a note on
|
||||
weread content in the inbox.
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-10-28 星期六
|
||||
|
||||
## 今天要做的事情
|
||||
|
||||
[What I learn from dom-to-image](/notes/what-i-learn-from-dom-to-image)
|
||||
|
||||
## 打卡
|
||||
|
||||
## Inbox
|
||||
|
||||
<!-- start of weread -->
|
||||
<!-- end of weread -->
|
@ -1,16 +1,15 @@
|
||||
---
|
||||
title: 2023-11-06 星期一
|
||||
title: '2023-11-06'
|
||||
slug: diary-2023-11-06
|
||||
date: 2023-11-06T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
published: true
|
||||
description: 2023年11月6日,星期一,记录了当天的打卡情况,显示Wakatime的使用时间较长,给人留下了深刻印象。此外,还提到了inbox,但未详细说明内容。
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-11-06 星期一
|
||||
@ -19,7 +18,7 @@ date_modified: 2025-01-22T05:39:24.000Z
|
||||
|
||||
## 打卡
|
||||
|
||||

|
||||

|
||||
今天的 wakatime 有点恐怖了
|
||||
|
||||
## Inbox
|
||||
|
@ -1,18 +1,17 @@
|
||||
---
|
||||
title: 2023-11-16 星期四
|
||||
title: '2023-11-16'
|
||||
slug: diary-2023-11-16
|
||||
date: 2023-11-16T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
published: true
|
||||
description: >-
|
||||
今天是2023年11月16日,星期四。今天的主要任务是开始学习web3,特别是参加了一个名为solidity_bootcamp的在线课程,该课程由open
|
||||
build提供。此外,还记录了学习笔记,但具体内容未在提供的材料中详细说明。
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-11-16 星期四
|
||||
@ -23,7 +22,7 @@ date_modified: 2025-01-22T05:39:24.000Z
|
||||
|
||||
开始学习 web3,上周报名的 open build 的 solidity_bootcamp 开营了。
|
||||
|
||||
[solidity_bootcamp学习笔记](https://notes.kazoottt.top/03-领域/编程/web3/solidity_bootcamp学习笔记)
|
||||
[solidity_bootcamp学习笔记](/notes/soliditybootcamp-study-notes)
|
||||
|
||||
## Inbox
|
||||
|
||||
|
@ -1,17 +1,16 @@
|
||||
---
|
||||
title: 2023-11-17 星期五
|
||||
title: '2023-11-17'
|
||||
slug: diary-2023-11-17
|
||||
date: 2023-11-17T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 日记
|
||||
published: true
|
||||
description: >-
|
||||
今天的任务清单中,已完成的是下午去办理港澳通行证,而未完成的是准备公司评级的材料和学习web3基础知识。此外,今天的日程中还包括打卡和查看inbox,但没有具体的事项列出。
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 2023-11-17 星期五
|
||||
|
32
src/content/note/2024-03-05 刷题.md
Normal file
32
src/content/note/2024-03-05 刷题.md
Normal file
@ -0,0 +1,32 @@
|
||||
---
|
||||
description: >-
|
||||
内容中提到了两个编程问题及其相关注意事项。首先,对于“两数之和”问题,指出了在JavaScript代码中,如果`numberToIndexMap[targetNumber]`的值为0时,使用`!==
|
||||
undefined`进行判断可能会导致错误的结果,建议使用`in`操作符来检查对象属性是否存在。其次,提到了“删除有序数组中的重复项”问题,强调了需要原地删除重复元素,即不使用额外的空间。
|
||||
slug: 2024-03-05-brush-questions
|
||||
toAstro: true
|
||||
date: 2024-07-11T02:17:53.454Z
|
||||
date_created: 2025-01-04T03:44:53.000Z
|
||||
date_modified: 2025-02-19T03:44:14.000Z
|
||||
title: 2024-03-05 刷题
|
||||
---
|
||||
|
||||
# 2024-03-05 刷题
|
||||
|
||||
需要注意的是
|
||||
|
||||
[1. 两数之和](<https://leetcode.cn/problems/two-sum/>)
|
||||
|
||||
```js
|
||||
if (numberToIndexMap[targetNumber] !== undefined) {
|
||||
const targetNumberIndex = numberToIndexMap[targetNumber]
|
||||
return [targetNumberIndex, i]
|
||||
}
|
||||
```
|
||||
|
||||
这里的写法,如果 `numberToIndexMap[targetNumber] = 0` 的话, if 也会判断为 false,所以不能这么写。
|
||||
|
||||
要么写成 `numberToIndexMap[targetNumber] !== undefined` 要么写成 `if (targetNumber in numberToIndexMap)`
|
||||
|
||||
[26. 删除有序数组中的重复项](<https://leetcode.cn/problems/remove-duplicates-from-sorted-array/>)
|
||||
|
||||
请你 **[原地](<http://baike.baidu.com/item/%E5%8E%9F%E5%9C%B0%E7%AE%97%E6%B3%95>)** 删除重复出现的元素
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 2024-03-05 星期二
|
||||
title: '2024-03-05'
|
||||
slug: diary-2024-03-05
|
||||
date: 2024-03-05T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
@ -8,22 +8,21 @@ tags:
|
||||
description: >-
|
||||
今天的主要任务包括完成Python学习至day15和刷题,已完成的任务有Python学习和刷题。未完成的任务包括整理周一和周二的资讯、进行多线程批量测试、解决Python的AttributeError问题以及JetBrains
|
||||
IDE的terminal无法打开问题。此外,还帮助前部门面试了一位前端候选人。明天计划继续处理未完成的任务,并记录了2024年3月5日的文件路径信息。
|
||||
published: true
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 今天要做的事情
|
||||
|
||||
- [x] python 看到 day15 [python100 1-15](https://notes.kazoottt.top/03-领域/编程/后端/python/python100 1-15)
|
||||
- [x] python 看到 day15 [python100 1-15](/notes/learn-python)
|
||||
- [x] 刷题
|
||||
- [ ] 整理周一和周二的资讯
|
||||
- [ ] 多线程批量跑测试
|
||||
- [ ] [[AttributeError module 'select' has no attribute 'epoll']]
|
||||
- [ ] [[jerbrains的ide打不开terminal]]
|
||||
- [ ] [2024-03-05 刷题](https://notes.kazoottt.top/03-领域/编程/算法/记录/2024-03-05 刷题)
|
||||
- [ ] [2024-03-05 刷题](/notes/2024-03-05-brush-questions)
|
||||
|
||||
# 打卡
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 2024-03-06 星期三
|
||||
title: '2024-03-06'
|
||||
slug: diary-2024-03-06
|
||||
date: 2024-03-06T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
@ -9,11 +9,10 @@ description: >-
|
||||
今天的工作主要集中在解决错误和提交代码上,成功地向autogen和notionnext提交了pull
|
||||
request,其中autogen的请求已被合并。同时,开通了notion
|
||||
ai,并迁移了部分本地内容到博客上。此外,收到了购买的时尚小物品,感到非常满意。遗憾的是,今天没有进行学习和刷题。计划早点休息,为明天做准备。
|
||||
published: true
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
# 今天要做的事情
|
||||
@ -30,11 +29,11 @@ date_modified: 2025-01-22T05:39:24.000Z
|
||||
|
||||
买的时尚小垃圾到了,挺喜欢的。
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
今天的不足之处是没有学习也没有刷题。
|
||||
|
||||
|
@ -11,7 +11,6 @@ date_modified: 2025-02-19T13:08:36.000Z
|
||||
title: 2024-10-21 11分17秒 使用飞书来记账
|
||||
date: 2025-02-19T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
published: true
|
||||
toAstro: true
|
||||
astroType: null
|
||||
category: 碎片
|
||||
|
@ -11,7 +11,6 @@ date_modified: 2025-02-19T13:09:10.000Z
|
||||
title: 2024-10-25 13分02秒 Vintage Camera Lab
|
||||
date: 2025-02-16T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
published: true
|
||||
toAstro: true
|
||||
astroType: null
|
||||
category: 碎片
|
||||
|
@ -13,7 +13,6 @@ date_modified: 2025-02-19T13:08:11.000Z
|
||||
title: 2024-10-25 13分11秒 Tapedeck
|
||||
date: 2024-10-25T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
published: true
|
||||
toAstro: true
|
||||
astroType: null
|
||||
category: 碎片
|
||||
|
@ -9,7 +9,6 @@ date_modified: 2025-02-19T13:11:13.000Z
|
||||
title: 2024-10-28 18分05秒 craft收费
|
||||
date: 2025-02-19T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
published: true
|
||||
toAstro: true
|
||||
astroType: null
|
||||
category: 碎片
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 2024-11-26 星期二
|
||||
title: '2024-11-26'
|
||||
slug: diary-2024-11-26
|
||||
date: 2024-11-26T00:00:00.000Z
|
||||
day_of_week: 星期二
|
||||
@ -11,11 +11,10 @@ tags:
|
||||
description: >-
|
||||
今天是milklove宣布二搭、三搭的日子。根据截图,牛奶爱情已经发展到了很幸福的阶段。有许多视频和 GIFs
|
||||
表示了他们之间的亲密度和甜蜜。虽然没有具体详细信息,但可以看出这对人是非常恩爱的。在这里汇总了一些关键的视频和截图,展示了milklove的幸福感和关怀。
|
||||
published: true
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:54.000Z
|
||||
---
|
||||
|
||||
很幸福的一天,今天是 milklove 宣布二搭、三搭的日子。
|
||||
@ -24,32 +23,32 @@ date_modified: 2025-01-22T05:39:24.000Z
|
||||
|
||||
在这里汇总一下今天的一些视频。
|
||||
|
||||
[截修](https://weibo.com/7101901680/P28tdryDc#comment)
|
||||
[截修](<https://weibo.com/7101901680/P28tdryDc#comment>)
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
[幸福的具象化](https://weibo.com/6083416567/P28jkx9MS#comment)
|
||||
[幸福的具象化](<https://weibo.com/6083416567/P28jkx9MS#comment>)
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
[girl rule cut](https://weibo.com/1750538651/P27NfAOja#comment)
|
||||
[girl rule cut](<https://weibo.com/1750538651/P27NfAOja#comment>)
|
||||
|
||||
[亲亲](https://weibo.com/1825971940/P288xfVxF#comment)
|
||||
[亲亲](<https://weibo.com/1825971940/P288xfVxF#comment>)
|
||||
|
||||

|
||||

|
||||
|
||||
[二搭 预告片 婉司姬](https://weibo.com/1753015991/P27pq9oJU#comment)
|
||||
[二搭 预告片 婉司姬](<https://weibo.com/1753015991/P27pq9oJU#comment>)
|
||||
|
||||

|
||||

|
||||
|
||||
[二搭 预告片 弯弯字幕组](https://weibo.com/7392264056/P27lQtUnd#comment)
|
||||
[二搭 预告片 弯弯字幕组](<https://weibo.com/7392264056/P27lQtUnd#comment>)
|
||||
|
||||

|
||||

|
||||
|
||||
[Findwichh推介会汇总](https://weibo.com/6613951279/P29c7fgx9#comment)
|
||||
[Findwichh推介会汇总](<https://weibo.com/6613951279/P29c7fgx9#comment>)
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 2024-11-27 星期三
|
||||
title: '2024-11-27'
|
||||
slug: diary-2024-11-27
|
||||
date: 2024-11-27T00:00:00.000Z
|
||||
day_of_week: 星期三
|
||||
@ -10,28 +10,27 @@ description: >-
|
||||
windsurf 赠送了试用的天数,个人发现 windsurf 的 cursor 自动补全速度比其他软件快且更智能。然而,volview 中的 store
|
||||
信息难以理解,而 Crop2D.vue 的文件内容未能解释明了。此外,安装 canvas 时遇到错误,需要参考 node-canvas 的 Windows
|
||||
安装指导解决问题。
|
||||
published: true
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:54.000Z
|
||||
---
|
||||
|
||||
windsurf 赠送了试用的天数
|
||||
|
||||

|
||||

|
||||
|
||||
个人感觉 cursor 的自动补全速度比 windsurf 快和智能很多
|
||||
|
||||
volview 也这么多 store,谁能看懂...
|
||||
|
||||

|
||||

|
||||
|
||||
`src\components\tools\crop\Crop2D.vue`
|
||||
|
||||
啥意思
|
||||
|
||||

|
||||

|
||||
|
||||
安装 canvas 的时候报错:
|
||||
|
||||
@ -41,4 +40,4 @@ error C1083: 无法打开包括文件: “cairo.h”: No such file or directory
|
||||
|
||||
解决方法:
|
||||
|
||||
[Installation: Windows · Automattic/node-canvas Wiki · GitHub](https://github.com/Automattic/node-canvas/wiki/Installation:-Windows)
|
||||
[Installation: Windows · Automattic/node-canvas Wiki · GitHub](<https://github.com/Automattic/node-canvas/wiki/Installation:-Windows>)
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 2024-11-28 星期四
|
||||
title: '2024-11-28'
|
||||
slug: diary-2024-11-28
|
||||
date: 2024-11-28T00:00:00.000Z
|
||||
day_of_week: 星期四
|
||||
@ -11,14 +11,13 @@ description: >-
|
||||
Configure Runtime
|
||||
Arguments",然后添加“disable-hardware-acceleration”:true,实验发现它确实有助于提高工作效率。但是,如果你的
|
||||
SonarLint 占用内存过高,就会导致卡顿问题。此外,你还遇到了 vite-plugin-checker 的错误,解决方法是安装或重新安装 uv。
|
||||
published: true
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:54.000Z
|
||||
---
|
||||
|
||||
[x.com](https://x.com/vikingmute/status/1858781019492790315)
|
||||
[x.com](<https://x.com/vikingmute/status/1858781019492790315>)
|
||||
|
||||
```
|
||||
打开这个禁止硬件加速的选项可以让 VSCode 快很多倍,Cusror 这种基于 VSCode 的也可以,不知道什么原理,应该是针对低端显卡或者集成显卡的机器比较有效?但是我试了一下确实感觉快了一些,我是 M3 的 macbook,大家可以试试看效果怎样?
|
||||
@ -33,7 +32,7 @@ SonarLint 内存占用高,卡顿
|
||||
|
||||
---
|
||||
|
||||
[vite-tsconfig-paths](https://www.npmjs.com/package/vite-tsconfig-paths#vite-tsconfig-paths) 踩坑
|
||||
[vite-tsconfig-paths](<https://www.npmjs.com/package/vite-tsconfig-paths#vite-tsconfig-paths>) 踩坑
|
||||
|
||||
```
|
||||
error when starting dev server:
|
||||
@ -49,9 +48,9 @@ Ensure the project either has "type": "module" set or that the Vite config is re
|
||||
|
||||
# Claude MCP can't connect to SQLite MCP serve
|
||||
|
||||

|
||||

|
||||
|
||||
[Reddit - Dive into anything](https://www.reddit.com/r/ClaudeAI/comments/1h0my0y/comment/lz5w7ar/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)
|
||||
[Reddit - Dive into anything](<https://www.reddit.com/r/ClaudeAI/comments/1h0my0y/comment/lz5w7ar/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button>)
|
||||
|
||||
解决方法:install or reinstall uv
|
||||
|
||||
@ -65,8 +64,8 @@ brew install uv
|
||||
|
||||
我怎么这么久了才开始玩(谢谢酱紫表的安利)
|
||||
|
||||

|
||||

|
||||
|
||||
[GitHub - ollama/ollama: Get up and running with Llama 3.2, Mistral, Gemma 2, and other large language models.](https://github.com/ollama/ollama?tab=readme-ov-file)
|
||||
[GitHub - ollama/ollama: Get up and running with Llama 3.2, Mistral, Gemma 2, and other large language models.](<https://github.com/ollama/ollama?tab=readme-ov-file>)
|
||||
|
||||
[GitHub - AugustDev/enchanted: Enchanted is iOS and macOS app for chatting with private self hosted language models such as Llama2, Mistral or Vicuna using Ollama.](https://github.com/AugustDev/enchanted)
|
||||
[GitHub - AugustDev/enchanted: Enchanted is iOS and macOS app for chatting with private self hosted language models such as Llama2, Mistral or Vicuna using Ollama.](<https://github.com/AugustDev/enchanted>)
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 2024-11-29 星期五
|
||||
title: '2024-11-29'
|
||||
date: 2024-11-29T00:00:00.000Z
|
||||
day_of_week: 星期五
|
||||
author: KazooTTT
|
||||
@ -13,15 +13,14 @@ description: >-
|
||||
在使用ECharts时,Canvas和SVG两个渲染器的选择主要取决于软硬件环境、数据量和功能需求。在需要优化性能的问题场景下,尝试结合实验来确定使用哪种渲-render器更合适。
|
||||
只有在你熟悉用canvas手搓图表时,你才能在网页上创建这种图。 最近的工作包括编辑器图片上传重构、移动端应用程序的开发以及学习VTK和图形学。
|
||||
slug: diary-2024-11-29
|
||||
published: true
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:54.000Z
|
||||
---
|
||||
|
||||
qube 如何集成到 github:
|
||||
[GitHub Integration | Mapping your organization into SonarQube - YouTube](https://www.youtube.com/watch?v=6zvBuZr8CeI)
|
||||
[GitHub Integration | Mapping your organization into SonarQube - YouTube](<https://www.youtube.com/watch?v=6zvBuZr8CeI>)
|
||||
|
||||
Image HTTP code 409 is in use. Delete the container that's using it and try again.
|
||||
先删除 container 再删除 volume
|
||||
@ -32,25 +31,25 @@ Image HTTP code 409 is in use. Delete the container that's using it and try agai
|
||||
|
||||
windows 有没有像 macos 一样的窗口管理工具,loop raycast 之类的
|
||||
|
||||
[Adobe Express](https://new.express.adobe.com/tools/convert-to-svg)
|
||||
[Adobe Express](<https://new.express.adobe.com/tools/convert-to-svg>)
|
||||
|
||||
covnert image to svg (需要登录)
|
||||
|
||||

|
||||

|
||||
|
||||
[Canvas vs. SVG - 最佳实践 - 使用手册 - Apache ECharts](https://echarts.apache.org/handbook/zh/best-practices/canvas-vs-svg/)
|
||||
[Canvas vs. SVG - 最佳实践 - 使用手册 - Apache ECharts](<https://echarts.apache.org/handbook/zh/best-practices/canvas-vs-svg/>)
|
||||
|
||||
> [!note]
|
||||
> 选择哪种渲染器,我们可以根据软硬件环境、数据量、功能需求综合考虑。
|
||||
>
|
||||
> - 在软硬件环境较好,数据量不大的场景下,两种渲染器都可以适用,并不需要太多纠结。
|
||||
> - 在环境较差,出现性能问题需要优化的场景下,可以通过试验来确定使用哪种渲染器。比如有这些经验:
|
||||
> - 在需要创建很多 ECharts 实例且浏览器易崩溃的情况下(可能是因为 Canvas 数量多导致内存占用超出手机承受能力),可以使用 SVG 渲染器来进行改善。大略的说,如果图表运行在低端安卓机,或者我们在使用一些特定图表如 [水球图](https://ecomfe.github.io/echarts-liquidfill/example/) 等,SVG 渲染器可能效果更好。
|
||||
> - 在需要创建很多 ECharts 实例且浏览器易崩溃的情况下(可能是因为 Canvas 数量多导致内存占用超出手机承受能力),可以使用 SVG 渲染器来进行改善。大略的说,如果图表运行在低端安卓机,或者我们在使用一些特定图表如 [水球图](<https://ecomfe.github.io/echarts-liquidfill/example/>) 等,SVG 渲染器可能效果更好。
|
||||
> - 数据量较大(经验判断 > 1k)、较多交互时,建议选择 Canvas 渲染器。
|
||||
|
||||
我什么时候可以做到用 canvas 手搓这种图
|
||||
|
||||

|
||||

|
||||
|
||||
最近可以做的事情:
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 2024-11-30 星期六
|
||||
title: '2024-11-30'
|
||||
date: 2024-11-30T00:00:00.000Z
|
||||
day_of_week: 星期六
|
||||
author: KazooTTT
|
||||
@ -11,11 +11,10 @@ description: >-
|
||||
如果存在占用特定端口的程序,请使用命令“lsof -i :<PORT>”识别端口对应的进程ID(PID),再使用命令“kill -9
|
||||
<PID>”终止该进程。也可以使用更方便的方式“kill -9 $(lsof -t -i :<PORT>)”,即直接杀死占用端口的进程。
|
||||
slug: diary-2024-11-30
|
||||
published: true
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:54.000Z
|
||||
---
|
||||
|
||||
vscode extention 启动时间
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 2024-12-11 星期三
|
||||
title: '2024-12-11'
|
||||
date: 2024-12-11T00:00:00.000Z
|
||||
day_of_week: 星期三
|
||||
author: KazooTTT
|
||||
@ -11,33 +11,32 @@ description: >-
|
||||
的变化感到困惑。虽然我耐下了心理压力,能清晰地理解项目里的复杂数据流转,但是写文档还是头昏眼花,一时起走神来。除了上周加班外,我也试用了
|
||||
react-scan 和安卓视频下载软件,好看的个人主页让我感动。
|
||||
slug: diary-2024-12-11
|
||||
published: true
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:54.000Z
|
||||
---
|
||||
|
||||
终于没有那么忙了,上周忙成狗了,加班加的 wakatime 时长直接进入全球前 100 了
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
上周在忙什么?主要是做 vtk.js 的开发花了很多时间,不然后续的需求查漏补缺我不会做的这么着急。
|
||||
|
||||
对于 vtk.js 的掌握程度还是太低了,甚至连 polydata 的变化要怎么写都是临时掌握的。不过好在上周耐心理了一下项目里复杂的数据流转,清晰了很多。
|
||||
|
||||

|
||||

|
||||
|
||||
然后今天主要再写文档,写得头昏眼花的,好容易走神。
|
||||
|
||||
---
|
||||
|
||||
react-scan 让页面的 rerender 一眼便知 [React Scan](https://react-scan.com/),试了下确实好用(比浏览器的开发者工具里面的 rerender 监视器好用),后面项目优化有事做了。
|
||||
react-scan 让页面的 rerender 一眼便知 [React Scan](<https://react-scan.com/>),试了下确实好用(比浏览器的开发者工具里面的 rerender 监视器好用),后面项目优化有事做了。
|
||||
|
||||
安卓的视频下载软件 [GitHub - JunkFood02/Seal: 🦭 Video/Audio Downloader for Android, based on yt-dlp, designed with Material You](https://github.com/JunkFood02/Seal)
|
||||
安卓的视频下载软件 [GitHub - JunkFood02/Seal: 🦭 Video/Audio Downloader for Android, based on yt-dlp, designed with Material You](<https://github.com/JunkFood02/Seal>)
|
||||
|
||||
好看的个人主页 [CAICAI - A Product Manager](https://www.caicai.me/)
|
||||
好看的个人主页 [CAICAI - A Product Manager](<https://www.caicai.me/>)
|
||||
|
||||

|
||||

|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 2024-12-12 星期四
|
||||
title: '2024-12-12'
|
||||
date: 2024-12-12T00:00:00.000Z
|
||||
day_of_week: 星期四
|
||||
author: KazooTTT
|
||||
@ -12,11 +12,10 @@ description: >-
|
||||
这一天的碎片化记录,包含了对深Seek
|
||||
API和其新版聊天功能的感想,以及工作、生活中的各种感受和体验。作者在这段时间内进行了一些个人思考和记录,包括购买了智能工具Diagen,感受到了一种计算收益的模式,并且在思考自己的精神层面,希望能够创作出更能让自己满意的作品。
|
||||
slug: diary-2024-12-12
|
||||
published: true
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:54.000Z
|
||||
---
|
||||
|
||||
之前只用过 deepseek 的 api,这几天的 deepseek 的 chat 用的比较多,发现两者都挺好用的
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 2024-12-19 星期四
|
||||
title: '2024-12-19'
|
||||
date: 2024-12-19T00:00:00.000Z
|
||||
day_of_week: 星期四
|
||||
author: KazooTTT
|
||||
@ -7,11 +7,10 @@ tags:
|
||||
- 日记
|
||||
description: null
|
||||
slug: diary-2024-12-19
|
||||
published: true
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:54.000Z
|
||||
---
|
||||
|
||||
## 值得记录的事情
|
||||
@ -24,9 +23,9 @@ date_modified: 2025-01-22T05:39:24.000Z
|
||||
|
||||
今天写好了一个 [合并多个PDF](/notes/merge-pdfs) 的小项目,写完之后用了合并功能在微信读书已经看上了杂货铺的中文翻译✌️
|
||||
|
||||
[PDF文件合并工具 - 在线免费合并PDF文档](https://pdf.kazoottt.top/)
|
||||
[PDF文件合并工具 - 在线免费合并PDF文档](<https://pdf.kazoottt.top/>)
|
||||
|
||||

|
||||

|
||||
|
||||
## 碎片化记录(基于 n8n + rss + 飞书 webhook 生成)
|
||||
|
||||
|
@ -7,11 +7,10 @@ tags:
|
||||
- 日记
|
||||
description: null
|
||||
slug: diary-2024-12-23
|
||||
published: true
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:54.000Z
|
||||
---
|
||||
|
||||
学习 unity day01
|
||||
@ -30,4 +29,4 @@ date_modified: 2025-01-22T05:39:24.000Z
|
||||
|
||||
不管怎么样实践和学习总是没错,不要抵触新的事物,先做一个垃圾出来至少也算是做出来了。
|
||||
|
||||

|
||||

|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 2025-01-06 星期一
|
||||
title: '2025-01-06'
|
||||
date: 2025-01-06T00:00:00.000Z
|
||||
day_of_week: 星期一
|
||||
author: KazooTTT
|
||||
@ -9,11 +9,10 @@ tags:
|
||||
- 压力
|
||||
description: null
|
||||
slug: diary-2025-01-06
|
||||
published: true
|
||||
toAstro: true
|
||||
category: 日记
|
||||
date_created: 2025-01-06T12:11:06.000Z
|
||||
date_modified: 2025-01-22T05:39:24.000Z
|
||||
date_modified: 2025-02-19T17:22:54.000Z
|
||||
---
|
||||
|
||||
最近一直都很忙,忙到有时候怀疑自己从上海回成都是否是好的决定。
|
||||
|
@ -2,23 +2,18 @@
|
||||
title: 2025-W07
|
||||
date: 2025-02-16T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Draft
|
||||
tags:
|
||||
- 周报
|
||||
- 工具
|
||||
- 生活
|
||||
- 工作
|
||||
- 职业规划
|
||||
finished: true
|
||||
published: true
|
||||
category: 周报
|
||||
slug: 2025-W07
|
||||
description: null
|
||||
toAstro: true
|
||||
astroType: post
|
||||
date_created: 2025-02-10T08:14:42.000Z
|
||||
date_modified: 2025-02-19T03:44:22.000Z
|
||||
date_modified: 2025-02-19T17:26:39.000Z
|
||||
---
|
||||
|
||||
日期范围:2025-02-10 - 2025-02-16
|
||||
@ -36,26 +31,26 @@ date_modified: 2025-02-19T03:44:22.000Z
|
||||
在之前也有一些个人的碎碎念: [碎片-2025-02-11 12时32分](/notes/fragmented-notes-2025-02-11-12-32-42)
|
||||
|
||||
> [!quote]
|
||||
很羡慕和佩服那些拥有热爱并且为之付出的人 感觉自己没什么持久的热爱,很多时候只是因为受他人影响选择了目前的工作。
|
||||
>
|
||||
> 很羡慕和佩服那些拥有热爱并且为之付出的人 感觉自己没什么持久的热爱,很多时候只是因为受他人影响选择了目前的工作。
|
||||
>
|
||||
> 也有人说不要把工作看得多重要,只是挣钱的途径。但实际上工作占据一天中很多时间,如果体验糟糕,那么还是会觉得一天过得挺糟糕的。
|
||||
>
|
||||
>
|
||||
> 很多时候都没弄清楚自己的行动意图
|
||||
>
|
||||
>
|
||||
> 之前一直说希望可以远程工作,可以离家近一点。但是只是下意识的说辞,回到成都后,回家频率更高,也是往离家更近的方向靠,但是并没多开心。所以我期望的或许不是要离家近。
|
||||
>
|
||||
>
|
||||
> 也说过离开上家公司的原因之一是流程太繁琐,层层审批,有时候互相推脱找不到负责人,推进一件事情过于困难。但换了公司后,确实更加扁平化,不再有所谓的工单和流程,面临的是另外的不愉快。随意指派的任务,不合理的排期,让我依然觉得心累。
|
||||
>
|
||||
>
|
||||
> 比起接下一份工作,是更希望自己可以弄清楚自己喜欢什么,擅长什么,工作体验与工资比例相对合理的公司是我的目标吗,求稳定还是求待遇,以及自己能否找到这样的工作,如果不能找到还能怎么办
|
||||
>
|
||||
>
|
||||
> 不然面临的又是匆忙决定然后又后悔然后又想离开
|
||||
>
|
||||
>
|
||||
> 真的好迷茫啊
|
||||
>
|
||||
> 我一直都觉得我是情绪驱动类,有上头的事物可以高强度投入其中。
|
||||
>
|
||||
> 我的快乐很大部分都是追星带来的,真的会因为新消息开心很久,期盼很久。所以之前说我不知道我喜欢什么,准确来说是我不知道我能把什么爱好和我的工作对应上。
|
||||
>
|
||||
>
|
||||
> 我一直都觉得我是情绪驱动类,有上头的事物可以高强度投入其中。
|
||||
>
|
||||
> 我的快乐很大部分都是追星带来的,真的会因为新消息开心很久,期盼很久。所以之前说我不知道我喜欢什么,准确来说是我不知道我能把什么爱好和我的工作对应上。
|
||||
>
|
||||
> 感觉能利用好情绪驱动的话是优势,利用不好就是劣势吧
|
||||
|
||||
所以在春节期间以及回来后的一周内,我想了很多。回想起自己喜欢什么,擅长什么,想要什么,以及自己到底想要过什么样的生活。也做了一些咨询。其中很关键的一点是这样一句话:
|
@ -12,7 +12,6 @@ date_modified: 2025-02-19T13:11:26.000Z
|
||||
title: 241029 1144 vite环境变量
|
||||
date: 2025-02-19T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
published: true
|
||||
toAstro: true
|
||||
astroType: null
|
||||
category: 碎片
|
||||
|
67
src/content/note/86.分隔链表.md
Normal file
67
src/content/note/86.分隔链表.md
Normal file
@ -0,0 +1,67 @@
|
||||
---
|
||||
title: 86.分隔链表
|
||||
date: 2023-09-13T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 算法
|
||||
- 链表
|
||||
- leetcode
|
||||
- 待优化
|
||||
- todo
|
||||
platform: leetcode
|
||||
number: 86
|
||||
leetcode-url: 'https://leetcode.cn/problems/partition-list/description/'
|
||||
toAstro: true
|
||||
slug: 86-separated-chained-tables
|
||||
description: >-
|
||||
该内容描述了一个TypeScript函数`partition`,用于将一个单链表分割成两部分:一部分包含所有小于给定值x的节点,另一部分包含所有大于或等于x的节点。函数首先创建两个新的链表头节点`small`和`large`,分别用于存储小于x和大于等于x的节点。通过遍历原链表,将节点值小于x的节点添加到`small`链表,将节点值大于等于x的节点添加到`large`链表。最后,将`large`链表连接到`small`链表的尾部,并返回`small`链表的头节点。此方法在内存使用上还有优化空间。
|
||||
date_created: 2025-01-04T03:44:53.000Z
|
||||
date_modified: 2025-02-19T03:44:14.000Z
|
||||
---
|
||||
|
||||
# 86.分隔链表
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* Definition for singly-linked list.
|
||||
* class ListNode {
|
||||
* val: number
|
||||
* next: ListNode | null
|
||||
* constructor(val?: number, next?: ListNode | null) {
|
||||
* this.val = (val===undefined ? 0 : val)
|
||||
* this.next = (next===undefined ? null : next)
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
|
||||
function partition(head: ListNode | null, x: number): ListNode | null {
|
||||
let small = new ListNode(-1),
|
||||
smallP = small,
|
||||
large = new ListNode(-1),
|
||||
largeP = large
|
||||
|
||||
while (head) {
|
||||
if (head.val < x) {
|
||||
smallP.next = {
|
||||
val: head.val,
|
||||
next: null,
|
||||
}
|
||||
smallP = smallP.next
|
||||
} else {
|
||||
largeP.next = {
|
||||
val: head.val,
|
||||
next: null,
|
||||
}
|
||||
largeP = largeP.next
|
||||
}
|
||||
head = head.next
|
||||
}
|
||||
largeP.next = null
|
||||
smallP.next = large.next
|
||||
return small.next
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
可以看出内存还有很大的优化空间
|
30
src/content/note/AI大局.md
Normal file
30
src/content/note/AI大局.md
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
slug: present-conditions
|
||||
toAstro: true
|
||||
description: >-
|
||||
基础大模型在实际应用中面临两大挑战:终端客户对高昂算力成本的接受度以及大模型在垂直行业任务中的表现不足。为解决这些问题,大模型通常会通过领域特定数据或知识库进行训练和优化,以形成适用于垂直领域的行业大模型或业务大模型。此外,一些企业还有深度定制和私有化部署的需求,需要在行业大模型的基础上,进一步加入企业专有数据进行训练或微调,以构建企业级大模型。
|
||||
category: AI
|
||||
title: AI大局
|
||||
date: 2023-09-04T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 基础大模型
|
||||
- 产业应用
|
||||
- 机器学习
|
||||
finished: false
|
||||
date_created: 2025-01-04T03:44:53.000Z
|
||||
date_modified: 2025-02-19T03:44:16.000Z
|
||||
---
|
||||
|
||||
# 大局
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
基础大模型落地面临两大难题,一是终端客户对算力成本的接受能力,二是大模型虽擅长通用领域问题,但往往在垂直行业任务中表现欠佳。因此,基础大模型会通过领域数据或专属知识库进行训练和调优,形成垂直领域的行业大模型或业务大模型;此外,部分企业还具有深度定制、私有化部署的需求,需要在行业大模型基础上,进一步加入企业专有数据进行训练或微调,形成企业级大模型。
|
||||
|
||||
[2023 年中国 AIGC 产业全景报告 | 艾瑞咨询 - 实时互动网](<https://www.nxrte.com/zixun/31964.html>)
|
||||
|
||||
中间层
|
||||
应用层
|
28
src/content/note/AI相关名词.md
Normal file
28
src/content/note/AI相关名词.md
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
title: AI相关名词
|
||||
date: 2024-02-28T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- ai
|
||||
- 深度学习
|
||||
finished: false
|
||||
toAstro: true
|
||||
slug: ai-related-words
|
||||
description: >-
|
||||
SOTA(State of the
|
||||
Art)代表在特定任务中表现最佳的方法或模型,尤其在计算机视觉领域,常指最先进的深度学习技术。扩散模型作为深度生成模型的新SOTA,在性能上超越了传统的基准和基线。研究论文通常以超越现有基线/基准为目标,通过实验数据评估其性能提升。基线强调一套方法,而基准则侧重于如精确度、召回率等可量化的最高指标。
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:11.000Z
|
||||
---
|
||||
|
||||
# AI 相关名词
|
||||
|
||||
#ai #深度学习
|
||||
|
||||
SOTA 是 state of the art 的缩写,指在特定任务中目前表现最好的方法或模型。它代表着最前沿、
|
||||
|
||||
最先进、目前最高水平的意思。在计算机视觉等领域,SOTA 通常指代最先进的深度学习模型或方法,在各种基准测试中取得最好的性能表现
|
||||
|
||||
Benchmark 和 baseline 则是指最基础的比较对象。研究论文通常以超越现有的 baseline/benchmark 为动机,实验数据需要以它们为基准来评估是否有提高。Baseline 强调一套方法,而 benchmark 更偏向于当前最高的指标,如 precision、recall 等可量化的指标
|
||||
|
||||
> 扩散模型(diffusion models)是深度生成模型中新的 SOTA [扩散模型爆火,这是首篇综述与Github论文分类汇总 | 机器之心](<https://www.jiqizhixin.com/articles/2022-09-13-5>)
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
date_created: 2025-01-31T13:07:18.000Z
|
||||
date_modified: 2025-02-19T03:44:14.000Z
|
||||
date_modified: 2025-02-19T17:22:51.000Z
|
||||
slug: blender-macos-steam-version-limitations
|
||||
tags:
|
||||
- Blender
|
||||
@ -15,9 +15,6 @@ title: Blender on macOS - Steam Version Limitations for Apple Silicon Devices
|
||||
date: 2025-01-31T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Technical Note
|
||||
status: Published
|
||||
finished: true
|
||||
published: true
|
||||
category: 3D Modeling
|
||||
toAstro: true
|
||||
---
|
||||
|
@ -0,0 +1,65 @@
|
||||
---
|
||||
slug: bloomberg-welcomes-intra-firm-chatbots-to-ib
|
||||
title: 'Bloomberg Welcomes Intra-Firm Chatbots to IB '
|
||||
tags:
|
||||
- 翻译
|
||||
category: 阅读笔记-阅读和翻译
|
||||
description: >-
|
||||
彭博社宣布推出新的Instant Bloomberg (IB)附加服务——IB
|
||||
Connect,其中包括公司内部聊天机器人服务。这项服务允许彭博终端用户将专有聊天机器人集成到IB聊天室中,促进内部信息的共享和商业智能的发现。客户可以使用提供的软件开发工具包定制聊天机器人,以适应其独特的技术堆栈和工作流程。此外,IB
|
||||
Connect支持两种类型的聊天机器人:问答式和通知型,分别用于提供可操作的情报和关键事件的及时通知。这一创新旨在帮助客户推进数字化转型战略,提高协作工作流程的效率。
|
||||
date: 2023-11-09T10:26:54.033Z
|
||||
toAstro: true
|
||||
date_created: 2024-12-17T05:34:45.000Z
|
||||
date_modified: 2025-02-19T03:44:11.000Z
|
||||
---
|
||||
|
||||
# 彭博社欢迎公司内部聊天机器人加入国际商业银行
|
||||
|
||||
[原文:Bloomberg Welcomes Intra-Firm Chatbots to IB](<https://www.bloomberg.com/company/press/bloomberg-welcomes-intra-firm-chatbots-to-ib/>)
|
||||
|
||||
2023 年 11 月 09 日
|
||||
**_ 客户可使用公司内部聊天机器人推动数字化转型和协作工作流程 _**
|
||||
|
||||
彭博社今天宣布推出一项新的 Instant Bloomberg (IB) 附加服务,以支持客户的数字化转型计划。IB Connect:IB Connect:公司内部聊天机器人服务使彭博终端用户能够将专有聊天机器人添加到所有用户都是同一公司成员的 IB 聊天室中。
|
||||
|
||||
客户可以调用公司内部聊天机器人,自动将其内部系统中的重要信息显示在 IB 中,与同事共享,并促进内部商业智能的可发现性。
|
||||
|
||||
**IB Connect** 是一套服务,使彭博终端用户能够将 IB 与公司内部工作流程工具无缝集成,帮助简化与同事的协作。
|
||||
|
||||
**IB Connect:公司内部聊天机器人**是一项新的 IB Connect 服务,在客户适用的 IB 聊天室与其内部系统之间提供双向集成。它使用自然语言处理为客户的非结构化 IB 数据提供结构和上下文,并将丰富的信息提供给客户的公司内部聊天机器人。
|
||||
每个客户都可以使用提供的软件开发工具包来构建和定制自己的 IB Connect:行内聊天机器人,以满足其公司独特的技术堆栈和内部用户工作流程,并与彭博社的 API 协议保持一致。
|
||||
|
||||
**ING 金融市场战略工程主管 Pieter van Gaa**l 说:"ING 的金融市场前台战略工程团队一直致力于改善客户体验。人们已经开始期待即时访问,我们认为他们对金融市场的体验也应如此。
|
||||
我们使用聊天机器人已经有一段时间了,我们发现 Instant Bloomberg 中新增的公司内部聊天机器人非常适合我们的需求 "。
|
||||
|
||||
**Bardin Hill Investment Partners 的执行信贷主管兼投资组合经理 Philip Raciti** 说:" 在彭博社推出公司内部聊天机器人之前,我们一直在寻找一种方法,以一种可用于深度分析的结构从不同来源获取数据,并能随着时间的推移扩展功能。
|
||||
我们认为 Intra-Firm Chatbots 是弥合数据鸿沟的重要一步,因为它提供了一个简单、高附加值的工具,促进了彭博社与我们内部系统之间的实时数据连接。Bardin Hill 实施的公司内部聊天机器人帮助我们直接访问最大的信息孤岛,同时提高流程效率。
|
||||
|
||||
**罗杰 - 伯奇(Roger Birch),产品主管:彭博国际银行通信与协作系统产品主管 Roger Birch** 说:" 我们将继续投资于创新,使我们的客户能够进一步推进其数字化转型战略,并从使用 IB 中获取更多价值。
|
||||
IB Connect 服务集(包括公司内部聊天机器人)将帮助我们的客户创建信息超回路,并从根本上提高协作工作流程的效率。"
|
||||
|
||||
彭博社目前通过 IB Connect 支持两种类型的客户聊天机器人功能:**公司内问答聊天机器人**和**公司内通知聊天机器人**。
|
||||
|
||||
**问答式公司内部聊天机器人**通过 IB Connect 与客户系统之间的双向通信获取可操作的情报,以回答指向公司内部聊天机器人的聊天询问。
|
||||
用户可以查询其专有系统中的各种数据,然后这些聊天机器人可以直接在聊天室中生成内容(链接、表格、可视化丰富数据)。
|
||||
这些与问答 Intrafirm 聊天机器人的简单互动可帮助用户及其队友高效地传递信息,并为他们的交流增加更多价值。
|
||||
|
||||
当发生关键事件或满足特定市场条件时,**通知型 Intrafirm 聊天机器人**会及时、主动地发出警报,并提供有意义的商业情报,而不会转移对正在进行的团队交流的注意力。
|
||||
|
||||
这样,用户就能在已经开展协作的 IB 环境中接收关键更新。例如,可以为交易前、执行中和交易后的工作流程发送分析、库存或订单状态更新通知。
|
||||
|
||||
**关于 Instant Bloomberg(IB):**
|
||||
IB 帮助彭博终端用户与金融市场和彼此之间实时连接,在安全的环境中交流想法、分享可操作的信息并优化通信工作流程。
|
||||
彭博还提供其他服务,使客户能够将 IB 与公司内部应用程序无缝集成,帮助简化与同事的协作。
|
||||
|
||||
**关于彭博终端:**
|
||||
四十多年来,彭博终端通过为资本市场带来透明度和创新,彻底改变了金融服务行业。
|
||||
彭博终端受到全球最具影响力的决策者的信赖,提供实时的新闻、数据、见解和交易工具,帮助我们的客户将知识转化为行动。
|
||||
|
||||
**关于彭博社**
|
||||
彭博社是商业和金融信息领域的全球领导者,提供可信赖的数据、新闻和见解,为市场带来透明度、效率和公平性。
|
||||
公司通过可靠的技术解决方案帮助连接全球金融生态系统中具有影响力的社区,使我们的客户能够做出更明智的决策并促进更好的合作。欲了解更多信息,请访问 Bloomberg.com/company 或申请演示。
|
||||
|
||||
**媒体联系方式**
|
||||
Robert Madden, <rmadden29@bloomberg.net>, +1 (646) 807-2213
|
43
src/content/note/CSS随用随记.md
Normal file
43
src/content/note/CSS随用随记.md
Normal file
@ -0,0 +1,43 @@
|
||||
---
|
||||
title: CSS随用随记
|
||||
date: 2022-11-15T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- css
|
||||
- 前端
|
||||
- 刷题
|
||||
slug: css-on-the-go
|
||||
toAstro: true
|
||||
description: >-
|
||||
本文介绍了CSS中的一些关键技巧,包括使用伪类选择器来设置HTML模块中特定li标签的背景颜色,以及如何为div元素添加后伪元素并设置其样式。此外,还讨论了浮动和清除浮动的概念,并提供了一个实际的编程练习链接,帮助读者更好地理解和应用这些CSS技术。
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:10.000Z
|
||||
---
|
||||
|
||||
# CSS 随用随记
|
||||
|
||||
## 1. 请将 Html 模块中 Ul 列表的第 2 个 Li 标签和第 4 个 Li 标签的背景颜色设置成 "rgb(255, 0, 0)"
|
||||
|
||||
关键词:伪类选择器
|
||||
|
||||
```css
|
||||
ul li:nth-child(2n) {
|
||||
background: rgb(255, 0, 0);
|
||||
}
|
||||
```
|
||||
|
||||

|
||||
|
||||
## 2. 请给 Html 模块的 Div 元素加一个后伪元素,且后伪元素的宽度和高度都是 20px,背景颜色为 "rgb(255, 0, 0)"
|
||||
|
||||

|
||||
|
||||
## 3. [浮动和清除浮动*牛客题霸*牛客网 (nowcoder.com)](<https://www.nowcoder.com/practice/88bcbaee954349f5a8810bfa94ee61a8?tpId=260&tqId=2200196&ru=%2Fexam%2Foj&qru=%2Fta%2Ffront-quick-study%2Fquestion-ranking&sourceUrl=%2Fexam%2Foj%3Fpage%3D1%26tab%3DHTML%2FCSS%26topicId%3D260>)
|
||||
|
||||
请将类为 "left" 的 div 元素和类为 "right" 的 div 元素在同一行上向左浮动,且清除类为 "wrap" 的父级 div 元素内部的浮动。
|
||||
|
||||
关键词:清除浮动
|
||||
|
||||
TODO:
|
||||
|
||||
<a href='/2022/11/15/清除浮动/'>CSS | 清除浮动</a>
|
@ -0,0 +1,24 @@
|
||||
---
|
||||
slug: can-brain-science-help-us-break-bad-habits
|
||||
tags:
|
||||
- 摘抄
|
||||
description: >-
|
||||
研究表明,通过调整环境来隐藏诱惑,可以有效提高自控力。一项实验发现,当孩子们看不到面前的棉花糖时,他们能坚持的时间比看到棉花糖时更长。这表明自控力并非仅是个人内在品质,而是受环境影响的。因此,通过微调环境,我们或许能模仿那些看起来更有自制力的人。
|
||||
category: 阅读笔记-阅读和翻译
|
||||
date: 2024-01-07T00:00:00.000Z
|
||||
title: Can Brain Science Help Us Break Bad Habits
|
||||
toAstro: true
|
||||
date_created: 2024-12-02T03:03:24.000Z
|
||||
date_modified: 2025-02-19T03:44:11.000Z
|
||||
---
|
||||
|
||||
# Can Brain Science Help Us Break Bad Habits?
|
||||
|
||||
原文:
|
||||
[Can Brain Science Help Us Break Bad Habits? | The New Yorker](<https://www.newyorker.com/magazine/2019/10/28/can-brain-science-help-us-break-bad-habits>)
|
||||
翻译:
|
||||
[研究表明,依靠意志力改掉坏习惯是徒劳无功的 \[译\] | 宝玉的分享](<https://baoyu.io/translations/life/can-brain-science-help-us-break-bad-habits>)
|
||||
|
||||
> 研究者比较了两种情况:一种是孩子们能看到面前的棉花糖;另一种则是知道棉花糖在那儿,但看不到它。结果显示,面对可见诱惑时,孩子们平均只能坚持六分钟,但如果把诱惑藏起来,他们能坚持十分钟。对 Wood 而言,这说明自控力“并非内在品质,而是我们所处环境的反映。”通过微调环境,我们也许能够模仿那些看起来更有自制力的人。
|
||||
|
||||
> 成功的自控,实际上来自于有效隐藏诱惑
|
@ -2,14 +2,10 @@
|
||||
title: ChainForge简单介绍
|
||||
date: 2024-05-22T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
tags:
|
||||
- llm
|
||||
- chainforge
|
||||
- 工具
|
||||
finished: true
|
||||
published: true
|
||||
category: AI
|
||||
slug: chainforge-intro
|
||||
description: >-
|
||||
@ -26,7 +22,6 @@ description: >-
|
||||
environments.
|
||||
NotionID-notionnext: 40ec4f8d-2030-4ce1-b8c7-c1c9f56ef55b
|
||||
link-notionnext: 'https://kazoottt.notion.site/ChainForge-40ec4f8d20304ce1b8c7c1c9f56ef55b'
|
||||
rinId: 8
|
||||
toAstro: true
|
||||
date_created: 2025-01-04T03:44:53.000Z
|
||||
date_modified: 2025-02-19T03:44:16.000Z
|
||||
|
107
src/content/note/CommonJS简介.md
Normal file
107
src/content/note/CommonJS简介.md
Normal file
@ -0,0 +1,107 @@
|
||||
---
|
||||
title: CommonJS简介
|
||||
date: 2023-10-17T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- commonjs
|
||||
- JavaScript
|
||||
- node
|
||||
toAstro: true
|
||||
slug: introduction-to-commonjs
|
||||
description: >-
|
||||
CommonJS是一种模块规范,主要用于Node.js服务器端JavaScript应用程序。它通过`require`函数导入模块,通过`module.exports`或`exports`导出模块内容。在`package.json`文件中,通过设置`"type"`字段为`"commonjs"`来指定模块格式。CommonJS不支持浏览器环境,是Node.js中模块管理的基础。
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:22.000Z
|
||||
---
|
||||
|
||||
# CommonJS 简介
|
||||
|
||||
## 什么是 Commonjs
|
||||
|
||||
commonjs 是 module 的一种类型(规范)
|
||||
|
||||
## 使用场景
|
||||
|
||||
> CommonJS is mainly used in server-side JS apps with Node, as browsers don't support the use of CommonJS.
|
||||
|
||||
CommonJS 主要用于带有 Node 的服务器端 JS 应用程序,因为浏览器不支持使用 CommonJS。
|
||||
|
||||
## 如何使用
|
||||
|
||||
### package.json
|
||||
|
||||
> The "type" field defines the module format that Node.js uses for all .js files that have that package.json file as their nearest parent.
|
||||
|
||||
`"type"` 字段定义 Node.js 用于所有将该 `package.json` 文件作为其最近父级的 `.js` 文件的模块格式。
|
||||
|
||||
在 package 中不需要显示定义 type(type 的可选项是 commonjs 和 module),一般是需要用到 ESM 的时候才去定义 module。
|
||||
|
||||
package 的影响范围是当前文件夹以及子文件夹的所有 js 文件。(ts 会被 ts 编译器转化为 js 代码)
|
||||
|
||||
### 语法
|
||||
|
||||
导入:require 导出:module.exports
|
||||
|
||||
举个例子:
|
||||
|
||||
```jsx
|
||||
// 导出两个函数
|
||||
exports.add = function (a, b) {
|
||||
return a + b
|
||||
}
|
||||
|
||||
exports.multiply = function (a, b) {
|
||||
return a * b
|
||||
}
|
||||
```
|
||||
|
||||
```jsx
|
||||
// 引入 math 模块
|
||||
var math = require("./math")
|
||||
|
||||
// 使用 math 模块中的函数
|
||||
var sum = math.add(5, 3)
|
||||
var product = math.multiply(4, 6)
|
||||
|
||||
console.log("Sum:", sum)
|
||||
console.log("Product:", product)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
批量导入导出:
|
||||
|
||||
```jsx
|
||||
// 定义多个实用函数
|
||||
function add(a, b) {
|
||||
return a + b
|
||||
}
|
||||
|
||||
function subtract(a, b) {
|
||||
return a - b
|
||||
}
|
||||
|
||||
// 将这些函数添加到一个对象中并导出该对象
|
||||
module.exports = {
|
||||
add,
|
||||
subtract,
|
||||
}
|
||||
```
|
||||
|
||||
```jsx
|
||||
// main.js
|
||||
|
||||
// 引入 utils 模块
|
||||
var utils = require("./utils")
|
||||
|
||||
// 使用 utils 模块中的函数
|
||||
var sum = utils.add(5, 3)
|
||||
var difference = utils.subtract(8, 2)
|
||||
|
||||
console.log("Sum:", sum)
|
||||
console.log("Difference:", difference)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
参考:
|
36
src/content/note/Cta Button是什么.md
Normal file
36
src/content/note/Cta Button是什么.md
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
link: 'https://kazoottt.notion.site/Cta-Button-71da9f4b9152422fa99acfef23f0eaca'
|
||||
notionID: 71da9f4b-9152-422f-a99a-cfef23f0eaca
|
||||
slug: whats-cta-button
|
||||
toAstro: true
|
||||
description: >-
|
||||
CTA按钮,即Call to
|
||||
Action按钮,是网页、广告或应用程序中的重要设计元素,用于鼓励用户执行特定动作,如注册、购买或下载等。这些按钮通常设计醒目,包含清晰的文本和明确的指示,以吸引用户注意力并促使他们采取期望的行动。CTA按钮广泛应用于网站、广告、社交媒体和移动应用中,是数字营销和用户互动的关键组成部分。
|
||||
tags:
|
||||
- CTA 按钮设计
|
||||
- CTA Button
|
||||
- User Interaction
|
||||
- 数字营销
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:10.000Z
|
||||
title: Cta Button是什么
|
||||
---
|
||||
|
||||
# Cta Button 是什么
|
||||
|
||||
[React Navbar - Flowbite](<https://www.flowbite-react.com/docs/components/navbar#navbar-with-cta-button>)
|
||||
|
||||
CTA(Call to Action)按钮是网页、广告或应用程序中的一个设计元素,旨在鼓励用户执行特定的动作或行为。这个按钮通常包含明确的文本或图标,目的是引导用户完成某项任务,如注册、订阅、购买、下载、分享内容等。CTA 按钮的设计和文本通常是精心制定的,以吸引用户的注意力,并激发他们的兴趣,促使他们采取所期望的行动。
|
||||
|
||||
CTA 按钮通常具有醒目的颜色、清晰的文本和明确的指示,以便用户能够轻松地理解要采取的行动。它们在网站、广告、社交媒体帖子、电子邮件营销和移动应用中都广泛使用,是数字营销和用户互动的关键元素之一。
|
||||
|
||||
一些常见的 CTA 按钮示例包括:
|
||||
|
||||
1. " 注册 " 按钮,用于引导用户创建账户。
|
||||
2. " 购买 " 按钮,用于鼓励用户购买产品或服务。
|
||||
3. " 了解更多 " 按钮,引导用户深入了解某一主题或产品。
|
||||
4. " 下载 " 按钮,用于鼓励用户下载应用程序、电子书或其他资源。
|
||||
5. " 分享 " 按钮,用于鼓励用户分享内容到社交媒体平台。
|
||||
6. " 订阅 " 按钮,引导用户订阅新闻简报、博客或电子邮件通讯。
|
||||
|
||||
CTA 按钮的设计和位置在用户体验和转化率方面非常重要,因此它们通常是设计和营销策略的核心组成部分。
|
25
src/content/note/LLM.md
Normal file
25
src/content/note/LLM.md
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
slug: llm
|
||||
toAstro: true
|
||||
description: >-
|
||||
本文介绍了大型语言模型(LLM)中的`temperature`参数如何影响模型的输出结果。当`temperature`值较低时,模型输出更确定的结果;而当该值较高时,模型可能产生更多样化或更具创造性的输出。此外,文章还提供了学习与AI沟通的资源链接,包括Learn
|
||||
Prompting和Prompt Engineering Guide。
|
||||
tags:
|
||||
- LLM
|
||||
- temperature
|
||||
- random,prompt engineering,生成型语言模型
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:10.000Z
|
||||
title: LLM
|
||||
---
|
||||
|
||||
# LLM
|
||||
|
||||
TODO
|
||||
|
||||
`temperature` 的参数值越小,模型就会返回越确定的一个结果。如果调高该参数值,大语言模型可能会返回更随机的结果,也就是说这可能会带来更多样化或更具创造性的产出。
|
||||
|
||||
[欢迎 | Learn Prompting: Your Guide to Communicating with AI](<https://learnprompting.org/zh-Hans/docs/intro>)
|
||||
[提示工程指南 | Prompt Engineering Guide<!-- -->](<https://www.promptingguide.ai/zh>)
|
||||
|
||||
arxiv.org/abs/2201.11903
|
@ -2,37 +2,33 @@
|
||||
title: MUV家元旦24H限定食堂 - 汇总网站
|
||||
date: 2025-01-06T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
tags:
|
||||
- 项目
|
||||
- milklove
|
||||
- 同人
|
||||
- milkpansa
|
||||
- loverrukk
|
||||
finished: true
|
||||
published: true
|
||||
category: 项目
|
||||
slug: milklovemuv
|
||||
description: null
|
||||
toAstro: true
|
||||
date_created: 2025-01-06T02:02:35.000Z
|
||||
date_modified: 2025-02-19T03:43:53.000Z
|
||||
date_modified: 2025-02-19T17:22:55.000Z
|
||||
---
|
||||
|
||||
[MUV家元旦24H限定食堂 - 汇总](<https://milklovemuv.com/>)
|
||||
|
||||
## 介绍
|
||||
|
||||
方便后续回顾,写了一个 [#muv家元旦24h限定食堂#](<https://s.weibo.com/weibo?q=%23muv%E5%AE%B6%E5%85%83%E6%97%A624h%E9%99%90%E5%AE%9A%E9%A3%9F%E5%A0%82%23>) 的汇总网站。
|
||||
方便后续回顾,写了一个 [#muv家元旦24h限定食堂#](<https://s.weibo.com/weibo?q=%23muv%E5%AE%B6%E5%85%83%E6%97%A624h%E9%99%90%E5%AE%9A%E9%A3%9F%E5%A0%82%23>) 的汇总网站。
|
||||
|
||||
点击卡片内的微博图标可以跳转到对应的微博,点击蓝色的外链图标可以直接跳转至查看文章或者视频的平台。
|
||||
点击卡片内的微博图标可以跳转到对应的微博,点击蓝色的外链图标可以直接跳转至查看文章或者视频的平台。
|
||||
|
||||
非常感谢各位老师的产出
|
||||
|
||||

|
||||
|
||||
---
|
||||
---
|
||||
|
||||
## 开发
|
||||
|
||||
|
@ -1,23 +1,18 @@
|
||||
---
|
||||
date_created: 2025-02-06T03:59:39.000Z
|
||||
date_modified: 2025-02-19T03:44:14.000Z
|
||||
date_modified: 2025-02-19T17:26:45.000Z
|
||||
title: Obsidian Web Clipper 离线阅读同人作品
|
||||
date: 2025-02-06T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
tags:
|
||||
- obsidian
|
||||
- web-clipper
|
||||
- 离线阅读
|
||||
- 同人作品
|
||||
finished: false
|
||||
published: false
|
||||
category: 软件
|
||||
slug: obsidian-web-clipper-offline-reading-fanfics
|
||||
description: null
|
||||
toAstro: true
|
||||
astroType: post
|
||||
---
|
||||
|
||||
作为一个经常阅读同人作品的人来说,我使用过许多方法,有使用 raindrop 保存链接的,也有使用 epubkit 把同人作品转换成 epub 格式然后上传到微信读书或者 apple books 上进行阅读的。
|
||||
@ -38,7 +33,7 @@ astroType: post
|
||||
table dateformat(published, "yyyyMMdd") as "发布时间"
|
||||
from "Clippings"
|
||||
where contains(tags, "替换为你要筛选的标签")
|
||||
sort published desc
|
||||
sort published desc
|
||||
```
|
||||
|
||||

|
63
src/content/note/Page Visibility API.md
Normal file
63
src/content/note/Page Visibility API.md
Normal file
@ -0,0 +1,63 @@
|
||||
---
|
||||
title: Page Visibility API
|
||||
date: 2024-05-22T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- document
|
||||
- mdn
|
||||
- html
|
||||
- pagevisibility
|
||||
toAstro: true
|
||||
slug: page-visibility-api
|
||||
description: >-
|
||||
The Page Visibility API is a web API related to the Document object, designed
|
||||
to determine whether the current document is visible to users. It is
|
||||
particularly useful for pausing and resuming animations and videos when the
|
||||
user switches to a different tab, thereby conserving system resources and
|
||||
battery life. Additionally, it can enhance user interaction by dynamically
|
||||
changing the page title based on visibility status, such as changing the title
|
||||
to "你快回来" when the tab is not in focus. The API is supported by various
|
||||
resources and discussions, including those on GitHub and articles by experts
|
||||
like Ruan Yifeng, ensuring its compatibility and practical application in web
|
||||
development.
|
||||
NotionID-notionnext: 3bd51bf2-356f-4059-9d12-e8321d422a49
|
||||
link-notionnext: >-
|
||||
https://kazoottt.notion.site/Page-Visibility-API-3bd51bf2356f40599d12e8321d422a49
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T17:22:50.000Z
|
||||
---
|
||||
|
||||
# Page Visibility API
|
||||
|
||||
[Page Visibility API - Web APIs | MDN](<https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API>)
|
||||
|
||||
这是一个与 Domcument 有关的 API,主要用来判断当前的 document 是否可见。
|
||||
|
||||
具体的用途:
|
||||
|
||||
- **暂停/恢复动画和视频**:当用户切换到其他标签页时,暂停正在播放的视频或动画,节省系统资源和电量。当用户返回该页面时,再恢复播放。
|
||||
- 为用户交互提供一些多样性,例如我们切换到其他的 tab 页的时候,博客对应的 tab 的标题变成了“你快回来”。
|
||||
|
||||
```js
|
||||
document.addEventListener("visibilitychange", function () {
|
||||
if (document.visibilityState === "hidden") {
|
||||
document.title = "你快回来"
|
||||
} else {
|
||||
document.title = "原始标题"
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## 协议以及相关的讨论
|
||||
|
||||
[GitHub - w3c/page-visibility: Page Visibility](<https://github.com/w3c/page-visibility>)
|
||||
|
||||
[Editorial: remove note about hidden being 'historical' by marcoscaceres · Pull Request #64 · w3c/page-visibility · GitHub](<https://github.com/w3c/page-visibility/pull/64>)
|
||||
|
||||
## 其他的资料
|
||||
|
||||
[Page Lifecycle API 教程 - 阮一峰的网络日志](<https://www.ruanyifeng.com/blog/2018/11/page_lifecycle_api.html>)
|
||||
|
||||
[Page Visibility API 教程 - 阮一峰的网络日志](<https://www.ruanyifeng.com/blog/2018/10/page_visibility_api.html>)
|
||||
|
||||
[使用 Page Visibility API | Articles | web.dev](<https://web.dev/articles/pagevisibility-intro>) 这篇文章很好地实现了兼容性
|
@ -2,16 +2,12 @@
|
||||
title: Perplexity系列产品
|
||||
date: 2024-09-04T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
tags:
|
||||
- AI
|
||||
- 搜索引擎
|
||||
- Perplexity
|
||||
- Playground
|
||||
- 播客
|
||||
finished: true
|
||||
published: true
|
||||
category: 软件
|
||||
slug: perplexity-productions-intro
|
||||
description: 概述Perplexity系列产品,包括搜索引擎、Playground和播客,重点介绍其功能和区别。
|
||||
|
@ -4,15 +4,11 @@ title: >-
|
||||
Playback forcibly
|
||||
date: 2024-05-25T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Draft
|
||||
tags:
|
||||
- focusee
|
||||
- obs
|
||||
- VirtualSoundCard
|
||||
- BlackHole2ch
|
||||
finished: true
|
||||
published: true
|
||||
slug: >-
|
||||
possible-causes-and-solutions-for-focusee-switching-system-audio-to-speaker-playback-forcibly-en
|
||||
description: >-
|
||||
@ -24,11 +20,10 @@ description: >-
|
||||
NotionID-notionnext: 80f19b4c-d207-45a0-bbbb-39641a9dc330
|
||||
link-notionnext: >-
|
||||
https://kazoottt.notion.site/Possible-Causes-and-Solutions-for-Focusee-Switching-System-Audio-to-Speaker-Playback-forcibly-80f19b4cd20745a0bbbb39641a9dc330
|
||||
rinId: 39
|
||||
category: 软件
|
||||
toAstro: true
|
||||
date_created: 2024-12-02T03:03:21.000Z
|
||||
date_modified: 2025-02-19T03:44:22.000Z
|
||||
date_modified: 2025-02-19T17:22:54.000Z
|
||||
---
|
||||
|
||||
# Possible Causes and Solutions for Focusee Switching System Audio to Speaker Playback Forcibly
|
||||
|
18
src/content/note/React设计原理阅读.md
Normal file
18
src/content/note/React设计原理阅读.md
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
slug: react-design-principles-reading
|
||||
toAstro: true
|
||||
description: >-
|
||||
React设计原理的核心概念是将用户界面(UI)定义为状态(state)的函数(f),即UI =
|
||||
f(state)。这一公式简洁地表达了React如何通过状态的变化来更新界面的工作原理。
|
||||
tags:
|
||||
- React设计原理
|
||||
- UI设计原理
|
||||
- 状态管理
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:10.000Z
|
||||
title: React设计原理阅读
|
||||
---
|
||||
|
||||
# React 设计原理阅读
|
||||
|
||||
UI = f(state)
|
@ -2,8 +2,6 @@
|
||||
title: Reasons Not to Recommend Purchasing Focusee for macOS Users
|
||||
date: 2024-06-20T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
tags:
|
||||
- macOS
|
||||
- Focusee
|
||||
@ -12,8 +10,6 @@ tags:
|
||||
- Software
|
||||
- Review
|
||||
- Refund
|
||||
finished: true
|
||||
published: true
|
||||
category: 软件
|
||||
slug: focusee-macos-review-en
|
||||
description: >-
|
||||
@ -23,10 +19,9 @@ description: >-
|
||||
NotionID-notionnext: c692f30c-bcbc-48fd-9739-19e23a3e1e40
|
||||
link-notionnext: >-
|
||||
https://kazoottt.notion.site/Reasons-Not-to-Recommend-Purchasing-Focusee-for-macOS-Users-c692f30cbcbc48fd973919e23a3e1e40
|
||||
rinId: 40
|
||||
toAstro: true
|
||||
date_created: 2024-12-02T03:03:21.000Z
|
||||
date_modified: 2025-02-19T03:44:22.000Z
|
||||
date_modified: 2025-02-19T17:22:54.000Z
|
||||
---
|
||||
|
||||
# Reasons Not to Recommend Purchasing Focusee for macOS Users
|
||||
|
@ -2,16 +2,12 @@
|
||||
title: Share My Incorrect Usage Cases of Zustand
|
||||
date: 2024-12-17T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
tags:
|
||||
- zustand
|
||||
- selector
|
||||
- store
|
||||
- react-scan
|
||||
- 最小粒度原则
|
||||
finished: true
|
||||
published: true
|
||||
category: null
|
||||
slug: share-my-incorrect-usage-case-of-zustand-en
|
||||
description: >-
|
||||
@ -27,7 +23,6 @@ description: >-
|
||||
toAstro: true
|
||||
date_created: 2025-01-04T03:44:53.000Z
|
||||
date_modified: 2025-02-19T03:44:15.000Z
|
||||
astroType: post
|
||||
---
|
||||
|
||||
## What is Zustand?
|
31
src/content/note/Telegram bot推荐 VidDlPBot.md
Normal file
31
src/content/note/Telegram bot推荐 VidDlPBot.md
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
title: Telegram bot推荐 VidDlPBot
|
||||
date: 2024-06-26T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- Telegram
|
||||
- 视频下载
|
||||
- VidDlPBot
|
||||
- Twitter
|
||||
- TikTok
|
||||
- YouTube
|
||||
- Instagram
|
||||
slug: telegram-bot-recommendation-viddlpbot
|
||||
description: 推荐一款Telegram bot——VidDlPBot,可以轻松下载Twitter、TikTok、YouTube、Instagram的视频,操作简便。
|
||||
category: 软件
|
||||
toAstro: true
|
||||
date_created: 2024-12-17T05:34:45.000Z
|
||||
date_modified: 2025-02-19T03:44:14.000Z
|
||||
---
|
||||
|
||||
# Telegram Bot 推荐 VidDlPBot
|
||||
|
||||

|
||||
|
||||
目前已支持 Twitter、TikTok、YouTube、Instagram
|
||||
|
||||
添加 bot 之后,直接输入要下载的链接给 bot,它就会返回下载好的视频给你了。超级方便。gemoo
|
||||
|
||||
教学视频:
|
||||
|
||||
[如何快速下载视频(手机端同理)\[telegram bot推荐#1\]\_哔哩哔哩\_bilibili](<https://www.bilibili.com/video/BV1dGgkecEr7/>)
|
67
src/content/note/What I learn from dom-to-image.md
Normal file
67
src/content/note/What I learn from dom-to-image.md
Normal file
@ -0,0 +1,67 @@
|
||||
---
|
||||
slug: what-i-learn-from-dom-to-image
|
||||
toAstro: true
|
||||
description: >-
|
||||
This article explores the dom-to-image library, detailing the author's
|
||||
experience with it, particularly in handling CORS issues when generating
|
||||
images from DOM nodes. The author shares their journey of diving into the
|
||||
source code to understand the library's functionality and to find alternative
|
||||
solutions to CORS problems. They also discuss the structure of the project's
|
||||
directory and highlight the importance of the README file and the main source
|
||||
file, `src/dom-to-image.js`.
|
||||
tags:
|
||||
- dom-to-image
|
||||
- CORS解决方案
|
||||
- DOM转化
|
||||
- Image生成
|
||||
- 前端开发
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:10.000Z
|
||||
title: What I learn from dom-to-image
|
||||
---
|
||||
|
||||
# What I Learn from Dom-to-image
|
||||
|
||||
the github repo url is below:
|
||||
|
||||
[GitHub - tsayen/dom-to-image: Generates an image from a DOM node using HTML5 canvas](<https://github.com/tsayen/dom-to-image>)
|
||||
|
||||
## Why I want to Read the Source Code of This Project?
|
||||
|
||||
I use this lib to generate the image of mgclub post content. And When I use it, I found that it will throw out error because of [CORS](<https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS>).
|
||||
Finally, I convert the images to base64 in the server side to solve the problem.
|
||||
But I wonder how the lib realize the function and how can I solve the CORS in other way.
|
||||
So I start reading the source code of the project.
|
||||
|
||||
## RoadMap
|
||||
|
||||
## README
|
||||
|
||||
the `README.md` is a good choice to start.
|
||||
it tells me
|
||||
|
||||
1. what dom-to-image it is and what can it do
|
||||
2. install
|
||||
3. the way to use it (pass in Dom node and render options)
|
||||
4. how it works (svg foreignObject)
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```plain text
|
||||
├── Gruntfile.js // dev and build config
|
||||
├── LICENSE // open source litcence
|
||||
├── README.md
|
||||
├── bower.json // bower config
|
||||
├── bower_components // for bower enable
|
||||
├── dist // output
|
||||
├── karma.conf.js // test
|
||||
├── node_modules
|
||||
├── package.json
|
||||
├── spec // test
|
||||
├── src // *the main file
|
||||
└── test-lib
|
||||
```
|
||||
|
||||
So we should read the `src/dom-to-image.js` mainly.
|
||||
|
||||
[dom-to-image源代码解析](/notes/source-code-analysis-of-dom-to-image)
|
@ -2,21 +2,16 @@
|
||||
title: __dirname is not defined in ES module scope
|
||||
date: 2024-05-29T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
tags:
|
||||
- nodejs
|
||||
- 前端
|
||||
- esm
|
||||
- module
|
||||
finished: true
|
||||
published: true
|
||||
category: 前端
|
||||
slug: dirname-is-not-defined-in-es-module-scope
|
||||
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的写法。
|
||||
|
187
src/content/note/agent-protocol代码阅读.md
Normal file
187
src/content/note/agent-protocol代码阅读.md
Normal file
@ -0,0 +1,187 @@
|
||||
---
|
||||
title: agent-protocol代码阅读
|
||||
date: 2023-12-23T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- JavaScript
|
||||
- TypeScript
|
||||
- Agent Protocol
|
||||
- agent
|
||||
toAstro: true
|
||||
slug: agent-protocol-code-study
|
||||
description: >-
|
||||
本文详细介绍了一个名为Agent Protocol的JavaScript & TypeScript
|
||||
SDK,该库旨在统一agent的规范,使不同agent之间的通信更为便捷。文章首先提供了库的文档和源代码地址,并解释了其主要功能和结构。接着,详细描述了库的入口点、目录结构以及如何使用tsup进行打包。此外,还深入探讨了库中包含的各种方法,如创建任务、列出任务ID、获取任务详情等,并解释了这些方法的内部逻辑和使用方式。最后,文章通过一个示例展示了如何使用Agent
|
||||
Protocol启动服务,并详细解释了启动过程中的每一步。
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:11.000Z
|
||||
---
|
||||
|
||||
# Agent-protocol
|
||||
|
||||
下面我们先来看一下这个库的代码
|
||||
文档地址:
|
||||
|
||||
[JavaScript & TypeScript Agent Protocol SDK - Agent Protocol](<https://agentprotocol.ai/sdks/js>)
|
||||
源代码地址:
|
||||
|
||||
[js](<https://github.com/AI-Engineer-Foundation/agent-protocol/tree/main/packages/sdk/js>)
|
||||
|
||||
这个库的作用是什么?
|
||||
|
||||
统一 agent 的规范,让不同的 agent 之间通信更加容易。
|
||||
|
||||
## 入口和目录结构
|
||||
|
||||
这个库使用的是 tsup 来打包。
|
||||
|
||||
```js
|
||||
import { defineConfig } from "tsup"
|
||||
|
||||
export default defineConfig({
|
||||
entry: ["src/index.ts"],
|
||||
target: "node16",
|
||||
platform: "node",
|
||||
format: "cjs",
|
||||
minify: true,
|
||||
sourcemap: true,
|
||||
dts: true,
|
||||
loader: {
|
||||
".yml": "text",
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
在自定义 Loader 的时候有这样一行代码:
|
||||
|
||||
```javascript
|
||||
loader: {
|
||||
'.yml': 'text',
|
||||
}
|
||||
```
|
||||
|
||||
表示了 Tsup 的加载器配置。这个配置指定了当 Tsup 打包你的应用时,如何处理特定文件类型(在这种情况下是.yml 文件)。
|
||||
|
||||
具体来说,这个配置告诉 Tsup 在处理.yml 文件时使用 text loader。也就是说遇到 yml 文件的时候,直接把它作为纯文本文件加载到你的应用中,不进行特殊的编译或转换。
|
||||
|
||||
然后整个项目的结构如下:
|
||||
|
||||

|
||||
其中 model 和 yml.d.ts 是用来定义类型的。
|
||||
|
||||
然后这个库的入口为 index.ts(从 tsup 的配置中也能看出来), 因此只导入了 agent 和 model 模块,因此可以看出 api 是只在 agent 里面用的。
|
||||
|
||||
所以层级是:
|
||||
|
||||
index.ts --> agent.ts --> api.ts
|
||||
|
||||
最后导出的内容为:
|
||||
|
||||
```typescript
|
||||
export {
|
||||
type TaskInput,
|
||||
type Artifact,
|
||||
type StepInput,
|
||||
type StepOutput,
|
||||
type Step,
|
||||
type StepRequestBody,
|
||||
type Task,
|
||||
type TaskRequestBody,
|
||||
type StepHandler,
|
||||
type TaskHandler,
|
||||
StepResultWithDefaults as StepResult,
|
||||
createAgentTask,
|
||||
listAgentTaskIDs,
|
||||
getAgentTask,
|
||||
listAgentTaskSteps,
|
||||
executeAgentTaskStep,
|
||||
getAgentTaskStep,
|
||||
}
|
||||
|
||||
export { v4 } from "uuid"
|
||||
|
||||
export default Agent
|
||||
```
|
||||
|
||||
## 具体的方法
|
||||
|
||||
对于 Type 我们可以先不看,直接看后面的方法
|
||||
|
||||
### 对于 StepResultWithDefaults
|
||||
|
||||
这里是对于 StepResul 的一个初始化
|
||||
|
||||
### 对于 createAgentTask
|
||||
|
||||
这个方法的作用是:Creates a task for the agent. 为代理创建任务。
|
||||
|
||||
输入是任务的信息 输出是全局的任务列表
|
||||
内部的逻辑是:
|
||||
|
||||
跑一遍 taskHandler(从 Agent 外部传进来的)
|
||||
|
||||
然后获取到 stepHandler
|
||||
最后把任务的信息和 stepHandler 添加到全局的任务列表的最后
|
||||
|
||||
### 对于 listAgentTaskIDs
|
||||
|
||||
Lists all tasks that have been created for the agent.
|
||||
列出为代理创建的所有任务。
|
||||
|
||||
这里的逻辑很简单,就是去遍历全局的 tasks 把它的用 uuid 创建的 task_id 给取出来放到一个数组里
|
||||
|
||||
### 对于 getAgentTask
|
||||
|
||||
Get details about a specified agent task.
|
||||
获取指定代理任务的详细信息。
|
||||
|
||||
传入 task_id,获取 task item 的信息(也就是 task 和 stephandler 的信息)
|
||||
|
||||
### 对于 listAgentTaskSteps
|
||||
|
||||
Lists all steps for the specified task.
|
||||
列出指定任务的所有步骤。
|
||||
|
||||
根据 task_id 来查询这个 task 的所有的步骤 id
|
||||
|
||||
### 对于 executeAgentTaskStep
|
||||
|
||||
Execute a step in the specified agent task.
|
||||
执行指定代理任务中的一个步骤。
|
||||
|
||||
传入 taskId
|
||||
获取到对应的所有的任务
|
||||
执行 stephandler,获取到结果
|
||||
然后创建一个 step,把任务的 id ,step 执行结果给存进去
|
||||
最后把这个 step 给添加到一个全局的 step_list 的最后
|
||||
|
||||
### 对于 getAgentTaskStep
|
||||
|
||||
Get details about a specified task step.
|
||||
输入 task 和 step 的 id,查询这个 step 具体的信息
|
||||
|
||||
### 然后是最后的 Agent
|
||||
|
||||
它有一个静态的方法 taskHandler
|
||||
|
||||
和对外提供服务的接口化的方法 start()
|
||||
它把上述所有的方法都用 express 给构建成了服务
|
||||
|
||||
## 如何使用?
|
||||
|
||||
[minimal.ts](<https://github.com/AI-Engineer-Foundation/agent-protocol/blob/main/packages/sdk/js/examples/minimal.ts>)
|
||||
`Agent.handleTask(taskHandler).start()`
|
||||
|
||||
使用 Agent.handleTask(taskHandler).start() 来启动服务,过程中发生了什么
|
||||
|
||||
`Agent.handleTask(taskHandler).start()` 这一行代码的目的是通过调用 `Agent` 类的静态方法 `handleTask` 来创建一个 `Agent` 实例,然后立即调用该实例的 `start` 方法来启动服务。让我解释这个过程中发生的事情:
|
||||
|
||||
1. `Agent.handleTask(taskHandler)`:首先,`Agent.handleTask` 是一个静态方法,它接受两个参数,第一个参数是 `taskHandler`(任务处理程序),第二个参数是一个部分代理配置。这个方法的目的是创建一个新的 `Agent` 实例,并将 `taskHandler` 和代理配置传递给该实例的构造函数。实际上,这一步返回了一个 `Agent` 实例。
|
||||
2. `.start()`: 一旦 `Agent.handleTask(taskHandler)` 返回一个 `Agent` 实例,紧接着调用了 `start()` 方法。这个方法用于启动代理服务。
|
||||
|
||||
- 在内部调用 `createApi(config)`,是用于创建代理的 API。
|
||||
|
||||
总结起来,`Agent.handleTask(taskHandler).start()` 这一行代码的作用是:
|
||||
|
||||
1. 创建一个代理实例,该实例具有指定的任务处理程序和配置信息。
|
||||
2. 启动代理服务,并根据提供的或默认的端口号监听客户端请求。
|
21
src/content/note/agent合集.md
Normal file
21
src/content/note/agent合集.md
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
slug: agent-collection
|
||||
toAstro: true
|
||||
description: >2-
|
||||
探索ICLR 2024年基于大型语言模型(LLM)的智能代理论文合集,该合集收录了最新的研究成果,为研究者和开发者提供了丰富的资源和灵感。
|
||||
slug: iclr-2024-llm-based-agent-论文合集 tags: ICLR 2024, LLM-based Agent, 论文合集,
|
||||
人工智能研究 description: 本合集汇集了ICLR
|
||||
2024年关于基于大型语言模型的智能代理的最新研究论文,为人工智能领域的研究者和开发者提供了一个宝贵的资源库。
|
||||
tags:
|
||||
- Agent
|
||||
- ICLR 2024
|
||||
- LLM
|
||||
- 机器人
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:11.000Z
|
||||
title: agent合集
|
||||
---
|
||||
|
||||
# Agent 合集
|
||||
|
||||
[ICLR 2024 LLM-based Agent论文合集](<https://www.aminer.cn/topic/65409b681512231370cbf681>)
|
70
src/content/note/ant design pro i18n-remove报错.md
Normal file
70
src/content/note/ant design pro i18n-remove报错.md
Normal file
@ -0,0 +1,70 @@
|
||||
---
|
||||
title: ant design pro i18n-remove报错
|
||||
date: 2024-02-13T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- antd
|
||||
- eslint
|
||||
- bugFix
|
||||
toAstro: true
|
||||
slug: ant-design-pro-i18n-remove
|
||||
link: >-
|
||||
https://kazoottt.notion.site/ant-design-pro-i18n-remove-6e2a745902ca4600ae306437f0cd1a9f
|
||||
notionID: 6e2a7459-02ca-4600-ae30-6437f0cd1a9f
|
||||
description: >-
|
||||
在执行ant design
|
||||
pro的i18n-remove任务时,遇到了一个报错,错误信息显示环境键“es2022”未知。解决方法是注释掉.eslintrc.js文件中的extends部分。此问题在GitHub的ant-design/ant-design-pro仓库的Issue#10620中有详细讨论。
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:15.000Z
|
||||
category: 前端
|
||||
---
|
||||
|
||||
# Ant Design pro i18n-remove 报错
|
||||
|
||||
报错日志:
|
||||
|
||||
```
|
||||
* 正在执行任务: pnpm run i18n-remove
|
||||
|
||||
> ant-design-pro@6.0.0 i18n-remove /Users/kazoottt/GitHub/KazooTTT/toolkit
|
||||
|
||||
> pro i18n-remove --locale=zh-CN --write
|
||||
|
||||
✔ 📦 load all locale file and build ts
|
||||
|
||||
✔ ✂️ format routes
|
||||
|
||||
⠋ ✂️ remove locale for src/components/Footer/index.tsx./Users/kazoottt/GitHub/KazooTTT/toolkit/node_modules/.pnpm/@eslint+eslintrc@0.4.3/node_modules/@eslint/eslintrc/lib/shared/config-validator.js:175
|
||||
|
||||
throw new Error(message);
|
||||
|
||||
^
|
||||
|
||||
Error: .eslintrc.js » /Users/kazoottt/GitHub/KazooTTT/toolkit/node_modules/.pnpm/@umijs+lint@4.0.52_eslint@8.34.0_jest@29.4.3_styled-components@6.1.8_stylelint@14.8.2_typescript@4.9.5/node_modules/@umijs/lint/dist/config/eslint/index.js:
|
||||
|
||||
Environment key "es2022" is unknown
|
||||
|
||||
|
||||
```
|
||||
|
||||
也就是
|
||||
|
||||
> Environment key "es2022" is unknown
|
||||
|
||||
这里报错了
|
||||
|
||||
解决方法:注释掉 extends 这里
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
// extends: [require.resolve('@umijs/lint/dist/config/eslint')],
|
||||
globals: {
|
||||
page: true,
|
||||
REACT_APP_ENV: true,
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
## 参考
|
||||
|
||||
[yarn run i18n-remove报错🐛 \[BUG\] · Issue #10620 · ant-design/ant-design-pro · GitHub](<https://github.com/ant-design/ant-design-pro/issues/10620>)
|
25
src/content/note/antd switch组件错误使用案例.md
Normal file
25
src/content/note/antd switch组件错误使用案例.md
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
title: antd switch组件错误使用案例
|
||||
date: 2024-10-12T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- bug
|
||||
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
|
||||
toAstro: true
|
||||
date_created: 2025-01-04T03:44:53.000Z
|
||||
date_modified: 2025-02-19T03:44:15.000Z
|
||||
---
|
||||
|
||||
# antd switch 组件错误使用案例
|
||||
|
||||
在使用 antd 的 [switch](<https://ant-design.antgroup.com/components/switch-cn>) 的时候,我错误地使用了 api
|
||||
|
||||
``` tsx
|
||||
<Switch checked={mode === 1} onChange={handleModeChange} />
|
||||
```
|
||||
|
||||
这里的 onChange 是 cheked 变化的时候触发的回调,如果想要切换 Switch 的时候触发回调,应该使用 onClick,而不是 onChange。
|
||||
|
||||

|
22
src/content/note/arm64和x64与苹果芯片的关系备忘.md
Normal file
22
src/content/note/arm64和x64与苹果芯片的关系备忘.md
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
title: arm64和x64与苹果芯片的关系备忘
|
||||
date: 2023-10-16T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 备忘
|
||||
link: 'https://kazoottt.notion.site/arm64-x64-b527f80503f241d3a0f20503eb8a9c0c'
|
||||
notionID: b527f805-03f2-41d3-a0f2-0503eb8a9c0c
|
||||
slug: memo-on-arm64-and-x64-in-relation-to-apple-chips
|
||||
description: >-
|
||||
本文旨在帮助读者理解并记忆arm64(aarch64)与x86_64架构的区别及其与苹果芯片和Intel芯片的关系。通过简明的记录,指导读者在选择硬件时如何根据芯片类型做出正确的决策。
|
||||
toAstro: true
|
||||
date_created: 2024-12-02T03:03:24.000Z
|
||||
date_modified: 2025-02-07T03:17:02.000Z
|
||||
---
|
||||
|
||||
# Arm64 和 X64 与苹果芯片的关系备忘
|
||||
|
||||
一直记不住应该如何选择,在这里记录备忘一下
|
||||
|
||||
aarch64 or arm64 - 苹果芯片
|
||||
x86_64 - Intel 芯片
|
@ -2,19 +2,15 @@
|
||||
title: askfm的关停
|
||||
date: 2025-02-05T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
tags:
|
||||
- askfm
|
||||
- 爬虫
|
||||
finished: false
|
||||
published: false
|
||||
category: 软件
|
||||
slug: askfm-shutdown
|
||||
description: null
|
||||
toAstro: true
|
||||
date_created: 2025-02-04T16:48:47.000Z
|
||||
date_modified: 2025-02-19T03:44:14.000Z
|
||||
date_modified: 2025-02-19T17:22:51.000Z
|
||||
---
|
||||
|
||||
今天翻了一下 todo list, 发现其中有一个是:写 askfm 爬虫
|
||||
|
45
src/content/note/astro启动报错address not available.md
Normal file
45
src/content/note/astro启动报错address not available.md
Normal file
@ -0,0 +1,45 @@
|
||||
---
|
||||
title: astro启动报错address not available
|
||||
date: 2024-03-03T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- astro
|
||||
- ipv6
|
||||
- node
|
||||
toAstro: true
|
||||
slug: astroaddress-not-available
|
||||
description: >-
|
||||
To resolve the issue with the Astro configuration, modify the
|
||||
`astro.config.mjs` file by setting the `server.host` to `0.0.0.0`. This change
|
||||
allows the server to accept connections from any IP address, enhancing
|
||||
accessibility and functionality of the application. The updated configuration
|
||||
includes integrations for MDX, sitemap, and Tailwind, ensuring a robust and
|
||||
optimized web development setup.
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-07T03:25:34.000Z
|
||||
category: 前端
|
||||
---
|
||||
|
||||
# Astro 启动报错 address not Available
|
||||
|
||||

|
||||
|
||||
解决方法:
|
||||
|
||||
在 `astro.config.mjs` 修改 server.host 为 `0.0.0.0`
|
||||
|
||||
```js
|
||||
import { defineConfig } from "astro/config"
|
||||
import mdx from "@astrojs/mdx"
|
||||
import sitemap from "@astrojs/sitemap"
|
||||
import tailwind from "@astrojs/tailwind"
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: "https://astrofy-template.netlify.app",
|
||||
integrations: [mdx(), sitemap(), tailwind()],
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
},
|
||||
})
|
||||
```
|
22
src/content/note/bento专题.md
Normal file
22
src/content/note/bento专题.md
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
slug: bento-topics
|
||||
toAstro: true
|
||||
description: >-
|
||||
Bento专题介绍了两种不同的网页设计工具:Bento风格的起始页和Packery无缝可拖动的网格布局。Bento风格的起始页提供了一个简洁的GitHub项目链接,而Packery则是一个用于创建无缝且可拖动网格布局的工具。这些资源为网页设计师提供了创新的设计思路和实用的布局工具。
|
||||
tags:
|
||||
- bento布局
|
||||
- packery网格布局
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:11.000Z
|
||||
title: bento专题
|
||||
---
|
||||
|
||||
# Bento 专题
|
||||
|
||||
## Bento 风格的起始页
|
||||
|
||||
<https://github.com/migueravila/Bento>
|
||||
|
||||
## packery: 无缝、可拖动的网格布局
|
||||
|
||||
<https://github.com/metafizzy/packery>
|
30
src/content/note/bilibili-rec-auto-ffmpeg.md
Normal file
30
src/content/note/bilibili-rec-auto-ffmpeg.md
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
slug: bilibili-rec-auto-ffmpeg
|
||||
toAstro: true
|
||||
description: >-
|
||||
bilibili-rec-auto-ffmpeg是一个自动化工具,用于处理B站录播机的录播内容,包括弹幕的转化和压制。该工具使用ffmpeg进行视频格式转换和弹幕处理,支持将xml格式的弹幕转换为ass格式,并将flv视频转换为mp4格式。此外,还提供弹幕与视频的压制功能,以及danmakufactory的webui界面,方便用户进行操作和管理。
|
||||
tags:
|
||||
- bilibili
|
||||
- ffmpeg
|
||||
- 录播处理
|
||||
- 弹幕转化
|
||||
- 视频压制
|
||||
- danmakufactory
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:11.000Z
|
||||
title: bilibili-rec-auto-ffmpeg
|
||||
---
|
||||
|
||||
# Bilibili-rec-auto-ffmpeg
|
||||
|
||||
自动使用 ffmpeg 处理 b 站录播机的录播,弹幕转化,以及弹幕压制到录播内。
|
||||
|
||||
## TODO
|
||||
|
||||
- [ ] xml 转 ass (使用 danmakufactory)
|
||||
- [ ] flv 转 mp4
|
||||
- [ ] ass 弹幕 + 视频压制
|
||||
|
||||
danmakufactory webui
|
||||
|
||||
## 开发
|
19
src/content/note/blender学习资源.md
Normal file
19
src/content/note/blender学习资源.md
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
slug: blender-learning-resources
|
||||
toAstro: true
|
||||
description: 本资源提供了两个学习Blender的途径:羊羊羊的教室和暗房。羊羊羊的教室展示了Blender的截图,而暗房则未详细说明其内容。
|
||||
tags:
|
||||
- blender学习资源
|
||||
- 羊羊教室
|
||||
- Blender screenshot
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:11.000Z
|
||||
title: blender学习资源
|
||||
---
|
||||
|
||||
# Blender 学习资源
|
||||
|
||||
1. 羊羊羊的教室
|
||||

|
||||
|
||||
2. 暗房
|
25
src/content/note/bossdesign.cn.md
Normal file
25
src/content/note/bossdesign.cn.md
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
title: bossdesign.cn
|
||||
date: 2023-09-24T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 网站推荐
|
||||
- 设计
|
||||
- gradient
|
||||
- svg背景图
|
||||
- 项目推荐
|
||||
toAstro: true
|
||||
slug: bossdesigncn
|
||||
description: >-
|
||||
在寻找gradient和svg背景图时,bossdesign.cn网站提供了许多优秀的推荐。如果有相关需求,可以直接访问该网站获取推荐资源。网址为:<https://www.bossdesign.cn/>。
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:22.000Z
|
||||
---
|
||||
|
||||
# bossdesign.cn
|
||||
|
||||
昨天搜 gradient 和 svg 背景图的时候,都在这个网站上找打了很棒的推荐。所以如果有相关的需求的话,可以直接检索这个网站的推荐。
|
||||
|
||||
<https://www.bossdesign.cn/>
|
||||
|
||||

|
44
src/content/note/b站首页的背景图跟随鼠标移动是如何实现的?.md
Normal file
44
src/content/note/b站首页的背景图跟随鼠标移动是如何实现的?.md
Normal file
@ -0,0 +1,44 @@
|
||||
---
|
||||
slug: >-
|
||||
how-is-the-background-image-on-the-home-page-of-b-site-realized-to-follow-the-mouse-movement
|
||||
toAstro: true
|
||||
description: >-
|
||||
B站首页的背景图跟随鼠标移动的效果,是通过JavaScript结合HTML5的canvas元素实现的。具体步骤包括创建canvas元素、监听鼠标移动事件以获取位置坐标、根据鼠标位置计算图像绘制参数、使用canvas的绘图API更新图像帧,并通过requestAnimationFrame实现动画循环。这种技术不仅限于canvas,也可以使用CSS3动画或Web
|
||||
Animation API来实现类似效果,具体方法需根据项目需求和技术框架来选择。
|
||||
tags:
|
||||
- b 站首页背景图、javascript、canvas、鼠标事件
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:11.000Z
|
||||
title: b站首页的背景图跟随鼠标移动是如何实现的?
|
||||
---
|
||||
|
||||
# b 站首页的背景图跟随鼠标移动是如何实现的?
|
||||
|
||||
其实 b 站首页的背景图会跟着季节或者某些特殊的节日变化,里面也会有一些小细节。
|
||||
|
||||
今天看的时候突然发现鼠标悬浮上去,然后左右移动的时候,这个背景图片会跟随鼠标移动。如下图所示:
|
||||
|
||||

|
||||
|
||||
那么这样的效果是如何实现的呢?我们就来探究一下。
|
||||
|
||||
打开 F12,把无关的元素给删掉,只留下这个 banner 相关的 div,显示的效果如下:
|
||||
|
||||

|
||||
dom 树中结构如下:
|
||||
|
||||

|
||||
|
||||
来自 claude:
|
||||
|
||||
这种画面随着鼠标移动的效果可以通过 JavaScript 来实现。常见的方式是使用 HTML5 canvas 元素结合鼠标事件监听来绘制和更新动画效果。
|
||||
|
||||
基本步骤如下:
|
||||
|
||||
1. 创建一个 canvas 元素并获取它的 2D 渲染上下文。
|
||||
2. 使用 JavaScript 监听鼠标移动事件,获取鼠标位置坐标。
|
||||
3. 在鼠标事件处理函数中,根据鼠标位置坐标计算出需要绘制图像的位置和角度等参数。
|
||||
4. 使用 canvas 的绘图 API 在每一帧中清空上一帧,并根据计算出的参数重新绘制新的一帧图像。
|
||||
5. 使用 requestAnimationFrame 或 setTimeout 等方式实现动画帧的循环更新。
|
||||
|
||||
除了基于 canvas 的方式外,也可以使用 CSS3 动画或 Web Animation API 等方式来实现类似的动画效果,但原理都是根据鼠标位置不断更新和重绘图像帧。具体实现方式需要结合使用的技术框架和项目需求来设计。
|
51
src/content/note/codegen学习.md
Normal file
51
src/content/note/codegen学习.md
Normal file
@ -0,0 +1,51 @@
|
||||
---
|
||||
title: codegen学习
|
||||
date: 2024-03-22T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags: []
|
||||
finished: false
|
||||
toAstro: true
|
||||
slug: codegen-learning
|
||||
description: >-
|
||||
AutoGen项目是一个编程框架,用于构建智能代理AI。它包括后端和前端两部分,后端使用Python实现,依赖于`pyproject.toml`文件,而前端与后端通过RESTful服务进行通信。项目提供了详细的安装指南和启动命令,使得开发者可以轻松地开始使用。此外,AutoGen还提供了示例代码和社区支持,方便用户学习和交流。
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:11.000Z
|
||||
---
|
||||
|
||||
# Codegen 学习
|
||||
|
||||
官网地址 [AutoGen | AutoGen](<https://microsoft.github.io/autogen/>)
|
||||
|
||||
代码地址 [GitHub - microsoft/autogen: A programming framework for agentic AI. Join our Discord: https://discord.gg/pAbnFJrkgZ](<https://github.com/microsoft/autogen>)
|
||||
|
||||
## 从 samples 开始
|
||||
|
||||

|
||||
|
||||
目前有三个 app,直接看第二个 autogen-studio
|
||||
|
||||
项目分为两个部分,一个是后端(autogen + restful 服务)一个是前端,前端与后端是通过 restful 来通信的。
|
||||
|
||||
## 后端
|
||||
|
||||
后端使用 python 实现,依赖文件在 `pyproject.toml`
|
||||
|
||||
如何安装依赖?
|
||||
|
||||
创建虚拟环境并 activate,然后输入一下命令,就会安装对应的依赖。
|
||||
|
||||
```shell
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
启动命令:
|
||||
|
||||
```shell
|
||||
autogenstudio ui --port 8081
|
||||
```
|
||||
|
||||
## 后端 Autogen
|
||||
|
||||
## 后端 Restful 服务
|
||||
|
||||
## 前端
|
32
src/content/note/codeimage.dev 代码美化工具.md
Normal file
32
src/content/note/codeimage.dev 代码美化工具.md
Normal file
@ -0,0 +1,32 @@
|
||||
---
|
||||
title: codeimage.dev 代码美化工具
|
||||
date: 2023-09-19T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- solidjs
|
||||
- 开源项目
|
||||
- 项目推荐
|
||||
- 代码美化
|
||||
toAstro: true
|
||||
slug: codeimagedev-code-beautification-tool
|
||||
description: >-
|
||||
代码美化工具codeimage.dev,专为美化代码屏幕截图设计。用户可以直接复制粘贴代码,选择预设模板或自定义样式,然后导出美化后的截图。登录后还可保存个人预设。该工具基于SolidJS和Fastify构建,不仅实用,也是学习SolidJS的好资源。
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:22.000Z
|
||||
---
|
||||
|
||||
# codeimage.dev 代码美化工具
|
||||
|
||||
<https://app.codeimage.dev/>
|
||||
|
||||
<https://github.com/riccardoperra/codeimage>
|
||||
|
||||
A tool to beautify your code screenshots. Built with SolidJS and Fastify.
|
||||
|
||||
美化代码屏幕截图的工具。使用 SolidJS 和 Fastify 构建。
|
||||
|
||||
直接把代码复制粘贴进去,然后挑选预设模板,或自己调整样式,最后导出既可。如果登录之后,也可以保存预设。
|
||||
|
||||
无论是实用性还是从 solidjs 学习层面都挺有用的。
|
||||
|
||||

|
51
src/content/note/convert list like into list.md
Normal file
51
src/content/note/convert list like into list.md
Normal file
@ -0,0 +1,51 @@
|
||||
---
|
||||
title: convert list like into list
|
||||
date: 2024-06-03T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags: []
|
||||
toAstro: true
|
||||
slug: convert-list-like-into-list
|
||||
description: 如何使用 NodeList 转换为 Array 进行 map 操作
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:22.000Z
|
||||
---
|
||||
|
||||
# Convert List like into List
|
||||
|
||||
```js
|
||||
document.querySelectorAll(".dir-item").map((item) => item.innerText)
|
||||
```
|
||||
|
||||
The error `document.querySelectorAll(...).map is not a function` occurs because `querySelectorAll` returns a `NodeList`, which is not an Array and does not have the `map` method. To solve this, you can convert the `NodeList` to an Array using one of the following methods:
|
||||
|
||||
1. **Spread Operator**
|
||||
|
||||
```javascript
|
||||
const items = [...document.querySelectorAll(".dir-item")]
|
||||
const itemTexts = items.map((item) => item.innerText)
|
||||
```
|
||||
|
||||
1. **Array.from()**
|
||||
|
||||
```javascript
|
||||
const items = Array.from(document.querySelectorAll(".dir-item"))
|
||||
const itemTexts = items.map((item) => item.innerText)
|
||||
```
|
||||
|
||||
1. **Array.prototype.slice.call()**
|
||||
|
||||
```javascript
|
||||
const items = Array.prototype.slice.call(document.querySelectorAll(".dir-item"))
|
||||
const itemTexts = items.map((item) => item.innerText)
|
||||
```
|
||||
|
||||
After converting the `NodeList` to an Array, you can then use the `map` method to get the `innerText` of each element.
|
||||
|
||||
Here's an example using the spread operator:
|
||||
|
||||
```javascript
|
||||
const itemTexts = [...document.querySelectorAll(".dir-item")].map((item) => item.innerText)
|
||||
console.log(itemTexts)
|
||||
```
|
||||
|
||||
This will give you an array of the text content of each element with the class `dir-item`.
|
47
src/content/note/cra系列比较.md
Normal file
47
src/content/note/cra系列比较.md
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
title: cra系列比较
|
||||
date: 2024-03-27T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- react
|
||||
- create-reaat-app
|
||||
- 脚手架
|
||||
toAstro: true
|
||||
slug: cra-series-comparison
|
||||
description: >-
|
||||
craco是目前仍在更新的Create React
|
||||
App配置覆盖工具,相比其他已多年未更新的类似项目,如react-app-rewired和customize-cra,craco是一个更好的选择。尽管React官网已不再推荐使用Create
|
||||
React App,但对于需要使用该系列工具的用户,craco提供了更新的支持和更易理解的配置层。
|
||||
NotionID-notionnext: 62b39e52-62d0-4cae-b17b-9c280dd513a7
|
||||
link-notionnext: 'https://kazoottt.notion.site/cra-62b39e5262d04caeb17b9c280dd513a7'
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:10.000Z
|
||||
---
|
||||
|
||||
# Cra 系列比较
|
||||
|
||||
省流版:craco 目前还算在更新,其他的已经几年未更新了。虽然 react 官网已经不推荐 cra 了,但如果非要用这个系列还是推荐 craco 吧。
|
||||
|
||||
## [GitHub - dilanx/craco: Create React App Configuration Override, an easy and comprehensible configuration layer for Create React App.](<https://github.com/dilanx/craco>)
|
||||
|
||||
3 个月前
|
||||
|
||||

|
||||
|
||||
## [GitHub - facebook/create-react-app: Set up a modern web app by running one command.](<https://github.com/facebook/create-react-app>)
|
||||
|
||||
9 个月前
|
||||
|
||||

|
||||
|
||||
## [GitHub - timarney/react-app-rewired: Override create-react-app webpack configs without ejecting](<https://github.com/timarney/react-app-rewired>)
|
||||
|
||||
2 年前
|
||||
|
||||

|
||||
|
||||
## [GitHub - arackaf/customize-cra: Override webpack configurations for create-react-app 2.0](<https://github.com/arackaf/customize-cra>)
|
||||
|
||||
4 年前
|
||||
|
||||

|
180
src/content/note/dom-to-image源代码解析.md
Normal file
180
src/content/note/dom-to-image源代码解析.md
Normal file
@ -0,0 +1,180 @@
|
||||
---
|
||||
slug: source-code-analysis-of-dom-to-image
|
||||
toAstro: true
|
||||
description: >-
|
||||
本文详细解析了GitHub上的开源项目dom-to-image的源代码,该项目能够通过HTML5
|
||||
canvas从DOM节点生成图像。作者通过阅读和注释源代码,分享了其工作流程,包括递归克隆DOM节点、计算并复制样式、嵌入Web字体和图像、序列化节点为XML等步骤。此外,作者还讨论了使用该库开发截图应用的背景和动机,以及如何将帖子内容转换为图片以解决论坛分享问题。文章最后提供了toSvg函数的代码实现和分析,展示了如何将DOM节点转换为SVG数据URL。
|
||||
tags: []
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:10.000Z
|
||||
title: dom-to-image源代码解析
|
||||
---
|
||||
|
||||
# Dom-to-image 源代码解析
|
||||
|
||||
仓库地址 [GitHub - tsayen/dom-to-image: Generates an image from a DOM node using HTML5 canvas](<https://github.com/tsayen/dom-to-image>)
|
||||
|
||||
我写了注释的地址:[om-to-image](<https://github.com/KazooTTT/dom-to-image/tree/code-reading>)
|
||||
|
||||
分支是:code-reading 这个分支。
|
||||
|
||||
## 背景
|
||||
|
||||
开一个 thread 来记录阅读 dom-to-image 源代码的收获和感受。
|
||||
|
||||
是怎么发现这个库的?起因是想要快速制作封面于是找到了 [https://coverview.vercel.app](<https://t.co/7Zzs7Av0kp>) 这个网站,习惯性地 fork 了代码然后进行学习参考,发现这个网站的使用了 [dom-to-image](<https://t.co/X434ulYzzh>) 这个库。
|
||||
|
||||
为什么要阅读这个库的代码?因为我所使用的一个论坛没有提供分享内容为图片的功能,并且是小众应用,所以发送帖子链接到 qq 的时候,会被腾讯屏蔽无法直接打开,体验非常不好。所以我想开发一个分享帖子内容的功能。
|
||||
|
||||
而这个功能前期我有两种思路,第一种是使用 pptr 截图,第二种是把帖子内容渲染出来生成图片(联想到了之前 coverview 的思路,也就是使用 dom-to-image 了)。最后放弃 pptr 的原因是 vercel 的请求超过 10 秒则超时,而 pptr 的启动 +api 调用往往超过了这个时间,更别说服务之间的时间了。
|
||||
|
||||
不过市面上的截图 api 已经很成熟了,例如 [https://screenshotone.com](<https://t.co/OC77w4GJRX>) 可以直接调用,最近大热的 [https://screenshottocode.com](<https://t.co/7LYVHIGjmR>) 也是使用的上述 api 进行截图,而 cali 老师的博客使用的是 [https://urlbox.io](<https://t.co/1kV1dVmLQ8>) 这个 api。其他的就不一一列举了。
|
||||
|
||||
回到正题,于是我开始使用 dom-to-image 开始开发我的自己的截图应用。我能够直接根据帖子的链接,拿到对应的 post 的 content,content 由富文本编辑器编辑,因此保存的内容直接是 html,我只需要手动新增一下和社区类似的样式就可以渲染出差不多的帖子界面,然后调用 dom-to-image 截图。
|
||||
|
||||
## 开始
|
||||
|
||||
我们从 readme 入手,其实作者已经非常清晰地讲解了这个库的工作流程。
|
||||
|
||||
[GitHub - tsayen/dom-to-image: Generates an image from a DOM node using HTML5 canvas](<https://github.com/tsayen/dom-to-image?tab=readme-ov-file#how-it-works>)
|
||||
|
||||
以下为内容引用以及翻译
|
||||
|
||||
1. Clone the original DOM node recursively
|
||||
递归克隆原始 DOM 节点
|
||||
2. Compute the style for the node and each sub-node and copy it to corresponding clone
|
||||
计算节点和每个子节点的样式,并将其复制到相应的克隆
|
||||
|
||||
- and don't forget to recreate pseudo-elements, as they are not cloned in any way, of course
|
||||
并且不要忘记重新创建伪元素,因为它们当然不会以任何方式克隆
|
||||
|
||||
3. Embed web fonts 嵌入 Web 字体
|
||||
|
||||
- find all the `@font-face` declarations that might represent web fonts
|
||||
查找可能表示 Web 字体的所有 `@font-face` 声明
|
||||
- parse file URLs, download corresponding files
|
||||
解析文件 URL,下载相应文件
|
||||
- base64-encode and inline content as `data:` URLs
|
||||
base64 编码和内联内容作为 `data:` URL
|
||||
- concatenate all the processed CSS rules and put them into one `<style>` element, then attach it to the clone
|
||||
将所有处理过的 CSS 规则连接起来并将它们放入一个 `<style>` 元素中,然后将其附加到克隆中
|
||||
|
||||
4. Embed images 嵌入图像
|
||||
|
||||
- embed image URLs in `<img>` elements
|
||||
在元素中 `<img>` 嵌入图像 URL
|
||||
- inline images used in `background` CSS property, in a fashion similar to fonts
|
||||
CSS 属性中使用的 `background` 内联图像,其方式类似于字体
|
||||
|
||||
5. Serialize the cloned node to XML
|
||||
将克隆的节点序列化为 XML
|
||||
6. Wrap XML into the `<foreignObject>` tag, then into the SVG, then make it a data URL
|
||||
将 XML 包装到标记中 `<foreignObject>` ,然后包装到 SVG 中,然后使其成为数据 URL
|
||||
7. Optionally, to get PNG content or raw pixel data as a Uint8Array, create an Image element with the SVG as a source, and render it on an off-screen canvas, that you have also created, then read the content from the canvas
|
||||
(可选)若要将 PNG 内容或原始像素数据作为 Uint8Array 获取,请创建一个以 SVG 为源的 Image 元素,并将其呈现在你也创建的屏幕外画布上,然后从画布中读取内容
|
||||
8. Done! 完成!
|
||||
|
||||
## 从 toSvg 开始
|
||||
|
||||
从 `dom-to-image.js` 的 18 行代码开始,从这里的代码中可以看出来,所有的图形转化的基础方法都是 toSvg 这一个。因此我们从 toSvg 入手,看看它的实现原理。
|
||||
|
||||
```js
|
||||
var domtoimage = {
|
||||
// 2023-10-28 @kazoottt, standard lib functions
|
||||
toSvg: toSvg, // 2023-11-06 @kazoottt, 传入节点,返回svg dataUrl
|
||||
toPng: toPng, // 2023-11-06 @kazoottt, 传入节点,返回png dataUrl
|
||||
toJpeg: toJpeg, // 2023-11-06 @kazoottt, 传入节点,返回jpeg dataUrl
|
||||
toBlob: toBlob, // 2023-11-06 @kazoottt, 传入节点,返回blob对象
|
||||
toPixelData: toPixelData, // 2023-11-06 @kazoottt, 传入节点,返回表示RGBA的Uint8Array
|
||||
}
|
||||
```
|
||||
|
||||
toSvg 的代码如下
|
||||
|
||||
```js
|
||||
function toSvg(node, options) {
|
||||
// 2023-10-28 @kazoottt, if the options received is undefined, set it to {}
|
||||
options = options || {}
|
||||
// 2023-10-28 @kazoottt, call the copyOptions method(just for impl for test, so it will not affect the behavior of dom-to-image itself)
|
||||
copyOptions(options)
|
||||
// 2023-10-28 @kazoottt, wrap the node to a Promise object so that it can be used in the chained calls
|
||||
return Promise.resolve(node)
|
||||
.then(function (node) {
|
||||
// 2023-10-29 @kazoottt, return Element
|
||||
return cloneNode(node, options.filter, true)
|
||||
})
|
||||
.then(embedFonts)
|
||||
.then(inlineImages)
|
||||
.then(applyOptions)
|
||||
.then(function (clone) {
|
||||
// 2023-11-06 @kazoottt, 节点转svg dataUrl
|
||||
return makeSvgDataUri(
|
||||
clone,
|
||||
options.width || util.width(node),
|
||||
options.height || util.height(node),
|
||||
)
|
||||
})
|
||||
|
||||
/**
|
||||
* @description: 传入节点,之前保存的配置复制给这个节点,然后返回节点
|
||||
* @param {*} clone
|
||||
* @return {*}
|
||||
*/
|
||||
function applyOptions(clone) {
|
||||
if (options.bgcolor) clone.style.backgroundColor = options.bgcolor
|
||||
|
||||
if (options.width) clone.style.width = options.width + "px"
|
||||
if (options.height) clone.style.height = options.height + "px"
|
||||
|
||||
if (options.style)
|
||||
Object.keys(options.style).forEach(function (property) {
|
||||
clone.style[property] = options.style[property]
|
||||
})
|
||||
|
||||
return clone
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
toSvg 的类型声明:
|
||||
入参:`node` 和 `options`
|
||||
出参:`Promise<any>`
|
||||
|
||||
由于这个库是很久之前写的,当时还不支持 es6 的写法,所以写的是一串回调。
|
||||
看起来可能会不习惯,转成 async 的写法后会比较好理解。
|
||||
不过这么多年这个库依然可以使用,也说明了兼容性很好。
|
||||
它进行的操作如下:
|
||||
|
||||
第一步: `Promise.resolve(node)` (可忽略)
|
||||
使用 `Promise.resolve(node)` 创建一个已经解决的 Promise,然后 `.then` 方法被用来添加一个回调函数。这样做的好处是,无论 `node` 是一个普通值还是一个 Promise,`.then` 方法都会正确地处理。不过其实 `cloneNode(node, options.filter, true);` 返回的也是 Promise,可以直接从这里开始调用的。
|
||||
作者在最开头写这里 `Promise.resolve(node)` 的使用可能是为了确保代码的健壮性。因为 `Promise.resolve(node)` 可以处理 `node` 是 Promise 或者非 Promise 的情况。如果 `node` 不是一个 Promise,
|
||||
|
||||
第二步:`cloneNode(node, filter, root)`
|
||||
|
||||
```js
|
||||
function cloneNode(node, filter, root) {
|
||||
// 2023-10-28 @kazoottt, if 1.the node is not the root 2.the filter is existed 3. after the filter, the node is not included, return undefined. (it is to filter out the node)
|
||||
if (!root && filter && !filter(node)) return Promise.resolve();
|
||||
|
||||
// 2023-10-29 @kazoottt,the result is: Element
|
||||
return Promise.resolve(node)
|
||||
.then(makeNodeCopy)
|
||||
.then(function (clone) {
|
||||
// 2023-10-29 @kazoottt, get the target node
|
||||
return cloneChildren(node, clone, filter);
|
||||
})
|
||||
.then(function (clone) {
|
||||
return processClone(node, clone);
|
||||
});
|
||||
```
|
||||
|
||||
2.1 makeNodeCopy
|
||||
判断是否是 canvas,如果是 canvas 则直接转为
|
||||
|
||||
第三步 embedFonts
|
||||
|
||||
第四步 inlineImages
|
||||
|
||||
第五步 applyOptions
|
||||
|
||||
第五步 makeSvgDataUri
|
69
src/content/note/embedding exapmle.md
Normal file
69
src/content/note/embedding exapmle.md
Normal file
@ -0,0 +1,69 @@
|
||||
---
|
||||
title: embedding exapmle
|
||||
date: 2024-02-28T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- openai
|
||||
- embedding
|
||||
finished: false
|
||||
toAstro: true
|
||||
slug: embedding-exapmle
|
||||
description: 一个很好的embedding例子
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:10.000Z
|
||||
---
|
||||
|
||||
# Embedding Example
|
||||
|
||||
[emoji-semantic-search/server/app.py at main · lilianweng/emoji-semantic-search · GitHub](<https://github.com/lilianweng/emoji-semantic-search/blob/main/server/app.py#L51>)
|
||||
|
||||
## Build
|
||||
|
||||
构造一个 msg2emoji 的 json
|
||||
|
||||
```python
|
||||
msg2emoji = {
|
||||
"Hello! How are you?": ["😊", "👋"],
|
||||
"I'm doing great!": ["👍"],
|
||||
"What about you?": ["❓"],
|
||||
"Me too!": ["😄"]
|
||||
}
|
||||
```
|
||||
|
||||
转化为数组
|
||||
|
||||
```python
|
||||
descriptions = [
|
||||
"The emoji 😊 is about feeling happy.",
|
||||
"The emoji 👋 is about saying hello.",
|
||||
"The emoji 👍 is about showing approval.",
|
||||
"The emoji ❓ is about asking a question.",
|
||||
"The emoji 😄 is about expressing joy."
|
||||
]
|
||||
```
|
||||
|
||||
调用接口 embeddings
|
||||
|
||||
```python
|
||||
[
|
||||
{"emoji": "😊", "message": "feeling happy", "embed": [0.1, 0.2, 0.3]},
|
||||
{"emoji": "👋", "message": "saying hello", "embed": [0.4, 0.5, 0.6]},
|
||||
{"emoji": "👍", "message": "showing approval", "embed": [0.7, 0.8, 0.9]},
|
||||
{"emoji": "❓", "message": "asking a question", "embed": [0.2, 0.3, 0.4]},
|
||||
{"emoji": "😄", "message": "expressing joy", "embed": [0.5, 0.6, 0.7]}
|
||||
]
|
||||
```
|
||||
|
||||
然后保存 emoji-embeddings.jsonl.gz 中,不用重复训练
|
||||
|
||||
## Search
|
||||
|
||||
从本地读取 emoji-embeddings.jsonl.gz 文件,然后格式化
|
||||
|
||||
请求 embedding api, 获取向量
|
||||
|
||||
```python
|
||||
dotprod = np.matmul(self.embeddings, np.array(query_embed).T)
|
||||
```
|
||||
|
||||
取 20 个最相似的返回
|
54
src/content/note/evo.ninja.md
Normal file
54
src/content/note/evo.ninja.md
Normal file
@ -0,0 +1,54 @@
|
||||
---
|
||||
slug: evoninja
|
||||
toAstro: true
|
||||
description: >-
|
||||
本文主要介绍了evo.ninja仓库的代码结构和运行机制。首先,通过分析根目录下的package.json文件,了解到该仓库的脚本命令包括重置、清理、构建、启动服务等。特别关注了start:api命令,该命令实现在名为evo-ninja的工作区中,具体位于evo.ninja/app.cli目录下。这里的package.json文件定义了启动命令,分别指向cli.ts和api.ts文件,这两个文件依赖于app.ts文件。此外,还提到了evo.ninja的API部分使用了名为agent-protocol的库。
|
||||
tags:
|
||||
- evo.ninja
|
||||
- agent-protocol
|
||||
- 语法错误
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:10.000Z
|
||||
title: evo.ninja
|
||||
---
|
||||
|
||||
# evo.ninja
|
||||
|
||||
我首先阅读的是 evo.ninja 这个仓库的代码
|
||||
在它根目录的 package.json 中,它的 script 是这样写的:
|
||||
|
||||
```json
|
||||
"scripts": {
|
||||
"reset": "yarn clean && yarn && yarn build",
|
||||
"clean": "npx rimraf ./node_modules ./*/**/node_modules ./*/**/yarn.lock ./*/**/build",
|
||||
"build": "npx turbo build",
|
||||
"build:browser": "yarn workspace @evo-ninja/ui run build",
|
||||
"start": "yarn workspace evo-ninja run start",
|
||||
"start:browser": "yarn workspace @evo-ninja/ui run start",
|
||||
"start:api": "yarn workspace evo-ninja run start:api",
|
||||
"lint": "npx turbo lint",
|
||||
"lint:fix": "npx turbo lint -- --fix"
|
||||
},
|
||||
```
|
||||
|
||||
然后在 run 中,它运行的是 start:api。所以我们直接来看 start:api 的代码。
|
||||
|
||||
可以看到 start:api 的代码是在工作区中 package.json 的 name 是 evo-ninja 的这个文件夹中的 package.json 中的 script 中的 start:api
|
||||
|
||||
具体位置就是 evo.ninja/app.cli 了
|
||||
|
||||
这个代码的 package.json 是这样写的:
|
||||
|
||||
``` json
|
||||
"scripts": {
|
||||
"start": "ts-node src/cli.ts",
|
||||
"start:api": "ts-node src/api.ts",
|
||||
"build": "rimraf build && tsc --project tsconfig.build.json",
|
||||
},
|
||||
````
|
||||
|
||||
也就是说命令在 cli.ts,服务在 api.ts,而这两个文件都依赖于 app.ts,它才是主体。
|
||||
|
||||
[[evo.ninja api]]
|
||||
它用到了一个叫做 agent-protocol 的库来实现
|
||||
[agent-protocol代码阅读](/notes/agent-protocol-code-study)
|
30
src/content/note/expo报错.md
Normal file
30
src/content/note/expo报错.md
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
title: expo报错
|
||||
slug: expo-error
|
||||
description: >-
|
||||
在expo开发中遇到报错:TypeError: The 'compilation' argument must be an instance of
|
||||
Compilation。错误的原因是项目中存在多个webpack版本,特别是由于额外添加了依赖"metro-core":
|
||||
"^0.80.1"。解决此问题的方法是删除node_modules目录,移除该依赖,然后重新安装依赖。
|
||||
date: 2024-02-07T00:00:00.000Z
|
||||
category: web3
|
||||
tags:
|
||||
- expo 错误,angular cli,webpack,npm, metro-core
|
||||
toAstro: true
|
||||
date_created: 2025-01-04T03:44:53.000Z
|
||||
date_modified: 2025-02-19T03:44:15.000Z
|
||||
---
|
||||
|
||||
# Expo 报错
|
||||
|
||||
[angular cli - The 'compilation' argument must be an instance of Compilation - Stack Overflow](<https://stackoverflow.com/questions/67727180/the-compilation-argument-must-be-an-instance-of-compilation>)
|
||||
|
||||
expo TypeError: The 'compilation' argument must be an instance of Compilation
|
||||
|
||||
```
|
||||
npm ls webpack
|
||||
```
|
||||
|
||||
原因是有多个 webpack,而具体的原因是我另外加了一个 dep
|
||||
"metro-core": "^0.80.1",
|
||||
|
||||
解决方法:删除 node_modules,以及把上面这个依赖移除,再安装一次。
|
66
src/content/note/fetch 报错排查 SocketError other side closed.md
Normal file
66
src/content/note/fetch 报错排查 SocketError other side closed.md
Normal file
@ -0,0 +1,66 @@
|
||||
---
|
||||
title: fetch 报错排查 SocketError other side closed
|
||||
date: 2024-02-03T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- 网络
|
||||
slug: fetch-socketerror-other-side-closed
|
||||
link: >-
|
||||
https://kazoottt.notion.site/fetch-SocketError-other-side-closed-d399e7db398c4f7faaa8d3e0003327fd
|
||||
notionID: d399e7db-398c-4f7f-aaa8-d3e0003327fd
|
||||
description: >-
|
||||
在main.js文件中使用fetch方法时遇到了报错,错误信息显示“fetch failed”并指出“other side
|
||||
closed”。错误发生在getFansNum函数中,具体是由于TLS连接的另一端关闭导致的。解决此问题的方法是关闭MitM(中间人攻击)工具,这通常用于拦截和修改网络通信,可能会导致不正常的连接关闭。
|
||||
category: 前端
|
||||
toAstro: true
|
||||
date_created: 2025-01-04T03:44:53.000Z
|
||||
date_modified: 2025-02-07T03:25:34.000Z
|
||||
---
|
||||
|
||||
# Fetch 报错
|
||||
|
||||
# 常规
|
||||
|
||||
排查 SocketError other side closed
|
||||
|
||||
在 main.js 中使用了 fetch,但是在运行 main.js 的时候时候 fetch 报错。
|
||||
|
||||
```shell
|
||||
% node main.js
|
||||
|
||||
(node:51258) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
|
||||
(Use `node --trace-warnings ...` to show where the warning was created)
|
||||
node:internal/deps/undici/undici:11730
|
||||
Error.captureStackTrace(err, this);
|
||||
^
|
||||
|
||||
TypeError: fetch failed
|
||||
at Object.fetch (node:internal/deps/undici/undici:11730:11)
|
||||
at async getFansNum (/Users/kazoottt/GitHub/bilibili-fans/main.js:11:20) {
|
||||
cause: SocketError: other side closed
|
||||
at TLSSocket.onSocketEnd (node:internal/deps/undici/undici:8280:26)
|
||||
at TLSSocket.emit (node:events:526:35)
|
||||
at endReadableNT (node:internal/streams/readable:1589:12)
|
||||
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
|
||||
code: 'UND_ERR_SOCKET',
|
||||
socket: {
|
||||
localAddress: '198.19.0.1',
|
||||
localPort: 55306,
|
||||
remoteAddress: '198.18.2.185',
|
||||
remotePort: 443,
|
||||
remoteFamily: 'IPv4',
|
||||
timeout: undefined,
|
||||
bytesWritten: 607,
|
||||
bytesRead: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Node.js v20.10.0
|
||||
```
|
||||
|
||||
从报错信息中可以看出来是 getFansNum 这个方法中的 fetch 方法报了错。
|
||||
|
||||
解决方法:
|
||||
|
||||
关闭 MitM
|
@ -6,8 +6,6 @@ tags:
|
||||
- file-downloader
|
||||
- 项目
|
||||
- npm包
|
||||
finished: true
|
||||
published: true
|
||||
slug: file-downloader
|
||||
description: >-
|
||||
本文介绍了两个用于文件下载的函数:`downloadFileFromURL` 和
|
||||
@ -15,7 +13,6 @@ description: >-
|
||||
函数用于从指定的URL下载文件,可以自定义文件名;`downloadFileFromBlob`
|
||||
函数则用于从Blob对象下载文件,同样支持自定义文件名。这两个函数均来自 `@kzttools/file-downloader`
|
||||
包,该包的NPM地址和GitHub地址均已提供。项目遵循MIT许可证,作者为kazoottt。
|
||||
rinId: 63
|
||||
category: 项目
|
||||
toAstro: true
|
||||
date_created: 2024-12-17T05:34:45.000Z
|
||||
|
56
src/content/note/flask-jwt.md
Normal file
56
src/content/note/flask-jwt.md
Normal file
@ -0,0 +1,56 @@
|
||||
---
|
||||
slug: flask-jwt
|
||||
description: >-
|
||||
本文对比了几个Flask可用的JWT库,包括flask-jwt-extended、Flask-JWT和jwt,根据PyPI下载量和Star量,选择使用最广泛的flask-jwt-extended。文章介绍了在父页面通过iframe嵌入子页面时,如何在子页面中验证和使用JWT
|
||||
token,包括页面级别和接口级别的token验证。同时,提供了安装flask-jwt-extended的命令,并建议参考官方文档进行详细配置。
|
||||
category: 后端
|
||||
title: flask-jwt
|
||||
date: 2024-09-10T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- flask-jwt
|
||||
- flaskjwt扩展
|
||||
- token验证
|
||||
- iframe嵌入
|
||||
- 接口鉴权
|
||||
- 装饰器
|
||||
finished: false
|
||||
toAstro: true
|
||||
date_created: 2025-01-04T03:44:53.000Z
|
||||
date_modified: 2025-02-19T03:44:15.000Z
|
||||
---
|
||||
|
||||
# Flask-jwt
|
||||
|
||||
## Flask 可用库的对比
|
||||
|
||||
flask-jwt-extended 的使用量是最多的,为了后期更好地项目维护,还是选择第一个来使用。
|
||||
|
||||
## 使用 flask-jwt-extended
|
||||
|
||||
场景:
|
||||
|
||||
父页面 + iframe 嵌入子页面,嵌入的时候 url 带上 token。
|
||||
|
||||
在子页面需要做的事情:
|
||||
|
||||
1. 页面级别:每个页面都需要验证 token 是否有效。
|
||||
2. 接口级别:每个接口都需要验证 token 是否有效。
|
||||
|
||||
### 对于页面
|
||||
|
||||
父页面使用 iframe 嵌入子页面的时候,url 带上 token。因此在子页面加载的时候需要处理 url 以获取 token,然后把它存储在 localStorage 中。在后续接口调用中都需要把 token 带上,以便于接口的鉴权。
|
||||
|
||||
### 对于接口
|
||||
|
||||
实现一个装饰器,用于校验 token。
|
||||
|
||||
## 具体过程
|
||||
|
||||
[参考文档](<https://flask-jwt-extended.readthedocs.io/en/stable/basic_usage.html>)
|
||||
|
||||
1. 安装 `flask-jwt-extended`
|
||||
|
||||
```shell
|
||||
pip install flask-jwt-extended
|
||||
```
|
@ -2,21 +2,16 @@
|
||||
title: focusee录制系统声音被强制切换为扬声器播放的可能原因和解决方法
|
||||
date: 2024-05-25T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
tags:
|
||||
- focusee
|
||||
- obs
|
||||
- 虚拟声卡
|
||||
- BlackHole2ch
|
||||
finished: true
|
||||
published: true
|
||||
slug: >-
|
||||
possible-causes-and-solutions-for-focusee-switching-system-audio-to-speaker-playback-forcibly
|
||||
description: macOS上,使用focusee录制系统声音时遇到问题。解决方法是卸载BlackHole2ch,并通过obs选择录制桌面音频或应用音频。
|
||||
NotionID-notionnext: 8ac966eb-66b4-4f39-b2fa-3fd4e4911a41
|
||||
link-notionnext: 'https://kazoottt.notion.site/focusee-8ac966eb66b44f39b2fa3fd4e4911a41'
|
||||
rinId: 41
|
||||
category: 软件
|
||||
toAstro: true
|
||||
date_created: 2024-12-17T05:34:45.000Z
|
||||
|
59
src/content/note/form的validate注意判空.md
Normal file
59
src/content/note/form的validate注意判空.md
Normal file
@ -0,0 +1,59 @@
|
||||
---
|
||||
title: form的validate注意判空
|
||||
date: 2023-10-16T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- antdesign
|
||||
- 组件库
|
||||
- react
|
||||
- antd
|
||||
toAstro: true
|
||||
slug: ant-design-form-validate
|
||||
description: >-
|
||||
在表单验证中,特别是密码确认字段的验证,需要注意即使设置了必填规则,也应在自定义验证函数中检查值是否为空。示例代码展示了如何使用Ant
|
||||
Design的Form组件进行密码确认验证,其中包含了一个必填规则和一个自定义验证函数,确保输入的密码与确认密码一致。如果不检查确认密码字段的值是否为空,可能会导致不必要的异常抛出。
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:22.000Z
|
||||
---
|
||||
|
||||
# Form 的 validate 注意判空
|
||||
|
||||

|
||||
|
||||
```js
|
||||
<Form.Item
|
||||
name="confirm"
|
||||
label="Confirm Password"
|
||||
dependencies={["password"]}
|
||||
hasFeedback
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: "Please confirm your password!",
|
||||
},
|
||||
({ getFieldValue }) => ({
|
||||
validator(_, value) {
|
||||
if (!value || getFieldValue("password") === value) {
|
||||
return Promise.resolve()
|
||||
}
|
||||
return Promise.reject(new Error("The new password that you entered do not match!"))
|
||||
},
|
||||
}),
|
||||
]}
|
||||
>
|
||||
<Input.Password />
|
||||
</Form.Item>
|
||||
```
|
||||
|
||||
需要注意一下,即使 rule 中存在
|
||||
|
||||
```ts
|
||||
{
|
||||
required: true,
|
||||
message: 'Please confirm your password!',
|
||||
},
|
||||
```
|
||||
|
||||
在后面的自定义校验(validator)中,也需要对 value 进行判断是否非空。
|
||||
|
||||
否则容易抛出其他的异常。
|
47
src/content/note/gallery.md
Normal file
47
src/content/note/gallery.md
Normal file
@ -0,0 +1,47 @@
|
||||
---
|
||||
title: gallery
|
||||
date: 2023-11-03T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags: []
|
||||
toAstro: true
|
||||
slug: gallery
|
||||
description: >-
|
||||
该gallery网站包含多个板块,包括首页、动态汇总、科普、产出汇总和关于与友链。动态汇总主要来源于b站动态。日程部分详细列出了资源、名称、日期、作者原始链接、系列和标签等信息,并提供画廊查询展示功能,支持单图片展示。整体结构清晰,内容丰富,适合用户浏览和获取信息。
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:22.000Z
|
||||
---
|
||||
|
||||
# Gallery
|
||||
|
||||
## 结构
|
||||
|
||||
首页
|
||||
|
||||
动态汇总
|
||||
|
||||
科普
|
||||
|
||||
产出汇总
|
||||
|
||||
关于和友链
|
||||
|
||||
## 动态汇总
|
||||
|
||||
来源
|
||||
b 站动态
|
||||
|
||||
## 日程
|
||||
|
||||
结构:
|
||||
|
||||
资源
|
||||
名称
|
||||
日期
|
||||
作者原始链接
|
||||
系列
|
||||
标签
|
||||
|
||||
查询展示
|
||||
画廊
|
||||
|
||||
支持单图片
|
71
src/content/note/how to check if a key is in the Object.md
Normal file
71
src/content/note/how to check if a key is in the Object.md
Normal file
@ -0,0 +1,71 @@
|
||||
---
|
||||
title: how to check if a key is in the Object
|
||||
date: 2024-05-06T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- javascript
|
||||
- Object
|
||||
toAstro: true
|
||||
category: 随手记
|
||||
slug: how-to-check-if-a-key-is-in-the-object
|
||||
description: >-
|
||||
This document explains two methods to check if a property exists in a
|
||||
JavaScript object: the `in` operator and the `hasOwnProperty` method. The `in`
|
||||
operator returns `true` if the specified property is in the object or its
|
||||
prototype chain, and it requires the property name to be a string. The
|
||||
`hasOwnProperty` method also checks for property existence, specifically
|
||||
within the object itself, not its prototype chain, and it also requires the
|
||||
property key to be a string. Both methods are demonstrated with examples.
|
||||
NotionID-notionnext: 196ff681-16d8-47f1-a3d1-15a87b02aa5f
|
||||
link-notionnext: >-
|
||||
https://kazoottt.notion.site/how-to-check-if-a-key-is-in-the-Object-196ff68116d847f1a3d115a87b02aa5f
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T17:22:49.000Z
|
||||
---
|
||||
|
||||
# How to Check if a Key is in the Object
|
||||
|
||||
there are many methods.
|
||||
|
||||
## `in` Operator
|
||||
|
||||
[in - JavaScript | MDN](<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in>)
|
||||
|
||||
> The **`in`** operator returns `true` if the specified property is in the specified object or its prototype chain.
|
||||
|
||||
how to use?
|
||||
|
||||
for example:
|
||||
|
||||
```javascript
|
||||
const dict = { a: "a", b: "b" }
|
||||
console.log("a" in dict)
|
||||
```
|
||||
|
||||
attention: the attribute name should be string.
|
||||
|
||||
that is to say:
|
||||
|
||||
- a in dict ❎
|
||||
- "a" in dict ✅
|
||||
|
||||
## Object API: hasOwnProperty
|
||||
|
||||
[Object.prototype.hasOwnProperty() - JavaScript | MDN](<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty>)
|
||||
|
||||
The complete expression is `Object.prototype.hasOwnProperty()`.
|
||||
|
||||
how to use it ?
|
||||
|
||||
```javascript
|
||||
const dict = {
|
||||
a: "a",
|
||||
b: "b",
|
||||
}
|
||||
console.log(dict.hasOwnProperty("a"))
|
||||
```
|
||||
|
||||
the same is the attribute key should be a string.
|
||||
|
||||
- a in dict ❎
|
||||
- "a" in dict ✅
|
@ -0,0 +1,68 @@
|
||||
---
|
||||
title: how to find the repeated number of an array
|
||||
date: 2024-05-06T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- javascript
|
||||
- array
|
||||
- map
|
||||
- object
|
||||
toAstro: true
|
||||
slug: how-to-find-the-repeated-number-of-an-array
|
||||
description: >-
|
||||
This TypeScript function `findTheNumber` uses a Map to store and check for the
|
||||
presence of numbers in an array. It utilizes the `find` method to locate the
|
||||
first number that has already been encountered in the array, using the Map to
|
||||
track seen numbers. The difference between a Map and an Object in JavaScript
|
||||
is that a Map allows keys of any type, while Object keys are limited to
|
||||
strings or symbols, and a Map maintains the order of insertion. The `find`
|
||||
method is used to retrieve the first element in an array that satisfies a
|
||||
given condition.
|
||||
NotionID-notionnext: 3e3d3c62-203d-4771-a708-ad8d6c04b992
|
||||
link-notionnext: >-
|
||||
https://kazoottt.notion.site/how-to-find-the-repeated-number-of-an-array-3e3d3c62203d4771a708ad8d6c04b992
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-12T05:56:39.000Z
|
||||
---
|
||||
|
||||
# How to Find the Repeated Number of an Array
|
||||
|
||||
```typescript
|
||||
const findTheNumber = (array: number[]) => {
|
||||
const dict = new Map()
|
||||
return array.find((item) => {
|
||||
if (dict.has(item)) {
|
||||
return item
|
||||
} else {
|
||||
dict.set(item, true)
|
||||
}
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
## 1. What is the Difference between Map and Object?
|
||||
|
||||
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#objects_vs._maps>
|
||||
|
||||
1. the key of the map can be any type, but the key of the object only can be **string** or **symbol**.
|
||||
2. the map has order.
|
||||
|
||||
> The Map object holds key-value pairs and remembers the original insertion order of the keys. Any value (both objects and primitive values) may be used as either a key or a value.
|
||||
|
||||
## 2. How to Get the Target Item from a Array?
|
||||
|
||||
use the `find` api of the Array `Array.prototype.find()`
|
||||
|
||||
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find>
|
||||
|
||||
> The find() method of Array instances returns the first element in the provided array that satisfies the provided testing function. If no values satisfy the testing function, undefined is returned.
|
||||
|
||||
how to use:
|
||||
|
||||
```typescript
|
||||
// find the first item that can be divided by 2(even)
|
||||
const array = [1, 2, 3, 4]
|
||||
const target = array.find((item) => {
|
||||
return item / 2 === 0
|
||||
})
|
||||
```
|
@ -2,20 +2,16 @@
|
||||
title: how to make a hollow cylinder in blender
|
||||
date: 2025-01-15T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
tags:
|
||||
- blender
|
||||
- cylinder
|
||||
- model
|
||||
finished: true
|
||||
published: true
|
||||
category: blender
|
||||
slug: how-to-make-a-hollow-cylinder-in-blender
|
||||
description: null
|
||||
toAstro: true
|
||||
date_created: 2025-01-14T16:38:23.000Z
|
||||
date_modified: 2025-02-19T03:44:14.000Z
|
||||
date_modified: 2025-02-19T17:22:51.000Z
|
||||
---
|
||||
|
||||
this is a blender note is to record how to make a hollow cylinder in blender.
|
||||
@ -41,32 +37,32 @@ after we add a cylinder, we can see there has a `add cylinder` panel in the bott
|
||||
|
||||
and if we click the `add cylinder` panel, we can edit the props of the cylinder, such as the vertex count, radius, depth, etc.
|
||||
|
||||

|
||||

|
||||
|
||||
because i am a new user of blender, so i will try to figure out the meaning of the props of panels one by one. (if you do not care about the meaning of the props, you can skip this part)
|
||||
because i am a new user of blender, so i will try to figure out the meaning of the props of panels one by one. (if you do not care about the meaning of the props, you can skip this part)
|
||||
|
||||
1. **Vertices**:
|
||||
- Defines the number of edges or vertices around the base of the cylinder. A higher number results in a smoother circle, while a lower number creates a more polygonal shape.(default 32)
|
||||
- Defines the number of edges or vertices around the base of the cylinder. A higher number results in a smoother circle, while a lower number creates a more polygonal shape.(default 32)
|
||||
2. **Radius**:
|
||||
- Sets the radius of the base of the cylinder. This controls how wide the cylinder is.(default 1m)
|
||||
- Sets the radius of the base of the cylinder. This controls how wide the cylinder is.(default 1m)
|
||||
3. **Depth**:
|
||||
- Determines the **height** of the cylinder along the Z-axis.(default_2m)
|
||||
- Determines the **height** of the cylinder along the Z-axis.(default_2m)
|
||||
4. **Cap Fill Type**:
|
||||
- Specifies the way the top and bottom caps of the cylinder are filled:
|
||||
- **None**: Leaves the ends of the cylinder open.(default)
|
||||
- **N-Gon**: Fills the ends with a single face (polygon) that spans the entire area.
|
||||
- **Triangles**: Fills the ends with triangles arranged in a radial pattern.
|
||||
- Specifies the way the top and bottom caps of the cylinder are filled:
|
||||
- **None**: Leaves the ends of the cylinder open.(default)
|
||||
- **N-Gon**: Fills the ends with a single face (polygon) that spans the entire area.
|
||||
- **Triangles**: Fills the ends with triangles arranged in a radial pattern.
|
||||
5. **Generate UVs**:
|
||||
- When checked, automatically generates UV mapping for the cylinder. This is useful for texturing the cylinder later.(default checked)
|
||||
- When checked, automatically generates UV mapping for the cylinder. This is useful for texturing the cylinder later.(default checked)
|
||||
6. **Align**:
|
||||
- Determines the alignment of the cylinder relative to the scene:
|
||||
- **World**: Aligns the cylinder to the global coordinate system.
|
||||
- **View**: Aligns the cylinder to the current camera view.
|
||||
- **Cursor**: Aligns the cylinder based on the position and orientation of the 3D cursor.
|
||||
- Determines the alignment of the cylinder relative to the scene:
|
||||
- **World**: Aligns the cylinder to the global coordinate system.
|
||||
- **View**: Aligns the cylinder to the current camera view.
|
||||
- **Cursor**: Aligns the cylinder based on the position and orientation of the 3D cursor.
|
||||
7. **Location (X, Y, Z)**:
|
||||
- Specifies the position of the cylinder in 3D space. These fields allow you to place the cylinder at exact coordinates.(default 0,0,0) unit is meter
|
||||
- Specifies the position of the cylinder in 3D space. These fields allow you to place the cylinder at exact coordinates.(default 0,0,0) unit is meter
|
||||
8. **Rotation (X, Y, Z)**:
|
||||
- Defines the orientation of the cylinder by specifying its rotation around each of the three axes.(default 0,0,0)unit is degree
|
||||
- Defines the orientation of the cylinder by specifying its rotation around each of the three axes.(default 0,0,0)unit is degree
|
||||
|
||||
## 3. make the cylinder hollow
|
||||
|
||||
@ -82,7 +78,7 @@ attention: you should click the faces at the top and bottom both, not the vertic
|
||||
|
||||
then we press the `i` button to inset the faces, move the mouse and we can see the faces are inseted, like this:
|
||||
|
||||

|
||||

|
||||
|
||||
then if then size is ok ,release the mouse
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
date_created: 2025-01-20T01:56:29.000Z
|
||||
date_modified: 2025-02-19T03:44:14.000Z
|
||||
date_modified: 2025-02-19T17:22:51.000Z
|
||||
slug: how-to-separate-object-in-blender
|
||||
tags:
|
||||
- Blender
|
||||
@ -14,9 +14,6 @@ title: how to separate object in blender
|
||||
date: 2025-01-20T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Tutorial
|
||||
status: Published
|
||||
finished: true
|
||||
published: true
|
||||
category: blender
|
||||
toAstro: true
|
||||
---
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
date_created: 2025-01-31T12:24:09.000Z
|
||||
date_modified: 2025-02-19T03:44:14.000Z
|
||||
date_modified: 2025-02-19T17:22:51.000Z
|
||||
slug: split-window-in-blender
|
||||
tags:
|
||||
- Blender
|
||||
@ -11,10 +11,6 @@ description: Guide to splitting editor windows in Blender for improved workflow
|
||||
title: how to split window in blender
|
||||
date: 2025-01-31T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
type: Post
|
||||
status: Published
|
||||
finished: true
|
||||
published: true
|
||||
category: blender
|
||||
toAstro: true
|
||||
---
|
||||
|
22
src/content/note/index.md.md
Normal file
22
src/content/note/index.md.md
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
title: index.md
|
||||
slug: indexmd
|
||||
date_created: 2024-12-02T03:03:22.000Z
|
||||
date_modified: 2025-02-19T03:44:19.000Z
|
||||
date: 2025-02-10T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags: []
|
||||
toAstro: true
|
||||
description: null
|
||||
---
|
||||
|
||||
# index.md
|
||||
|
||||
[FlowUs 息流 - 新一代生产力工具](<https://flowus.cn/share/a7f8853a-db27-48a3-b233-22e562052ac9>)
|
||||
|
||||
```dataview
|
||||
table dateformat(file.ctime, "yyyyMMdd") as "创建时间"
|
||||
from "{{folder_name}}"
|
||||
sort file.ctime asc
|
||||
WHERE !icontains(file.path,"模板")
|
||||
```
|
28
src/content/note/leetcode刷题 js + python.md
Normal file
28
src/content/note/leetcode刷题 js + python.md
Normal file
@ -0,0 +1,28 @@
|
||||
---
|
||||
slug: leetcode-brush-up
|
||||
toAstro: true
|
||||
description: >-
|
||||
2023年1月10日,记录了在LeetCode上的刷题情况。首先完成了“两数之和”问题,随后解决了“删除有序数组中的重复项”,虽然使用的方法简单但性能较差。最后,解决了“移除元素”问题。每个问题都附有相关的提交链接和截图,以便记录和回顾。
|
||||
date: 2024-07-11T02:17:53.454Z
|
||||
date_created: 2025-01-04T03:44:53.000Z
|
||||
date_modified: 2025-02-19T03:44:14.000Z
|
||||
title: leetcode刷题 js + python
|
||||
---
|
||||
|
||||
# Leetcode 刷题
|
||||
|
||||
2023-01-10
|
||||
[1. 两数之和 - 力扣(LeetCode)](<https://leetcode.cn/problems/two-sum/submissions/394403223/>)
|
||||
|
||||

|
||||
|
||||
[26. 删除有序数组中的重复项 - 力扣(LeetCode)](<https://leetcode.cn/problems/remove-duplicates-from-sorted-array/submissions/394407635/>)
|
||||
使用的方法比较简单,性能比较差
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
[27. 移除元素 - 力扣(LeetCode)](<https://leetcode.cn/problems/remove-element/submissions/394409513/>)
|
||||
|
||||

|
69
src/content/note/lodash中的位运算.md
Normal file
69
src/content/note/lodash中的位运算.md
Normal file
@ -0,0 +1,69 @@
|
||||
---
|
||||
title: lodash中的位运算
|
||||
date: 2023-10-20T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- lodash
|
||||
- 源码学习
|
||||
toAstro: true
|
||||
slug: lodash-bit-cal
|
||||
description: >-
|
||||
在lodash的深拷贝源码中,使用了位运算来控制拷贝行为。通过设置不同的标志位,如CLONE_DEEP_FLAG和CLONE_SYMBOLS_FLAG,分别控制深拷贝和是否克隆symbol属性。这些标志位通过按位或(|)运算组合成一个变量,然后通过按位与(&)运算在baseClone函数中解构,以确定具体的拷贝行为。这种设计使得代码更加高效且灵活,能够根据不同的标志位组合实现不同的拷贝需求。
|
||||
noteId_x: 6
|
||||
create_time: '2023/10/20 09:56:48'
|
||||
update_time: '2023/10/20 10:28:41'
|
||||
publish_time: '2023/10/20 10:28:22'
|
||||
link: 'https://kazoottt.notion.site/lodash-43f6444559334df780b685ca74591cec'
|
||||
notionID: 43f64445-5933-4df7-80b6-85ca74591cec
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-01-22T05:39:22.000Z
|
||||
---
|
||||
|
||||
# Lodash 中的位运算
|
||||
|
||||
在阅读 lodash 的深拷贝源码的时候,发现有 FLAG 这样的变量。
|
||||
|
||||
```ts
|
||||
// src/cloneDeep.ts
|
||||
const CLONE_DEEP_FLAG = 1
|
||||
const CLONE_SYMBOLS_FLAG = 4
|
||||
|
||||
function cloneDeep(value) {
|
||||
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG)
|
||||
}
|
||||
```
|
||||
|
||||
- `CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG` 代表的是做位运行算,按位或操作
|
||||
- CLONE_DEEP_FLAG - 控制是否进行深拷贝
|
||||
- CLONE_SYMBOLS_FLAG - 控制是否克隆 symbol 属性
|
||||
- CLONE_DEEP_FLAG 的值是 1 二进制表示是 0001
|
||||
CLONE_SYMBOLS_FLAG 的值是 4,二进制表示是 0100
|
||||
|
||||
按位或计算如下:
|
||||
0001
|
||||
0100
|
||||
0101
|
||||
所以 1 | 4 二进制是 0101。结果是 5,
|
||||
|
||||
然后在传入 baseClone 的时候,
|
||||
|
||||
```ts
|
||||
// src/.internal/baseClone.ts
|
||||
function baseClone(value, bitmask, customizer, key, object, stack) {
|
||||
let result
|
||||
const isDeep = bitmask & CLONE_DEEP_FLAG
|
||||
const isFlat = bitmask & CLONE_FLAT_FLAG
|
||||
const isFull = bitmask & CLONE_SYMBOLS_FLAG
|
||||
...
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
通过与运算来判断是否需要做某项操作。
|
||||
|
||||
之前我们传入的 bitmask 是 0101
|
||||
然后 CLONE_DEEP_FLAG 是 0001
|
||||
与运算得到的是 0001 (1),其他同理
|
||||
|
||||
也就是说可以通过或的操作把变量组合为一个变量
|
||||
然后再用与操作,把变量解构成不同的变量
|
31
src/content/note/md路径正确但是图片不显示的原因.md
Normal file
31
src/content/note/md路径正确但是图片不显示的原因.md
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
title: md路径正确但是图片不显示的原因
|
||||
date: 2024-03-01T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
- bug
|
||||
- markdown
|
||||
- md
|
||||
toAstro: true
|
||||
slug: the-reason-why-the-markdown-path-is-correct-but-the-image-is-not-displayed
|
||||
description: >-
|
||||
从flowus导出文章后,图片无法在预览中显示,原因是路径中包含空格。解决方法是使用%20替换路径中的空格。此外,如果使用vscode的prettier格式化工具且未对md文件设置忽略,保存时可能会破坏文件路径链接,导致预览问题。
|
||||
link: 'https://kazoottt.notion.site/md-74bbc5ba9b24460d91c04e6bd3ec5422'
|
||||
notionID: 74bbc5ba-9b24-460d-91c0-4e6bd3ec5422
|
||||
date_created: 2025-01-04T03:34:08.000Z
|
||||
date_modified: 2025-02-19T03:44:10.000Z
|
||||
---
|
||||
|
||||
# Md 路径正确但是图片不显示的原因
|
||||
|
||||
从 flowus 导出文章后,发现虽然路径是正确的,但是在预览中无法显示图片。
|
||||
|
||||

|
||||
|
||||
后来发现是路径中带有空格的原因,解决方法是使用%20 替代路径中的空格
|
||||
|
||||

|
||||
|
||||
另外还有一个坑点是:
|
||||
|
||||
如果你的 vscode 的 formatter 是 prettier,并且对于 md 没有做忽略设置,那么在保存的时候可能也会破坏你的文件路径链接,导致无法正常预览
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user