Transform2D

Uncategorized

每个Object都有自己的坐标系统,把这个物体放在世界坐标系统后,对Object执行变换操作,本质上是在变换它的坐标系,而不是改变物体上的点线面的位置。 Transform2D的结构是这样的: $$\begin{bmatrix} basis.x.x & basis.y.x & origin.x \\ basis.x.y & basis.y.y & origin.y \end{bmatrix}$$ 如果我执行旋转操作的时候,本身是给某个点执行左乘旋转矩阵,旋转矩阵的长这样: $$R(θ) =\begin{bmatrix}\cosθ & -\sinθ \\\sinθ & \cosθ\end{bmatrix}$$ 入股哦我们有一个2D的点或者一个Vector: $$ v = \begin{bmatrix} […]

Django部署静态文件问题

Uncategorized

登陆一个Django服务器的admin页面的时候出现如下错误: 主要原因是没有把admin的静态文件写入到domain/static对应的文件里 在setting.py中配置: 这里设置的STATIC_ROOT是服务器本地目录,生成的静态文件会放在这里面。执行如下命令: 执行完了,会生成一些静态文件,大概像这样: 配置Nginx: 重启一下nginx就可以了

Adding Swap Space on Ubuntu 24.04

Uncategorized

source page: https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-22-04 We can see if the system has any configured swap by typing: If you don’t get back any output, this means your system does not […]

Step by Step实现RAG

LLM

RAG(Retrieval and generation)技术可以扩展大模型的知识库,用来回答我们特定问题,这里我们Step by Step 实现RAG技术。

OpenMP and MPI

Coding, In English

OpenMP(Open Multi-Processing) is an application programming interface (library) that supports multi-platform shared-memory parallel programming in C, C++ and Fortran on all architectures, including Unix and Windows platform. It […]