<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Franklinfang</title>
    <description>Blog template powered by jekyll to share the interesting stories in life （基于Jekyll的模板引擎的维基风格的个人博客，记录分享生活中的新鲜故事）</description>
    <link>https://frankdevhub.github.io/</link>
    <atom:link href="https://frankdevhub.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sat, 07 Feb 2026 03:06:23 +0000</pubDate>
    <lastBuildDate>Sat, 07 Feb 2026 03:06:23 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>Netty实现的JT808协议详解与应用实践</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#1-jt808协议详解&quot; id=&quot;markdown-toc-1-jt808协议详解&quot;&gt;1. JT808协议详解&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#11-jt808协议概述&quot; id=&quot;markdown-toc-11-jt808协议概述&quot;&gt;1.1 JT808协议概述&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#12-协议基本结构&quot; id=&quot;markdown-toc-12-协议基本结构&quot;&gt;1.2 协议基本结构&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#13-消息类型与数据字段&quot; id=&quot;markdown-toc-13-消息类型与数据字段&quot;&gt;1.3 消息类型与数据字段&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;1-jt808协议详解&quot;&gt;1. JT808协议详解&lt;/h1&gt;
在车载终端通信领域，JT808协议是一种广泛应用于车辆定位监控系统的通信协议。JT808协议详细规定了车载终端与服务端之间的数据交互格式、消息类型、加密方式等内容。本章将从协议的基本概念讲起，然后逐步深入分析协议的结构、消息类型和数据字段等关键内容，为接下来章节中Netty框架在JT808通信中的应用打下坚实的理论基础。

&lt;h2 id=&quot;11-jt808协议概述&quot;&gt;1.1 JT808协议概述&lt;/h2&gt;
JT808协议全称叫做《车辆定位监控信息系统通用技术条件》，它是由中国国家标准化管理委员会发布的一种专门用于车载定位监控的通信协议标准。该协议不仅涉及车辆与监控中心之间的信息传输，还覆盖了车载终端、通信服务端、数据处理等多方面技术细节。

&lt;h2 id=&quot;12-协议基本结构&quot;&gt;1.2 协议基本结构&lt;/h2&gt;
JT808协议的消息结构分为消息头和消息体两部分。消息头主要包含版本信息、消息ID、数据长度等基本信息，而消息体则根据不同的消息类型包含不同的数据项。理解这两个部分对于构建和解析JT808消息至关重要。

&lt;h2 id=&quot;13-消息类型与数据字段&quot;&gt;1.3 消息类型与数据字段&lt;/h2&gt;
JT808协议定义了多种消息类型，例如登录请求、位置信息汇报、远程控制命令、文本消息等。每种消息类型都有其独特的数据字段，了解这些字段的作用和格式对于正确处理JT808协议中的数据至关重要。本章将逐一对这些类型进行解析，以便于后续章节中详细介绍如何在Netty框架中高效处理这些消息。

</description>
        <pubDate>Wed, 21 Jan 2026 00:00:00 +0000</pubDate>
        <link>https://frankdevhub.github.io/2026/01/21/Netty-JT808-%E5%8D%8F%E8%AE%AE%E8%AF%A6%E8%A7%A3%E4%B8%8E%E5%BA%94%E7%94%A8%E5%AE%9E%E8%B7%B5/</link>
        <guid isPermaLink="true">https://frankdevhub.github.io/2026/01/21/Netty-JT808-%E5%8D%8F%E8%AE%AE%E8%AF%A6%E8%A7%A3%E4%B8%8E%E5%BA%94%E7%94%A8%E5%AE%9E%E8%B7%B5/</guid>
        
        <category>Netty</category>
        
        
        <category>JT808</category>
        
        <category>Netty</category>
        
      </item>
    
      <item>
        <title>Python使用selenium操作Docker里的Chrome浏览器的技巧</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#python使用selenium操作docker容器中的chrome浏览器&quot; id=&quot;markdown-toc-python使用selenium操作docker容器中的chrome浏览器&quot;&gt;Python使用selenium操作Docker容器中的Chrome浏览器&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#1-介绍&quot; id=&quot;markdown-toc-1-介绍&quot;&gt;1. 介绍&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#2-seleniumstandalone-chrome&quot; id=&quot;markdown-toc-2-seleniumstandalone-chrome&quot;&gt;2. selenium/standalone-chrome&lt;/a&gt;        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;#21-拉取镜像&quot; id=&quot;markdown-toc-21-拉取镜像&quot;&gt;2.1 拉取镜像&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;#22-启动容器&quot; id=&quot;markdown-toc-22-启动容器&quot;&gt;2.2 启动容器&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;#23-测试&quot; id=&quot;markdown-toc-23-测试&quot;&gt;2.3 测试&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;python使用selenium操作docker容器中的chrome浏览器&quot;&gt;Python使用selenium操作Docker容器中的Chrome浏览器&lt;/h2&gt;

