BlockLune's Blog

首页 标签 关于 |

博客迁移记录:从 Hexo 到 Astro

2024-11-10
blog-setuphexoastro

终于,我决定自己写一个博客!

简明开发环境配置指南

2024-11-09
unixwindowsterminalproductivitysoftware-engineeringconfigurationtool

作为开发者,我们每天都会使用各种机器。一个配置良好的开发环境可以显著提高生产力,让编码变得更加愉快。本指南将指导您配置一个舒适且高效的工作空间。此文主要面向初学者,但经验丰富的开发者也可能受到启发。

Docker: 是什么? 为什么? 怎么用?

2024-10-28
dockercontainerizationsoftware-engineeringtooldevops

作为一个喜欢折腾新玩意儿的人,在网上冲浪时,我经常会去寻找各种各样新式的软件或服务。如果你和我一样也喜欢寻找这些软件,那你可能也会注意到,在安装指南中,越来越多的软件提供了一种使用 Docker 的安装或部署方法。这是什么东西?为什么现在流行使用它?我们又能如何使用它?这篇文章,带你入门 Docker 。

Zsh 简明配置指南

2024-10-21
terminalzshoh-my-zshconfiguration

作为计算机爱好者,我们每天会花大量时间和 Shell 打交道,一个配置得足够好的 Shell 会让你觉得更加得心应手。这篇博文记录了我的 Zsh 配置。本来,这篇文章只是作为我自己的笔记,所以写得比较随意;同时出于练习英语写作的目的,写成了英文。但后来发现我的朋友们也会参考,所以我将其重置为中文的,并修改完善了一些内容。

我的 Vim (以及 NeoVim) 配置

2024-10-18
vimneovimidetext-editorterminalconfiguration

Vim 可以说是一个老古董了,但是在命令行文本编辑器这一领域,即使到目前,它说第二也没人能说第一。在这篇文章中,我们会进行一些简单的配置,让 Vim 更加好用。并且,我们还会谈到 NeoVim 相关的内容,通过安装和配置 LazyVim,来让 NeoVim 变为一个现代化的、全功能的 IDE。

使用 Vue 和 @vueuse/motion 制作带动画的模态框

2024-10-17
vuetypescriptjavascriptwebmodal-animation

本文介绍了如何使用 Vue 和 @vueuse/motion 创建一个带有动画的模态框。你可以在 这里 找到最终代码。

使用 Rust 写一个简单的线程池

2024-10-17
rustconcurrencythread-poolweb-serversoftware-engineeringprogramming-language

线程池是一种多线程处理形式,它通过将任务分配给事先创建好的线程以进行重用,提高了并发性能。本文是一篇阅读笔记,原材料为 Rust 语言圣经 - 进阶实战 1 实现一个 Web 服务器。

阅读材料 4 - 代码审查 | MIT 6.005

2024-09-11
software-engineeringjavacode-reviewdrycode-hygiene

MIT 6.005 Spring 2016 的 OCW 版本的学习笔记。此篇笔记涉及的内容为 Reading 4 Code Review。

阅读材料 3 - 测试 | MIT 6.005

2024-09-11
software-engineeringtestingunit-testingregression-testingtest-coverage

MIT 6.005 Spring 2016 的 OCW 版本的学习笔记。此篇笔记涉及的内容为 Reading 3 Testing。

NextJS 笔记

2024-09-06
nextjsreactfull-stackweb-developmentserver-componentsnote

这是一篇课堂笔记,课程为 Udemy React - The Complete Guide 2024。该笔记包含了该课程中有关 NextJS 的部分内容。

My GDB Cheat Sheet

2024-03-09
ccpptoolgdbdebugging

The GNU debugger is a powerful tool for the debugging of (mainly) C/C++ programs. In this post I document the common operations of gdb and some useful learning resources.

Managing Multiple Python Versions with pyenv and conda

2024-02-20
pythontoolenvironment-managementpyenvconda

As a CS student, I often find myself working on projects that require different Python versions, each with its own set of dependencies and libraries. In such scenarios, having a reliable and efficient method for managing these versions becomes crucial. Inspired by pyenv 与 conda 双轨制:管理 Python 版本和环境, this blog post aims to document my experience with managing multiple versions of Python using pyenv and conda.

Notes for Algorithms, Part II: Shortest Paths

2024-02-10
algorithmdata-structurecourseragraph-theoryspanning-treenote

This is a note for 4.4 Shortest Paths, Algorithms, Part II.

Testing Typescript project with Mocha and Istanbul NYC

