<feed xmlns="http://www.w3.org/2005/Atom"> <id>https://immengzi.github.io/</id><title>XMengH</title><subtitle>A CS student passionate about new tech, currently focused on Web Dev.</subtitle> <updated>2025-12-12T01:04:05+08:00</updated> <author> <name>XMengH</name> <uri>https://immengzi.github.io/</uri> </author><link rel="self" type="application/atom+xml" href="https://immengzi.github.io/feed.xml"/><link rel="alternate" type="text/html" hreflang="zh" href="https://immengzi.github.io/"/> <generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator> <rights> © 2025 XMengH </rights> <icon>/assets/img/favicons/favicon.ico</icon> <logo>/assets/img/favicons/favicon-96x96.png</logo> <entry><title>FTrace 源码学习</title><link href="https://immengzi.github.io/posts/get-start-with-FTrace/" rel="alternate" type="text/html" title="FTrace 源码学习" /><published>2025-12-12T00:46:50+08:00</published> <updated>2025-12-12T00:46:50+08:00</updated> <id>https://immengzi.github.io/posts/get-start-with-FTrace/</id> <content src="https://immengzi.github.io/posts/get-start-with-FTrace/" /> <author> <name>XMengH</name> </author> <category term="内核" /> <summary> 0 ftrace_init // kernel/trace/ftrace.c void __init ftrace_init(void) { extern unsigned long __start_mcount_loc[]; // 某个 section 的起始地址 extern unsigned long __stop_mcount_loc[]; // 该 section 的结束地址 unsigned long count, flags; int ret; local_irq_save(flags); ret = ftrace_dyn_arch_init(); // 1 架构相关初始化 local_irq_restore(flags); if (ret) goto failed; count = __stop_mcount_loc - __start_m... </summary> </entry> <entry><title>TestpaperAuto 开发实录</title><link href="https://immengzi.github.io/posts/testpaperAuto-development-record/" rel="alternate" type="text/html" title="TestpaperAuto 开发实录" /><published>2024-10-30T14:52:57+08:00</published> <updated>2024-10-30T14:52:57+08:00</updated> <id>https://immengzi.github.io/posts/testpaperAuto-development-record/</id> <content src="https://immengzi.github.io/posts/testpaperAuto-development-record/" /> <author> <name>XMengH</name> </author> <category term="Nextjs" /> <summary> 项目背景 针对期末复习阶段往年试卷答案缺失、OCR 识别质量差的痛点，开发一站式试卷识别与答案生成解决方案 核心功能 整合高精度 OCR 与 GPT 模型，实现试卷的智能识别与答案生成 基于 Token 的计费系统，支持用户充值和额度管理 完整的用户系统，包含注册、登录、找回密码等功能 个人中心展示识别历史记录，支持答案的再次查看 目录结构 ├─public │ └─icon │ square-pen-light.ico │ square-pen.ico │ └─src ├─app │ │ init.ts │ │ layout.tsx │ │ page.tsx │ │ │ ├─(routes) │ │ │ layout.tsx │ ... </summary> </entry> <entry><title>JS 中拍平数组/对象</title><link href="https://immengzi.github.io/posts/flattening-arrays-or-objects-in-JS/" rel="alternate" type="text/html" title="JS 中拍平数组/对象" /><published>2024-09-03T14:51:02+08:00</published> <updated>2024-09-03T14:51:02+08:00</updated> <id>https://immengzi.github.io/posts/flattening-arrays-or-objects-in-JS/</id> <content src="https://immengzi.github.io/posts/flattening-arrays-or-objects-in-JS/" /> <author> <name>XMengH</name> </author> <category term="JavaScript" /> <summary> JS 数组拍平 function flat(arr) { let newArr = []; for (let i = 0; i &amp;lt; arr.length; i++) { let ele = arr[i]; if (Array.isArray(ele)) { newArr = newArr.concat(flat(ele.slice())); } else { newArr.push(ele); } } return newArr; } const arr = [1, 2, [3, 4, [5]]]; console.log(flat(arr)); // [ 1, 2, 3, 4, 5 ] JS 对象拍平 const or... </summary> </entry> <entry><title>LeetCode 438. 找到字符串中所有字母异位词</title><link href="https://immengzi.github.io/posts/find-all-the-letter-anagrams-in-the-string/" rel="alternate" type="text/html" title="LeetCode 438. 找到字符串中所有字母异位词" /><published>2024-07-28T20:51:23+08:00</published> <updated>2024-07-28T20:51:23+08:00</updated> <id>https://immengzi.github.io/posts/find-all-the-letter-anagrams-in-the-string/</id> <content src="https://immengzi.github.io/posts/find-all-the-letter-anagrams-in-the-string/" /> <author> <name>XMengH</name> </author> <category term="algorithm" /> <summary> 题目描述 给定两个字符串 s 和 p，找到 s 中所有 p 的 异位词 的子串，返回这些子串的起始索引。不考虑答案输出的顺序。 异位词 指由相同字母重排列形成的字符串（包括相同的字符串）。 示例 1: 输入: s = “cbaebabacd”, p = “abc” 输出: [0,6] 解释: 起始索引等于 0 的子串是 “cba”, 它是 “abc” 的异位词。 起始索引等于 6 的子串是 “bac”, 它是 “abc” 的异位词。 示例 2: 输入: s = “abab”, p = “ab” 输出: [0,1,2] 解释: 起始索引等于 0 的子串是 “ab”, 它是 “ab” 的异位词。 起始索引等于 1 的子串是 “ba”, 它是 “ab” 的异位词。 起始索引等于 2 的子串是 “ab”, 它是 “ab” 的异位词。 整体思路 为了找出满足条件的起始索引，可以... </summary> </entry> <entry><title>JavaScript 中的深拷贝</title><link href="https://immengzi.github.io/posts/deepClone-in-JavaScript/" rel="alternate" type="text/html" title="JavaScript 中的深拷贝" /><published>2024-06-05T21:10:10+08:00</published> <updated>2024-06-05T21:10:10+08:00</updated> <id>https://immengzi.github.io/posts/deepClone-in-JavaScript/</id> <content src="https://immengzi.github.io/posts/deepClone-in-JavaScript/" /> <author> <name>XMengH</name> </author> <category term="JavaScript" /> <summary> 什么是深拷贝 对象的深拷贝是指其属性与其拷贝的源对象的属性不共享相同的引用（指向相同的底层值）的副本。因此，当你更改源或副本时，可以确保不会导致其他对象也发生更改；也就是说，你不会无意中对源或副本造成意料之外的更改。这种行为与浅拷贝的行为形成对比，在浅拷贝中，对源或副本的更改可能也会导致其他对象的更改（因为两个对象共享相同的引用）。 在 JavaScript 中，标准的内置对象复制操作（展开语法、Array.prototype.concat()、Array.prototype.slice()、Array.from()、Object.assign() 和 Object.create()）不创建深拷贝（相反，它们创建浅拷贝）。 JSON.stringify() 如果一个 JavaScript 对象可以被序列化，则存在一种创建深拷贝的方式：使用 JSON.stringify() 将... </summary> </entry> </feed>