&lt;h3 id=&quot;1-介绍&quot;&gt;1. 介绍&lt;/h3&gt;
selenium &lt;a href=&quot;https://www.selenium.dev/&quot;&gt;官网链接&lt;/a&gt;是我们开展web ui &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;自动化测试&lt;/code&gt;的利器，可以很方便的用代码模拟人工在浏览器上的操作，实现 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BDD（Behavior-driven development）&lt;/code&gt;，节约大量的人力。
然而，selenium在实际使用又有些痛处：

&lt;ul&gt;
  &lt;li&gt;往往需要在 windows 主机上安装、运行浏览器（比如chrome），甚至同时安装多种浏览器，不利于在 Linux 命令行下自动化执行&lt;/li&gt;
  &lt;li&gt;浏览器版本难以管理，回退到特定的版本比较困难&lt;/li&gt;
  &lt;li&gt;持续集成时需要配置 windows 节点机&lt;/li&gt;
  &lt;li&gt;需要为每种浏览器配置 webdriver&lt;/li&gt;
&lt;/ul&gt;

所以我们期望有这样的特点：

&lt;ul&gt;
  &lt;li&gt;在 Linux 命令行下启动 headless 无界面浏览器&lt;/li&gt;
  &lt;li&gt;方便启动和销毁特定版本的浏览器&lt;/li&gt;
  &lt;li&gt;一体化，减少多个服务的安装配置&lt;/li&gt;
  &lt;li&gt;自带 webdriver
docker-selenium 项目实现了上述这些特点。&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;2-seleniumstandalone-chrome&quot;&gt;2. selenium/standalone-chrome&lt;/h3&gt;
这是一个单机版本的镜像，这个里面包括一个chrome浏览器，可以用来调试selenium程序。

&lt;h4 id=&quot;21-拉取镜像&quot;&gt;2.1 拉取镜像&lt;/h4&gt;
&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;selenium/standalone-chrome
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h4 id=&quot;22-启动容器&quot;&gt;2.2 启动容器&lt;/h4&gt;
chromedriver的默认端口是4444

&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;docker run &lt;span class=&quot;nt&quot;&gt;-tid&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--name&lt;/span&gt; selenium-standalone-chrome &lt;span class=&quot;nt&quot;&gt;-h&lt;/span&gt; selenium-standalone-chrome &lt;span class=&quot;nt&quot;&gt;--memory&lt;/span&gt; 1g &lt;span class=&quot;nt&quot;&gt;--memory-swap&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-1&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; 9515:4444 selenium/standalone-chrome
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h4 id=&quot;23-测试&quot;&gt;2.3 测试&lt;/h4&gt;
这里有一点要说明下，这个和前面此处讲的Windows环境的远程chromedriver不太一样的是，这里的远程地址要加上“/wd/hub”路径才行。