2024-02-08
typescriptjavascripttestingmochanyc

Mocha is a popular JS test framework, and Istanbul is a popular JS test coverage tool. How to use them when it comes to Typescript? This post shows a simple demo.

Introducing hexo-blockquote2note

2024-02-04
software-engineeringtoolmarkdownhexonext-theme

I use Hexo with the NexT theme to build my blog. I wrote this plugin to solve a pain point I've encountered in this workflow.

Simple Git Tutorial: Working with Remote Server

2024-01-29
gitsoftware-engineeringcollaborationremote-serverversion-control

Use remote servers to work with collaborators better.

Simple Git Tutorial: Branching and Merging

2024-01-29
gitsoftware-engineeringversion-controlbranchingmerging

Git's powerful branching and merging capabilities can help you deal with parallel collaborative development processes. Let's take a look.

A very interesting VimGolf

2024-01-28
vimtoolquicksortvimgolf

VimGolf.com is a good place for vimers to practice and improve their vim skills. This post records my experience of solving a very interesting VimGolf game -- Quicksort.

Git Commit Message Cheat Sheet (CN)

2024-01-27
gitsoftware-engineeringcommit-messagecheat-sheet

A Git commit message cheat sheet in Chinese.

Simple GitHub Tutorial

2024-01-27
gitsoftware-engineeringsshgithubversion-control

I have posted a tutorial of Git (See Simple Git Tutorial). But it mixed up using Git and using GitHub together. I post this new tutorial to draw a line and make things clear.

Two Way Binding in Vue3

2024-01-26
vuetypescript

A simple two way binding example in vue3.

Simple CMake Examples

2023-12-03
cdata-structurecmakesoftware-engineeringbuild-system

Some simple CMake examples for reviewing.

Note for Intro to Machine Learning

2023-11-12
pythonmachine-learningdecision-treerandom-forestmean-absolute-errornote

This is a note for the course on Kaggle: Intro to Machine Learning.

Getter and Setter in Python

2023-10-17
pythonoopgetter-setterproperty-decorator

Chinese translation for Getter and Setter in Python.

Awesome CLI Apps

2023-10-09
unixterminaltoolclicommand-line

This is a list of some awesome CLI (command-line interface) apps.

Notes for Machine Learning Specialization: More numerically accurate code examples

2023-08-14
aimachine-learningtensorflowcourserasoftmaxnote

This is a note for the Machine Learning Specialization.

Notes for Machine Learning Specialization: Vectorization

2023-08-09
aimachine-learningpythonvectorizationlinear-algebranote

This is a note for the Machine Learning Specialization.

Notes for 《tmux Productive Mouse-Free Development》

2023-08-05
tmuxterminalunixproductivityshellnote

Notes for tmux Productive Mouse-Free Development written by Brian P. Hogan.

Tmux Quick Start

2023-08-04
terminaltoolunixproductivity

Chinese translation for How to Install and Use Tmux.

Notes for Algorithms, Part II: Minimum Spanning Trees

2023-08-03
algorithmdata-structurejavacourseraminimum-spanning-treenote

This is a note for 4.3 Minimum Spanning Trees, Algorithms, Part II.

Notes for Algorithms, Part II: Directed Graphs

2023-07-29
algorithmdata-structurejavadigraphcourseranote

This is a note for 4.2 Directed Graphs, Algorithms, Part II.

Notes for Algorithms, Part II: Undirected Graphs

2023-07-27
algorithmdata-structurejavacourseragraph-theorynote

This is a note for 4.1 Undirected Graphs, Algorithms, Part II.

Notes for Nand2Tetris: Virtual Machine I: Stack Arithmetic

2023-07-19
nand2tetrisprogramming-languagesoftware-engineeringvm-abstractionstack-machinenote

This is a note for Nand2Tetris unit 7 (Part II, Unit 1).

Notes for Nand2Tetris: Assembler

2023-07-17
nand2tetrispythonassemblerprogramming-languagesoftware-engineeringnote

This is a note for Nand2Tetris Unit 6.

Notes for Machine Learning

2023-07-14
aimachine-learningcourseranotepythonoctavelinear-regressionlogistic-regression

Here are my notes for course Machine Learning taught by Andrew Ng.About exercise: I didn't do the original version exercise which depends on Octave or Matlab, but a third-party Python version (See nsoojin/coursera-ml-py).

Notes for Nand2Tetris: Computer Architecture

2023-07-12
nand2tetriscomputer-architecturehardware-designassembly-languagecourseranote

