<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[GreedySnaker的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/GreedySnaker</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; GreedySnaker]]></copyright><item><title><![CDATA[VS2022+ Qt 下 libtorch 报错 C2059 语法错误:“＜parameter-list＞”]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/151365238</link><guid>https://blog.csdn.net/GreedySnaker/article/details/151365238</guid><author>GreedySnaker</author><pubDate>Tue, 09 Sep 2025 16:39:18 +0800</pubDate><description><![CDATA[应该是libtorch的slots字符和Qt的slots冲突了，用下面的代码替代#include <torch/torch.h>1.改了1天，终于找到原因。修改后，看前三行就行。]]></description><category></category></item><item><title><![CDATA[qpdf开源库踩坑记录]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/144419372</link><guid>https://blog.csdn.net/GreedySnaker/article/details/144419372</guid><author>GreedySnaker</author><pubDate>Thu, 12 Dec 2024 10:37:05 +0800</pubDate><description><![CDATA[功能很强大，低版本qt没有插件用这个就可。]]></description><category></category></item><item><title><![CDATA[Qt-chart 画折线图(文字x轴)]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/144419209</link><guid>https://blog.csdn.net/GreedySnaker/article/details/144419209</guid><author>GreedySnaker</author><pubDate>Thu, 12 Dec 2024 10:26:34 +0800</pubDate><description><![CDATA[【代码】Qt-chart 画折线图(文字x轴)]]></description><category></category></item><item><title><![CDATA[Qt-chart 画折线图(以时间为x轴)]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/144418622</link><guid>https://blog.csdn.net/GreedySnaker/article/details/144418622</guid><author>GreedySnaker</author><pubDate>Thu, 12 Dec 2024 10:10:57 +0800</pubDate><description><![CDATA[【代码】Qt-chart 画折线图(以时间为x轴)]]></description><category></category></item><item><title><![CDATA[Qt-chart 画柱状图]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/144417761</link><guid>https://blog.csdn.net/GreedySnaker/article/details/144417761</guid><author>GreedySnaker</author><pubDate>Thu, 12 Dec 2024 09:54:11 +0800</pubDate><description><![CDATA[记录下，记录下。]]></description><category></category></item><item><title><![CDATA[Windwos +vs 2022 编译openssl 1.0.2 库]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/139920931</link><guid>https://blog.csdn.net/GreedySnaker/article/details/139920931</guid><author>GreedySnaker</author><pubDate>Mon, 24 Jun 2024 12:00:42 +0800</pubDate><description><![CDATA[先说 结论，编译64位报错，查了一圈没找到解决方案，最后换了32位的。使用qt访问web接口，因为是https，没有openssl库会报错if (reply)// 处理成功响应// 处理responseDataelse// 处理错误响应错误就是说明需要openssl使用下面代码查看qt需要的库如图。]]></description><category></category></item><item><title><![CDATA[LeetCode-542]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/124915131</link><guid>https://blog.csdn.net/GreedySnaker/article/details/124915131</guid><author>GreedySnaker</author><pubDate>Sun, 22 May 2022 19:51:35 +0800</pubDate><description><![CDATA[给定一个由 0 和 1 组成的矩阵 mat ，请输出一个大小相同的矩阵，其中每一个格子是 mat 中对应位置元素到最近的 0 的距离。
两个相邻元素间的距离为 1 。
LeetCode链接
我们可以从左上-&gt;右下遍历一次, 更新左, 上的最近距离, 再从右下-&gt;左上遍历一次, 更新右, 下最近距
class Solution 
{
public:
    vector&lt;vector&lt;int&gt;&gt; updateMatrix(vector&lt;vector&lt;int&gt]]></description><category></category></item><item><title><![CDATA[QT常用表格导出为Excel]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/124914465</link><guid>https://blog.csdn.net/GreedySnaker/article/details/124914465</guid><author>GreedySnaker</author><pubDate>Sun, 22 May 2022 18:42:20 +0800</pubDate><description><![CDATA[在.pro中添加
QT += axcontainer
添加头文件
#include &lt;QFileDialog&gt; 
#include &lt;QDesktopServices&gt;

QTableWidget导出为Excel
void MainWindow::WidgetExcalByHtml(QTableWidget *tableWidget, QString &amp;title)
{
    QString fileName = QFileDialog::getSaveFileName(t]]></description><category></category></item><item><title><![CDATA[c++判断字符串是否有中文]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/124914378</link><guid>https://blog.csdn.net/GreedySnaker/article/details/124914378</guid><author>GreedySnaker</author><pubDate>Sun, 22 May 2022 18:35:50 +0800</pubDate><description><![CDATA[电脑系统中的英文字符串和中文字符最根本的区别就在于：
1、英文的 ASCII 码，其最高位为 0，占一个字节
注：英文的ASCII码范围是在0到127，二进制为（0000 0000 ~ 0111 1111）
2、中文的 ASCII 码，其最高位为 1。占两个字节，
#include &lt;stdio.h&gt;
#include &lt;string.h&gt;

int main()
{
    std::string str = ".、,，是ciw.，,";
    char szchinese[3]]]></description><category></category></item><item><title><![CDATA[QTablewidget中一列添加多个控件]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/124914207</link><guid>https://blog.csdn.net/GreedySnaker/article/details/124914207</guid><author>GreedySnaker</author><pubDate>Sun, 22 May 2022 18:18:06 +0800</pubDate><description><![CDATA[一列中添加多个控件
		//设置查看图片按键
		QPushButton* viewimage = new QPushButton();
        viewimage-&gt;setText("查看图片");
        connect(viewimage, &amp;QPushButton::clicked, this, &amp;Mainwindow::clickViewImage);
        //设置查看PDF按键
        QPushButton* viewpdf = new]]></description><category></category></item><item><title><![CDATA[QT时间(日期相减问题）]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/124914085</link><guid>https://blog.csdn.net/GreedySnaker/article/details/124914085</guid><author>GreedySnaker</author><pubDate>Sun, 22 May 2022 18:10:37 +0800</pubDate><description><![CDATA[日期计算
 QDateTime time = QDateTime::currentDateTime();//获取系统现在的时间
 QString str = time.toString("yyyy-MM-dd"); //设置显示格式
 QString BeforeDaystr=time.addDays(-30).toString("yyyy-MM-dd");//获取一个月前时间

日期与时间戳互转
QString starttime ="2022-11-11 12:00:00";
QString endti]]></description><category></category></item><item><title><![CDATA[Python桶排序]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/124786674</link><guid>https://blog.csdn.net/GreedySnaker/article/details/124786674</guid><author>GreedySnaker</author><pubDate>Sun, 15 May 2022 19:46:59 +0800</pubDate><description><![CDATA[设置一个定量的数组当作空桶；（当数字少的时候，可以设置n个桶，只把相等的数放在同一个桶，不过这种方法空桶过多，数字多的时候回消耗极大的空间。数字多的时候可以少设置几个桶，利用映射关系将多个数放在一个桶。）遍历输入数据，并且把数据映射完之后，一个一个放到对应的桶里去；从不是空的桶里把排好序的数据拼接起来。
def bucktetSort(numList,bucketNum):
    if len(numList) == 0 or len(numList) == 1:
        return numLi]]></description><category></category></item><item><title><![CDATA[QComboBox样式表]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/124786102</link><guid>https://blog.csdn.net/GreedySnaker/article/details/124786102</guid><author>GreedySnaker</author><pubDate>Sun, 15 May 2022 18:53:54 +0800</pubDate><description><![CDATA[修改样式真是心累，这个还是比较全的，转发一下，免得后面找不到了。qt的控件样式大部分可以套用下面的
链接
/* 未下拉时，QComboBox的样式 */
QComboBox {
    border: 1px solid gray;   /* 边框 */
    border-radius: 3px;   /* 圆角 */
    padding: 1px 18px 1px 3px;   /* 字体填衬 */
    color: #000;
    font: normal normal 15px "Mi]]></description><category></category></item><item><title><![CDATA[LeetCode-517]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/124235270</link><guid>https://blog.csdn.net/GreedySnaker/article/details/124235270</guid><author>GreedySnaker</author><pubDate>Sun, 17 Apr 2022 20:17:14 +0800</pubDate><description><![CDATA[超级洗衣机
假设有 n 台超级洗衣机放在同一排上。开始的时候，每台洗衣机内可能有一定量的衣服，也可能是空的。在每一步操作中，你可以选择任意 m (1 &lt;= m &lt;= n) 台洗衣机，与此同时将每台洗衣机的一件衣服送到相邻的一台洗衣机。给定一个整数数组 machines 代表从左至右每台洗衣机中的衣物数量，请给出能让所有洗衣机中剩下的衣物的数量相等的 最少的操作步数 。如果不能使每台洗衣机中衣物的数量相等，则返回 -1 。
class Solution 
{
public:
    int fin]]></description><category></category></item><item><title><![CDATA[LeetCode-486]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/124084603</link><guid>https://blog.csdn.net/GreedySnaker/article/details/124084603</guid><author>GreedySnaker</author><pubDate>Sun, 10 Apr 2022 20:05:10 +0800</pubDate><description><![CDATA[预测赢家
给你一个整数数组 nums 。玩家 1 和玩家 2 基于这个数组设计了一个游戏。玩家 1 和玩家 2 轮流进行自己的回合，玩家 1 先手。开始时，两个玩家的初始分值都是 0 。每一回合，玩家从数组的任意一端取一个数字（即，nums[0] nums[nums.length - 1]），取到的数字将会从数组中移除（数组长度减 1 ）。玩家选中的数字将会加到他的得分上。当数组中没有剩余数字可取时，游戏结束。如果玩家 1 能成为赢家，返回 true 。如果两个玩家得分相等，同样认为玩家 1 是游戏的赢家，]]></description><category></category></item><item><title><![CDATA[LeetCode-473]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/124084306</link><guid>https://blog.csdn.net/GreedySnaker/article/details/124084306</guid><author>GreedySnaker</author><pubDate>Sun, 10 Apr 2022 19:48:56 +0800</pubDate><description><![CDATA[火柴拼正方形
你将得到一个整数数组 matchsticks ，其中 matchsticks[i] 是第 i 个火柴棒的长度。你要用 所有的火柴棍 拼成一个正方形。你 不能折断 任何一根火柴棒，但你可以把它们连在一起，而且每根火柴棒必须 使用一次 。如果你能使这个正方形，则返回 true ，否则返回 false 。
回溯，根据先决条件判断出变长，轮询，不满足则剪枝，减少判断次数
class Solution 
{
public:
    bool makesquare(vector&lt;int&gt;&am]]></description><category></category></item><item><title><![CDATA[AAC音频编码介绍]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/123972097</link><guid>https://blog.csdn.net/GreedySnaker/article/details/123972097</guid><author>GreedySnaker</author><pubDate>Tue, 05 Apr 2022 16:50:26 +0800</pubDate><description><![CDATA[一.AAC概述
AAC是高级音频编码（Advanced Audio Coding）的缩写，出现于1997年，最初是基于MPEG-2的音频编码技术。由Fraunhofer IIS、Dolby Laboratories、AT&amp;T、Sony等公司共同开发，目的是取代MP3格式。2000年，MPEG-4标准出台，AAC重新集成了其它技术（PS,SBR），为区别于传统的MPEG-2 AAC，故含有SBR或PS特性的AAC又称为MPEG-4 AAC。
二、AAC规格简述
AAC是新一代的音频有损压缩技术，它通过]]></description><category></category></item><item><title><![CDATA[LeetCode-451]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/123971960</link><guid>https://blog.csdn.net/GreedySnaker/article/details/123971960</guid><author>GreedySnaker</author><pubDate>Tue, 05 Apr 2022 16:42:08 +0800</pubDate><description><![CDATA[根据字符出现频率排序
给定一个字符串 s ，根据字符出现的 频率 对其进行 降序排序 。一个字符出现的 频率 是它出现在字符串中的次数。返回 已排序的字符串 。如果有多个答案，返回其中任何一个。
示例 1:
输入: s = “tree”
输出: “eert”
解释: 'e’出现两次，'r’和’t’都只出现一次。
因此’e’必须出现在’r’和’t’之前。此外，"eetr"也是一个有效的答案。
LeetCode链接
统计字符数量后排序，再重组字符串
class Solution 
{
public:
    s]]></description><category></category></item><item><title><![CDATA[LeetCode-435]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/123971426</link><guid>https://blog.csdn.net/GreedySnaker/article/details/123971426</guid><author>GreedySnaker</author><pubDate>Tue, 05 Apr 2022 16:20:49 +0800</pubDate><description><![CDATA[无重叠区间
给定一个区间的集合 intervals ，其中 intervals[i] = [starti, endi] 。返回 需要移除区间的最小数量，使剩余区间互不重叠 。
示例 1:
输入: intervals = [[1,2],[2,3],[3,4],[1,3]]
输出: 1
解释: 移除 [1,3] 后，剩下的区间没有重叠。
LeetCode链接
class Solution 
{
public:
    int eraseOverlapIntervals(vector&lt;vector&lt;i]]></description><category></category></item><item><title><![CDATA[LeetCode-406]]></title><link>https://blog.csdn.net/GreedySnaker/article/details/123959538</link><guid>https://blog.csdn.net/GreedySnaker/article/details/123959538</guid><author>GreedySnaker</author><pubDate>Mon, 04 Apr 2022 20:20:29 +0800</pubDate><description><![CDATA[根据身高重建队列
假设有打乱顺序的一群人站成一个队列，数组 people 表示队列中一些人的属性（不一定按顺序）。每个 people[i] = [hi, ki] 表示第 i 个人的身高为 hi ，前面 正好 有 ki 个身高大于或等于 hi 的人。请你重新构造并返回输入数组 people 所表示的队列。返回的队列应该格式化为数组 queue ，其中 queue[j] = [hj, kj] 是队列中第 j 个人的属性（queue[0] 是排在队列前面的人）。
LeetCode链接
class Solution]]></description><category></category></item></channel></rss>