&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# set opts&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# chrome = webdriver.Chrome(options=opts)&lt;/span&gt;
chrome &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; webdriver.Remote&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;http://192.168.2.88:9515/wd/hub&quot;&lt;/span&gt;, &lt;span class=&quot;nv&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;opts&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Tue, 12 Dec 2023 00:00:00 +0000</pubDate>
        <link>https://frankdevhub.github.io/2023/12/12/Python-docker-selenium/</link>
        <guid isPermaLink="true">https://frankdevhub.github.io/2023/12/12/Python-docker-selenium/</guid>
        
        <category>Selenium</category>
        
        <category>Python</category>
        
        
        <category>Selenium</category>
        
        <category>Python</category>
        
        <category>Docker</category>
        
      </item>
    
      <item>
        <title>ChatGPT 和 Elasticsearch的结合：在私域数据上使用ChatGPT</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#什么是chatgpt&quot; id=&quot;markdown-toc-什么是chatgpt&quot;&gt;什么是ChatGPT？&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;img src=&quot;https://raw.githubusercontent.com/frankdevhub/frankdevhub.github.io/master/_posts/2023/2023-04/e38d714a88fcf90cb1607340ec41bd58.png&quot; alt=&quot;image&quot; /&gt;

如何结合 Elasticsearch 的搜索相关性和 OpenAI 的 ChatGPT 的问答功能来查询您的数据？在此博客中，您将了解如何使用 Elasticsearch 将 ChatGPT 连接到专有数据存储，并为您的数据构建问答功能。

&lt;img src=&quot;https://raw.githubusercontent.com/frankdevhub/frankdevhub.github.io/master/_posts/2023/2023-04/6d492cab1ab2337ffb6f6c249e67085e.png&quot; alt=&quot;image&quot; /&gt;

&lt;h2 id=&quot;什么是chatgpt&quot;&gt;什么是ChatGPT？&lt;/h2&gt;

近几个月来，人们对 ChatGPT 充满了热情，这是一种由 OpenAI 创建的开创性人工智能模型。但 ChatGPT 到底是什么？

基于强大的 GPT 架构，ChatGPT 旨在理解文本输入并生成类似人类的响应。GPT 代表“生成式预训练Transformer（Generative Pre-trained Transformer）”。Transformer 是一种尖端模型架构，彻底改变了自然语言处理 (NLP) 领域。这些模型在海量数据上进行了预训练，能够理解上下文、生成相关响应，甚至进行对话. 要了解更多关于 transformer 模型的历史和 Elastic Stack 中的一些 NLP 基础知识，请务必查看很棒的&lt;a href=&quot;https://www.youtube.com/watch?v=SvvbMCwyOnU&quot;&gt;Elastic ML 工程师 Josh Devins 的演讲&lt;/a&gt;。

</description>
        <pubDate>Mon, 24 Apr 2023 00:00:00 +0000</pubDate>
        <link>https://frankdevhub.github.io/2023/04/24/ChatGPT-Elasticsearch-%E7%A7%81%E5%9F%9F%E6%95%B0%E6%8D%AE%E4%B8%8A%E4%BD%BF%E7%94%A8ChatGPT/</link>
        <guid isPermaLink="true">https://frankdevhub.github.io/2023/04/24/ChatGPT-Elasticsearch-%E7%A7%81%E5%9F%9F%E6%95%B0%E6%8D%AE%E4%B8%8A%E4%BD%BF%E7%94%A8ChatGPT/</guid>
        
        <category>ChatGPT</category>
        
        <category>Elasticsearch</category>
        
        <category>OpenAI</category>
        
        
        <category>ChatGPT</category>
        
        <category>Elasticsearch</category>
        
        <category>OpenAI</category>
        
      </item>
    
      <item>
        <title>FauxPilot：可本地运行的开源 GitHub Copilot （Copilot Plugin）</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#简介&quot; id=&quot;markdown-toc-简介&quot;&gt;简介&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#前提条件&quot; id=&quot;markdown-toc-前提条件&quot;&gt;前提条件&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#copilot-插件&quot; id=&quot;markdown-toc-copilot-插件&quot;&gt;Copilot 插件&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#设置&quot; id=&quot;markdown-toc-设置&quot;&gt;设置&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

GitHub Copilot 是 GitHub 去年 6 月推出的人工智能模型，这是一个利用机器学习技术为开发者提供代码建议和代码补全的工具，能够帮助开发者更快完成编程任务。但由于 GitHub Copilot 训练使用的数据集，以及该工具如今成为了一款向开发者收费的商业性产品，GitHub Copilot 也引发了一些争议。

