diff --git a/_posts/2023-05-24-OCCT-sample-projects.md b/_posts/2023-05-24-OCCT-sample-projects.md index 11a64bd..c693dae 100644 --- a/_posts/2023-05-24-OCCT-sample-projects.md +++ b/_posts/2023-05-24-OCCT-sample-projects.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# OCCT projects on github - ## OCCT samples 需要安装 `OpenGL`: [基于Ubuntu搭建OpenGL开发环境](https://www.cnblogs.com/jiujiubashiyi/p/16429717.html) diff --git a/_posts/2023-05-24-kill-signals-of-linux-system.md b/_posts/2023-05-24-kill-signals-of-linux-system.md index c99960e..b25a694 100644 --- a/_posts/2023-05-24-kill-signals-of-linux-system.md +++ b/_posts/2023-05-24-kill-signals-of-linux-system.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# kill信号不同分类的影响 - 与`kill -KILL`不同的是,`kill -INT -PID` 将通知被结束进程,等同于`Ctrl+C`。 例如如果结束一个script,该script中同步启动了一个APP,使用`kill -INT -`可以同时将这个APP结束掉,`kill -KILL`则不行。 diff --git a/_posts/2023-05-24-ubuntu-login-without-pwd.md b/_posts/2023-05-24-ubuntu-login-without-pwd.md index c75262d..0f6c339 100644 --- a/_posts/2023-05-24-ubuntu-login-without-pwd.md +++ b/_posts/2023-05-24-ubuntu-login-without-pwd.md @@ -1,5 +1,5 @@ --- -title: ubuntu免密登录 +title: ubuntu 免密登录 date: 2023-05-24 +0800 # 2022-01-01 13:14:15 +0800 只写日期也行;不写秒也行;这样也行 2022-03-09T00:55:42+08:00 categories: [shell] tags: [shell] # TAG names should always be lowercase @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# ubuntu免密登录 - ## vscode 1. 在windows端 diff --git a/_posts/2023-05-25-OCCT-build-with-samples.md b/_posts/2023-05-25-OCCT-build-with-samples.md index bf2938c..b57619d 100644 --- a/_posts/2023-05-25-OCCT-build-with-samples.md +++ b/_posts/2023-05-25-OCCT-build-with-samples.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# Ubuntu 编译 Qt + VTK + OCCT + samples - ## 1. 卸载安装的Qt,编译安装Qt 实践发现使用安装的`Qt`,编译带`samples`的`OCCT`在`CMake`阶段就出错(可能是Ubuntu系统中环境有问题,或者是没有完整设置`Qt`相关变量)。 diff --git a/_posts/2023-05-5-clang-tidy-rule-file-sample-1.md b/_posts/2023-05-5-clang-tidy-rule-file-sample-1.md index 10011c1..080acec 100644 --- a/_posts/2023-05-5-clang-tidy-rule-file-sample-1.md +++ b/_posts/2023-05-5-clang-tidy-rule-file-sample-1.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# clang-tidy rule file sample [1] - 文件名:`.clang-tidy` 部分检查项目中文解释:[selfboot/ClangTidyChecks](https://github.com/selfboot/ClangTidyChecks) diff --git a/_posts/2023-05-5-clang-tidy-rule-file-sample-2.md b/_posts/2023-05-5-clang-tidy-rule-file-sample-2.md index 7c96d0a..d3c0e7c 100644 --- a/_posts/2023-05-5-clang-tidy-rule-file-sample-2.md +++ b/_posts/2023-05-5-clang-tidy-rule-file-sample-2.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# clang-tidy rule file sample [2] - 文件名:`.clang-tidy` 引用自 [cnl/.clang-tidy at main · johnmcfarlane/cnl (github.com)](https://github.com/johnmcfarlane/cnl/blob/main/.clang-tidy) diff --git a/_posts/2023-05-5-cpp-code-snippet.md b/_posts/2023-05-5-cpp-code-snippet.md index 23765e4..5a2e27c 100644 --- a/_posts/2023-05-5-cpp-code-snippet.md +++ b/_posts/2023-05-5-cpp-code-snippet.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# cpp code snippet - ## 1. 获取数组长度 ```cpp diff --git a/_posts/2023-05-5-debug-combind-Python-and-C++.md b/_posts/2023-05-5-debug-combind-Python-and-C++.md index 4d90bd4..00b8065 100644 --- a/_posts/2023-05-5-debug-combind-Python-and-C++.md +++ b/_posts/2023-05-5-debug-combind-Python-and-C++.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# Python与C++混合调试 - vscode启动python与C++混合调试时,gdb需要管理员权限。 [Remote attach using non-root account would fail directly](https://github.com/microsoft/vscode-remote-release/issues/2053) diff --git a/_posts/2023-05-5-design-modes-for-all.md b/_posts/2023-05-5-design-modes-for-all.md index 4f9929b..40b8f46 100644 --- a/_posts/2023-05-5-design-modes-for-all.md +++ b/_posts/2023-05-5-design-modes-for-all.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# 写给大家看的设计模式 - - [写给大家看的设计模式](https://juejin.cn/post/6844903491601694727) - [图解TensorFlow源码](https://www.cnblogs.com/yao62995/p/5773578.html) diff --git a/_posts/2023-05-5-get-function-via-address.md b/_posts/2023-05-5-get-function-via-address.md index 4304d02..ff2ff9d 100644 --- a/_posts/2023-05-5-get-function-via-address.md +++ b/_posts/2023-05-5-get-function-via-address.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# 通过函数指针地址找到函数 - ```bash # 通过地址找到函数声明 info symbol 0x7f0db14cf57e diff --git a/_posts/2023-06-05-Create_CompileDB_from_Makefile.md b/_posts/2023-06-05-Create_CompileDB_from_Makefile.md index 03d8c21..568fa3e 100644 --- a/_posts/2023-06-05-Create_CompileDB_from_Makefile.md +++ b/_posts/2023-06-05-Create_CompileDB_from_Makefile.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# 从Makefile创建compile_commands.json - ## 操作步骤 ```bash diff --git a/_posts/2023-06-12-OCCT-bounding-box.md b/_posts/2023-06-12-OCCT-bounding-box.md index e3fc6fa..6f35427 100644 --- a/_posts/2023-06-12-OCCT-bounding-box.md +++ b/_posts/2023-06-12-OCCT-bounding-box.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# OCC boundding box 以及 distance - ## bounding box 方式检测 ```cpp diff --git a/_posts/2023-06-12-OCCT-explore-api-usage.md b/_posts/2023-06-12-OCCT-explore-api-usage.md index 93633f7..25b6e3f 100644 --- a/_posts/2023-06-12-OCCT-explore-api-usage.md +++ b/_posts/2023-06-12-OCCT-explore-api-usage.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# OCC TopExp_Explorer 用法 - ```cpp #include #include diff --git a/_posts/2023-06-14-OCCT-BHV-tree-bounding-box.md b/_posts/2023-06-14-OCCT-BHV-tree-bounding-box.md index 01f14b8..a29b5f1 100644 --- a/_posts/2023-06-14-OCCT-BHV-tree-bounding-box.md +++ b/_posts/2023-06-14-OCCT-BHV-tree-bounding-box.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# OCCT 使用 BVH 树加速 bounding box 查找遍历 - ## Demo code ### Demo code 1 diff --git a/_posts/2023-06-17-compile-gdb-commands.md b/_posts/2023-06-17-compile-gdb-commands.md index dd90755..2168b91 100644 --- a/_posts/2023-06-17-compile-gdb-commands.md +++ b/_posts/2023-06-17-compile-gdb-commands.md @@ -15,8 +15,6 @@ mermaid: true # pin: true --- -# Linux 系统下编译 gcc 9.2 - ## 操作 下载 gcc源码包,解压生成`gcc-9.2.0`: diff --git a/_posts/2023-06-22-show-hdf5-data-using-vtkUnstructuredGrid.md b/_posts/2023-06-22-show-hdf5-data-using-vtkUnstructuredGrid.md index fd7df6a..3f1fea4 100644 --- a/_posts/2023-06-22-show-hdf5-data-using-vtkUnstructuredGrid.md +++ b/_posts/2023-06-22-show-hdf5-data-using-vtkUnstructuredGrid.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# vtkUnstructuredGrid 显示 HDF5 数据 - ## Reference * [VTK examples](https://github.com/Kitware/vtk-examples/blob/c1c8af1e70708e65d6fa4bf69fab814f03c99dc2/src/Cxx/GeometricObjects/Hexahedron.cxx) diff --git a/_posts/2023-0610-install-qt5-on-ubuntu-22.04-for-VTK.md b/_posts/2023-0610-install-qt5-on-ubuntu-22.04-for-VTK.md index dbde397..51d21c4 100644 --- a/_posts/2023-0610-install-qt5-on-ubuntu-22.04-for-VTK.md +++ b/_posts/2023-0610-install-qt5-on-ubuntu-22.04-for-VTK.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# Ubuntu 22.04 安装 Qt5,以编译 VTK - ## 1. install commands ```bash diff --git a/_posts/2023-07-02-VTK-official-examples.md b/_posts/2023-07-02-VTK-official-examples.md index c4c26f4..7554299 100644 --- a/_posts/2023-07-02-VTK-official-examples.md +++ b/_posts/2023-07-02-VTK-official-examples.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# VTK 官方examples记录,及优秀VTK blog列表 - ## 概览列表 关于CXX的示例说明,在官方examples代码的相关README里面有简单介绍,路径:src/Cxx.md @@ -21,11 +19,14 @@ mermaid: true * 演示`vtkUnstructureGrid`及mesh显示(`EdgeVisibilityOn`) [UGrid](https://examples.vtk.org/site/Cxx/UnstructuredGrid/UGrid/) ## Color a mesh by dotting a vector from the origin to each point with a specified vector + * [SimpleElevationFilter](https://examples.vtk.org/site/Cxx/Meshes/SimpleElevationFilter/) ## Vector field -- 显示矢量场箭头 + * [VectorField](https://examples.vtk.org/site/Cxx/Visualization/VectorField/) * [VectorFieldNonZeroExtraction](https://examples.vtk.org/site/Cxx/Filtering/VectorFieldNonZeroExtraction/) - + ## VTK blog + * [VTK入门范例2](https://www.michaelapp.com/posts/2019/2019-03-20-VTK%E5%85%A5%E9%97%A8%E8%8C%83%E4%BE%8B2/) diff --git a/_posts/2023-07-02-clean-screen-and-reset.md b/_posts/2023-07-02-clean-screen-and-reset.md index d710a28..04f2a4d 100644 --- a/_posts/2023-07-02-clean-screen-and-reset.md +++ b/_posts/2023-07-02-clean-screen-and-reset.md @@ -16,4 +16,5 @@ echo -en "\e[H\e[J\e[3J" ``` ## reference + * [clear command in Konsole](https://superuser.com/questions/122911/what-commands-can-i-use-to-reset-and-clear-my-terminal) diff --git a/_posts/2023-07-09-vtk-notes.md b/_posts/2023-07-09-vtk-notes.md index 9b6d57a..2ccf599 100644 --- a/_posts/2023-07-09-vtk-notes.md +++ b/_posts/2023-07-09-vtk-notes.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# VTK 笔记 - ## vtkUnstructuredGrid 添加数据 * SetScalar、Vector = AddArray + SetActiveScalar\Vector 类似问题,看源码,不同的filter会取不同的activeAttribute,具体设置哪个active还是取决于filter diff --git a/_posts/2024-05-09-combind-usage-of-std-visit-and-std-variant.md b/_posts/2024-05-09-combind-usage-of-std-visit-and-std-variant.md index 6510162..532c4c4 100644 --- a/_posts/2024-05-09-combind-usage-of-std-visit-and-std-variant.md +++ b/_posts/2024-05-09-combind-usage-of-std-visit-and-std-variant.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# C++ 17新功能: std::visit 和 std::variant 配合使用 - ## 1. `std::variant` (变体) 在很多编程场景中,我们经常遇到需要处理多种类型的情况。传统上,这可以通过多种方式来实现,例如使用 `union` 或 `void*` 指针,甚至使用一系列的 `if-else` 语句和类型转换。但这些方法通常都有各种缺点,如类型不安全、容易出错或难以维护。 @@ -107,6 +105,7 @@ auto generic_lambda = [](auto x) { 使用 `if constexpr`,你可以在一个统一的代码块中处理多种类型,而无需使用多个繁琐的 `if-else` 语句。这不仅让代码看起来更简洁,而且更易于维护。 #### 类型萃取:认识你的类型 + `类型萃取(Type Traits)`是 `C++11` 引入的一组模板,用于在编译时获取类型的属性。例如,`std::is_same_v` 可以告诉你 `T1` 和 `T2` 是否是同一种类型。 通过结合 `if constexpr` 和类型萃取,你可以写出高度灵活且类型安全的代码。这也是 `std::visit` 能发挥最大威力的地方。 @@ -173,6 +172,7 @@ int main() { ``` 在这个例子中: + - 我们定义了一个 `std::variant` 类型 `MyVariant`,它可以存储 `int`、`double` 或 `std::string`。 - `VariantVisitor` 是一个重载了 operator() 的结构体,对每种可能的类型提供了一个处理方法。 - 在 `main` 函数中,我们创建了三个 `MyVariant` 实例,分别存储不同的类型。 diff --git a/_posts/2024-05-11-how-to-create-blog-using-github-pages-and-Chirpy-theme.md b/_posts/2024-05-11-how-to-create-blog-using-github-pages-and-Chirpy-theme.md index 498a878..e00244e 100644 --- a/_posts/2024-05-11-how-to-create-blog-using-github-pages-and-Chirpy-theme.md +++ b/_posts/2024-05-11-how-to-create-blog-using-github-pages-and-Chirpy-theme.md @@ -10,7 +10,4 @@ mermaid: true # pin: true --- - -# 如何使用`github pages`以及`Chirpy Theme`创建博客 - - [使用Chirpy Theme在GitHub Pages部署Jekyll](https://zhang-nianqiang.github.io/posts/Deploy-Jekyll-on-GitHub-Pages-using-Chirpy-Theme/) \ No newline at end of file diff --git a/_posts/2024-05-11-qt-notes.md b/_posts/2024-05-11-qt-notes.md index 4c59c42..d1d3033 100644 --- a/_posts/2024-05-11-qt-notes.md +++ b/_posts/2024-05-11-qt-notes.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# Qt 笔记 - ## 1. 控件的 `eventFilter` 如下代码,将为`edtCleanCount`部件安装一个事件过滤器,当用户按下`Up`或`Down`键时,并且参数`obj`为`edtCleanCount`时,会自动修改`edtCleanCount`的值。 diff --git a/_posts/2024-05-12-enable-windows-powershell-git-auto-complete.md b/_posts/2024-05-12-enable-windows-powershell-git-auto-complete.md index 39cc01e..478ca45 100644 --- a/_posts/2024-05-12-enable-windows-powershell-git-auto-complete.md +++ b/_posts/2024-05-12-enable-windows-powershell-git-auto-complete.md @@ -10,14 +10,11 @@ mermaid: true # pin: true --- -# Qt VSCode 开发,使能PowerShell Git自动完成 - ## 准备 需要使用 [posh-git](https://github.com/dahlbyk/posh-git)。 首先确定`PowerShell`版本(在安装`PowerShell 7`之后,vscode默认使用的是`PowerShell 7`): - ```powershell $PSVersionTable.PSVersion ``` @@ -96,4 +93,3 @@ Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete - [posh-git](https://github.com/dahlbyk/posh-git) - [Windows安装posh](https://blog.csdn.net/cxs5534/article/details/129737617) - diff --git a/_posts/2024-05-12-vscode-powershell-quick-op-settings.md b/_posts/2024-05-12-vscode-powershell-quick-op-settings.md index 69850cc..631626c 100644 --- a/_posts/2024-05-12-vscode-powershell-quick-op-settings.md +++ b/_posts/2024-05-12-vscode-powershell-quick-op-settings.md @@ -10,8 +10,6 @@ mermaid: true # pin: true --- -# VSCode 开发,shelll高效操作设置(PowerShell) - ## PowerShell 清屏快捷键设置 由于 `VSCode` Windows 开发使用 `cls` 命令不能执行清屏操作(仅仅是滚动SCREEN缓冲区),所以使用快捷键代替清屏操作。 @@ -36,4 +34,4 @@ function gl { git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow # git status 别名 function g { git status -sb } -``` \ No newline at end of file +```