Latest Articles
522 articles · Fresh posts aggregated from independent blogs across the directory.
Delightful React File/Directory Structure
How should we structure components and other files in our React apps? I've iterated my way to a solution I'm really happy with. In this blog post, I'll share how it works, what the tradeoffs are, and how I mitigate them.

显示器色域漫谈
提到显示器,很多同学第一时间想到的可能是分辨率(2K、4K)、尺寸(24、27、32)、面板(IPS、TN、LED)等,常玩游戏的同学可能还会想到刷新率、响应时间等参数。不过色域却常常被大家所忽视,其实色域是一个特别直接的影响视觉体验的参数。 色域是什么? 维基百科给的概念是这样的: 色域是对一种颜色进行编码的方法,也指一个技术系统能够产生的颜色的总合。 顶级显示器制造商艺卓是这样解释的: 色域在人眼能够识别的色彩范围(即可见光谱)内限定了一个更具体的范围。彩色成像设备包括多种设备,例如数码相机、扫描仪、显示器和…
Make Beautiful Gradients
Have you ever noticed that gradients tend to look a little gray and washed-out in the middle? This happens because of a mathematical quirk with RGB colors. Fortunately, we can work around this quirk, and create beautiful, lush, saturated gradients.
配置 Fail2ban 保护 Proxmox VE
各种情况下 Proxmox VE 的登陆界面需要暴露在公网的时候,需要使用 fail2ban 来保护它不被暴力破解。 创建 filter 文件 /etc/fail2ban/filter.d/proxmox.conf 1 2 3 [Definition] failregex = pvedaemon\[.*authentication failure; rhost= user=.* msg=.* ignoreregex = 创建 jail 文件 /etc/fail2ban/jail.d/proxmox.conf 1…
A Modern CSS Reset
I have a set of baseline CSS styles that come with me from project to project. In the past, I'd use a typical CSS reset, but times have changed, and I believe I have a better set of global styles!
Introducing “Shadow Palette Generator”
In order to create lush, realistic shadows in CSS, we need to use multiple layers and colors. How do we come up with all of the parameters, though? I've built a tool that'll help.
笔记:Arch Linux iPXE 基本启动脚本
似乎一直没有(公开且版本够新)的 Arch Linux 无人值守安装配置,所以想做一个。 参考 netboot.xyz 的 iPXE 配置,简单记录一下: 1 2 3 4 5 6 7 #!ipxe set mirror http://archlinux.mirror/archlinux/iso/latest set script http://unattended.install.script/script.sh kernel ${mirror}/arch/boot/x86_64/vmlinuz-linux ar…

《汇编语言》课程设计1
任务 将实验7中的Power idea公司的数据按照图10.2所示的格式在屏幕上显示出来。 答 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 7…
《汇编语言》实验10 编写子程序
1. 显示字符串 显示字符串是现实工作中经常要用到的功能,应该编写一个通用的子程序来实现这个功能。我们应该提供灵活的调用接口,使调用者可以决定显示的位置(行、列)、内容和颜色。 子程序描述 名称:show_str 答 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53…
《汇编语言》实验9 根据材料编程
题目 编程, 在屏幕蹭分别显示绿色、绿底红色、白底蓝色的字符串 ‘welcome to masm!’。 答 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 assu…
《汇编语言》实验8 分析一个奇怪的程序
任务 分析下面的程序,在运行前思考:这个程序可以正确返回吗? 答 可以正确返回,分析如下面代码中的注释 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 assume cs:code code segment mov ax, 4c00h int 21h start: mov ax,0 s: nop ; 声明一个字节的空指令 nop ; 声明一个字节的空指令 mov di,offset s mov…

《汇编语言》实验7 寻址方式在结构化数据访问中的应用
任务 Power idea 公司从1975年成立一直到1995年的基本情况如下。 年份 收入(千美元) 雇员(人) 人均收入(千美元) 1975 16 3 ? 1975 22 7 ? 1975 382 9 ? 1975 1356 13 ? 1975 2390 28 ? 1975 8000 38 ? … ? 1995 5937000 17800 ? 下面的程序中, 已经定义好了这些数据: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 assume cs:code data se…
《汇编语言》实验5 编写、调试具有多个段的程序
第 (1) 题 将下面的程序编译、连接,用Debug加载、跟踪,然后回答问题 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 assume cs:code,ds:data,ss:stack data segment dw 0123h,0456h,0789h,0abch,0defh,0fedh,0cbah,0987h data ends stack segment dw 0,0,0,0,0,0,0,0 stack…
初学JAVA
本文是Java学习笔记的第一部分,旨在为初学者介绍最基础的Java编程概念。文章从经典的“Hello World”程序开始,演示了如何使用System.out.println()语句进行内容输出。接着,教程引入了用户输入的实现方法,即通过创建Scanner对象来读取用户的输入内容,并给出了一个结合输入与输出的互动示例。随后,文章讲解了Java中的变量与赋值,介绍了包括int、long、float、double以及byte在内的基本数据类型,并说明了其定义和赋值方式与C语言类似。最后,通过一个输入两个数字并计算其和…