那有没有一个能够替代 GitHub Copilot 的工具呢？

近日美国纽约大学计算机科学和工程系助理教授 Brendan Dolan-Gavitt 开源了一个名为 FauxPilot 的项目，根据介绍，这是 GitHub Copilot 的替代品，能够在本地运行并且不会上传用户的数据，如果开发者使用的是自己训练的 AI 模型，也无需再担心生成代码的许可问题。

GitHub Copilot 依赖于 OpenAI Codex，后者是一个基于 GPT-3 的自然语言转代码系统，使用了存储在 GitHub 上的 “数十亿行公共代码” 进行训练。而 FauxPilot 并没有使用 Codex，为了方便开发者使用它依赖了 Salesforce 的 CodeGen 模型，CodeGen 同样也是使用公共开源代码进行训练的。

目前 Salesforce CodeGen 提供了 3.5 亿、20 亿、60 亿 和 160 亿参数的模型，但在 FauxPilot 这边只看到 3.5 亿、60 亿和 160 亿的模型，暂时没有 20 亿模型可用，这就对训练模型需要使用的 GPU 提出了较高的要求。因为 3.5 亿参数的模型仅需要 2GB VRAM；而稍高一个档次的 60 亿参数模型所需要的 VRAM 就大幅上涨到了 13GB，这就需要至少 RTX 3090 的显卡才能跑，就更不用说 160 亿的模型了。

&lt;img src=&quot;https://raw.githubusercontent.com/frankdevhub/frankdevhub.github.io/master/_posts/2023/2023-04/2cbc40a18df03a0d3492702cae9c4f2d.png&quot; alt=&quot;image&quot; /&gt;

由于 CodeGen 模型同样是通过公共代码训练的，因此给出的代码建议可能仍然存在版权 / 许可方面的问题。开发者 Dolan-Gavitt 表示，有足够计算能力的公司或开发者可以使用自己专有的代码库或使用特定协议的开源代码库（如只含 GPL 协议的代码仓库）训练模型，将训练好的模型导入 FauxPilot 即可正常使用，这样也无需再担心产生的代码会有许可问题了。这就是 FauxPilot 可以在本地运行的好处，它也能够为企业提供一种在内部运行人工智能辅助软件的方式。

FauxPilot 的另一个特点是对于隐私方面的考虑，它不会读取公司或开发者编写的代码，也不会将这些信息共享给第三方。

FauxPilot 在 GitHub 上的地址如下：&lt;a href=&quot;https://github.com/moyix/fauxpilot&quot;&gt;https://github.com/moyix/fauxpilot&lt;/a&gt;

&lt;h2 id=&quot;简介&quot;&gt;简介&lt;/h2&gt;

这是一个本地托管版本的 GitHub Copilot。它在英伟达的 Triton 推理服务器中使用了 SalesForce CodeGen 模型和 FasterTransformer 后端。

&lt;h2 id=&quot;前提条件&quot;&gt;前提条件&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Docker&lt;/li&gt;
  &lt;li&gt;docker-compose &amp;gt;= 1.28&lt;/li&gt;
  &lt;li&gt;一台计算能力大于 7.0 的英伟达 GPU，以及足够的 VRAM 来运行你想要的模型&lt;/li&gt;
  &lt;li&gt;nvidia-docker&lt;/li&gt;
  &lt;li&gt;curl 和 zstd，用于下载和解包模型&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;copilot-插件&quot;&gt;Copilot 插件&lt;/h2&gt;

你可以配置官方 VSCode Copilot 插件来使用你的本地服务器。只要编辑你的 settings.json 来添加。

&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;github.copilot.advanced&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;debug.overrideEngine&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;codegen&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;debug.testOverrideProxyUrl&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;http://localhost:5000&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;debug.overrideProxyUrl&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;http://localhost:5000&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;设置&quot;&gt;设置&lt;/h2&gt;

