<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[CQ的学习笔记]]></title><description><![CDATA[编程学习笔记]]></description><link>https://blog.csdn.net/weixin_43948991</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; weixin_43948991]]></copyright><item><title><![CDATA[318自驾交流]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/139769790</link><guid>https://blog.csdn.net/weixin_43948991/article/details/139769790</guid><author>weixin_43948991</author><pubDate>Tue, 18 Jun 2024 14:39:25 +0800</pubDate><description><![CDATA[推荐一家巴塘的民宿，叫孔雄温泉民宿，前台和招待都是当地藏民老奶奶，带wifi，空调，房间干净，是藏民自建的小楼，房间是藏风全实木装修，空间大，还自带温泉，可以带泳衣去泡，不另收费，老奶奶还会免费给你酥油茶，当地干果吃，早上会给你做早饭，一晚上只要一百出头，真正良心。1.国道上虽然不时有落脚点，但是不是每个落脚点都有厕所，有的厕所会被当地锁住，而且大部分是旱厕，很臭，所以国道上如果想上厕所，可以不用害羞，只要有空地就可以停车，走两步到路边解决才是正道（无论大小），毕竟就算你不上厕所，那边也全是牛粪。]]></description><category></category></item><item><title><![CDATA[2024.4.5学习记录————嵌入式学习内容]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/137395161</link><guid>https://blog.csdn.net/weixin_43948991/article/details/137395161</guid><author>weixin_43948991</author><pubDate>Fri, 05 Apr 2024 10:35:30 +0800</pubDate><description><![CDATA[上位机通过网口/串口，供工程人员使用软件UI界面控制硬件，上位机与设备通信的协议和数据包设计。基础特性：类，对象，派生，继承，运算符重载，友元，虚函数，多态，模板，STL。嵌入式设备轻量级Linux系统，内核空间小，原生接口有差异，交叉编译工具链。指针，位操作，结构体字节对齐，位段，宏的高级运用。面向对象的构建能力：嵌入式系统构建适合的类和接口。mysql：安装，部署，访问，设计，增删改查。芯片接口驱动开发等，位于嵌入式应用下位。linux内核向嵌入式设备移植。经典硬件通信协议 MODBUS。]]></description><category></category></item><item><title><![CDATA[2024.3.31学习记录————树莓派4B学习一：环境配置]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/137211418</link><guid>https://blog.csdn.net/weixin_43948991/article/details/137211418</guid><author>weixin_43948991</author><pubDate>Fri, 05 Apr 2024 10:08:16 +0800</pubDate><description><![CDATA[教程需要去官网自己选择下载的镜像版本，但是现在可以使用树莓派自己的image flash工具，工具中可以直接选择需要下载的镜像版本以及位数，并且可以定制化用户名和密码，默认打开ssh，以及系统默认连接的wifi名称和密码，比起教程里使用根目录下创建config文件才能打开SSH和wifi要方便了很多，烧写完后sd卡插入板子连接电源上电，红绿灯闪烁后变为绿灯规律闪烁就是正常开机了。硬件方面一开始只需要一块树莓派4B的板子和充电线，以及一张用来当作内存的sd卡和读卡器就行。]]></description><category></category></item><item><title><![CDATA[2020.9.8C++Primer学习笔记————模板函数]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/108474596</link><guid>https://blog.csdn.net/weixin_43948991/article/details/108474596</guid><author>weixin_43948991</author><pubDate>Tue, 19 Mar 2024 22:26:48 +0800</pubDate><description><![CDATA[C++Primer学习笔记————模板函数
看C++Primer看到了第十章函数模板部分，其中提到了模板函数用法，帮助强类型语言减少简单方法的代码量。
C++是强类型语言，在调用方法时需要对传参有严格的判断，例如实现一个简单的大小判断方法时：
int min( int a, int b ) { 
 return a &lt; b ? a : b; 
} 
double min( double a, double b ) { 
 return a &lt; b ? a : b; 
}