This is a note for Nand2Tetris Unit 5.

joshuto: A great file manager in terminal

2023-07-12
terminaltoolrustfile-managervim-like

When in a terminal, sometimes it's really annoying to keep on typing in cd or something else to browse the files and directories. Can we do it just like what we do in GUI? Then joshuto may be helpful to you.

Notes for Nand2Tetris: Machine Language

2023-07-11
nand2tetrisprogramming-languageassemblysoftware-engineeringalgorithmnote

This is a note for Nand2Tetris unit 4.

Notes for Nand2Tetris: Memory

2023-07-09
nand2tetrisnotecomputer-architecturedigital-logic

This is a note for Nand2Tetris unit 3.

Notes for Nand2Tetris: Boolean Arithmetic and the ALU

2023-07-08
nand2tetrisalgorithmhardware-designdigital-logiccourseranote

This is a note for Nand2Tetris Unit 2.

Notes for Nand2Tetris: Boolean Functions and Gate Logic

2023-07-08
nand2tetrisnotehardware-descriptionboolean-logicdigital-circuits

This is a note for Nand2Tetris Unit 1.

Python libraries mentioned in CS50P

2023-07-07
pythonprogramming-languagesoftware-engineeringtoolcs50p

This is a list of some Python libraries mentioned in CS50P 2022.

Matching IPv4 addresses with RegExp

2023-07-04
pythonregexsoftware-engineeringprogramming-languageipv4

While solving the NUM3RS problem of CS50P, I was asked to match IPv4 addresses with RegExp.

Notes for Matplotlib

2023-06-29
pythonmatplotlibdata-visualizationnotetool

Here are some notes for Matplotlib.

Better right-click menu in Win11

2023-06-22
windowstoolright-click-menucontext-menucustomization

When the Windows system was updated to version 11, the right-click menu was completely redesigned. Microsoft is apparently trying to make it simpler and more modern, but the way they have chosen to do it is really brute force: hiding everything useful in the secondary menu! I find this really annoying. Luckily, we have a way to bring back the classic, and even customize it and make it better! (This post is in Chinese.)

My personal summary of Stanford CS106L

2023-06-01
cppmodern-cppstanfordprogramming-languagesoftware-engineering

This is CS106L, an in-depth modern C++ language course from Stanford. I enrolled in it at the beginning of April and almost finished it today.

Const Correctness in C++

2023-06-01
cppsoftware-engineeringconst-interfaceconst-correctnessprogramming-language

This is a note for Lecture 8, CS106L, Spring 2023.

Type Safety and std::optional in C++

2023-05-31
cppconst-correctnesstype-safetysoftware-engineeringprogramming-language

This is a note for Lecture 14, CS106L, Spring 2023.

Move Semantics in C++

2023-05-30
cppmove-semanticsr-value-referencespecial-member-functionsprogramming-language

This is a note for Lecture 13, CS106L, Spring 2023.

static_cast and const_cast in C++

2023-05-30
cppprogramming-languagesoftware-engineeringconst-caststatic-cast

This is a note for Lecture 8, CS106L, Spring 2023.

Permutations and Combinations in Python (itertools)

2023-05-28
pythonalgorithmdata-structureitertoolspermutations-combinationsprogramming-language

Extracted from itertools — Functions creating iterators for efficient looping — Python 3.11.3 documentation

My personal summary of Algorithms, Part I on Coursera

2023-05-12
algorithmdata-structurecourseraprincetononline-course

As the title says, this is my personal summary of Algorithms, Part I on Coursera.

Installing Ubuntu

2023-04-27
software-engineeringunixterminalubuntu-installationlinux-setup

This is NOT a tutorial on how to install Ubuntu. I am just documenting some problems I encountered during my installation.

Set up a blog with Hexo

2023-04-15
hexoblog-setupwebgithub-pagesnext-theme

This is a simple record of my further attempt to set up a blog with Hexo. I built one on GitHub Page before, using Hexo with the Icarus theme. This time I want to try something different. I also cleaned up my old blog and selectively migrated some old posts here.

Uses std::cin.ignore() to keep the user typing until the input meets the requirements

2023-03-25
cppcinput-validationstd-cin

I used to control users' input by making the input a string and process it later. But today, my friend posed this question to me: Can we control input without a char array or string class?

The const and constexpr in C++ (REMAKE)

2023-03-24
cppprogramming-languageconst-usageconstexpr