运行设置脚本以选择要使用的模型。 这将从 Huggingface 下载模型，然后将其转换为与 FasterTransformer 一起使用。

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ ./setup.sh 
Models available:
[1] codegen-350M-mono (2GB total VRAM required; Python-only)
[2] codegen-350M-multi (2GB total VRAM required; multi-language)
[3] codegen-2B-mono (7GB total VRAM required; Python-only)
[4] codegen-2B-multi (7GB total VRAM required; multi-language)
[5] codegen-6B-mono (13GB total VRAM required; Python-only)
[6] codegen-6B-multi (13GB total VRAM required; multi-language)
[7] codegen-16B-mono (32GB total VRAM required; Python-only)
[8] codegen-16B-multi (32GB total VRAM required; multi-language)
Enter your choice [6]: 2
Enter number of GPUs [1]: 1
Where do you want to save the model [/home/moyix/git/fauxpilot/models]? /fastdata/mymodels
Downloading and converting the model, this will take a while...
Converting model codegen-350M-multi with 1 GPUs
Loading CodeGen model
Downloading config.json: 100%|██████████| 996/996 [00:00&amp;lt;00:00, 1.25MB/s]
Downloading pytorch_model.bin: 100%|██████████| 760M/760M [00:11&amp;lt;00:00, 68.3MB/s] 
Creating empty GPTJ model
Converting...
Conversion complete.
Saving model to codegen-350M-multi-hf...

=============== Argument ===============
saved_dir: /models/codegen-350M-multi-1gpu/fastertransformer/1
in_file: codegen-350M-multi-hf
trained_gpu_num: 1
infer_gpu_num: 1
processes: 4
weight_data_type: fp32
========================================
transformer.wte.weight
transformer.h.0.ln_1.weight
[... more conversion output trimmed ...]
transformer.ln_f.weight
transformer.ln_f.bias
lm_head.weight
lm_head.bias
Done! Now run ./launch.sh to start the FauxPilot server.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Tue, 18 Apr 2023 00:00:00 +0000</pubDate>
        <link>https://frankdevhub.github.io/2023/04/18/FauxPilot-%E5%BC%80%E6%BA%90%E6%8F%92%E4%BB%B6-GitHub-Copilot/</link>
        <guid isPermaLink="true">https://frankdevhub.github.io/2023/04/18/FauxPilot-%E5%BC%80%E6%BA%90%E6%8F%92%E4%BB%B6-GitHub-Copilot/</guid>
        
        <category>Copilot</category>
        
        <category>GitHub</category>
        
        <category>OpenAI</category>
        
        
        <category>GitHub</category>
        
        <category>Copilot</category>
        
        <category>OpenAI</category>
        
      </item>
    
      <item>
        <title>NLP余弦相似度计算文本相似率的示例分析</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#余弦相似度&quot; id=&quot;markdown-toc-余弦相似度&quot;&gt;余弦相似度&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;余弦相似度&quot;&gt;余弦相似度&lt;/h1&gt;

余弦相似度 (Cosine Similarity) 通过计算两个向量的夹角余弦值来评估他们的相似度。将向量根据坐标值，绘制到向量空间中，求得他们的夹角，并得出夹角对应的余弦值，此余弦值就可以用来表征这两个向量的相似性。夹角越小，余弦值越接近于1，它们的方向越吻合，则越相似。

&lt;ul&gt;
  &lt;li&gt;余弦定理&lt;/li&gt;
&lt;/ul&gt;

&lt;img src=&quot;https://raw.githubusercontent.com/frankdevhub/frankdevhub.github.io/master/_posts/2022/2022-06/20267488-8c050a854764cb75.jpg&quot; alt=&quot;image&quot; /&gt;

以二维空间为例，上图的a和b是两个向量，我们要计算它们的夹角θ。余弦定理告诉我们，可以用下面的公式求得：

&lt;ul&gt;
  &lt;li&gt;三角形的余弦公式&lt;/li&gt;
&lt;/ul&gt;

&lt;img src=&quot;https://raw.githubusercontent.com/frankdevhub/frankdevhub.github.io/master/_posts/2022/2022-06/20267488-9f823d91cf6090ad.jpg&quot; alt=&quot;image&quot; /&gt;

