Flexbox
Flexbox is a way to arrange items into rows or columns. These items will flex based on some rules that you can define. Flexbox is not just a single CSS property but a whole toolbox of properties that you can use to put things where you need them. Some of these properties belong on the flex container, while some go on the flex items. This is an important concept. Flex container: any elements that has display: flex on it. Flex item: any element that lives directly inside of a flex...
The Box Model
The Box Model We could consider all the elements in the website a box. Yes, they are rectangular boxes, nesting in an other box, and lying beside an other box. Here we use padding, border, and margin to manipulate the size of these boxes, and the space between them. padding increases the space between the border of a box and the content of the box. border adds space (even if it’s only a pixel or two) between the margin and the padding margin increases the space between the borders of a box...
The Cascade
SpecificityA CSS declaration that is more specific will take precedence over less specific ones. First inline styles have the hightest specificity compared to selectors, while each type of selector has its own specificity level. ID selectors (most specific selector) Class selectors Type selectors Specificity will only be taken into account when an element has multiple, conflicting declarations targeting it, sort of like a tie-breaker. Note: When there is no declaration with a selector of...
Foundation Intro to CSS
Basic Syntax At the most basic level, CSS is made of various rules. These rules are made of a selector and a semicolon-separated list of declarations, with each of those declarations being made up of a property-value pair. Just like this: Selectors Selectors refer to the HTML elements to which CSS rules apply. Universal SelectorThe universal selector will select elements of every type (as in the whole document) 123* { color: purple;} Type SelectorA Type selector (or element...
javascript
What is javascript? JavaScript is a high-level scripting language mainly used for building interactive web pages. It runs in web browsers (like Chrome or Firefox) using an embedded engin (like V8 in Chrome).It can also run outside browsers using Node.js. How does javascript run? Not like C, JavaScript cannot be directly compiled into a binary file, then executed by operating system. Here I will clarify this layer by layer, from JS code to the Hardware. JavaScript Engine The execution of...
线代笔记
行列式的变换 行列式的计算三角形行列式的计算三角形行列式很好算,结果就等于主对角线的乘积。 范德蒙行列式的计算范德蒙行列式的结果就等于公比元素作差再相乘。并且这个作差是后边的减去前边的。 爪形行列式的计算爪形行列式通常化为三角形行列式进行计算。 一种与余子式有关的特殊题型 利用拆和的方法计算行列式 利用拉普拉斯公式计算行列式 矩阵矩阵的乘法矩阵乘法取第一个矩阵的行和第二个矩阵的列注意: 抽象矩阵求逆矩阵 数字型矩阵求逆对于较小的矩阵如二阶方阵,一般使用伴随矩阵法直接秒,而高阶方阵一般都使用初等行变换法,通过构造增广矩阵并进行初等变换来提取逆矩阵。 求解矩阵方程只要一步步解就行了 方阵的行列式这里主要讲几个公式: 矩阵的秩 行阶梯型矩阵就是每一行的第一个非零元素所在的列都比下一行的第一个非零元素所在的列更靠前。设 A 为一个矩阵,那么通过初等行变换将矩阵 A 转化为行阶梯型矩阵 B 之后,矩阵 B 中非零行的个数即位矩阵 A 的秩的值。 向量组的线性相关性判断数字型向量组的线性相关性多个向量组成的向量组...
高数下笔记
多元函数微分学二重极限的计算二重极限有这么几个计算方法: 对于非零元素可直接带入得到极限 对于整体元素,可以还原变成一元极限计算 对于0元素,可以使用等价无穷小替换 偏导数的计算一阶偏导数 一般情况:直接将其它变量当作常量进行求导即可 复合函数求偏导:链式法则,同枝相乘,异枝相加 二阶偏导数直接先求一阶导,再求二阶导就行了 多元函数全微分全微分就是函数关于各个自变量的偏导与自变量的微分之积的和 多元隐函数的偏导数直接对方程两遍同时求偏导再解方程即可,与一元隐函数求导的方法相同。 多元函数求极值 条件极值/最值使用拉格朗日乘数法: 二重积分非圆周区域上二重积分的计算首先确定积分区域的类型,x 型区域先积 y 再积 x;y 型区域先积 x 再积 y。 特殊情况有时候会遇到一些不可积函数,但是可能是对 y 不可积,但是对 x 却可积。在这种情况的题目中,一般都是可以选 x 型区域,也可以选择 y 型区域。这时候我们就要注意这种情况进行合理的区域类型选取。 example: 圆周相关区域上二重积分的计算当积分区域与圆有关,或者北极函数含有 $x^2 +...
how-to-use-waydroid
If you want to run Android software, and accidentally you are using Arch Linux, waydroid is a good choice. 在这篇文章中我会讲述如何在 Arch Linux 中安装并且使用 waydroid。
steam-in-arch
想要在 archlinux 上使用 steam,由于 steam 需要 32 位库支持,首先应当启用 multilib。打开文件 /etc/pacman.conf: 1$ sudo nvim /etc/pacman.conf 在文件中添加以下内容: 12[multilib]Include = /etc/pacman.d/mirrorlist 接着更新软件包数据库: 1$ sudo pacman -Syu 安装 steam 以及其依赖: 1$ sudo pacman -S steam lib32-nvidia-utils lib32-alsa-plugins lib32-mesa 配置 xwayland 兼容性:由于 hyprland 默认使用 wayland, 而 steam 依赖 xwayland,就需要配置一下 hyprland 的 xwayland 1$ nvim ~/.config/hypr/hyprland.conf 添加以下内容: text123456xwayland { force_zero_scaling = true # 禁用...
重定位, pic & 延迟绑定
这里给出一个 ELF 文件类型的表格: 重定位 (Relocation)让我们抛出两个问题:什么是重定位?为什么要重定位呢? 在一个 C 源码被经过编译和汇编,生成一个由机器码组成的 ELF 文件(这是一个可重定位文件 ET_REL)之后,要想成功执行它的话,我们要考虑到这样一个问题: 这个 C 源码可能使用了库函数,比如 printf,malloc 等等,这些库函数是定义在标准库中的,仅仅依靠这一个 C 源码的话是无法运行的。 那么编译器如何处理这个问题呢?有两个方案: 使用静态链接,将标准库中的代码与 C 源码直接整合到一起,形成一个更大的 ELF 文件,自己本身就包含了所有所需的代码,可以独立完成任务。 使用动态链接,首先使用 如果要静态链接一个程序,只需要将多个可重定位文件(.o 文件)通过 linker(链接器)直接链接为一个完整的可执行文件,所有代码和数据都包含在最终的 ELF 文件中,运行时不再依赖外部的共享库,也不需要动态链接器(interpreter)。 而如果要动态链接一个程序,首先也需要通过 linker 对多个可重定位文件进行处理,但这时...