<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
            <title type="text">郎家岭伯爵的博客</title>
            <subtitle type="text">滚滚红尘，须臾花开，刹那雪乱。</subtitle>
    <updated>2026-04-27T20:35:12+08:00</updated>
        <id>https://langjialing.com</id>
        <link rel="alternate" type="text/html" href="https://langjialing.com" />
        <link rel="self" type="application/atom+xml" href="https://langjialing.com/atom.xml" />
    <rights>Copyright © 2026, 郎家岭伯爵的博客</rights>
    <generator uri="https://halo.run/" version="1.6.3">Halo</generator>
            <entry>
                <title><![CDATA[Java：流资源的使用和理解]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/java-liu-zi-yuan-de-shi-yong-he-li-jie" />
                <id>tag:https://langjialing.com,2026-04-27:java-liu-zi-yuan-de-shi-yong-he-li-jie</id>
                <published>2026-04-27T20:30:40+08:00</published>
                <updated>2026-04-27T20:35:12+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[前言最近在做一个需求时，需要在 Linux 服务器上获取某个磁盘上挂载点的大小，写了一段逻辑但是发现有些问题（没有显式的关闭资源）。为了排查是否会造成影响，所以仔细分析了下这段代码，也加深了对 Java 中流资源的理解。这里记录下。实现代码以下是两段代码，第一段是问题代码，第二段是修复后的代码。可以]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[Java：stopWatch用法]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/javastopwatch-yong-fa" />
                <id>tag:https://langjialing.com,2026-04-14:javastopwatch-yong-fa</id>
                <published>2026-04-14T20:15:03+08:00</published>
                <updated>2026-04-14T20:15:03+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[前言最近在做项目时发现有使用 stopWatch 工具来实现性能分析，这里记录一下。实现Hutool工具类实现这里使用 Hutool 工具类里的 stopWatch 来实现。示例代码段：package org.example.test;import cn.hutool.core.date.StopW]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[多线程：如何确保所有子线程执行完毕-join()方法]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/duo-xian-cheng--ru-he-que-bao-suo-you-zi-xian-cheng-zhi-xing-wan-bi--join-fang-fa" />
                <id>tag:https://langjialing.com,2025-12-04:duo-xian-cheng--ru-he-que-bao-suo-you-zi-xian-cheng-zhi-xing-wan-bi--join-fang-fa</id>
                <published>2025-12-04T20:46:38+08:00</published>
                <updated>2025-12-04T20:50:21+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[前言前面有写过关于一篇在多线程环境中如何确保所有子线程执行完毕的文章，当时写的是使用 CountDownLatch 计数器来实现。今天来纠正下这部分的内容：使用计数器只能确保所有的线程都开始被执行了，无法确保线程执行完毕。接下来我们来复现下这个问题。实现问题复现这里我们复现一下使用 CountDow]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[Git：在IDE中打开多个窗口运行同一个项目(或同一个项目的不同分支)——worktree的使用]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/git-zai-ide-zhong-da-kai-duo-ge-chuang-kou-yun-xing-tong-yi-ge-xiang-mu--huo-tong-yi-ge-xiang-mu-de-bu-tong-fen-zhi-worktree-de-shi-yong" />
                <id>tag:https://langjialing.com,2025-10-01:git-zai-ide-zhong-da-kai-duo-ge-chuang-kou-yun-xing-tong-yi-ge-xiang-mu--huo-tong-yi-ge-xiang-mu-de-bu-tong-fen-zhi-worktree-de-shi-yong</id>
                <published>2025-10-01T08:55:59+08:00</published>
                <updated>2025-10-01T08:57:44+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[前言最近遇到这样一个问题：在代码调试时需要频繁切换运行参数，切换参数后需频繁重新运行代码。因此想找一个可在IDE中打开多个窗口运行同一个项目的方法，还真有这样的方法——Git中的 worktree 可完美解决这个问题。实现理论部分Git 的 工作树（worktree） 是一个强大的功能，它允许我们在]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[电化学平衡的基本条件的判断]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/dian-hua-xue-ping-heng-de-ji-ben-tiao-jian-de-pan-duan" />
                <id>tag:https://langjialing.com,2025-09-20:dian-hua-xue-ping-heng-de-ji-ben-tiao-jian-de-pan-duan</id>
                <published>2025-09-20T14:46:02+08:00</published>
                <updated>2025-09-22T20:39:42+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[理论本文的核心思想是：通过改变电极电位（即施加电压），可以主动地控制电化学反应的方向。这就像是开车，加电压（踩油门）让反应往一个方向跑，减电压（踩刹车）就让反应往反方向跑。核心概念：平衡状态首先，要理解“净的”反应，得先知道什么是“平衡”状态。对于一个简单的电化学反应（以铜电极为例）：Cu²⁺ + ]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[绝对电极电位与相对电极电位]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/jue-dui-dian-ji-dian-wei-yu-xiang-dui-dian-ji-dian-wei" />
                <id>tag:https://langjialing.com,2025-09-20:jue-dui-dian-ji-dian-wei-yu-xiang-dui-dian-ji-dian-wei</id>
                <published>2025-09-20T14:41:46+08:00</published>
                <updated>2025-09-20T15:57:51+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[理论绝对电极电位为什么绝对电极电位不可测？核心概念：什么是“绝对电极电位”？想象一下把一块金属（比如锌片）插入到它的盐溶液（比如硫酸锌溶液）中。金属表面和溶液之间会发生化学反应，形成一层特殊的电荷层（我们称之为“双电层”）。这个电荷层产生的电势差，就是这块金属在该溶液中的绝对电极电位（图中表示为 φ]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[相的内电位与相间电位]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/xiang-de-nei-dian-wei-yu-xiang-jian-dian-wei" />
                <id>tag:https://langjialing.com,2025-09-16:xiang-de-nei-dian-wei-yu-xiang-jian-dian-wei</id>
                <published>2025-09-16T20:56:55+08:00</published>
                <updated>2025-09-16T20:56:55+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[理论电子逸出功（Work Function），也常被称为功函数或脱出功，是一个在电化学、材料科学和固体物理中非常重要的概念。它描述的是 电子从固体材料（最常见的是金属）内部挣脱到其表面之外的真空中，所需要克服的最小能量 。]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[电化学界面的基本结构特征：双电层]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/dian-hua-xue-jie-mian-de-ji-ben-jie-gou-te-zheng--shuang-dian-ceng" />
                <id>tag:https://langjialing.com,2025-09-15:dian-hua-xue-jie-mian-de-ji-ben-jie-gou-te-zheng--shuang-dian-ceng</id>
                <published>2025-09-15T20:45:11+08:00</published>
                <updated>2025-09-16T20:15:28+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[理论水化作用的本质是水分子通过氢键、静电力或配位键等作用力与物质结合。当离子或分子溶于水时，会破坏水原有的四面体氢键结构，并在其周围形成定向排列的水分子层，称为水化膜。这个过程属于“溶剂化”的一种（以水为溶剂时特称为水化），它促进了物质的溶解或离解。在电解质溶液中，离子通常以水化离子的形式存在，例如]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[电化学绪论]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/dian-hua-xue-xu-lun" />
                <id>tag:https://langjialing.com,2025-09-15:dian-hua-xue-xu-lun</id>
                <published>2025-09-15T20:16:01+08:00</published>
                <updated>2025-09-15T20:18:52+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[背景由于工作需要用到电化学相关知识，因此记录一些电化学视频课程的笔记。此分类下的课程基于B站胡吉明老师的电化学视频课程。理论]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[Java：值传递和引用传递]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/java-zhi-chuan-di-he-yin-yong-chuan-di" />
                <id>tag:https://langjialing.com,2025-08-19:java-zhi-chuan-di-he-yin-yong-chuan-di</id>
                <published>2025-08-19T20:02:14+08:00</published>
                <updated>2025-08-20T11:29:02+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[前言今天遇到一个关于 Java 引用导致的 Bug，这个问题其实是一个高频的面试问题，比较考验我们对 Java 中“对象类型传递”的理解。这个问题还是比较基础的，稍微记录一下。实现理论部分首先我们需要明确：Java 中所有的参数传递都是值传递。基本数据类型直接传递的是值，这很直观。Java 中有 8]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[多线程：ExecutorService的submit()方法]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/duo-xian-cheng-executorservice-de-submit-fang-fa" />
                <id>tag:https://langjialing.com,2025-08-04:duo-xian-cheng-executorservice-de-submit-fang-fa</id>
                <published>2025-08-04T20:00:13+08:00</published>
                <updated>2025-12-04T20:57:13+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[前言之前我们介绍过在多线程的应用中确保所有任务执行完成的代码用法，我们使用 CountDownLatch 计数器来实现。本文我们将使用 ExecutorService 的 submit() 方法来实现。实现理论submit()和execute()先介绍下 ExecutorService 的 subm]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[Redis：分布式锁应用中获取锁与加锁的原子性问题]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/redis-fen-bu-shi-suo-ying-yong-zhong-huo-qu-suo-yu-jia-suo-de-yuan-zi-xing-wen-ti" />
                <id>tag:https://langjialing.com,2025-04-02:redis-fen-bu-shi-suo-ying-yong-zhong-huo-qu-suo-yu-jia-suo-de-yuan-zi-xing-wen-ti</id>
                <published>2025-04-02T16:14:14+08:00</published>
                <updated>2025-04-02T17:21:16+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[前言在分布式环境下通常需要加分布式锁来解决服务之间的资源竞争问题，通常我们使用 Redis 或者 Zookeeper 来解决分布式锁问题。本文我们来解决下 Redis 实现分布式锁时的获取锁和加锁的原子性操作问题。实现前面我们写过几篇关于 Redis 基本操作的案例，本文不再赘述 Redis 的基础]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[Java：Java8函数式接口使用]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/javajava8-han-shu-shi-jie-kou-shi-yong" />
                <id>tag:https://langjialing.com,2025-03-11:javajava8-han-shu-shi-jie-kou-shi-yong</id>
                <published>2025-03-11T11:29:46+08:00</published>
                <updated>2025-03-11T11:31:42+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[前言最近遇到 Java8 里的函数式接口，记录一下常规使用。实现函数式接口(Functional Interface)就是一个有且仅有一个抽象方法，但是可以有多个非抽象方法的接口。函数式接口可以被隐式转换为 Lambda 表达式。Java8 里的函数式接口可分为五大类：消费型接口(Consumer)]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[MySQL：SQL中变量的使用]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/mysqlsql-zhong-bian-liang-de-shi-yong" />
                <id>tag:https://langjialing.com,2024-11-05:mysqlsql-zhong-bian-liang-de-shi-yong</id>
                <published>2024-11-05T16:16:57+08:00</published>
                <updated>2024-11-05T16:20:22+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[前言在一些业务场景中，需要在数据库层生成有一定规律的编码，此时可以使用 SQL 中的变量来进行操作。实现建表首先我们创建一个如下的表结构，并写入15条数据：CREATE TABLE &#96;user202411&#96; (  &#96;user_id&#96; int NOT NULL AUTO]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[Docker：更换国内镜像源]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/docker-geng-huan-guo-nei-jing-xiang-yuan" />
                <id>tag:https://langjialing.com,2024-10-10:docker-geng-huan-guo-nei-jing-xiang-yuan</id>
                <published>2024-10-10T16:43:07+08:00</published>
                <updated>2024-10-10T16:43:07+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[前言由于众所周不知的原因，国内很多 Docker 镜像源都无法使用了（例如网易镜像源、中科大镜像源等），网上找了半天，这个方法还是可用的。解决具体镜像源地址如下：{  &quot;registry-mirrors&quot;: [    &quot;https://docker.m.daocloud]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[ElasticSearch：Logstash之大数据量同步中的深分页问题]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/elasticsearchlogstash-zhi-da-shu-ju-liang-tong-bu-zhong-de-shen-fen-ye-wen-ti" />
                <id>tag:https://langjialing.com,2024-09-11:elasticsearchlogstash-zhi-da-shu-ju-liang-tong-bu-zhong-de-shen-fen-ye-wen-ti</id>
                <published>2024-09-11T11:46:50+08:00</published>
                <updated>2024-12-03T09:36:58+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[前言前面写过几篇使用 Logstash 把数据从 MySQL 同步到 ElasticSearch 的文章，在那几篇文章中，同步的数据量较小时没有问题，但在同步大量数据时会出现深分页问题。本文我们即是要解决深分页问题。需要注意的是，深分页问题并不是 Logstash 或者 ElasticSearch ]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[Python：开发Android应用]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/python-kai-fa-android-ying-yong" />
                <id>tag:https://langjialing.com,2024-07-05:python-kai-fa-android-ying-yong</id>
                <published>2024-07-05T12:56:18+08:00</published>
                <updated>2024-07-05T12:59:23+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[前言近几天想用 Python 写一个 Android 脚本，Python 功能搞完了，但是在打包为 APK 文件时费了半天的劲。特意记录一下步骤。实现AutoPy-Android在控制 Android 系统时，我使用的 AutoPy-Android 工具包。官方文档的示例程序写得很完善，而且还有 Q]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[Halo：H2数据库切换为MySQL]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/haloh2-shu-ju-ku-qie-huan-wei-mysql" />
                <id>tag:https://langjialing.com,2024-06-28:haloh2-shu-ju-ku-qie-huan-wei-mysql</id>
                <published>2024-06-28T09:05:37+08:00</published>
                <updated>2024-06-28T09:09:22+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[前言Halo 站点在 1.x 版本默认使用的使用 H2 数据库，在 Halo 社区常有各种原因(服务器异常掉电、OOM 等问题)导致 H2 物理文件损坏，继而导致数据丢失的案例出现，Halo 官方也建议更换为 MySQL 数据库。本文记录下本站点 H2 转 MySQL 的步骤。实现Halo 管理后台]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[Maven：安装JAR包到本地仓库]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/maven-an-zhuang-jar-bao-dao-ben-de-cang-ku" />
                <id>tag:https://langjialing.com,2024-06-26:maven-an-zhuang-jar-bao-dao-ben-de-cang-ku</id>
                <published>2024-06-26T09:50:23+08:00</published>
                <updated>2024-06-26T09:52:51+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[前言由于网络原因，通常大家会把 Maven 的云仓库配置为阿里云仓库，但有些依赖在阿里云拉取不到(例如 geotools 的依赖)。这时我们需要把 JAR 包从 Maven 中央仓库下载下来，然后手动安装到本地进行使用。实现首先确认 Maven 环境是正常的：然后使用如下命令把 JAR 包安装到本地]]>
                </content>
            </entry>
            <entry>
                <title><![CDATA[ElasticSearch：“近实时性”理解]]></title>
                <link rel="alternate" type="text/html" href="https://langjialing.com/archives/elasticsearch-jin-shi-shi-xing--li-jie" />
                <id>tag:https://langjialing.com,2024-06-25:elasticsearch-jin-shi-shi-xing--li-jie</id>
                <published>2024-06-25T11:25:11+08:00</published>
                <updated>2024-06-25T11:28:19+08:00</updated>
                <author>
                    <name>郎家岭伯爵</name>
                    <uri>https://langjialing.com</uri>
                </author>
                <content type="html">
                        <![CDATA[背景在生产环境遇到这样一个问题：先在索引中删除数据，在接下来的逻辑里需要判断数据是否删除，发现数据仍然存在；但在 kibana 的命令行里查询数据，又发现数据的确被删除了。概括问题的现象是这样的：删除数据没有立即生效，立刻去查询依然可以查询到，间隔一小段时间后就查询不到了。解决理论部分这其实是 El]]>
                </content>
            </entry>
</feed>