余弦的这种计算方法对n维向量也成立。假定A和B是两个n维向量，A是 [A1, A2, …, An] ，B是 [B1, B2, …, Bn] ，则A与B的夹角θ的余弦等于：

&lt;ul&gt;
  &lt;li&gt;N维向量的余弦定理&lt;/li&gt;
&lt;/ul&gt;

&lt;img src=&quot;https://raw.githubusercontent.com/frankdevhub/frankdevhub.github.io/master/_posts/2022/2022-06/20267488-ef9a62890a92b969.jpg&quot; alt=&quot;image&quot; /&gt;

</description>
        <pubDate>Mon, 27 Jun 2022 00:00:00 +0000</pubDate>
        <link>https://frankdevhub.github.io/2022/06/27/NLP-%E4%B8%AD%E6%96%87%E5%88%86%E8%AF%8D-%E6%96%87%E6%9C%AC%E7%9B%B8%E4%BC%BC%E5%BA%A6-%E4%BD%99%E5%BC%A6%E7%9B%B8%E4%BC%BC%E5%BA%A6/</link>
        <guid isPermaLink="true">https://frankdevhub.github.io/2022/06/27/NLP-%E4%B8%AD%E6%96%87%E5%88%86%E8%AF%8D-%E6%96%87%E6%9C%AC%E7%9B%B8%E4%BC%BC%E5%BA%A6-%E4%BD%99%E5%BC%A6%E7%9B%B8%E4%BC%BC%E5%BA%A6/</guid>
        
        <category>NLP</category>
        
        
        <category>NLP</category>
        
        <category>中文分词</category>
        
        <category>文本相似度</category>
        
        <category>余弦相似度</category>
        
      </item>
    
      <item>
        <title>Inside the Special Forces Military Free Fall School</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#inside-the-special-forces-military-free-fall-school&quot; id=&quot;markdown-toc-inside-the-special-forces-military-free-fall-school&quot;&gt;Inside the Special Forces Military Free Fall School&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;inside-the-special-forces-military-free-fall-school&quot;&gt;Inside the Special Forces Military Free Fall School&lt;/h1&gt;

&lt;iframe width=&quot;100%&quot; height=&quot;315&quot; src=&quot;https://www.youtube-nocookie.com/embed/JTNPvE4vvII&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

In the season two premiere of Coffee or Die, Marty Skovlund, Jr. travels to the U.S. Army JFK Special Warfare Center’s Military Free Fall School in Yuma, Arizona, where special operations service-members are taught how to get to the battlefield clandestinely and safely to conduct operations against our nation’s enemies.

The Military Free Fall School encompasses four distinct courses: the Basic Parachutist’s Course, the Jumpmaster Course, the Advanced Tactical Infiltration Course (ATIC), and the Instructor Course. In this episode, Marty takes a first-hand look at all four courses, and how they each play a part in creating warfighters who are capable of inserting into any location on earth via military free fall techniques.

In a Coffee or Die exclusive, Marty was even able to interview an active duty special operator who conducted a classified combat free fall mission in Afghanistan in 2009. This is one episode you won’t want to miss!

We’ll have the full article coming soon on CoffeeOrDie.com, but in the mean time don’t forget to like this video and subscribe to our channel!

Want to keep up with all the latest stories on Coffee or Die? Go to www.coffeeordie.com and subscribe to our newsletter!

Special thanks to Scotty Wood for providing the photo we used in this thumbnail! Follow him on Instagram: @a_life_in_freefall

</description>
        <pubDate>Wed, 14 Oct 2020 00:00:00 +0000</pubDate>
        <link>https://frankdevhub.github.io/2020/10/14/special-forces-military-free-fall-school/</link>
        <guid isPermaLink="true">https://frankdevhub.github.io/2020/10/14/special-forces-military-free-fall-school/</guid>
        
        <category>movie</category>
        
        <category>american</category>
        
        <category>sniper</category>
        
        <category>Skydive</category>
        
        
        <category>Life</category>
        
        <category>Movie</category>
        
      </item>
    
      <item>
        <title>1分钟看懂美国H1B签证改革 | 美国</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#警惕史上最严的美国h1b签证改革&quot; id=&quot;markdown-toc-警惕史上最严的美国h1b签证改革&quot;&gt;警惕史上最严的美国H1B签证改革&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;警惕史上最严的美国h1b签证改革&quot;&gt;警惕史上最严的美国H1B签证改革&lt;/h1&gt;

