Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lmj01 committed Jun 20, 2024
1 parent 997e137 commit f90f0e9
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 7 deletions.
3 changes: 2 additions & 1 deletion articles/2024/trend.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

无头系统(Headless System)是指已配置为无须显示器(即“头”)、键盘和鼠标操作的计算机系统或设备。无头系统通常通过网络连接控制,但也有部分无头系统的设备需要通过RS-232串行连接进行设备的管理。服务器通常采用无头模式以降低运作成本。

[Headless UI 全称是 Headless User Interface](https://www.merrickchristensen.com/articles/headless-user-interface-components/),是一种前端开发的方法论(亦或者是一种设计模式),其核心思想是将 用户界面(UI)的逻辑和交互行为 与 视觉表现(CSS 样式) 分离开来;具体而言,Headless UI 的组件通常是纯粹的 JavaScript(或其他编程语言)组件,它们包含了一些交互逻辑和状态管理,但没有任何与视觉样式相关的代码。
[Headless UI 全称是 Headless User Interface](https://www.merrickchristensen.com/articles/headless-user-interface-components/),是一种前端开发的方法论(亦或者是一种设计模式),其核心思想是将 **用户界面(UI)的逻辑和交互行为****视觉表现(CSS 样式)** 分离开来;具体而言,Headless UI 的组件通常是纯粹的 JavaScript(或其他编程语言)组件,它们包含了一些交互逻辑和状态管理,但没有任何与视觉样式相关的代码。

这个算是组件开发的一部分了,把逻辑与样式分离开,样式名使用自己的一套命名规则,样式在对这些特定class name进行赋值。

## AI

Expand Down
4 changes: 4 additions & 0 deletions web/font.md → cg/font.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ figma文字 > 矢量形状 > 屏幕像素

- [canvas-editor基于canvas/svg的富文本编辑器](https://hufe.club/canvas-editor-docs/)

使用 freetype 库 用opengl显示 ,无法显示汉字,
freetype可以根据ttf等格式的font文件 提取到文字轮廓 然后根据轮廓三角化就行了,可以借助[CGAL库](https://www.cgal.org/)

[FTGL is a free cross-platform Open Source C++ library that uses Freetype2 to simplify rendering fonts in OpenGL applications. FTGL supports bitmaps, pixmaps, texture maps, outlines, polygon mesh, and extruded polygon rendering modes.](https://sourceforge.net/projects/ftgl/)

## 参考
[Web 字体 font-family 该如何设置?](https://zhuanlan.zhihu.com/p/313284552)
Expand Down
13 changes: 13 additions & 0 deletions cpl/language.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,16 @@ rust语言的安全,就是通过所有权的确定来保证在运行期不会

- [js版的highlight高亮配置,选中语言,下载后选择es版本的,选择特定语言即可](https://highlightjs.org/download)


## OOP
object-orientation

- [What's In a Class? - The Interface Principle](http://www.gotw.ca/publications/mill02.htm)

- [Tell-Don't-Ask is a principle that helps people remember that object-orientation is about bundling data with the functions that operate on that data.](https://martinfowler.com/bliki/TellDontAsk.html)

logic 指的就是 functions,logic 和 data 分离,就是 C 时期的 functions + struct;合并起来,就是 class。尽管 trivial getters/setters 是用 class 写的,但和 function + struct 并没有区别,只是在对象里面转发了一下数据而已,反而会使 API 膨胀,显得十分冗余。

class 抽象的是想法,而不是一堆数据。private 和 public 访问控制分离了抽象层次,private 里面应该放的是 data,public 里面应该放的是 idea。public 里面的接口要对人,而非对数据,要表现有关抽象的意义,而不是有关抽象的实现。

trivial getters/setters 并没有使接口更安全,只是把对于数据的抽象转移到了接口上,这样的封装没有体现任何抽象的意义,也没有体现任何数据间的联系,未能施展 OOP 的 class 概念和访问控制能力。那为什么还要用 class 呢?
2 changes: 2 additions & 0 deletions dev-note/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ git checkout -b XXX 新建本地分支XXX
git reset --hard commit-id 回滚分支XXX上的某个提交点
git reset --soft HEAD^ 撤销上一个提交,回到staging状态
git reset --soft HEAD~2 撤销多个提交
git reflog --show 查看操作记录
git checkout -b branName commit-id
```
此时代码就是某个提交点的,就可以修改了

Expand Down
1 change: 1 addition & 0 deletions dev-note/maven.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

### springboot
- mvn spring-boot:run
- mvn package 打包后用java -jar来运行

## 配置

Expand Down
3 changes: 2 additions & 1 deletion exercises/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 习题
> 典型和分类学习

- [常用数学公式排版KaTex语法总结](https://kissingfire123.github.io/2022/02/18_%E6%95%B0%E5%AD%A6%E5%85%AC%E5%BC%8Fkatex%E5%B8%B8%E7%94%A8%E8%AF%AD%E6%B3%95%E6%80%BB%E7%BB%93/)

## 数学

Expand Down
23 changes: 22 additions & 1 deletion exercises/math.high.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
# 高中数学
>

<details>
<summary>厦门2024强基</summary>

$$
\text{已知}x,y \gt 0, (x + y + xy)(x + y - xy) = xy, \text{求}x + y + xy \text{和}x + y - xy \text{的最小值}. \newline
\text{解读:记}A = x + y, B = xy, \text{则有} \newline
\begin{cases}
x,y \gt 0, A^2 \ge 0 \to A^2 - 4B \ge 0 \to A^2 \ge 4B, & \text{(1)} \newline
(A + B)(A - B)=B \to A^2 - B^2 = B \to A^2 = B^2 + B, & \text{(2)} \newline
\end{cases} \newline
\text{联立解得}B \ge 3 (\text{等号成立仅且当}x=y=\sqrt{3}) \newline
x + y + xy = A + B \ge 2\sqrt{B} + B \ge 2\sqrt{3} + 3 \newline
x + y - xy = A - B = \sqrt{B^2 + B} - B = \frac{B^2 + B - B^2}{\sqrt{B^2 + B} - B} = \frac{1}{ \sqrt{1 + \frac{1}{B}} + 1}
\ge = \frac{1}{ \sqrt{1 + \frac{1}{3}} + 1} = 2\sqrt{3} - 3.
$$

式子(1)的推理处理后面的就容易了,一步步地推到就可以得到。算术平均数总是大于或等于几何平均数,即算术平均数-几何平均数不等式(AM-GM不等式)
这个性质在数学与物理的许多领域都有应用


</details>
5 changes: 3 additions & 2 deletions index/book-info.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Books

[只收录优质在线工具的导航网站](https://www.tboxn.com/)
[zlibrary网站状态](https://www.tboxn.com/sites/320.html)
- [只收录优质在线工具的导航网站](https://www.tboxn.com/)
- [zlibrary网站状态](https://www.tboxn.com/sites/320.html)
- [程序员开发的书籍By Developers, For Developers](https://pragprog.com/)

## reading

Expand Down
1 change: 1 addition & 0 deletions index/computerScience.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
## ComputerGraphics

- [OpenGL](/cg/api.opengl.md)
- [字体](/cg/font.md)
- [webgl](/cg/canvas.md)
- [Shader](/cg/shader.md)
- [vulkan](/cg/api.modern.md)
Expand Down
3 changes: 1 addition & 2 deletions web/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- [css](/web/css.md)
- [canvas](/cg/canvas.md)
- [小程序开发](/web/mini.md)
- [字体](/web/font.md)
- [字体](/cg/font.md)
- [框架](/web/framework.md)
- [测试模块](/web/test.md)
- [图像处理](/web/ImageManipulation.md)
Expand All @@ -21,7 +21,6 @@
- [html](/web/html.md)
- [CSS](/web/css.md)
- [适配屏幕](/web/adapt.screen.md)
- [font](/web/font.md)
- [http](/web/http.md)
- [javascript](/cpl/web/ECMAScript.md)

Expand Down

0 comments on commit f90f0e9

Please sign in to comment.