<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0"><channel><title>安浩阳</title><link>https://www.anhaoyang.com/</link><atom:link href="https://www.anhaoyang.com/rss.xml" rel="self" type="application/rss+xml"/><description>~</description><generator>Halo v2.24.2</generator><language>zh-cn</language><image><url>https://www.anhaoyang.com/upload/LOGO.png</url><title>安浩阳</title><link>https://www.anhaoyang.com/</link></image><lastBuildDate>Tue, 11 Aug 2026 21:06:26 GMT</lastBuildDate><item><title><![CDATA[DeepAgent概述]]></title><link>https://www.anhaoyang.com/archives/deepagent-overview-1cmzfv</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=DeepAgent%E6%A6%82%E8%BF%B0&amp;url=/archives/deepagent-overview-1cmzfv" width="1" height="1" alt="" style="opacity:0;">## DeepAgent 概述摘要 DeepAgent是基于大语言模型（LLM）的代理构建框架，旨在简化AI代理和应用程序的开发流程。该框架内置任务规划、文件系统上下文管理、子代理生成及长期记忆等核心功能，可处理复杂多步骤任务。 DeepAgent基于LangChain核心代理模块构建，集成LangGraph运行时以支持持久执行、流式传输和人机交互。它包含三大组件：Deep Agents SDK（通用代理构建包）、Deep Agents Code（终端编码代理）以及ACP集成（用于Zed等编辑器的客户端协议连接器）。 此外，DeepAgent与LangSmith引擎深度集成，可自动检测运行问题并生成修复方案。用户可通过“引擎”选项卡直接提交包含修复建议的拉取请求。该框架为开发者提供了开箱即用的代理开发解决方案，兼顾灵活性与功能性。]]></description><guid isPermaLink="false">/archives/deepagent-overview-1cmzfv</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Fth%253Fid%3DOHR.MTCradle_ZH-CN1573998424_1920x1080.jpg&amp;size=m" type="image/jpeg" length="0"/><category>deepagent</category><pubDate>Fri, 29 May 2026 06:54:06 GMT</pubDate></item><item><title><![CDATA[实践-上下文工程]]></title><link>https://www.anhaoyang.com/archives/practicecontextual-engineering-1rxkc0</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=%E5%AE%9E%E8%B7%B5-%E4%B8%8A%E4%B8%8B%E6%96%87%E5%B7%A5%E7%A8%8B&amp;url=/archives/practicecontextual-engineering-1rxkc0" width="1" height="1" alt="" style="opacity:0;"># 文章摘要 本文介绍了**上下文工程**的实践方法，涵盖四个核心方面： 1. **环境变量配置**：使用`python-dotenv`库从`.env`文件加载环境变量（如API密钥），简化配置管理。 2. **Agent记忆机制**：通过创建`AGENTS.md`文件定义Agent身份（如名称“虾虾”、喜好等），利用`deepagents`框架的`FilesystemBackend`让Agent具备身份记忆能力，并能根据记忆回答相关问题。 3. **技能系统**：定义`SKILL.md`文件为Agent添加技能，如`multi-search-engine`全网搜索技能，整合8个国内外搜索引擎，支持高级搜索操作符，无需API密钥。 4. **运行时上下文**：使用`@dataclass`定义上下文类，通过`ToolRuntime`在工具调用时传递用户实时信息（如user_id、偏好等），实现动态上下文管理。 5. **长期记忆存储**：采用`CompositeBackend`组合多个存储后端，将用户偏好持久化保存到文件系统（如`/memories/user_preferences.txt`），支持后续对话中读取和更新。]]></description><guid isPermaLink="false">/archives/practicecontextual-engineering-1rxkc0</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Fth%253Fid%3DOHR.SwedenSolstice_ZH-CN8975506700_1920x1080.jpg&amp;size=m" type="image/jpeg" length="0"/><category>deepagent</category><pubDate>Fri, 29 May 2026 06:50:46 GMT</pubDate></item><item><title><![CDATA[上下文工程]]></title><link>https://www.anhaoyang.com/archives/context-engineering-z16tkds</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=%E4%B8%8A%E4%B8%8B%E6%96%87%E5%B7%A5%E7%A8%8B&amp;url=/archives/context-engineering-z16tkds" width="1" height="1" alt="" style="opacity:0;">## 上下文工程摘要 上下文工程是深度智能体可靠完成任务的关键，通过正确格式提供正确信息和工具。文章介绍了五类上下文管理机制： **输入上下文**包括系统提示、记忆文件和技能，通过`system_prompt`定义角色行为，记忆文件持久化项目约定，技能按需加载专业工作流。 **运行时上下文**在调用时传递用户元数据、API密钥等配置，通过`context_schema`定义结构，自动传播至子代理。 **上下文压缩**通过卸载大文件和总结旧消息防止上下文溢出，确保信息保持在模型窗口限制内。 **上下文隔离**利用子代理处理复杂任务，主代理仅接收最终结果，保持上下文清晰。 **长期记忆**通过虚拟文件系统实现跨会话持久化存储用户偏好和累积知识。 最佳实践包括：最小化始终加载的上下文、使用子代理处理繁重工作、将大输出持久化到文件、利用技能实现渐进式披露。]]></description><guid isPermaLink="false">/archives/context-engineering-z16tkds</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Fth%253Fid%3DOHR.YorkshireHay_ZH-CN9097986997_1920x1080.jpg&amp;size=m" type="image/jpeg" length="0"/><category>deepagent</category><pubDate>Thu, 28 May 2026 07:10:10 GMT</pubDate></item><item><title><![CDATA[模型]]></title><link>https://www.anhaoyang.com/archives/model-1nikdv</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=%E6%A8%A1%E5%9E%8B&amp;url=/archives/model-1nikdv" width="1" height="1" alt="" style="opacity:0;">## 文章摘要 Deep Agents支持与任何支持工具调用的LangChain聊天模型配合使用，模型通过`provider:model`格式指定（如`openai:gpt-5.4`）。文章列出了建议模型清单，包括Google（gemini系列）、OpenAI（GPT系列）、Anthropic（Claude系列）及开源模型（GLM、Kimi、MiniMax等）。通过Deep Agents评估套件测试各模型在不同任务上的表现，结果显示部分模型在文件操作、检索等任务上表现优异。文章还介绍了模型配置方法，支持提供商级别和模型级别的参数设置，并提供运行时动态切换模型的中间件方案，方便应用根据需求选择不同模型。]]></description><guid isPermaLink="false">/archives/model-1nikdv</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Fth%253Fid%3DOHR.MinokakeRocks_ZH-CN2474262090_1920x1080.jpg&amp;size=m" type="image/jpeg" length="0"/><category>deepagent</category><pubDate>Wed, 27 May 2026 09:43:10 GMT</pubDate></item><item><title><![CDATA[核心能力]]></title><link>https://www.anhaoyang.com/archives/core-competencies-1dtm8l</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=%E6%A0%B8%E5%BF%83%E8%83%BD%E5%8A%9B&amp;url=/archives/core-competencies-1dtm8l" width="1" height="1" alt="" style="opacity:0;">## Deep Agents框架核心能力摘要 Deep Agents框架提供四大核心能力，简化长期运行、可靠代理的构建过程： **执行环境**：包括可自定义的工具（API、函数、数据库）、虚拟文件系统（支持多模态文件操作）、声明式文件系统权限控制，以及沙箱和JavaScript解释器两种代码执行方式。 **上下文管理**：通过技能渐进式加载领域知识、持久化记忆文件、自动摘要和上下文卸载、提示缓存等机制，确保代理在令牌限制内高效运行。 **代表团**：支持任务规划和子代理并行执行，实现复杂问题的分解处理，同时保持上下文隔离和令牌效率。 **转向控制**：提供人机交互审批功能，可在关键操作前暂停代理执行，实现安全管控和交互式调试。 此外，Harness Profile允许将模型配置打包成可重用模块，简化不同模型间的切换。]]></description><guid isPermaLink="false">/archives/core-competencies-1dtm8l</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Fth%253Fid%3DOHR.MTCradle_ZH-CN1573998424_1920x1080-FGAe.jpg&amp;size=m" type="image/jpeg" length="0"/><category>deepagent</category><pubDate>Wed, 27 May 2026 09:12:19 GMT</pubDate></item><item><title><![CDATA[与 Claude Agent SDK 的比较]]></title><link>https://www.anhaoyang.com/archives/comparison-with-claude-agent-sdk-1tccm3</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=%E4%B8%8E%20Claude%20Agent%20SDK%20%E7%9A%84%E6%AF%94%E8%BE%83&amp;url=/archives/comparison-with-claude-agent-sdk-1tccm3" width="1" height="1" alt="" style="opacity:0;">## 摘要 本文比较了LangChain Deep Agents与Claude Agent SDK两种代理构建工具的主要差异。 **执行环境方面**，Deep Agents支持沙箱内外两种运行模式，可灵活选择本地、远程沙箱或虚拟文件系统作为后端；Claude Agent SDK仅支持沙箱内运行，针对本地文件系统执行工具。 **模型支持方面**，Deep Agents兼容Anthropic、OpenAI、Google等100多家提供商，灵活性更高；Claude Agent SDK专为Claude模型设计。 **部署方面**，Deep Agents提供托管和自托管两种选项，内置流式端点、线程管理和身份验证功能；Claude Agent SDK需自行构建服务器、认证和多租户层。 **多租户支持**，Deep Agents内置作用域线程、用户级沙箱和基于角色的访问控制；Claude Agent SDK需自行实现。 **适用场景**：需要模型和基础架构灵活性、内置多租户和托管选项选Deep Agents；已投资Anthropic生态且愿意自行构建基础设施选Claude Agent SDK。]]></description><guid isPermaLink="false">/archives/comparison-with-claude-agent-sdk-1tccm3</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Fth%253Fid%3DOHR.PicoVolcano_ZH-CN6865997792_1920x1080.jpg&amp;size=m" type="image/jpeg" length="0"/><category>deepagent</category><pubDate>Wed, 27 May 2026 02:20:00 GMT</pubDate></item><item><title><![CDATA[定制代理]]></title><link>https://www.anhaoyang.com/archives/custom-agent-2397up</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=%E5%AE%9A%E5%88%B6%E4%BB%A3%E7%90%86&amp;url=/archives/custom-agent-2397up" width="1" height="1" alt="" style="opacity:0;"># 摘要 本文档介绍了LangChain Deep Agents中`create_deep_agent`函数的核心配置选项。该函数支持多种模型提供商（OpenAI、Anthropic、Gemini等），并提供丰富的定制能力。 主要配置包括：工具系统，允许添加自定义工具如网络搜索；系统提示词，采用四层组装结构（USER→BASE/CUSTOM→SUFFIX）实现灵活配置；中间件机制，支持预构建组件和自定义拦截器；子代理功能，可将复杂任务委派给专门代理；后端存储，涵盖虚拟文件系统、状态后端、存储后端等多种选择；人机交互，支持敏感操作的审批流程；技能系统，通过AGENTS.md文件为代理扩展专业能力；以及结构化输出功能，可生成符合Pydantic模型的响应数据。这些组件共同构成了一个高度可定制的AI代理开发框架。]]></description><guid isPermaLink="false">/archives/custom-agent-2397up</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Fth%253Fid%3DOHR.GlenariffForest_ZH-CN7874768337_1920x1080.jpg&amp;size=m" type="image/jpeg" length="0"/><category>deepagent</category><pubDate>Tue, 26 May 2026 11:47:13 GMT</pubDate></item><item><title><![CDATA[开始使用]]></title><link>https://www.anhaoyang.com/archives/get-started-r8rac</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=%E5%BC%80%E5%A7%8B%E4%BD%BF%E7%94%A8&amp;url=/archives/get-started-r8rac" width="1" height="1" alt="" style="opacity:0;">这篇文章介绍了Langchain和Deepagents的快速入门指南。内容涵盖环境安装（Langchain[anthropic]和deepagents库）、模型初始化配置（使用ChatAnthropic），以及通过天气查询示例演示Agent的创建与调用流程。Deep Agents核心功能包括任务规划与分解、联网研究、文件系统上下文管理、子Agent委托和报告合成，并支持流式输出。后续还提供了自定义Agent、持久化记忆和部署等进阶开发路径。]]></description><guid isPermaLink="false">/archives/get-started-r8rac</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Fth%253Fid%3DOHR.MackArch_ZH-CN1068755647_1920x1080.jpg&amp;size=m" type="image/jpeg" length="0"/><category>deepagent</category><pubDate>Tue, 26 May 2026 11:02:14 GMT</pubDate></item><item><title><![CDATA[Langchain]]></title><link>https://www.anhaoyang.com/archives/langchain-ljnb9</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=Langchain&amp;url=/archives/langchain-ljnb9" width="1" height="1" alt="" style="opacity:0;">LangChain 是一个用于构建由大型语言模型（LLM）驱动的应用程序的开源框架，提供模块化的组件、链式调用、代理（Agent）、记忆（Memory）和工具调用等功能，可与 OpenAI、Anthropic 等多种 LLM 无缝集成。官方文档（https://docs.langchain.com）和中文社区（https://docs.langchain.org.cn）提供快速入门、示例代码以及完整的 API 参考，开发者可依据 Python API（https://reference.langchain.com/python/langchain-core/language_models/chat_models/BaseChatModel）和 Anthropic 模型接口（https://reference.langchain.com/python/langchain-anthropic/chat_models）快速搭建对话系统、信息检索、自动化任务等应用。]]></description><guid isPermaLink="false">/archives/langchain-ljnb9</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Fth%253Fid%3DOHR.BelemTowerBank_ZH-CN6235906597_1920x1080.jpg&amp;size=m" type="image/jpeg" length="0"/><category>deepagent</category><pubDate>Tue, 26 May 2026 11:01:17 GMT</pubDate></item><item><title><![CDATA[安装ElasticSearch和Kibana]]></title><link>https://www.anhaoyang.com/archives/install-elasticsearch-kibana</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=%E5%AE%89%E8%A3%85ElasticSearch%E5%92%8CKibana&amp;url=/archives/install-elasticsearch-kibana" width="1" height="1" alt="" style="opacity:0;">## 文章摘要 本文介绍了使用Docker安装ElasticSearch和Kibana的完整步骤。首先创建Docker网络并启动ElasticSearch单节点容器，设置内存限制为1GB，配置密码为elastic，同时复制SSL证书用于安全连接。通过curl命令验证服务运行状态。 扩展集群可通过生成注册令牌启动新节点容器实现。Kibana的启动同样使用Docker，访问时需输入注册令牌，并使用elastic账号密码登录。 为方便中文用户使用，可通过修改配置文件添加i18n.locale: "zh-CN"或设置环境变量I18N_LOCALE=zh-CN将Kibana界面设置为中文。整个部署过程采用容器化方式，简化了环境配置和依赖管理。]]></description><guid isPermaLink="false">/archives/install-elasticsearch-kibana</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=https%3A%2F%2Fimage.baidu.com%2Fsearch%2Fdown%3Furl%3Dhttps%3A%2F%2Ftvax3.sinaimg.cn%2F%2Flarge%2F0072Vf1pgy1foxkcriixpj31hc0u0wu8.jpg&amp;size=m" type="image/jpeg" length="0"/><category>ElasticSearch</category><pubDate>Wed, 24 Dec 2025 01:49:03 GMT</pubDate></item><item><title><![CDATA[AndroidSdk和Adb常用命令]]></title><link>https://www.anhaoyang.com/archives/androidsdk-and-adb-common-commands-vn6tb</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=AndroidSdk%E5%92%8CAdb%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4&amp;url=/archives/androidsdk-and-adb-common-commands-vn6tb" width="1" height="1" alt="" style="opacity:0;">## Android SDK与ADB常用命令摘要 本文汇总了Android开发和调试中常用的命令行工具，分为两大板块。 **包管理器（sdkmanager）**：用于管理SDK组件。包括列出所有可用包、查看已安装包、安装指定版本构建工具/CMake/模拟器/平台工具、卸载不再需要的组件等操作。 **虚拟机管理（avdmanager）**：支持创建、删除Android虚拟设备。可指定系统镜像、API级别及架构（arm64-v8a）。启动时可通过参数控制冷启动或清除数据。若遇硬件加速错误，需在Windows功能中启用Hyper-V并重启。 **ADB命令**：完成设备连接与应用部署。常用操作包括查看已连接设备、通过IP地址连接无线调试设备、指定设备安装APK等。这些命令是日常Android开发中进行真机或模拟器调试的基础工具。]]></description><guid isPermaLink="false">/archives/androidsdk-and-adb-common-commands-vn6tb</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Funsplash-6zUdG9TbSfY-20251216140748-xzyutu8.jpg&amp;size=m" type="image/jpeg" length="51626"/><category>APP开发</category><pubDate>Tue, 4 Nov 2025 10:54:18 GMT</pubDate></item><item><title><![CDATA[排查Linux根目录文件总占用小，但磁盘空间使用率高的问题]]></title><link>https://www.anhaoyang.com/archives/pai-cha-linuxgen-mu-lu-wen-jian-zong-zhan-yong-xiao</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=%E6%8E%92%E6%9F%A5Linux%E6%A0%B9%E7%9B%AE%E5%BD%95%E6%96%87%E4%BB%B6%E6%80%BB%E5%8D%A0%E7%94%A8%E5%B0%8F%EF%BC%8C%E4%BD%86%E7%A3%81%E7%9B%98%E7%A9%BA%E9%97%B4%E4%BD%BF%E7%94%A8%E7%8E%87%E9%AB%98%E7%9A%84%E9%97%AE%E9%A2%98&amp;url=/archives/pai-cha-linuxgen-mu-lu-wen-jian-zong-zhan-yong-xiao" width="1" height="1" alt="" style="opacity:0;">## 摘要 本文介绍如何排查Linux系统中“根目录文件总占用小，但磁盘空间使用率高”的异常问题。 **原因分析**：当文件被删除后，若有相关进程仍在运行，该文件占用的磁盘空间不会自动释放，导致df显示空间不足。 **解决方案**：使用lsof命令查找已删除但未释放的文件，按进程分组统计大小，然后重启相关进程即可回收空间。 作者提供了一个自动化脚本`showNoFreeDeletedFiles.sh`，通过`lsof | grep deleted`定位已删除文件，分析每个PID对应的文件总大小，帮助运维人员快速定位需要重启的进程，从而有效释放被占用的磁盘空间。]]></description><guid isPermaLink="false">/archives/pai-cha-linuxgen-mu-lu-wen-jian-zong-zhan-yong-xiao</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=https%3A%2F%2Fimages.unsplash.com%2Fphoto-1629654297299-c8506221ca97%3Fixid%3DM3w1Mjk5NjB8MHwxfHNlYXJjaHwxfHxsaW51eHxlbnwwfHx8fDE3NjU4Njk4NDN8MA%26ixlib%3Drb-4.1.0&amp;size=m" type="image/jpeg" length="0"/><category>问题记录</category><pubDate>Mon, 21 Apr 2025 02:46:54 GMT</pubDate></item><item><title><![CDATA[搭建个人音乐库]]></title><link>https://www.anhaoyang.com/archives/build-a-personal-music-library-z2ryq27</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E9%9F%B3%E4%B9%90%E5%BA%93&amp;url=/archives/build-a-personal-music-library-z2ryq27" width="1" height="1" alt="" style="opacity:0;"># 个人音乐库搭建方案摘要 本文介绍如何搭建个人音乐库，整合三款开源工具实现完整的音乐管理与播放体验。 **核心组件：** 1. **Navidrome**：开源音乐流服务器，负责音乐文件的存储与流媒体服务，支持多用户访问和丰富的元数据管理。 2. **音流**：跨平台音乐播放器客户端，支持Windows、Android、iOS系统，可连接Navidrome服务实现无缝音乐播放体验。 3. **Music Tag Web**：音乐标签编辑器，支持批量自动修正音频文件的曲名、专辑、艺术家、封面及歌词等信息，兼容MP3、FLAC、WAV等十余种格式。 **部署方式：** 通过Docker容器化部署，配置文件简洁明了。Navidrome映射音乐文件夹与数据目录；Music Tag Web默认端口8002，账号密码为admin。 该方案适合NAS用户或自建音乐服务器爱好者，可实现音乐文件管理、自动整理及多端同步播放的完整闭环。]]></description><guid isPermaLink="false">/archives/build-a-personal-music-library-z2ryq27</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Fimg_6-20241116130326-oki2kwv-tgpx.jpg&amp;size=m" type="image/jpeg" length="52732"/><category>好玩的APP</category><pubDate>Sat, 16 Nov 2024 04:57:57 GMT</pubDate></item><item><title><![CDATA[icloudpd]]></title><link>https://www.anhaoyang.com/archives/icloudpd-wqdlc</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=icloudpd&amp;url=/archives/icloudpd-wqdlc" width="1" height="1" alt="" style="opacity:0;">## 摘要 本文介绍如何通过Docker容器工具icloudpd实现iCloud照片的每日定时同步下载。 **核心步骤**：首先使用`chmod -R 777 iCloud`赋予文件夹权限，随后执行`sync-icloud.sh --Initialise`完成初始化（约需2分钟），最后通过两步验证完成认证连接。 **有效期说明**：iCloud认证有效期为90天，过期后需重新认证以恢复同步功能。 **Docker配置要点**：docker-compose文件中需配置apple_id（Apple ID邮箱）、时区、同步间隔（默认86400秒）、自动删除开关、中国区iCloud标识及文件夹结构模板等参数。配置目录用于存储认证Cookie，下载目录指定本地存储路径。 **项目地址**：github.com/boredazfcuk/docker-icloudpd]]></description><guid isPermaLink="false">/archives/icloudpd-wqdlc</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Funsplash-DoumgfLtasI-20241115141915-n3i57wj.jpg&amp;size=m" type="image/jpeg" length="45268"/><category>好玩的APP</category><pubDate>Thu, 14 Nov 2024 15:09:16 GMT</pubDate></item><item><title><![CDATA[linux遍历指定目录下log文件内容以查找内容]]></title><link>https://www.anhaoyang.com/archives/linux-traverses-the-contents-of-the-log-file-in-the-specified-directory-to-find-the-content-19ixtr</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=linux%E9%81%8D%E5%8E%86%E6%8C%87%E5%AE%9A%E7%9B%AE%E5%BD%95%E4%B8%8Blog%E6%96%87%E4%BB%B6%E5%86%85%E5%AE%B9%E4%BB%A5%E6%9F%A5%E6%89%BE%E5%86%85%E5%AE%B9&amp;url=/archives/linux-traverses-the-contents-of-the-log-file-in-the-specified-directory-to-find-the-content-19ixtr" width="1" height="1" alt="" style="opacity:0;">## 文章摘要 本文介绍两个Linux日志搜索脚本，均用于在多个指定目录下查找.log文件中的特定内容。 **find-log.sh**：遍历10个不同业务模块的日志目录（pms、personal、order、goods、finance、logger、jd、recharge、orange、perform），根据传入的过滤关键词搜索匹配的日志行，并输出文件名及匹配内容。 **find-errlog.sh**：功能与第一个脚本类似，但增加了ERROR级别日志的过滤。搜索时先匹配关键词，再筛选ERROR类型，并额外显示匹配行后的50行上下文，便于定位错误根因。 两个脚本均使用Bash编写，通过数组存储目标目录列表，结合grep、sed等命令实现日志检索，可显著提升排查多服务日志的效率。]]></description><guid isPermaLink="false">/archives/linux-traverses-the-contents-of-the-log-file-in-the-specified-directory-to-find-the-content-19ixtr</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=https%3A%2F%2Fimages.unsplash.com%2Fphoto-1551033406-611cf9a28f67%3Fixid%3DM3w1Mjk5NjB8MHwxfHNlYXJjaHwyfHxqYXZhfGVufDB8fHx8MTc2NTg2OTg3Nnww%26ixlib%3Drb-4.1.0&amp;size=m" type="image/jpeg" length="0"/><category>问题记录</category><pubDate>Tue, 7 May 2024 07:58:53 GMT</pubDate></item><item><title><![CDATA[nginx代理设置允许跨域请求]]></title><link>https://www.anhaoyang.com/archives/nginx-proxy-settings-allow-cross-domain-requests-z1pmtds</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=nginx%E4%BB%A3%E7%90%86%E8%AE%BE%E7%BD%AE%E5%85%81%E8%AE%B8%E8%B7%A8%E5%9F%9F%E8%AF%B7%E6%B1%82&amp;url=/archives/nginx-proxy-settings-allow-cross-domain-requests-z1pmtds" width="1" height="1" alt="" style="opacity:0;">## 摘要 本文介绍在Nginx代理服务器中配置允许跨域请求的方法。通过在location块中添加特定的响应头配置，实现对跨域访问的支持。主要配置包括： 1. **隐藏原有跨域头**：使用`proxy_hide_header`清除后端可能设置的`Access-Control-Allow-Origin` 2. **添加跨域响应头**：设置允许来源、请求头和HTTP方法均为通配符`*` 3. **优化预检请求**：对OPTIONS请求直接返回204状态码，避免不必要的代理转发 完整配置以api.test.com域名为例，监听80和443端口，反向代理到本地8100端口。配置中同时包含了SSL证书验证目录设置和安全访问限制（如禁止访问.git、.env等敏感文件）。此配置适用于前后端分离架构中API服务的跨域需求。]]></description><guid isPermaLink="false">/archives/nginx-proxy-settings-allow-cross-domain-requests-z1pmtds</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Fpexels-photo-35116895.jpeg&amp;size=m" type="image/jpeg" length="187755"/><category>问题记录</category><pubDate>Thu, 29 Feb 2024 05:38:13 GMT</pubDate></item><item><title><![CDATA[Windows10在启动时自动运行的应用]]></title><link>https://www.anhaoyang.com/archives/application-of-windows-10-automatically-runs-when-starting-btte5</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=Windows10%E5%9C%A8%E5%90%AF%E5%8A%A8%E6%97%B6%E8%87%AA%E5%8A%A8%E8%BF%90%E8%A1%8C%E7%9A%84%E5%BA%94%E7%94%A8&amp;url=/archives/application-of-windows-10-automatically-runs-when-starting-btte5" width="1" height="1" alt="" style="opacity:0;">## 摘要 本文介绍了在Windows 10中设置应用开机自动运行的简便方法。首先，用户需在开始菜单中找到目标应用，右键点击后选择“更多”→“打开文件位置”。若未出现此选项，说明该应用不支持开机自启。接着，按Windows徽标键+R打开运行对话框，输入“shell:startup”进入启动文件夹。最后，将目标应用的快捷方式复制粘贴至该文件夹即可。 此方法适用于大多数应用，设置后每次开机指定应用将自动启动，有效提升工作效率。用户也可随时通过从启动文件夹移除快捷方式来取消自动运行。]]></description><guid isPermaLink="false">/archives/application-of-windows-10-automatically-runs-when-starting-btte5</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Funsplash-H5IQEk1z_DY-20241126232734-rxrw265.jpg&amp;size=m" type="image/jpeg" length="183177"/><category>问题记录</category><pubDate>Wed, 21 Feb 2024 09:17:08 GMT</pubDate></item><item><title><![CDATA[Git初始流程]]></title><link>https://www.anhaoyang.com/archives/git-initial-process-oxkxi</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=Git%E5%88%9D%E5%A7%8B%E6%B5%81%E7%A8%8B&amp;url=/archives/git-initial-process-oxkxi" width="1" height="1" alt="" style="opacity:0;">{"id":"06686898a6e465244589f9f1209f3b75","type":"message","role":"assistant","model":"MiniMax-M2.5-highspeed","content":[{"thinking":"The user asks: \"你是一个专业的文章摘要总结助手，请根据文章内容生成简洁明了的摘要，字数控制在200字左右。\"\n\nThey provide a Chinese article about \"Git初始流程\" with SSH and Git repository steps. So we need to produce a concise summary in Chinese, about 200 characters. It should capture key points: generating SSH key, configuring SSH config to avoid connection timeout, initializing a local git repo, setting remote origin, setting upstream branch, committing and pushing.\n\nMake sure about 200 characters. Could be ~200 Chinese characters, not words.\n\nWe need to produce a concise summary, about 200 characters, Chinese.\n\nThe user also gave code snippets. Summaries should be plain text.\n\nWe need to generate a summary.\n\nPotential summary: \"本文介绍Git初始化和SSH配置流程。首先使用ssh-keygen生成RSA密钥，然后创建~/.ssh/config文件，指定Host、端口443等以避免连接超时。随后在本地执行git init初始化仓库，使用git remote add添加远程仓库地址，git branch --set-upstream-to设置上游分支，最后git add .、git commit和git push完成提交和推送。\"\n\nCheck length. Let's count characters: \"本文介绍Git初始化和SSH配置流程。首先使用ssh-keygen生成RSA密钥，然后创建~/.ssh/config文件，指定Host、端口443等以避免连接超时。随后在本地执行git init初始化仓库，使用git remote add添加远程仓库地址，git branch --set-upstream-to设置上游分支，最后git add .、git commit和git push完成提交和推送。\"\n\nCount characters manually: We'll approximate length. Chinese characters count as 1 each; ASCII code like \"ssh-keygen\", \"RSA\", etc count each as 1 char. But overall it's probably less than 200 characters. Let's count:\n\n\"本文介绍Git初始化和SSH配置流程。\" That's about 13? Let's count: 本(1)文2介3绍4G5i6t7初8始9化10和11S12S13H14配15置16流17程18。 So 18 characters inc punctuation.\n\n\"首先使用ssh-keygen生成RSA密钥，然后创建~/.ssh/config文件，指定Host、端口443等以避免连接超时。\" Let's count: 首1先2使3用4 s5 s6 h7 -8 k9 e10 y11 g12 e13 n14 生15成16 R17 S18 A19 密20钥21 ，22 然23 后24 创25 建26 ~27 /28 .29 s30 s31 h32 /33 c34 o35 n36 f37 i38 g39 文40 件41 ，42 指43 定44 H45 o46 s47 t48 、49 端50 口51 4 5 2 3 etc? Actually 443 is three digits, each count as a character: 4 5 3? That's three digits. So we need count individually: 4 is one, 5 second, 3 third. So after 端 (?), we have 4,5,3. But let's continue. \"等\" is one. So \"等以避免连接超时\". Let's count precisely. But approximate number is maybe ~50 characters. Then \"随后在本地执行git init初始化仓库，使用git remote add添加远程仓库地址，git branch --set-upstream-to设置上游分支，最后git add .、git commit和git push完成提交和推送。\" That also maybe ~80. So total maybe around 150. That's fine.\n\nThe user wants \"200字左右\" which can be ~200 Chinese characters. So we could produce summary about 180-200 characters.\n\nWe can also add a bit more explanation: \"配置SSH config是为了让Git通过443端口而非默认22端口访问GitHub，解决防火墙导致的超时问题。\" etc. We can incorporate.\n\nLet's produce a concise summary within 200 Chinese characters, perhaps around 190 characters.\n\nMake sure it's not too verbose, but covers main points: generate SSH key, config file, init repo, set remote, upstream branch, commit, push.\n\nAdd mention that config file ensures connectivity.\n\nWe can write:\n\n\"本文概述Git初始化的关键步骤：①使用ssh‑keygen生成4096位RSA密钥对；②在~/.ssh/config中配置Host为github.com，使用Hostname为ssh.github.com、端口443，以解决22端口超时问题；③本地执行git init创建仓库；④使用git remote add添加远程仓库地址；⑤通过git branch --set‑upstream‑to将本地分支关联到远程主分支；⑥git add .、git commit‑m提交信息后执行git push完成推送。\"\n\nLet's count characters.\n\n\"本文概述Git初始化的关键步骤：①使用ssh‑keygen生成4096位RSA密钥对；②在~/.ssh/config中配置Host为github.com，使用Hostname为ssh.github.com、端口443，以解决22端口超时问题；③本地执行git init创建仓库；④使用git remote add添加远程仓库地址；⑤通过git branch --set‑upstream‑to将本地分支关联到远程主分支；⑥git add .、git commit‑m提交信息后执行git push完成推送。\"\n\nCount characters (including punctuation, numbers, letters). Let's count manually.\n\nFirst part: \"本文概述Git初始化的关键步骤：\" Count: 本1 文2 概3 述4 G5 i6 t7 初8 始9 化10 的11 关12 键13 步14 骤15 ：16 So 16 characters.\n\nThen \"①使用ssh‑keygen生成4096位RSA密钥对；\" Let's count: ① is a symbol, but it's one. So:\n\n\"①\"1 \"使用\"2? Actually \"使用\" is two characters, \"使\" and \"用\". Let's count each.\n\nWe'll do step by step.\n\nWe'll count each Chinese character as 1, each Latin letter/digit also 1. We'll treat \"ssh‑keygen\" includes hyphen maybe considered one char, and \"ssh\" is three letters, \"keygen\" is six letters, hyphen maybe one.\n\n\"①使用ssh‑keygen生成4096位RSA密钥对；\"\n\nBreakdown:\n\n① =1\n使 =2\n用 =3\ns =4\ns =5\nh =6\n‑ (hyphen) =7\nk =8\ne =9\ny =10\ng =11\ne =12\nn =13\n生 =14\n成 =15\n4 =16\n0 =17\n9 =18\n6 =19\n位 =20\nR =21\nS =22\nA =23\n密 =24\n钥 =25\n对 =26\n； =27\n\nSo that part 27 characters.\n\nNext part: \"②在~/.ssh/config中配置Host为github.com，使用Hostname为ssh.github.com、端口443，以解决22端口超时问题；\"\n\nLet's count.\n\n② =1\n在 =2\n~ =3\n/ =4\n. =5\ns =6\ns =7\nh =8\n/ =9\nc =10\no =11\nn =12\nf =13\ni =14\ng =15\n中 =16\n配 =17\n置 =18\nH =19\no =20\ns =21\nt =22\n为 =23\ng =24\ni =25\nt =26\nh =27\nu =28\nb =29\n. =30\nc =31\no =32\nm =33\n， =34\n使 =35\n用 =36\nH =37\no =38\ns =39\nt =40\nn =41\na =42\nm =43\ne =44\n为 =45\ns =46\ns =47\nh =48\n. =49\ng =50\ni =51\nt =52\nh =53\nu =54\nb =55\n. =56\nc =57\no =58\nm =59\n、 =60\n端 =61\n口 =62\n4 =63\n4 =64\n3 =65\n， =66\n以 =67\n解 =68\n决 =69\n2 =70\n2 =71\n端 =72\n口 =73\n超 =74\n时 =75\n问 =76\n题 =77\n； =78\n\nSo that part 78 characters.\n\nNext: \"③本地执行git init创建仓库；\"\n\n③ =1\n本 =2\n地 =3\n执 =4\n行 =5\ng =6\ni =7\nt =8\n = space? Actually there is no space. Actually \"git\" includes letters: g i t. Then a space? The text shows \"git init\". There's a space between git and init. We count space? Usually spaces count as characters. Let's count it. So after \"git\" there is a space. Then \"init\". So we need to include the space. Let's count properly.\n\nWe'll break down:\n\n③ =1\n本 =2\n地 =3\n执 =4\n行 =5\ng =6\ni =7\nt =8\n(space) =9\ni =10\nn =11\ni =12\nt =13\n创 =14\n建 =15\n仓 =16\n库 =17\n； =18\n\nSo 18 characters.\n\nNext: \"④使用git remote add添加远程仓库地址；\"\n\n④ =1\n使 =2\n用 =3\ng =4\ni =5\nt =6\n(space) =7\nr =8\ne =9\nm =10\no =11\nt =12\ne =13\n(space) =14\na =15\nd =16\nd =17\n添 =18\n加 =19\n远 =20\n程 =21\n仓 =22\n库 =23\n地 =24\n址 =25\n； =26\n\nSo 26 characters.\n\nNext: \"⑤通过git branch --set‑upstream‑to将本地分支关联到远程主分支；\"\n\n⑤ =1\n通 =2\n过 =3\ng =4\ni =5\nt =6\n(space) =7\nb =8\nr =9\na =10\nn =11\nc =12\nh =13\n(space) =14\n- =15\n- =16\ns =17\ne =18\nt =19\n‑ =20 (the hyphen)\nu =21\np =22\ns =23\nt =24\nr =25\ne =26\na =27\nm =28\n‑ =29\nt =30\no =31\n将 =32\n本 =33\n地 =34\n分 =35\n支 =36\n关 =37\n联 =38\n到 =39\n远 =40\n程 =41\n主 =42\n分 =43\n支 =44\n； =45\n\nSo 45 characters.\n\nNext: \"⑥git add .、git commit‑m提交信息后执行git push完成推送。\"\n\n⑥ =1\ng =2\ni =3\nt =4\n(space) =5\na =6\nd =7\nd =8\n(space) =9\n. =10\n、 =11\ng =12\ni =13\nt =14\n(space) =15\nc =16\no =17\nm =18\nm =19\ni =20\nt =21\n‑ =22\nm =23\n提 =24\n交 =25\n信 =26\n息 =27\n后 =28\n执 =29\n行 =30\ng =31\ni =32\nt =33\n(space) =34\np =35\nu =36\ns =37\nh =38\n完 =39\n成 =40\n推 =41\n送 =42\n。 =43\n\nSo 43 characters.\n\nNow sum all characters:\n\nFirst segment: 16\nSecond: 27 =\u003e total 43\nThird: 78 =\u003e total 121\nFourth: 18 =\u003e total 139\nFifth: 26 =\u003e total 165\nSixth: 45 =\u003e total 210\nSeventh: 43 =\u003e total 253\n\nTotal ~253 characters, exceeding 200. Need to reduce to around 200 characters.\n\nWe need to condense more, maybe combine some steps and remove some details.\n\nSimplify: Instead of enumerating each step in full detail, use concise phrasing.\n\nGoal: ~200 characters. Let's aim for around 190 characters.\n\nLet's propose a revised summary:\n\n\"本文介绍Git初始化的关键流程：①使用ssh‑keygen生成RSA密钥；②在~/.ssh/config中配置Host为github.com、Hostname为ssh.github.com、端口443，解决22端口超时；③本地git init创建仓库；④git remote add添加远程地址；⑤git branch --set‑upstream‑to关联本地分支到远程主分支；⑥git add .、git commit‑m提交后git push推送。\"\n\nNow count characters.\n\nWe'll count again:\n\n\"本文介绍Git初始化的关键流程：①使用ssh‑keygen生成RSA密钥；②在~/.ssh/config中配置Host为github.com、Hostname为ssh.github.com、端口443，解决22端口超时；③本地git init创建仓库；④git remote add添加远程地址；⑤git branch --set‑upstream‑to关联本地分支到远程主分支；⑥git add .、git commit‑m提交后git push推送。\"\n\nWe need to count.\n\nBreak into parts:\n\n\"本文介绍Git初始化的关键流程：\" Count:\n\n本1 文2 介3 绍4 G5 i6 t7 初8 始9 化10 的11 关12 键13 流14 程15 ：16\n\nSo 16 characters.\n\nNow part after colon: \"①使用ssh‑keygen生成RSA密钥；\"\n\n① =1\n使 =2\n用 =3\ns =4\ns =5\nh =6\n‑ =7\nk =8\ne =9\ny =10\ng =11\ne =12\nn =13\n生 =14\n成 =15\nR =16\nS =17\nA =18\n密 =19\n钥 =20\n； =21\n\nSo 21 characters.\n\nRunning total: 16 + 21 = 37.\n\nNext: \"②在~/.ssh/config中配置Host为github.com、Hostname为ssh.github.com、端口443，解决22端口超时；\"\n\nWe'll count carefully.\n\n② =1\n在 =2\n~ =3\n/ =4\n. =5\ns =6\ns =7\nh =8\n/ =9\nc =10\no =11\nn =12\nf =13\ni =14\ng =15\n中 =16\n配 =17\n置 =18\nH =19\no =20\ns =21\nt =22\n为 =23\ng =24\ni =25\nt =26\nh =27\nu =28\nb =29\n. =30\nc =31\no =32\nm =33\n、 =34\nH =35\no =36\ns =37\nt =38\nn =39\na =40\nm =41\ne =42\n为 =43\ns =44\ns =45\nh =46\n. =47\ng =48\ni =49\nt =50\nh =51\nu =52\nb =53\n. =54\nc =55\no =56\nm =57\n、 =58\n端 =59\n口 =60\n4 =61\n4 =62\n3 =63\n， =64\n解 =65\n决 =66\n2 =67\n2 =68\n端 =69\n口 =70\n超 =71\n时 =72\n； =73\n\nThus 73 characters.\n\nRunning total: 37 + 73 = 110.\n\nNext: \"③本地git init创建仓库；\"\n\n③ =1\n本 =2\n地 =3\ng =4\ni =5\nt =6\n(space?) Actually \"git init\" includes a space. But there is no space after \"git\"? The text shows \"git init\". So we have \"本地git init创建仓库\". That is \"本地\"+\"git\"+\" init\"? Actually \"本地git init创建仓库\". There is no space between \"本地\" and \"git\"? It says \"本地git init创建仓库\". So \"本地\" then \"git\". So we need to count \"本地g\". Actually characters: \"本\" (1), \"地\" (2), \"g\" (3), \"i\" (4), \"t\" (5), \" \" maybe no space? Actually after \"git\" there is a space? The phrase \"git init\" includes a space. So after \"git\" there is a space, then \"init\". So let's parse \"本地git init创建仓库\". The string: 本 (1), 地 (2), g (3), i (4), t (5), space (6), i (7), n (8), i (9), t (10), 创 (11), 建 (12), 仓 (13), 库 (14), ； (15). So total 15 characters.\n\nThus 15 characters.\n\nRunning total: 110 + 15 = 125.\n\nNext: \"④git remote add添加远程地址；\"\n\n④ =1\ng =2\ni =3\nt =4\n(space) =5\nr =6\ne =7\nm =8\no =9\nt =10\ne =11\n(space) =12\na =13\nd =14\nd =15\n添 =16\n加 =17\n远 =18\n程 =19\n地 =20\n址 =21\n； =22\n\nThus 22 characters.\n\nRunning total: 125 + 22 = 147.\n\nNext: \"⑤git branch --set‑upstream‑to关联本地分支到远程主分支；\"\n\n⑤ =1\ng =2\ni =3\nt =4\n(space) =5\nb =6\nr =7\na =8\nn =9\nc =10\nh =11\n(space) =12\n- =13\n- =14\ns =15\ne =16\nt =17\n‑ =18\nu =19\np =20\ns =21\nt =22\nr =23\ne =24\na =25\n‑ =26\nt =27\no =28\n关 =29\n联 =30\n本 =31\n地 =32\n分 =33\n支 =34\n到 =35\n远 =36\n程 =37\n主 =38\n分 =39\n支 =40\n； =41\n\nThus 41 characters.\n\nRunning total: 147 + 41 = 188.\n\nNext: \"⑥git add .、git commit‑m提交后git push推送。\"\n\n⑥ =1\ng =2\ni =3\nt =4\n(space) =5\na =6\nd =7\nd =8\n(space) =9\n. =10\n、 =11\ng =12\ni =13\nt =14\n(space) =15\nc =16\no =17\nm =18\nm =19\ni","signature":"4bfcbc846e92908320220a2403596c6d847941b220ff797854f90ad3ac4731da","type":"thinking"}],"usage":{"input_tokens":295,"output_tokens":4096},"stop_reason":"max_tokens","base_resp":{"status_code":0,"status_msg":""}}]]></description><guid isPermaLink="false">/archives/git-initial-process-oxkxi</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=https%3A%2F%2Fimage.baidu.com%2Fsearch%2Fdown%3Furl%3Dhttps%3A%2F%2Ftvax3.sinaimg.cn%2F%2Flarge%2F0072Vf1pgy1fodqogw5wxj31gi0u7b29.jpg&amp;size=m" type="image/jpeg" length="0"/><category>技术栈</category><pubDate>Tue, 30 Jan 2024 10:38:50 GMT</pubDate></item><item><title><![CDATA[Docker拉取镜像太慢]]></title><link>https://www.anhaoyang.com/archives/docker-pulls-image-too-slowly-2osrgi</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=Docker%E6%8B%89%E5%8F%96%E9%95%9C%E5%83%8F%E5%A4%AA%E6%85%A2&amp;url=/archives/docker-pulls-image-too-slowly-2osrgi" width="1" height="1" alt="" style="opacity:0;">本文介绍了三种加速 Docker 镜像拉取的方案。 1. **国内镜像源**：在 `/etc/docker/daemon.json` 中添加阿里云、网易等镜像地址，Docker 会优先从国内节点获取镜像，显著提升下载速度。 2. **配置代理**：在 `daemon.json` 同时加入 `proxies` 项，指定 http/https 代理（如本机 127.0.0.1:7890），适用于需要通过代理访问外网的场景，可进一步优化跨地域拉取。 3. **离线迁移**：若已有镜像，先在源机器使用 `docker save -o image.tar image:tag` 导出为 tar 文件，再通过 scp/rsync 等方式拷贝至目标机器，最后在目标机器执行 `docker load -i image.tar` 加载，绕过网络限制实现快速部署。 三种方法分别从网络、代理和离线三个角度解决拉取慢的问题，可根据实际环境灵活选用或组合使用。]]></description><guid isPermaLink="false">/archives/docker-pulls-image-too-slowly-2osrgi</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=%2Fupload%2Funsplash-xcgq5iN7z9s-20241126213905-a0a07qh.jpg&amp;size=m" type="image/jpeg" length="75265"/><category>问题记录</category><pubDate>Thu, 21 Dec 2023 07:20:40 GMT</pubDate></item><item><title><![CDATA[Java-类中为什么要加序列化ID]]></title><link>https://www.anhaoyang.com/archives/javawhy-do-we-need-to-add-serialization-id-to-the-class-doy6i</link><description><![CDATA[<img src="https://www.anhaoyang.com/plugins/feed/assets/telemetry.gif?title=Java-%E7%B1%BB%E4%B8%AD%E4%B8%BA%E4%BB%80%E4%B9%88%E8%A6%81%E5%8A%A0%E5%BA%8F%E5%88%97%E5%8C%96ID&amp;url=/archives/javawhy-do-we-need-to-add-serialization-id-to-the-class-doy6i" width="1" height="1" alt="" style="opacity:0;">## 摘要 本文介绍了Java类中序列化ID（serialVersionUID）的作用与意义。在对象序列化和反序列化过程中，序列化ID主要用于确保类的版本兼容性。 **主要作用包括：** - **版本兼容性控制**：当类结构发生变化（增删字段或修改字段类型）时，显式声明的序列化ID可防止反序列化时出现InvalidClassException。 - **防止反序列化失败**：未指定序列化ID时，类结构变化会导致自动生成的ID改变，使反序列化失败。 - **主动版本管理**：开发者可手动维护序列化ID，更好地控制类的版本迭代。 - **提升代码稳定性**：显式指定序列化ID可避免自动生成ID带来的潜在问题，增强代码可维护性。 **添加方式**：在实现Serializable接口的类中声明私有静态常量`serialVersionUID`即可，且一旦设定应保持稳定，避免随意的版本号变更。]]></description><guid isPermaLink="false">/archives/javawhy-do-we-need-to-add-serialization-id-to-the-class-doy6i</guid><dc:creator>酷酷の橙</dc:creator><enclosure url="https://www.anhaoyang.com/apis/api.storage.halo.run/v1alpha1/thumbnails/-/via-uri?uri=https%3A%2F%2Fimages.unsplash.com%2Fphoto-1652077859695-de2851a95620%3Fixid%3DM3w1Mjk5NjB8MHwxfHNlYXJjaHw2fHxxdWVzdGlvbnxlbnwwfHx8fDE3NjU4NzAxNzJ8MA%26ixlib%3Drb-4.1.0&amp;size=m" type="image/jpeg" length="0"/><category>Java知识三千问</category><pubDate>Fri, 15 Dec 2023 06:46:00 GMT</pubDate></item></channel></rss>