美国总统川普上任后致力于加强在美国生产，雇用美国人的政策，针对H1B非移民工作签证，他特别签署法令。那么H1B有怎样的变化，现在的情况如何呢？

美国总统川普（特朗普）4月18日签署〝买美国货、雇美国人〞行政令，指示联邦部门加强执行H-1B签证规定，并提出新的改革方案，防止签证欺诈和滥用。

美国自1990年开始采行H-1B非移民工作签证计划，目前每年分配6.5万个普通名额，以及2万个拥有美国硕士以上学位的名额，以利雇主招聘技术熟练的外国劳工。H-1B签证持有人可在美国工作3年，期满可延长1次，总计6年。

移民局每年4月开始受理新财年H-1B签证申请案件，根据联邦政府数据，2014财年到2018财年名额开放申请后，平均不到7天时间，申请案件数量即超过H-1B年度配额，移民局已连续5年采用电脑抽签方式决定H-1B配额。

川普上任后，会如何改革H-1B签证，一直是热门话题。各界关注的是，川普行政部门可能提出的H-1B改革重点、现阶段可能发生的改变、工资是否会提高、国会是否会加速推动改革等。针对这些疑问，computerworld.com网站做了详细的整理。

&lt;img src=&quot;https://e-images.juwaistatic.com/2017/05/BuyAmerican.jpg&quot; alt=&quot;image&quot; /&gt;

</description>
        <pubDate>Fri, 09 Oct 2020 00:00:00 +0000</pubDate>
        <link>https://frankdevhub.github.io/2020/10/09/warning-the-message-of-H1B/</link>
        <guid isPermaLink="true">https://frankdevhub.github.io/2020/10/09/warning-the-message-of-H1B/</guid>
        
        <category>american</category>
        
        <category>H1B</category>
        
        
        <category>america</category>
        
        <category>H1B</category>
        
      </item>
    
      <item>
        <title>C++实现基于TCP的Socket通信</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#c-网络编程-tcpip&quot; id=&quot;markdown-toc-c-网络编程-tcpip&quot;&gt;c++ 网络编程 TCP/IP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;c-网络编程-tcpip&quot;&gt;c++ 网络编程 TCP/IP&lt;/h1&gt;

&lt;img src=&quot;https://user-images.githubusercontent.com/29160332/69917772-b1e52d00-14a4-11ea-82dc-574fa2509565.png&quot; alt=&quot;image&quot; /&gt;

最近闲暇时间多了，有了时间就下定决心学习学习 cpp，之前有一定 cpp 基础。所以 TCP/IP 为背景进行 cpp 的学习。先写一个简单 TCP 的服务端和客户端来体验一下。什么 TCP 呀 UDP 在开始接触网络编程时候是那么陌生，是那么遥远。
其实大家不要脱离实际，自己把他 magic 化，其实一切都是合乎常理和实际的。先从 TCP 来学起。
说到网络编程我们先理解一个术语&lt;strong&gt;套接字&lt;/strong&gt;，突破这个术语，我们就向理解 TCP 迈出了一大步。简单比喻一下吧，我们彼此间通过打电话或写信的进行哪种不是面对面的交流，套接字就是我们进行这些交流工具，电话机或是邮箱，仅此而已。

</description>
        <pubDate>Mon, 02 Dec 2019 00:00:00 +0000</pubDate>
        <link>https://frankdevhub.github.io/2019/12/02/tcp-socket-demo/</link>
        <guid isPermaLink="true">https://frankdevhub.github.io/2019/12/02/tcp-socket-demo/</guid>
        
        <category>c++</category>
        
        <category>TCP/IP</category>
        
        <category>socket</category>
        
        <category>io</category>
        
        
        <category>C++</category>
        
        <category>TCP/IP</category>
        
        <category>Socket</category>
        
        <category>IO</category>
        
      </item>
    
      <item>
        <title>Java自定义注解与简单应用：实现一个简易版的系统方法级别权限控制</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#概述&quot; id=&quot;markdown-toc-概述&quot;&gt;概述&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#自定义注解&quot; id=&quot;markdown-toc-自定义注解&quot;&gt;自定义注解&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;概述&quot;&gt;概述&lt;/h1&gt;

