<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"><channel><title>MagicLen</title><link>https://magiclen.org/cn/2022/10/</link><description>多元化原创文章，内容包罗万象，有编程语言、网站应用、软件介绍、硬件介绍、操作系统、旅行游记、专题采访、益智问题、文学创作，以及作者们的知识分享和作品分享。</description><language>zh-CN</language><lastBuildDate>Mon, 23 Nov 2026 04:28:33 +0800</lastBuildDate><atom:link href="https://magiclen.org/cn/2022/10/feed/" rel="self" type="application/rss+xml"/><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>8</sy:updateFrequency><sy:updateBase>1970-01-01T00:00+00:00</sy:updateBase><item><title>写程序算阶乘，关于阶乘的三两事</title><link>https://magiclen.org/cn/factorial/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2022/08/factorial-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2022/08/factorial-220x162.png 1x, https://magiclen.org/wp-content/uploads/2022/08/factorial-440x324.png 2x, https://magiclen.org/wp-content/uploads/2022/08/factorial-660x486.png 3x" alt>
正整数的阶乘(Factorial)是小于或等于该数的所有正整数的乘积，若正整数为 N，用 N! 来表示 N 的阶乘。至于 0! 是阶乘的特例，它被定义为 1。阶乘的运算具有递归(recursion)概念，常作为学习程序逻辑的材料，而这篇文章将会说明阶乘相关的程序计算。]]></description><category>研究分享</category><category>Go</category><category>Java</category><category>数学逻辑</category><category>Rust</category><category>JavaScript</category><category>Java</category><category>JavaScript</category><category>Rust</category><category>TypeScript</category><category>阶乘</category><category>Go</category><guid>https://magiclen.org/cn/factorial</guid><pubDate>Thu, 27 Oct 2022 12:00:00 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>如何在 Windows 操作系统上安装 WSL2 来运行 Ubuntu 操作系统？</title><link>https://magiclen.org/cn/wsl/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2022/08/sshot-14-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2022/08/sshot-14-220x162.png 1x, https://magiclen.org/wp-content/uploads/2022/08/sshot-14-440x324.png 2x, https://magiclen.org/wp-content/uploads/2022/08/sshot-14-660x486.png 3x" alt>
WSL (Windows Subsystem for Linux)是微软提供的在 Windows 上运行 Linux 操作系统环境的一个解决方案。WSL2 因为开了虚拟机(VM)所以能够模拟出更完整的 Linux 环境，经过微软公司的精心调校，应该会比自己用 VirtualBox 等虚拟机软件来安装 Linux 操作系统运行起来还要更有效率。]]></description><category>Linux</category><category>Windows</category><category>研究分享</category><category>Linux</category><category>Ubuntu</category><category>Windows</category><category>WSL</category><guid>https://magiclen.org/cn/wsl</guid><pubDate>Tue, 25 Oct 2022 12:00:00 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>用 FFmpeg 做声音可视化(Audio Visualization)</title><link>https://magiclen.org/cn/ffmpeg-audio-visualization/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2022/08/vlcsnap-2022-08-02-14h29m06s535-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2022/08/vlcsnap-2022-08-02-14h29m06s535-220x162.png 1x, https://magiclen.org/wp-content/uploads/2022/08/vlcsnap-2022-08-02-14h29m06s535-440x324.png 2x, https://magiclen.org/wp-content/uploads/2022/08/vlcsnap-2022-08-02-14h29m06s535-660x486.png 3x" alt>
FFmpeg 全名是 Fast Forward MPEG (Moving Picture Experts Group)，为开源的影音多媒体处理框架，可以进行影音的解码、编码、编码转换、混合、抽取、串流和滤镜，无论影音格式是从哪个地方出来的，从过去到现在的影音格式它几乎都能够支持。作为专业处理影音的 FFmpeg，当然也可以将声音转成图像，做出具有艺术视觉效果的音乐。]]></description><category>研究分享</category><category>软件介绍</category><category>FFmpeg</category><category>声音可视化</category><category>影音</category><guid>https://magiclen.org/cn/ffmpeg-audio-visualization</guid><pubDate>Thu, 20 Oct 2022 12:00:00 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>从零开始的基础乐理─第三章：调式</title><link>https://magiclen.org/cn/music-theory-3/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2022/06/piano-gd103225e7_1920-220x162.jpg" srcset="https://magiclen.org/wp-content/uploads/2022/06/piano-gd103225e7_1920-220x162.jpg 1x, https://magiclen.org/wp-content/uploads/2022/06/piano-gd103225e7_1920-440x324.jpg 2x, https://magiclen.org/wp-content/uploads/2022/06/piano-gd103225e7_1920-660x486.jpg 3x" alt>
音乐的调式就如同写作时需要的起承转合一样，是一种经过几百年逐渐成型的架构，我们平常听到的音乐大部份会符合调式的规范，从而让早已听得习惯的听者能够预期音乐的走向，觉得自己好像能够「听懂」它。大调式、小调式是最常见的调式，但它们究竟是什么呢？]]></description><category>研究分享</category><category>音乐心得</category><category>从零开始的基础乐理</category><guid>https://magiclen.org/cn/music-theory-3</guid><pubDate>Tue, 18 Oct 2022 12:00:00 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>如何在运行 git commit 前自动进行检查？Git Hooks 的基本用法</title><link>https://magiclen.org/cn/git-hooks/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2022/06/study-2422315_1920-220x162.jpg" srcset="https://magiclen.org/wp-content/uploads/2022/06/study-2422315_1920-220x162.jpg 1x, https://magiclen.org/wp-content/uploads/2022/06/study-2422315_1920-440x324.jpg 2x, https://magiclen.org/wp-content/uploads/2022/06/study-2422315_1920-660x486.jpg 3x" alt>
Git Hooks 可以在运行各个动作的前后自动去触发某个脚本来做前置处理或是后置处理，这个功能很常被用来在 commit 前自动检查代码的排版或是写法上的问题，确保 commit 过的代码排版和风格是一致的。Git Hooks 有分为在客户端(client-side)触发的 Hook，以及在服务器端(server-side)触发的 Hook，这篇文章只会介绍在客户端触发的 Hook。]]></description><category>编程</category><category>Git</category><guid>https://magiclen.org/cn/git-hooks</guid><pubDate>Thu, 13 Oct 2022 12:00:00 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>如何将 PDF 文件转成图片文件或是图片版本的 PDF？</title><link>https://magiclen.org/cn/pdf-to-images/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2022/06/pdf-1783009_1920-220x162.jpg" srcset="https://magiclen.org/wp-content/uploads/2022/06/pdf-1783009_1920-220x162.jpg 1x, https://magiclen.org/wp-content/uploads/2022/06/pdf-1783009_1920-440x324.jpg 2x, https://magiclen.org/wp-content/uploads/2022/06/pdf-1783009_1920-660x486.jpg 3x" alt>
当我们将文档导出成 PDF 文件的时候，在大部分的情况下，文字、符号、线条等并不会被转成图片格式，此时拥有这个 PDF 文件的人就可以直接从中拷贝出文字，也可以自由打印出高分辨率的影本，页面中的图片也可以个别被拷贝出来。PDF 格式虽然有提供「权限」设置，可以对打印拷贝等操作设置密码锁，但如果打开这份 PDF 文件的 PDF 读取器并没有遵守这个标准的话，依然还是可以直接打印与拷贝的。为了避免 P...]]></description><category>软件介绍</category><category>ImageMagick</category><category>PDF</category><category>图像处理</category><category>文书</category><guid>https://magiclen.org/cn/pdf-to-images</guid><pubDate>Tue, 11 Oct 2022 12:00:00 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>uGet 免费、开源且跨平台的文件续传软件</title><link>https://magiclen.org/cn/uget/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2022/05/shot-03-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2022/05/shot-03-220x162.png 1x, https://magiclen.org/wp-content/uploads/2022/05/shot-03-440x324.png 2x, https://magiclen.org/wp-content/uploads/2022/05/shot-03-660x486.png 3x" alt>
uGet 是一款轻量且具有干净的图形界面的文件续传软件，免费、开放源代码，并且支持多种操作系统。aria2 是文件下载的工具，支持多种文件传输协定，包含但不限于 HTTP(S)、FTP、SFTP 和 BitTorrent，在下载同一个文件的时候 aria2 可以打开多个连接进行分割传输，甚至可以从不同的来源下载文件，以尽可能地使用更多的带宽来加速文件下载的过程。aria2 本身并没有图形界面，使用...]]></description><category>软件介绍</category><category>Linux</category><category>Windows</category><category>断点续传</category><category>uGet</category><category>aria2</category><category>curl</category><guid>https://magiclen.org/cn/uget</guid><pubDate>Thu, 6 Oct 2022 12:00:00 +0800</pubDate><dc:creator>Magic Len</dc:creator></item><item><title>如何在 Ubuntu 操作系统上编译 FFmpeg 的可执行文件来用？</title><link>https://magiclen.org/cn/ubuntu-ffmpeg/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2022/07/shot-03-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2022/07/shot-03-220x162.png 1x, https://magiclen.org/wp-content/uploads/2022/07/shot-03-440x324.png 2x, https://magiclen.org/wp-content/uploads/2022/07/shot-03-660x486.png 3x" alt>
在 Ubuntu 上直接用「apt install ffmpeg」指令安装的 FFmpeg，版本通常比较旧，也没有激活所有功能。这篇文章会介绍笔者在 GitHub 上开的项目，利用 Docker 编译出具有完整功能的 FFmpeg 可执行文件，以及运行时缺少动态函数库的解决方法。]]></description><category>Linux</category><category>研究分享</category><category>软件介绍</category><category>FFmpeg</category><category>Ubuntu</category><category>影音</category><guid>https://magiclen.org/cn/ubuntu-ffmpeg</guid><pubDate>Tue, 4 Oct 2022 12:00:00 +0800</pubDate><dc:creator>Magic Len</dc:creator></item></channel></rss>