I have written a post about const in C++ in Chinese before, but it was too verbose and unclear. :( So, I decided to rewrite it.

The chmod command in Linux

2023-03-23
unixterminallinuxchmodpermission-management

I accidentally ran a wrong chmod command in my Linux, and it messed up everything! I hate the permission management in Linux. :|

Useful packages in Java

2023-03-15
javaprogramming-languagesoftware-engineeringjava-iojava-lang

A simple conclusion of some useful packages in java.

Simple Git Tutorial

2023-03-11
gitversion-controlsoftware-engineeringtoolcollaboration

This is mainly a simple tutorial of Git. Some info about GitHub also included. You may also read Simple GitHub Tutorial.

Package managers in Linux (To be continued)

2023-03-11
unixtoolpackage-managerlinuxapt

This post tries to simply introduce some package managers and their basic usage.

VS Code 中设置显示最大列数边界线

2023-01-13
toolvscodeconfiguration

很多时候我们会避免一行代码过长,常见的限制有 80 字符、120 个字符等。我希望能在 VS Code 中显示一条边界线来提醒我已经到达这个限制了,需要换行。下边是设置的方法。

C 语言文件操作

2023-01-12
cprogramming-languagefile-iostdio

简单记录一下 C 语言的文件操作的相关内容。

error: summary string parsing error 错误解决方法

2023-01-11
ccppclanglldbdebugging

直接先说解决方法:在使用 clang 工具链进行编译的时候,添加编译选项 -fstandalone-debug。

Makefile 简单笔记

2023-01-08
ccppmakefilesoftware-engineeringbuild-tool

这是一篇笔记,原视频是 @于仕琪 老师的 《Makefile 20 分钟入门,简简单单,展示如何使用 Makefile 管理和编译 C++ 代码》。

C 标准库中 qsort 和 C++ STL 中 sort 的用法

2022-12-08
ccppalgorithmprogramming-languagesorting

虽然到现在还是不能完全理解 qsort 和 sort 这两个函数的底层原理,但至少,先学会如何使用吧。

求解最大公约数的四种算法

2022-12-04
algorithmdata-structurecppgcd-algorithmeuclidean-algorithm

这是一次计算机导论课的作业。本来对于最大公约数的求解算法,我就只知道一个辗转相除法。原来,其实还有别的一些 ...

初探深度优先搜索(DFS)和广度优先搜索(BFS)

2022-11-22
algorithmdata-structuregraph-traversalstack-queue

深度优先搜索(DFS,Depth First Search)和广度优先搜索(BFS,Breadth First Search),我从来没弄明白过。是时候努力去好好理解一下了。

C++ const 用法汇总

2022-11-17
cppconstcprogramming-languageconst-qualifier

最开始只是用 const 来定义常量,学到了指针传参的时候又知道了用 const 来防止一些值的修改,学到类的时候又看到非静态成员函数后边加个 const 来干嘛干嘛,然后么又听说什么顶层 const、底层 const... 真是越学越迷糊了,赶紧做一波整理。

二维数组到底是啥啊...

2022-11-16
cppdata-structuremultidimensional-arrayprogramming-language

一维数组还是比较容易理解的,但是二维数组,我始终没弄清楚这玩意儿是按照什么规则从二维的样子转成一维然后存起来的,也因此常常犯下下标写反了的错误。我觉得是时候详细地理一理这玩意儿到底是个啥了...

当形参、实参是指针变量...

2022-11-16
ccpppointer-passingfunction-parameters

接《一个有关指针传参的问题》,再理一理这里边的一些问题...

C 语言中使用变量输出小数点位数

2022-11-05
cprogramming-languageprintf-formattingdynamic-array

这事儿要从一周前讲起,有人在群里问了这么一道题,要求用 C 实现:

值传递、指针传递、引用传递

2022-11-05
ccppprogramming-languageparameter-passingfunction-arguments

接上文《一个有关指针传参的问题》,打算结合一些简单的例子系统地梳理一下 C/C++ 中的值传递、指针传递和 C++ 中特有的 引用传递。

一个有关指针传参的问题

2022-11-03
ccpppointer-manipulationmemory-managementprogramming-language

这是我学习指针过程中遇到的一个问题,问过大佬才似乎懂了点,在此记录。顺便记下一句大佬说的话:注意到一点就行,指针其实也就是个存了内存地址的变量,它本身同时也具有内存地址。

C/C++ 中赋值语句的返回值问题

2022-10-27
ccppprogramming-languageassignment-operatorloop-control

我曾经一直以为 C/C++ 中赋值语句的返回值不是 0 就是 1 —— 成功执行赋值操作返回 1,没有成功执行就返回 0。直到今天课上的一个例子,才让我知道,原来赋值语句的返回值就是赋的值的大小!

C/C++ 格式化输入输出汇总

2022-10-19
ccppprogramming-languageio

本文汇总一下 C 语言 scanf 和 printf 的格式控制方法以及 C++ 的 <iomanip> 库。

挖老婆矿!—— NovelAI 初试

2022-10-15
ainovelaiwaifu-generationimage-generation

最近一段时间,感觉突然之间,就有很多很多将现实图片二次元化啊,按照每句歌词生成一副画作啊的 AI 绘画应用的图文视频出现。和室友聊天还说是不是最近一段时间 AI 技术突破什么瓶颈突飞猛进了。后来才知道,原来是 NovelAI 泄露了... 这样一来,本地部署方便了起来,于是整了一个玩玩。由于跑 AI 嘛,GPU 比较呼啸,跟挖矿一样,我就戏称我这是在“挖老婆矿”了。

VS Code 中文乱码问题

2022-10-13
windowsterminalencodingvscodecmd

2023 年 1 月 12 日更新: 找到了方便地改变 Windows 中终端默认编码的方法,所以原来的改变 C/C++ 文件默认编码的方法可以淘汰了。

C 语言中与(&&)和或(||)运算符的短路运算

2022-10-11
ccppprogramming-languageshort-circuit-evaluationlogical-operators

此篇笔记来源于下边的这个题目。

补记一个用 C++ 实现的 2048 小游戏

2022-10-06
cppgamealgorithmdata-structureprogramming-language

校科协的加入有条件,面试前一步是笔试。免去笔试的方法也不是没有,可以做免试题。看了各个组的免试题,发现都好难好难,只有前端组的 2048 敢去尝试尝试。但我有没怎么学过 JS,便想着先用 C++ 实现一下逻辑,再把代码改过去。

C++ 中 cin 与 cout 的转进制输入输出

2022-09-29
cppprogramming-languageoctaldecimal

笔者的朋友有道输入八进制输出十进制的题目,他是使用数学方法实现的。笔者隐隐约约记得好像cin和cout有控制输入输出数字进制的方法,查找了一些资料,做一下笔记。

VS Code 的安装与配置基础 C/C++ 开发环境

2022-09-17
vscodecppwindowstoolconfiguration

我以前学习 C++ 的时候,使用的是 DevCpp 。这个软件让我这个初学者比较舒服的点是,我不用太过详细地考虑编译的过程——新建一个 cpp 文件,写一点小程序,按下 F11,程序运行。我不需要管选择编译器啊、配置编译命令啊啥啥的。但是到 VS Code 这边,这都要我自己做了,对于新手并不是那么友好。这里记录一下我配置 VS Code 的 C/C++ 环境的完整过程,希望对你有所帮助。需要注意的是:学习一下基本的编译链接指令还是很有必要的!

LaTeX 公式基础

2022-09-15
latexmathnoteprogramming-language

用 LaTeX 写数学公式的时候,总记不住一些写法,故在此记录学习笔记。

补记一个用 Vue.js 和 ElementUI 实现的在线抽奖网页

2022-08-26
webvuejavascriptelement-ui

这是一个使用 Vue2 + Element UI 写的随机点人 / 抽奖网页应用。

Edge 扩展推荐

2022-08-25
toolchrome-extensionedge-browserbrowser

2019 年 7 月写过一篇 Chrome 插件推荐的文章,那时候我还在用 Chrome 作为我的主要浏览器。一晃三年过去了,我也早已从 Google Chrome 转入全新 Chromium 内核构建的 Edge 浏览器。微软倒蛮有意思,自己从头开发的东西不咋地,在别人的平台上倒是表现得相当好。由于国内的水土不服啊,我用 Chrome 时总会遇到同步不了的情况,这点的体验在 Edge 这儿得到了很好的改善,也是我用 Edge 的主要原因吧。前些天帮很多同学做新机开荒,也推荐他们就用这款“Win11 原装”浏览器。当然一个浏览器肯定是离不开扩展的,趁着帮他们开荒这个机会,也顺便整理了我认为必备的一些浏览器扩展。

Chrome 插件推荐

2019-07-13
chrome-extensiontoolbilibiliwebchrome

你可能常年使用着国产的一些浏览器,却也常年遭受着各种弹窗、全家桶的侵扰...你也可能不止一次地听过"Chrome",安装下来后却发现他空空如也,又默默地装回那些国产...那么,让这些插件来拯救你吧