本文主要介绍一下Java自定义注解，并且写个自定义注解应用的案例
请不要过多关注文中使用这种方式实现系统方法级别权限控制的完美性（后台按钮并没有直接根据用户权限决定显示不显示，而是默认都展示，用户操作时才进行此操作的权限认证），这只是一个用来演示自定义注解使用的案例
当然，你也可以直接集成spring-security或shiro，而且会更好

&lt;h2 id=&quot;自定义注解&quot;&gt;自定义注解&lt;/h2&gt;

从JDK 1.5开始, Java增加了对元数据(MetaData)的支持，也就是 Annotation(注解)
注解可以标记在包、类、属性、方法，方法参数以及局部变量上，且同一个地方可以同时标记多个注解
注解在Java中的应用相当广泛，例如@override @supperwarnning等，而框架中应用的就更多了，框架一般都会有自己的注解体系，那么注解有什么用呢？

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;生成文档&lt;/strong&gt; 例如常见的@see，@param，@return，@author等等&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;跟踪代码依赖性，实现替代配置文件功能&lt;/strong&gt;
比较常见的是spring 2.5 开始的基于注解配置，作用就是减少xml配置&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;在编译时进行格式检查&lt;/strong&gt;
比如我们熟知的@override， 放在方法上，如果你这个方法并不是覆盖了超类方法，则编译时就能检查出
接下来我们实现一个最简单的自定义注解：&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Sun, 17 Nov 2019 00:00:00 +0000</pubDate>
        <link>https://frankdevhub.github.io/2019/11/17/java-annotation-reflect/</link>
        <guid isPermaLink="true">https://frankdevhub.github.io/2019/11/17/java-annotation-reflect/</guid>
        
        <category>java</category>
        
        
        <category>Java</category>
        
      </item>
    
      <item>
        <title>Redis集群的5种使用方式，各自优缺点分析</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#redis集群的5种方式&quot; id=&quot;markdown-toc-redis集群的5种方式&quot;&gt;Redis集群的5种方式&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#一常见使用方式&quot; id=&quot;markdown-toc-一常见使用方式&quot;&gt;一、常见使用方式&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;redis集群的5种方式&quot;&gt;Redis集群的5种方式&lt;/h1&gt;

Redis 多副本，采用主从(replication)部署结构，相较于单副本而言最大的特点就是主从实例间数据实时同步，并且提供数据持久化和备份策略。

&lt;img src=&quot;https://user-images.githubusercontent.com/29160332/68992180-2b74fc80-08a3-11ea-8c9b-64bc428d2360.png&quot; alt=&quot;image&quot; /&gt;

&lt;h2 id=&quot;一常见使用方式&quot;&gt;一、常见使用方式&lt;/h2&gt;

Redis 的几种常见使用方式包括：

&lt;ul&gt;
  &lt;li&gt;
    Redis 单副本
  &lt;/li&gt;
  &lt;li&gt;
    Redis 多副本(主从)
  &lt;/li&gt;
  &lt;li&gt;
    Redis Sentinel(哨兵)
  &lt;/li&gt;
  &lt;li&gt;
    Redis Cluster
  &lt;/li&gt;
  &lt;li&gt;
    Redis 自研
  &lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Sat, 16 Nov 2019 00:00:00 +0000</pubDate>
        <link>https://frankdevhub.github.io/2019/11/16/about-redis-cluster/</link>
        <guid isPermaLink="true">https://frankdevhub.github.io/2019/11/16/about-redis-cluster/</guid>
        
        <category>redis</category>
        
        <category>cache</category>
        
        
        <category>Redis</category>
        
        <category>Cache</category>
        
      </item>
    
  </channel>
</rss>
