Skip to content

Commit

Permalink
update: format markdown files to let them formal
Browse files Browse the repository at this point in the history
  • Loading branch information
hxf0223 committed May 14, 2024
1 parent d7729cb commit 80e391b
Show file tree
Hide file tree
Showing 25 changed files with 9 additions and 54 deletions.
2 changes: 0 additions & 2 deletions _posts/2023-05-24-OCCT-sample-projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-05-24-kill-signals-of-linux-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# kill信号不同分类的影响

`kill -KILL`不同的是,`kill -INT -PID` 将通知被结束进程,等同于`Ctrl+C`
例如如果结束一个script,该script中同步启动了一个APP,使用`kill -INT -<PIDofScript>`可以同时将这个APP结束掉,`kill -KILL`则不行。

Expand Down
4 changes: 1 addition & 3 deletions _posts/2023-05-24-ubuntu-login-without-pwd.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# ubuntu免密登录

## vscode

1. 在windows端
Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-05-25-OCCT-build-with-samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# Ubuntu 编译 Qt + VTK + OCCT + samples

## 1. 卸载安装的Qt,编译安装Qt

实践发现使用安装的`Qt`,编译带`samples``OCCT``CMake`阶段就出错(可能是Ubuntu系统中环境有问题,或者是没有完整设置`Qt`相关变量)。
Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-05-5-clang-tidy-rule-file-sample-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# clang-tidy rule file sample [1]

文件名:`.clang-tidy`
部分检查项目中文解释:[selfboot/ClangTidyChecks](https://github.com/selfboot/ClangTidyChecks)

Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-05-5-clang-tidy-rule-file-sample-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-05-5-cpp-code-snippet.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# cpp code snippet

## 1. 获取数组长度

```cpp
Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-05-5-debug-combind-Python-and-C++.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-05-5-design-modes-for-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# 写给大家看的设计模式

- [写给大家看的设计模式](https://juejin.cn/post/6844903491601694727)
- [图解TensorFlow源码](https://www.cnblogs.com/yao62995/p/5773578.html)

Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-05-5-get-function-via-address.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# 通过函数指针地址找到函数

```bash
# 通过地址找到函数声明
info symbol 0x7f0db14cf57e
Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-06-05-Create_CompileDB_from_Makefile.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# 从Makefile创建compile_commands.json

## 操作步骤

```bash
Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-06-12-OCCT-bounding-box.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# OCC boundding box 以及 distance

## bounding box 方式检测

```cpp
Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-06-12-OCCT-explore-api-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# OCC TopExp_Explorer 用法

```cpp
#include <iostream>
#include <TopoDS_Shape.hxx>
Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-06-14-OCCT-BHV-tree-bounding-box.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# OCCT 使用 BVH 树加速 bounding box 查找遍历

## Demo code

### Demo code 1
Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-06-17-compile-gdb-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ mermaid: true
# pin: true
---

# Linux 系统下编译 gcc 9.2

## 操作

下载 gcc源码包,解压生成`gcc-9.2.0`
Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-06-22-show-hdf5-data-using-vtkUnstructuredGrid.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions _posts/2023-0610-install-qt5-on-ubuntu-22.04-for-VTK.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# Ubuntu 22.04 安装 Qt5,以编译 VTK

## 1. install commands

```bash
Expand Down
7 changes: 4 additions & 3 deletions _posts/2023-07-02-VTK-official-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# VTK 官方examples记录,及优秀VTK blog列表

## 概览列表

关于CXX的示例说明,在官方examples代码的相关README里面有简单介绍,路径:src/Cxx.md
Expand All @@ -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/)
1 change: 1 addition & 0 deletions _posts/2023-07-02-clean-screen-and-reset.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 0 additions & 2 deletions _posts/2023-07-09-vtk-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# VTK 笔记

## vtkUnstructuredGrid 添加数据

* SetScalar、Vector = AddArray + SetActiveScalar\Vector 类似问题,看源码,不同的filter会取不同的activeAttribute,具体设置哪个active还是取决于filter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# C++ 17新功能: std::visit 和 std::variant 配合使用

## 1. `std::variant` (变体)

在很多编程场景中,我们经常遇到需要处理多种类型的情况。传统上,这可以通过多种方式来实现,例如使用 `union``void*` 指针,甚至使用一系列的 `if-else` 语句和类型转换。但这些方法通常都有各种缺点,如类型不安全、容易出错或难以维护。
Expand Down Expand Up @@ -107,6 +105,7 @@ auto generic_lambda = [](auto x) {
使用 `if constexpr`,你可以在一个统一的代码块中处理多种类型,而无需使用多个繁琐的 `if-else` 语句。这不仅让代码看起来更简洁,而且更易于维护。

#### 类型萃取:认识你的类型

`类型萃取(Type Traits)``C++11` 引入的一组模板,用于在编译时获取类型的属性。例如,`std::is_same_v<T1, T2>` 可以告诉你 `T1``T2` 是否是同一种类型。

通过结合 `if constexpr` 和类型萃取,你可以写出高度灵活且类型安全的代码。这也是 `std::visit` 能发挥最大威力的地方。
Expand Down Expand Up @@ -173,6 +172,7 @@ int main() {
```

在这个例子中:

- 我们定义了一个 `std::variant` 类型 `MyVariant`,它可以存储 `int``double``std::string`
- `VariantVisitor` 是一个重载了 operator() 的结构体,对每种可能的类型提供了一个处理方法。
-`main` 函数中,我们创建了三个 `MyVariant` 实例,分别存储不同的类型。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
2 changes: 0 additions & 2 deletions _posts/2024-05-11-qt-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# Qt 笔记

## 1. 控件的 `eventFilter`

如下代码,将为`edtCleanCount`部件安装一个事件过滤器,当用户按下`Up``Down`键时,并且参数`obj``edtCleanCount`时,会自动修改`edtCleanCount`的值。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down Expand Up @@ -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)

4 changes: 1 addition & 3 deletions _posts/2024-05-12-vscode-powershell-quick-op-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ mermaid: true
# pin: true
---

# VSCode 开发,shelll高效操作设置(PowerShell)

## PowerShell 清屏快捷键设置

由于 `VSCode` Windows 开发使用 `cls` 命令不能执行清屏操作(仅仅是滚动SCREEN缓冲区),所以使用快捷键代替清屏操作。
Expand All @@ -36,4 +34,4 @@ function gl { git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow
# git status 别名
function g { git status -sb }
```
```

0 comments on commit 80e391b

Please sign in to comment.