想要对比不同类型的参数]]></description><category></category></item><item><title><![CDATA[2023.5.9工作问题记录————安卓GKI检测abi-check]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/125549048</link><guid>https://blog.csdn.net/weixin_43948991/article/details/125549048</guid><author>weixin_43948991</author><pubDate>Wed, 13 Mar 2024 11:27:36 +0800</pubDate><description><![CDATA[安卓系统GKI abi-check]]></description><category></category></item><item><title><![CDATA[2021.7.9工作问题记录————Mysql设置简单密码]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/118600299</link><guid>https://blog.csdn.net/weixin_43948991/article/details/118600299</guid><author>weixin_43948991</author><pubDate>Fri, 09 Jul 2021 10:32:18 +0800</pubDate><description><![CDATA[工作问题记录————Mysql设置简单密码
使用默认密码登录mysql
grep “password” /var/log/mysqld.log
2018-06-15T07:12:17.112615Z 1 [Note] A temporary password is generated for root@localhost: *m#e/-Bfz5T+
修改mysql参数配置
mysql&gt; set global validate_password_policy=0;
set global validate]]></description><category></category></item><item><title><![CDATA[2021.5.13C++学习笔记————函数指针形式调用动态链接库接口]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/116738884</link><guid>https://blog.csdn.net/weixin_43948991/article/details/116738884</guid><author>weixin_43948991</author><pubDate>Thu, 13 May 2021 14:14:49 +0800</pubDate><description><![CDATA[C++学习笔记————函数指针形式调用动态链接库接口
事情起因是需要给一个动态库中的某些接口进行第二层封装，但是要保证其他接口完全不变（包括方法名），一开始以为就是再封装一层动态库（就是菜），实际编写时发现一个问题，就是其他接口要保证完全不变，那封装的第二层库里的方法名就要跟原动态库的方法名一样，那就不能用平时直接在 VS 里用 lib 形式链接器直接使用动态库了，因为会有函数方法名称冲突。
函数指针形式调用动态链接库接口：
不过后面想到之前用别人链接动态库的代码，在 LoadLibrary 之后，会用函数]]></description><category></category></item><item><title><![CDATA[2021.5.11C++学习笔记————常量折叠]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/116663339</link><guid>https://blog.csdn.net/weixin_43948991/article/details/116663339</guid><author>weixin_43948991</author><pubDate>Wed, 12 May 2021 14:22:37 +0800</pubDate><description><![CDATA[C++学习笔记————常量折叠
之前在学习C++类型转换的内容时，涉及到了 const 关键字，在写代码测试时发现一个现象：
const int i = 1;
int *j = (int *)&amp;i;
*j = 2;
cout &lt;&lt; &amp;i &lt;&lt; endl;
cout &lt;&lt; j &lt;&lt; endl;
cout &lt;&lt; i &lt;&lt; endl;
cout &lt;&lt; *j &lt;&lt; endl;


...]]></description><category></category></item><item><title><![CDATA[2020.5.8工作问题记录————C++结构体内数据错位]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/116562242</link><guid>https://blog.csdn.net/weixin_43948991/article/details/116562242</guid><author>weixin_43948991</author><pubDate>Sun, 09 May 2021 11:24:06 +0800</pubDate><description><![CDATA[工作问题记录————C++结构体内数据错位
最近工作中遇到一个问题，在做甲方的代理服务时，要传送一组数据，用结构体格式，在处理数据时，结构体数据正确，但是传出数据处理函数时，数据出现了错误。
首先，结构体的内容很多，类似如下：
struct My_msg
{
	int 			socketid;						
	char			cmd[5]; 						
	char			termid[21]; 					
	char			appid[11];						
	char			site1[51];										]]></description><category></category></item><item><title><![CDATA[2021.4.19C++学习笔记————类型转换Casting Operator]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/115872472</link><guid>https://blog.csdn.net/weixin_43948991/article/details/115872472</guid><author>weixin_43948991</author><pubDate>Sat, 08 May 2021 15:02:13 +0800</pubDate><description><![CDATA[C++学习笔记————类型转换Casting Operator
C++可用Casting Operator手动指定变量类型的转换，使得编译和运行时类型转换更加安全，对变量类型的转换可读性更高。
转换分为四种：

const_cast&lt; type &gt;( expression )
reinterpret_cast&lt; type &gt;( expression )
static_cast&lt; type &gt;( expression )
dynamic_cast&lt; type &gt;]]></description><category></category></item><item><title><![CDATA[2021.4.18C++学习笔记————隐式转换]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/115837931</link><guid>https://blog.csdn.net/weixin_43948991/article/details/115837931</guid><author>weixin_43948991</author><pubDate>Mon, 19 Apr 2021 19:27:33 +0800</pubDate><description><![CDATA[C++学习笔记————复制与转换
1.隐式转换：
C++中隐式转换包括：
标准转换：窄型=&gt;宽型：int =&gt; double，char =&gt; int
数值计算：整数=&gt;float，double
同类型 signed 和 unsigned 转换（bit转换）
浮点型=&gt;整数型：可能会出现精度丢失和未知错误（转换后超出整数范围）
非基本类型转换：
bool型：true =&gt; 1，false =&gt; 0
0 =&gt; 任意指针 =&gt; void *
子类 * =&gt]]></description><category></category></item><item><title><![CDATA[2021.4.14C++学习笔记————C++11/14新特性]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/115703087</link><guid>https://blog.csdn.net/weixin_43948991/article/details/115703087</guid><author>weixin_43948991</author><pubDate>Fri, 16 Apr 2021 16:04:19 +0800</pubDate><description><![CDATA[C++学习笔记————C++11/14新特性
1.声明类型自动推导：auto
C++是强类型静态语言，除了模板，变量在编译时的类型就会被确定且不可更改。
auto是一个数据类型，用于在声明时对被声明变量进行自动的强类型推导，如：
auto i = 10;	//自动推导int型



...]]></description><category></category></item><item><title><![CDATA[2021.4.8C++学习笔记————重复进程检测]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/115504200</link><guid>https://blog.csdn.net/weixin_43948991/article/details/115504200</guid><author>weixin_43948991</author><pubDate>Thu, 08 Apr 2021 09:42:17 +0800</pubDate><description><![CDATA[C++学习笔记————重复进程检测
在服务器启动服务端时，服务端的ip和端口是给定的，所以要防止重复启动服务进程后互相阻塞ip的情况，在服务进程执行前需要进行重复进程检测，查看当前进程是否已经在运行。
代码：
int ProcessIfExist(char *pname)
{
	char cmd[512];
	char aline[256];
	FILE *tmpfp;
	int iPExistFlag=0;
	char tpname[256];
	char pid[10];
	char sfilename]]></description><category></category></item><item><title><![CDATA[2021.4.7工作问题记录————awk:         ^ backslash not last character on line]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/115478700</link><guid>https://blog.csdn.net/weixin_43948991/article/details/115478700</guid><author>weixin_43948991</author><pubDate>Wed, 07 Apr 2021 09:56:42 +0800</pubDate><description><![CDATA[工作问题记录————awk: ^ backslash not last character on line
在测试服务器时在终端查找服务端的进程号，使用指令：
ps -ef|grep -v grep|grep "bash"| awk '{printf(\"%d|%s\\n\",$2,$8)}'

显示错误：

解决：
该指令是从服务端检测进程重复代码中截取的，在终端直接运行时不需要转义符。
指令：
ps -ef|grep -v grep|grep "bash"| awk '{printf("%d|%s\n"]]></description><category></category></item><item><title><![CDATA[2021.3.30C++学习笔记————条件变量实现定时任务]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/115317556</link><guid>https://blog.csdn.net/weixin_43948991/article/details/115317556</guid><author>weixin_43948991</author><pubDate>Tue, 30 Mar 2021 09:30:18 +0800</pubDate><description><![CDATA[C++学习笔记————条件变量实现定时任务
近期部署的服务需要添加每隔十分钟轮询一次的功能，即定时任务，使用条件变量实现定时。
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;stdarg.h&gt;
#include &lt;string.h&gt;
#include &lt;time.h&gt;
#include &lt;iostream&gt;
#include &lt;map&gt;
#include &lt;set&g]]></description><category></category></item><item><title><![CDATA[2021.3.29C++学习笔记————watchdog守护进程自动重启]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/115306759</link><guid>https://blog.csdn.net/weixin_43948991/article/details/115306759</guid><author>weixin_43948991</author><pubDate>Tue, 30 Mar 2021 09:08:43 +0800</pubDate><description><![CDATA[C++学习笔记————watchdog守护进程自动重启
最近写完一个服务端后，希望能在启动后如果程序异常退出了能够自动重启。
经过查询，自己手动实现看门狗进程自动重启一般有两个方法：
一.脚本重启：
#!/bin/sh

while true
do
ps -ef | grep "test(程序名)" | grep -v "grep"

if ["$?" -eq 0]
then
./test
echo "wath process has been restarted! "

else
echo "watch ]]></description><category></category></item><item><title><![CDATA[2021.3.25C++学习笔记————守护进程]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/115198892</link><guid>https://blog.csdn.net/weixin_43948991/article/details/115198892</guid><author>weixin_43948991</author><pubDate>Thu, 25 Mar 2021 10:35:21 +0800</pubDate><description><![CDATA[C++学习笔记————守护进程
工作中要在Linux下部署一个代理服务，需要使其在后台运行并且防止僵尸进程，因此需要守护进程Daemon。
守护进程详细流程：
https://blog.csdn.net/lianghe_work/article/details/47659889
Daemon代码：
#include &lt;unistd.h&gt;   
#include &lt;signal.h&gt;   
#include &lt;fcntl.h&gt;  
#include &lt;sys/sysl]]></description><category></category></item><item><title><![CDATA[2021.2.19C++学习笔记————简单MFC应用窗口程序编译实例]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/113864911</link><guid>https://blog.csdn.net/weixin_43948991/article/details/113864911</guid><author>weixin_43948991</author><pubDate>Sat, 20 Feb 2021 14:28:12 +0800</pubDate><description><![CDATA[C++学习笔记————简单MFC应用窗口程序编译实例
工作需要，编写一个窗口界面的小程序，为了偷懒不下Qt选择使用VS2015写MFC窗口应用。
1.创建项目：
使用VS2015创建MFC应用程序，选择“基于对话框”：


在“使用MFC”那一项建议把“在共享DLL中使用MFC”改为静态的那个选项，这样可以让应用程序对环境依赖变低。（比如要复制到没有mfc库环境的电脑用）
等待一会加载完成，项目创建成功，顺便把要用的第三方库，头文件什么的加进项目，准备工作完成。
2.设计窗口界面：
一般窗口资源界面在项目创]]></description><category></category></item><item><title><![CDATA[2021.2.19C++学习笔记————Windows下dll动态库编译及调用]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/113863836</link><guid>https://blog.csdn.net/weixin_43948991/article/details/113863836</guid><author>weixin_43948991</author><pubDate>Fri, 19 Feb 2021 14:59:37 +0800</pubDate><description><![CDATA[C++学习笔记————Windows下dll动态库编译及调用
一. 编译：
首先，选择Win32项目，设置项目名及地址：

选择DLL，空项目：

编写动态库：
头文件：
#pragma once;
#include&lt;iostream&gt;
#ifdef DLL_IMPLEMENT
#define DLL_API _declspec(dllexport)
#else
#define DLL_API _declspec(dllimport)
#endif

extern "C" DLL_API str]]></description><category></category></item><item><title><![CDATA[2021.1.6C++学习笔记————C读取文件写入字符串]]></title><link>https://blog.csdn.net/weixin_43948991/article/details/112258403</link><guid>https://blog.csdn.net/weixin_43948991/article/details/112258403</guid><author>weixin_43948991</author><pubDate>Wed, 06 Jan 2021 09:51:54 +0800</pubDate><description><![CDATA[C++学习笔记————C读取文件写入字符串

#include "stdio.h"
#include "stdlib.h"
 
int main( void )
{
    FILE *fp;
    fp = fopen("/home/tqk/tqk1/123.txt" , "r");
    /*指针位置移动到文件末尾*/
    fseek( fp , 0 , SEEK_END );
    int file_size;
    /*读取文件大小*/
    file_size = ftell( fp]]></description><category></category></item></channel></rss>