- 博客(162)
- 收藏
- 关注
转载 unbuntu手动创建桌面快捷方式desktop文件详解
我们在使用一个应用程序的时候,总是希望能方便快捷的启动,这时候就需要能在桌面有快捷方式,或者在活动软件列表能搜索到,但Linux系统很多软件不一定会带有这样的功能,我们以为知笔记(wiznote)这款软件为例,下面我们就看看应该如何手动创建吧!
2024-12-09 18:14:18
100
原创 Qtopengl 渲染三角形例子
/ 确保图像路径正确。// 清除颜色缓冲区。//在VAO上创建VBO。// 生成和绑定 VAO 和 VBO。// 设置窗口的光标为自定义光标。// 绑定 VAO 并绘制三角形。// 设置顶点属性指针。// 创建自定义光标。// 使用着色器程序。// 顶点着色器代码。// 片段着色器代码。
2024-07-29 13:23:31
392
原创 GetProcAddress 获取函数指针转function
template <typename T>std::function<T> GetFunction(HMODULE hModule,const std::string& funcName){ FARPROC funAddress = GetProcAddress(hModule, funcName.c_str()); return std::function<T>((T*)(funAddress));}
2024-07-26 13:29:47
334
原创 opengl 渲染管线实现雾化效果
const char* vertexShaderSource = R"(#version 330 corelayout (location = 0) in vec3 aPos;out vec4 vertexColor;out float fogFactor;uniform mat4 model;uniform mat4 view;uniform mat4 projection;uniform vec3 fogColor;uniform float fogDensity;void main(
2024-07-10 09:22:53
242
原创 三维屏幕坐标转世界坐标(OpenGL)
但自己写的算法是对的。// 转换为 OpenGL 的坐标系。gluLookAt(0.0, 0.0, 5.0, // 眼睛位置。0.0, 0.0, 0.0, // 目标位置。// 将窗口坐标转换为 OpenGL 坐标。// 获取当前的矩阵和视口信息。// 转换窗口坐标到对象坐标。// 转换为窗口坐标。// 清除颜色和深度缓冲区。// 交换缓冲区并处理事件。// 设置鼠标按下回调函数。// 设置模型视图矩阵。// 初始化 GLFW。// 初始化 GLEW。// 设置模型视图矩阵。// 绘制一个立方体。
2024-06-28 17:33:18
476
原创 QT5自适应
/当前设置的屏幕宽度。2..pgn后缀的图片需修改为.svg。//获取屏幕设置中的分辨率。//集成屏幕自适应功能。1.以上代码需加main函数中。
2023-11-07 17:41:50
191
原创 QProcess 异步启动进程之后,判断进程唯一
一句话概括:用管道监听很好,比共享内存方便,原因,共享内存检测不到进程是否启动,可能是,Qprocess的问题。// 此时监听失败,可能是程序崩溃时,残留进程服务导致的,移除之。// 其他处理,如:将启动参数发送到服务端。// 其他处理,如:读取启动参数。//连接不上服务器,就创建一个。
2023-11-02 14:32:52
268
原创 c++字符串求相似度
return 1;return 0;?0i < sl;++i) {k < end;++k) {if (!++matches;break;return 0;i < sl;++i) {while (!++k;for (;
2023-10-31 17:07:15
504
原创 nlohmann json以结构体的形式解析
TOP =0,LOW =1,int Age;Type type;int Height;int Width;int Height;int Width;int main()"
2023-03-09 15:25:01
785
原创 openssl1.1.1ARM双编译
//快排int partition(int arr[], int low, int high){ int base_value = arr[low]; while (low<high){ //右边查找 while (low<high &&arr[high]>=base_value){ high--; } arr[low] = arr[high]; /...
2022-07-23 08:42:30
402
原创 关于map对key自定义排序
map对key默认是从小到大排序也可以自定义排序#include <iostream>#include <map>#include <string>// 定义自己std::map比较器template<class _Ty>struct PLess{ // functor for operator< bool operator()(const _Ty& pLeft, const _Ty& pRight)...
2021-07-31 15:40:16
581
1
原创 逻辑右移和算术右移区别
逻辑右移就是不考虑符号位,右移一位,左边补零即可。算术右移需要考虑符号位,右移一位,若符号位为1,就在左边补1,;否则,就补0。所以算术右移也可以进行有符号位的除法,右移,n位就等于除2的n次方...
2021-06-21 16:47:42
945
原创 vs编译boost库脚本
#vs2019b2.exe --toolset=msvc-14.2 architecture=x86 address-model=64 link=static --build-type=completeb2.exe --toolset=msvc-14.2 architecture=x86 address-model=32 link=static --build-type=complete#vs2015b2.exe --toolset=msvc-14.0 architecture=x86 addre
2021-06-21 13:26:30
140
原创 http协议知识msdn
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Protocol_upgrade_mechanism
2021-06-21 10:32:12
293
原创 openssl 1.1.1编译语句
Perl Configure VC-WIN64A no-asm --openssldir="D:\openssl_lib"perl Configure VC-WIN32 no-asm --openssldir="D:\openssl_lib"
2021-06-21 09:22:33
138
原创 c++指定枚举占一个字节
//这样的写法,指定这个枚举占1字节enum class watch_state : uint8_t{ initialized, // No outstanding RDC() call. listening, // RDC() call was made, and we're waiting for changes. pending_close, // Directory handle was closed, and we're waiting for the...
2021-06-19 09:31:32
961
原创 调整 Windows系统参数网址
https://www.ibm.com/docs/zh/was-nd/9.0.5?topic=systems-tuning-windows
2021-06-17 14:33:13
90
原创 ipconfig命令指南
ipconfig /all 显示本机TCP/IP配置的详细信息ipconfig /relase DHCP客户端手动释放IP地址ipconfig /renew DHCP客户端向服务器刷新请求(具有更新的作用)ipconfig /flushdns 清除本地的DNS缓存内容ipconfig /regesterdns dns客户端手工向服务器注册ipconfig /showclassid 显示网络适配器的DHCP类别的消息ipconfig /setclassid 设置网络适配器的DHCP类别ipc.
2021-06-02 13:33:56
669
原创 冒泡排序算法
//递增排序void asc_bubble_sort(int arr[], int data_size){ int i, j; for (i =0;i<data_size;i++){ for (j=0;j<data_size-i-1;++j){ if (arr[j]>arr[j+1]){ int temp = arr[j]; arr[j] = arr[j+1];...
2021-06-01 14:52:19
92
原创 归并排序算法
void desc_mege(int arr[], int low, int mid, int high){ int i, j, k; //先拷贝数组元素 for (i = low;i <= high;i++) { data_ptr[i] = arr[i]; } //两两比较,进行合并 i = low; j = mid + 1; //k是控制数组的下标 for (k = low;i <= mid &...
2021-06-01 14:50:44
101
原创 堆排序算法
//创建最大堆void max_heap_build(int a[], int start, int end){ int dad = start; int son = 2 * dad + 1; while (son<=end){ if (son+1<=end&&a[son]< a[son+1]){ ++son; } if (a[dad]>a[son]){ ...
2021-06-01 14:48:58
75
原创 选择排序算法
void asc_select_sort(int arr[],int data_size){ int i, j; for (i=0;i<data_size;i++){ int min_index = i; for (j=i+1;j<data_size;j++){ if (arr[min_index]>arr[j]){ min_index = j; } ...
2021-06-01 14:46:44
119
原创 希尔排序算法
//递增排序void asc_shell_sort(int arr[], int data_size){ int grap, i, j; //注意grap是要大于0 for (grap = data_size>>1;grap>0;grap=grap>>1){ for (i=grap;i<data_size;++i){ if (arr[i]<arr[i-grap]){ ...
2021-06-01 14:45:33
84
原创 经典排序之插入排序
//递增void asc_insert_sort(int arr[], int len){ int i, j; for (i=1;i<len;i++){ if (arr[i]<arr[i-1]){ int temp = arr[i]; for (j=i;arr[j-1]>temp&&j>0;j--){ arr[j] = arr[j - 1]; ...
2021-04-26 16:16:59
69
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人