<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[General Discussion | 综合讨论]]></title><description><![CDATA[A place to talk about whatever you want]]></description><link>http://forum.d2learn.org/category/2</link><generator>RSS for Node</generator><lastBuildDate>Fri, 06 Mar 2026 23:32:51 GMT</lastBuildDate><atom:link href="http://forum.d2learn.org/category/2.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 23 Feb 2026 13:24:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[快速十六进制转八进制]]></title><description><![CDATA[改进
<p dir="auto">经过@yyq252517提醒并测试，直接使用12bit的查找表可以更快：</p>
consteval std::array&lt;std::array&lt;char, 4&gt;, 4096&gt; hex_to_oct_lookup() noexcept
{
	std::array&lt;std::array&lt;char, 4&gt;, 4096&gt; lookup{};

	for (size_t i = 0; i &lt; 4096; ++i)
	{
		lookup[i][0] = '0' + ((i &gt;&gt; 0) &amp; 0b111);
		lookup[i][1] = '0' + ((i &gt;&gt; 3) &amp; 0b111);
		lookup[i][2] = '0' + ((i &gt;&gt; 6) &amp; 0b111);
		lookup[i][3] = '0' + ((i &gt;&gt; 9) &amp; 0b111);
	}

	return lookup;
}
// ...
std::string hex_to_oct(const std::string&amp; hex) noexcept
{
	const auto hex_length = hex.length();
	if (hex_length == 0) return "0";

	const auto groups = (hex_length + 2) / 3;
	const auto oct_digits = groups * 4;

	std::string res(oct_digits, '0');

	for (size_t i = hex_length % 3; i &lt; hex_length; i += 3)
	{
		const size_t curr_group = (i + 2) / 3;

		const uint16_t h0 = hex_lookup[std::bit_cast&lt;uint8_t&gt;(hex[i + 2])];  // [3:0]
		const uint16_t h1 = hex_lookup[std::bit_cast&lt;uint8_t&gt;(hex[i + 1])];  // [7:4]
		const uint16_t h2 = hex_lookup[std::bit_cast&lt;uint8_t&gt;(hex[i + 0])];  // [11:8]

		const uint16_t idx = (h2 &lt;&lt; 8) | (h1 &lt;&lt; 4) | h0;  // [11:0]

		const auto [o1, o2, o3, o4] = hex_to_oct_lookup_table[idx];

		res[curr_group * 4 + 3] = o1;
		res[curr_group * 4 + 2] = o2;
		res[curr_group * 4 + 1] = o3;
		res[curr_group * 4 + 0] = o4;
	}

	if (hex_length % 3 != 0)
	{
		std::array&lt;uint16_t, 3&gt; h{0, 0, 0};

		if (hex_length % 3 == 1)
		{
			h[0] = hex_lookup[std::bit_cast&lt;uint8_t&gt;(hex[0])];
		}
		else  // hex_length % 3 == 2
		{
			h[1] = hex_lookup[std::bit_cast&lt;uint8_t&gt;(hex[0])];
			h[0] = hex_lookup[std::bit_cast&lt;uint8_t&gt;(hex[1])];
		}

		const uint16_t idx = (h[2] &lt;&lt; 8) | (h[1] &lt;&lt; 4) | h[0];

		const auto [o1, o2, o3, o4] = hex_to_oct_lookup_table[idx];

		res[3] = o1;
		res[2] = o2;
		res[1] = o3;
		res[0] = o4;
	}

	const auto first_non_zero = res.find_first_not_of('0');
	if (first_non_zero == std::string::npos) return "0";
	return res.substr(first_non_zero);
}

<p dir="auto">使用和此前一致的测试环境，可以得到：</p>
Optimized version: 72.16 ms (stddev: 0.45 ms), 1385897448.4948883 hex chars/sec

<p dir="auto">比此前快了15%！此前低估了现代CPU的L1缓存系统的能力，看来它处理4096*4byte = 16KiB的查找表也不在话下</p>
<blockquote>
<p dir="auto">感谢@yyq252517</p>
</blockquote>
]]></description><link>http://forum.d2learn.org/topic/174/快速十六进制转八进制</link><guid isPermaLink="true">http://forum.d2learn.org/topic/174/快速十六进制转八进制</guid><dc:creator><![CDATA[Stehsaer]]></dc:creator><pubDate>Mon, 23 Feb 2026 13:24:52 GMT</pubDate></item><item><title><![CDATA[使用自编C++Web框架搭建的个人博客]]></title><description><![CDATA[<p dir="auto">@unamed-coder 看https://glwebsite.us.ci/about下边的小字，我真不是福瑞</p>
]]></description><link>http://forum.d2learn.org/topic/173/使用自编c-web框架搭建的个人博客</link><guid isPermaLink="true">http://forum.d2learn.org/topic/173/使用自编c-web框架搭建的个人博客</guid><dc:creator><![CDATA[MineCode]]></dc:creator><pubDate>Mon, 23 Feb 2026 07:48:12 GMT</pubDate></item><item><title><![CDATA[小白学习给点建议 - C语言学习]]></title><description><![CDATA[<p dir="auto">@johanvx 这个也是非常经典的公开课 中国大学Mooc和B站上应该都能找到视频</p>
]]></description><link>http://forum.d2learn.org/topic/153/小白学习给点建议-c语言学习</link><guid isPermaLink="true">http://forum.d2learn.org/topic/153/小白学习给点建议-c语言学习</guid><dc:creator><![CDATA[SPeak]]></dc:creator><pubDate>Mon, 12 Jan 2026 14:33:45 GMT</pubDate></item><item><title><![CDATA[第一个文件注释掉D2X_wait后直接报错退出]]></title><description><![CDATA[<p dir="auto">这个之前有个类似情况, 程序遇到死循环这个就可能发生. 重新运行每次都会这样吗</p>
]]></description><link>http://forum.d2learn.org/topic/152/第一个文件注释掉d2x_wait后直接报错退出</link><guid isPermaLink="true">http://forum.d2learn.org/topic/152/第一个文件注释掉d2x_wait后直接报错退出</guid><dc:creator><![CDATA[SPeak]]></dc:creator><pubDate>Sat, 20 Dec 2025 04:28:18 GMT</pubDate></item><item><title><![CDATA[devcpp光标位置和显示乱码问题: 调完字体大小后光标位置不对啊，有没有大佬看看(用xlings下的文字也有问题）]]></title><description><![CDATA[<p dir="auto">@SPeak 在 调完字体大小后光标位置不对啊，有没有大佬看看(用xlings下的文字也有问题） 中说：</p>
<blockquote>
<p dir="auto">http://forum.d2learn.org/post/418</p>
</blockquote>
<p dir="auto">问题1: 界面乱码问题</p>
<blockquote>
<p dir="auto">A1: xlings已经更新解决(增加了utf8编码的支持, 重装即可</p>
</blockquote>
<p dir="auto">问题2: 代码输入光标位置问题</p>
<blockquote>
<p dir="auto">解决方法1: 代码中不要包含中文内容<br />
解决方法2: 取消beta/utf8编码选项, 然后卸载重新安装devcpp</p>
</blockquote>
xlings remove devcpp
xlings install devcpp

<p dir="auto">6c34d5cd-b1eb-4c7f-8181-1ca3ca6c673b-image.png</p>

<p dir="auto">中/英文切换: https://forum.d2learn.org/topic/134</p>
]]></description><link>http://forum.d2learn.org/topic/137/devcpp光标位置和显示乱码问题-调完字体大小后光标位置不对啊-有没有大佬看看-用xlings下的文字也有问题</link><guid isPermaLink="true">http://forum.d2learn.org/topic/137/devcpp光标位置和显示乱码问题-调完字体大小后光标位置不对啊-有没有大佬看看-用xlings下的文字也有问题</guid><dc:creator><![CDATA[SPeak]]></dc:creator><pubDate>Thu, 02 Oct 2025 14:35:04 GMT</pubDate></item><item><title><![CDATA[项目代码在gtest单元测试中崩溃的问题]]></title><description><![CDATA[<p dir="auto">chain对象104, 3个对象中间asan插入了红区保护<br />
通过内存布局看 [00] 的访问(size_)是在104最后32字节的, 但依然报错</p>
<p dir="auto">image.png</p>
<p dir="auto">821b2e52-ffc5-4751-a9f8-306ac05b66ef-image.png</p>
<p dir="auto"><strong>并且非常奇怪的是, 插入crash代码(减少使用printf/cout 造成代码生成变化带来的干扰) 92可以执行到, 95行无法执行到</strong></p>
<p dir="auto">14502bf3-0652-4f95-8779-5e65c987d49a-image.png</p>
<p dir="auto">怀疑的地方</p>

分配器内存对齐问题?
operator=的实现是否正确处理基类?
哪里的代码造成UB, 导致代码生成出现问题?

]]></description><link>http://forum.d2learn.org/topic/135/项目代码在gtest单元测试中崩溃的问题</link><guid isPermaLink="true">http://forum.d2learn.org/topic/135/项目代码在gtest单元测试中崩溃的问题</guid><dc:creator><![CDATA[SPeak]]></dc:creator><pubDate>Tue, 23 Sep 2025 12:14:18 GMT</pubDate></item><item><title><![CDATA[关于sonic实现音频变速不变调的问题]]></title><description><![CDATA[<p dir="auto">hi,友友有解决这个情况吗，我也是当speed不为一时就报错了，我完全不知道如何查找崩溃，找了一天了，下面是我的代码：<br />
void AudioDecodeThread::run()<br />
{<br />
// 加入sonic<br />
// 初始化部分：先创建一个流<br />
sonicStream stream = sonicCreateStream(m_videoPlayControl-&gt;m_audioCodecCtx-&gt;sample_rate, 2);<br />
if (!stream)<br />
{<br />
m_videoPlayControl-&gt;m_eventHandler-&gt;onVideoPlayerError(0, "sonicCreateStream error!");<br />
}</p>
    if (!initSwrCtx())
    {
        m_videoPlayControl-&gt;m_eventHandler-&gt;onVideoPlayerError(0, "initSwrCtx error");
        return;
    }

    while (true)
    {
        if (m_videoPlayControl-&gt;m_currentState == State::STOP)
        {
            break;
        }
        else if (m_videoPlayControl-&gt;m_currentState == State::PAUSE)
        {
            std::this_thread::sleep_for(std::chrono::milliseconds(10));
            continue;
        }

        AVPacket *pkt = m_videoPlayControl-&gt;m_audioPacketQueue.pop();
        if (pkt == nullptr)
        {
            if (m_videoPlayControl-&gt;m_isReadFinished)
            {
                break;
            }
            continue;
        }

        if (memcmp(pkt-&gt;data, FLUSHDATA, strlen(FLUSHDATA)) == 0)
        {
            avcodec_flush_buffers(m_videoPlayControl-&gt;m_audioCodecCtx);
            av_packet_free(&amp;pkt);
            continue;
        }

        int ret = avcodec_send_packet(m_videoPlayControl-&gt;m_audioCodecCtx, pkt);
        if (ret &lt; 0)
        {
            char errbuf[1024] = { 0 };
            av_strerror(ret, errbuf, sizeof(errbuf));
            fprintf(stderr, "avcodec_send_packet: %s (error pts: %d)\n", errbuf, pkt-&gt;pts);
            av_packet_free(&amp;pkt);
            continue;
        }

        AVFrame *frame = av_frame_alloc();
        while (avcodec_receive_frame(m_videoPlayControl-&gt;m_audioCodecCtx, frame) == 0)
        {
            // 读取frame, swr转换, 放到frameQueue里面去
            int inSamples = frame-&gt;nb_samples;
            // int outSamples = av_rescale_rnd(inSamples, 1, 1, AV_ROUND_UP);

            // 废除手动分配的 audioBuffer，改用 resampleFrame 内部缓冲区
            AVFrame *resampleFrame = av_frame_alloc();
            resampleFrame-&gt;format = AV_SAMPLE_FMT_S16;
            av_channel_layout_default(&amp;resampleFrame-&gt;ch_layout, 2); // 双声道
            resampleFrame-&gt;sample_rate = frame-&gt;sample_rate;         // 正确设置采样率
            resampleFrame-&gt;nb_samples = inSamples;

            // 让 FFmpeg 自动分配缓冲区（确保地址和大小正确）
            if (av_frame_get_buffer(resampleFrame, 0) &lt; 0)
            {
                av_frame_free(&amp;resampleFrame);
                continue;
            }

            int len = swr_convert(m_swrCtx, resampleFrame-&gt;data, resampleFrame-&gt;nb_samples, (const uint8_t **)frame-&gt;data, inSamples);

            // 加入sonic

            sonicSetSpeed(stream, m_videoPlayControl-&gt;m_speed);
            // 4. 写入音频数据到Sonic ,这里的bug

            short *valid_audio_data = (short *)resampleFrame-&gt;data[0];
            int total_samples = len; // 单声道总样本数

            std::cout &lt;&lt; len &lt;&lt; std::endl;

            ret = sonicWriteShortToStream(stream, valid_audio_data, total_samples);
            if (ret == 0)
            {
                m_videoPlayControl-&gt;m_eventHandler-&gt;onVideoPlayerError(0, "sonicWriteShortToStream error");
                continue;
            }

            int availableSamples = sonicSamplesAvailable(stream); //
            if (availableSamples &lt;= 0)
            {
                continue;
            }

            // 根据实际需要的样本数分配缓冲区
            short *output_pcm = new short[availableSamples * 2];
            int samples = sonicReadShortFromStream(stream, output_pcm, availableSamples);
            if (samples &lt;= 0)
            {
                delete[] output_pcm;
                av_frame_free(&amp;resampleFrame);
                continue;
            }

            std::cout &lt;&lt; inSamples &lt;&lt; "---" &lt;&lt; len &lt;&lt; "---" &lt;&lt; availableSamples &lt;&lt; "---" &lt;&lt; samples &lt;&lt; std::endl;

            PCMFrame *pcm = new PCMFrame();
            pcm-&gt;setBuffer((uint8_t *)output_pcm, samples * 4);
            pcm-&gt;setPts(frame-&gt;pts);
            pcm-&gt;setSampleRate(frame-&gt;sample_rate);
            m_videoPlayControl-&gt;m_audioFrameQueue.push(pcm);

            delete[] output_pcm;
            av_frame_free(&amp;resampleFrame);
        }
        av_frame_free(&amp;frame);
        av_packet_free(&amp;pkt);
    }
    sonicDestroyStream(stream);
}

]]></description><link>http://forum.d2learn.org/topic/122/关于sonic实现音频变速不变调的问题</link><guid isPermaLink="true">http://forum.d2learn.org/topic/122/关于sonic实现音频变速不变调的问题</guid><dc:creator><![CDATA[Cat-Guijun]]></dc:creator><pubDate>Thu, 14 Aug 2025 19:17:58 GMT</pubDate></item><item><title><![CDATA[关于 GitHub 中的 Fork 仓库的简单问题]]></title><description><![CDATA[<p dir="auto">为方便描述，称上游 GitHub 仓库为 upstream，自己 fork 的 GitHub 仓库为 origin。如果没有理解错的话，你应该是遇到下面这个场景并想做到 Step 4：</p>
= Step 1: Fork

* aaaaaa (HEAD -&gt; main, origin/main, upstream/main)
...

= Step 2: Make local changes and push them to origin

* bbbbbb (HEAD -&gt; main, origin/main)
* aaaaaa (upstream/main)
...

= Step 3: Check (fetch) upstream's update

* bbbbbb (HEAD -&gt; main, origin/main)
| * cccccc (upstream/main)
|/
* aaaaaa
...

= Step 4: Rebase (but how?)

* bbbbbb (HEAD -&gt; main, origin/main)
* cccccc (upstream/main)
* aaaaaa
...

<p dir="auto">如果是这样的话，我通常的做法是在本地进行这样的操作：</p>
git pull -r upstream main
# Resolve conflict
git rebase --continue

<p dir="auto">至于 GitHub 有没有一键（或者几键）的做法，我没有找到。</p>
<p dir="auto">参考阅读：https://gitolite.com/git-pull--rebase</p>
]]></description><link>http://forum.d2learn.org/topic/120/关于-github-中的-fork-仓库的简单问题</link><guid isPermaLink="true">http://forum.d2learn.org/topic/120/关于-github-中的-fork-仓库的简单问题</guid><dc:creator><![CDATA[johanvx]]></dc:creator><pubDate>Sun, 10 Aug 2025 16:10:04 GMT</pubDate></item><item><title><![CDATA[工閒手多搞了個python數學加密拹議, 有努諸位看倌批評一下]]></title><description><![CDATA[<p dir="auto">@semmyenator 是的, 需要 [私钥 -map-&gt; 公钥] 是一个不可逆或有限条件下不可逆, 这样才能保证安全性</p>
]]></description><link>http://forum.d2learn.org/topic/86/工閒手多搞了個python數學加密拹議-有努諸位看倌批評一下</link><guid isPermaLink="true">http://forum.d2learn.org/topic/86/工閒手多搞了個python數學加密拹議-有努諸位看倌批評一下</guid><dc:creator><![CDATA[SPeak]]></dc:creator><pubDate>Wed, 07 May 2025 04:07:57 GMT</pubDate></item><item><title><![CDATA[某小项目关于账号验证的问题...]]></title><description><![CDATA[<p dir="auto">只要在第一次验证后, 让服务器发一个自己的token, 后面就可以使用这个token来获取数据。实在不行可以把这个功能做成可选的 -- 即一次验证(也可手动重新验证, 老的将失效) + 功能可选</p>
]]></description><link>http://forum.d2learn.org/topic/81/某小项目关于账号验证的问题</link><guid isPermaLink="true">http://forum.d2learn.org/topic/81/某小项目关于账号验证的问题</guid><dc:creator><![CDATA[sunrisepeak]]></dc:creator><pubDate>Sun, 13 Apr 2025 00:06:22 GMT</pubDate></item><item><title><![CDATA[Linux &amp; Win 游戏性能随手记录]]></title><description><![CDATA[<p dir="auto">我用错驱动了...<br />
理论上 上述linux的测试结果还能再提升？</p>
<p dir="auto">图片.png</p>
]]></description><link>http://forum.d2learn.org/topic/74/linux-win-游戏性能随手记录</link><guid isPermaLink="true">http://forum.d2learn.org/topic/74/linux-win-游戏性能随手记录</guid><dc:creator><![CDATA[MoYingJi]]></dc:creator><pubDate>Fri, 21 Mar 2025 10:55:20 GMT</pubDate></item><item><title><![CDATA[析构函数为何会调用]]></title><description><![CDATA[<p dir="auto">@CS-liujf 这里T2推导的应该是B类型</p>
]]></description><link>http://forum.d2learn.org/topic/72/析构函数为何会调用</link><guid isPermaLink="true">http://forum.d2learn.org/topic/72/析构函数为何会调用</guid><dc:creator><![CDATA[sunrisepeak]]></dc:creator><pubDate>Sun, 16 Mar 2025 03:09:57 GMT</pubDate></item><item><title><![CDATA[你在干什么?]]></title><description><![CDATA[<p dir="auto">可以先用github的release创建一个0.0.1版本, 或者一个 预览版。基于这个先做一个包文件 以及 验证。后面有变动可以再以版本的方式修改包文件</p>
]]></description><link>http://forum.d2learn.org/topic/64/你在干什么</link><guid isPermaLink="true">http://forum.d2learn.org/topic/64/你在干什么</guid><dc:creator><![CDATA[sunrisepeak]]></dc:creator><pubDate>Tue, 21 Jan 2025 06:46:05 GMT</pubDate></item><item><title><![CDATA[关于rt-thread task_struct结构体的疑惑]]></title><description><![CDATA[<p dir="auto">@sky-littlestar 在 关于rt-thread task_struct结构体的疑惑 中说：</p>
<blockquote>
<p dir="auto">但是一些函数却以此作为类型传参数，task_struct的定义应该怎么找<br />
找不到使用的地方感觉可以找一找实际的函数中是怎么使用的反推结构里面的成员, 也有可能结构是不公开的</p>
</blockquote>
]]></description><link>http://forum.d2learn.org/topic/40/关于rt-thread-task_struct结构体的疑惑</link><guid isPermaLink="true">http://forum.d2learn.org/topic/40/关于rt-thread-task_struct结构体的疑惑</guid><dc:creator><![CDATA[sunrisepeak]]></dc:creator><pubDate>Wed, 20 Nov 2024 15:16:37 GMT</pubDate></item><item><title><![CDATA[项目中智能指针多态性丢失的问题]]></title><description><![CDATA[<p dir="auto">已完成。<br />
最终解决方案是，通过cloneable接口的clone方法，实现具体类对象的动态创建：<br />
https://github.com/FrozenLemonTee/original/commit/fe14776ccc411790084dcd4ea1a002d3ee22eaa7<br />
https://github.com/FrozenLemonTee/original/commit/cdd94d92c29c09bb58ca4d6f4b9eadb8272e7e27</p>
]]></description><link>http://forum.d2learn.org/topic/36/项目中智能指针多态性丢失的问题</link><guid isPermaLink="true">http://forum.d2learn.org/topic/36/项目中智能指针多态性丢失的问题</guid><dc:creator><![CDATA[FrozenLemonTee]]></dc:creator><pubDate>Sat, 16 Nov 2024 10:28:46 GMT</pubDate></item><item><title><![CDATA[希望大佬们帮忙review代码，一个workstealing线程池]]></title><description><![CDATA[<p dir="auto">@sunrisepeak 全局队列或许也可以用CAS优化</p>
]]></description><link>http://forum.d2learn.org/topic/28/希望大佬们帮忙review代码-一个workstealing线程池</link><guid isPermaLink="true">http://forum.d2learn.org/topic/28/希望大佬们帮忙review代码-一个workstealing线程池</guid><dc:creator><![CDATA[sunrisepeak]]></dc:creator><pubDate>Fri, 08 Nov 2024 05:09:48 GMT</pubDate></item><item><title><![CDATA[关于c++ chrono库中类型方面的问题]]></title><description><![CDATA[<p dir="auto">chrono:xxseconds 一般是duration的别名</p>
    _EXPORT_STD using nanoseconds  = duration&lt;long long, nano&gt;;
    _EXPORT_STD using microseconds = duration&lt;long long, micro&gt;;
    _EXPORT_STD using milliseconds = duration&lt;long long, milli&gt;;
    _EXPORT_STD using seconds      = duration&lt;long long&gt;;
    _EXPORT_STD using minutes      = duration&lt;int, ratio&lt;60&gt;&gt;;
    _EXPORT_STD using hours        = duration&lt;int, ratio&lt;3600&gt;&gt;;

<p dir="auto">而duration的构造存在隐式类型转换, 他的构造函数是一个模板, 在构造函数里会使用duration_cast把std::chrono::milliseconds转成chrono::microseconds</p>
        template &lt;class _Rep2,
            enable_if_t&lt;is_convertible_v&lt;const _Rep2&amp;, _Rep&gt;
                            &amp;&amp; (treat_as_floating_point_v&lt;_Rep&gt; || !treat_as_floating_point_v&lt;_Rep2&gt;),
                int&gt; = 0&gt;
        constexpr explicit duration(const _Rep2&amp; _Val)
            noexcept(is_arithmetic_v&lt;_Rep&gt; &amp;&amp; is_arithmetic_v&lt;_Rep2&gt;) // strengthened
            : _MyRep(static_cast&lt;_Rep&gt;(_Val)) {}

        template &lt;class _Rep2, class _Period2,
            enable_if_t&lt;treat_as_floating_point_v&lt;_Rep&gt;
                            || (_Ratio_divide_sfinae&lt;_Period2, _Period&gt;::den == 1 &amp;&amp; !treat_as_floating_point_v&lt;_Rep2&gt;),
                int&gt; = 0&gt;
        constexpr duration(const duration&lt;_Rep2, _Period2&gt;&amp; _Dur)
            noexcept(is_arithmetic_v&lt;_Rep&gt; &amp;&amp; is_arithmetic_v&lt;_Rep2&gt;) // strengthened
            : _MyRep(_CHRONO duration_cast&lt;duration&gt;(_Dur).count()) {}  // 具体转换的代码

        _NODISCARD constexpr _Rep count() const noexcept(is_arithmetic_v&lt;_Rep&gt;) /* strengthened */ {
            return _MyRep;
        }

<p dir="auto">https://github.com/microsoft/STL/blob/a1bc1261795d4097cf7c12cfd0b5e2091809f281/stl/inc/__msvc_chrono.hpp#L110-L117</p>
]]></description><link>http://forum.d2learn.org/topic/25/关于c-chrono库中类型方面的问题</link><guid isPermaLink="true">http://forum.d2learn.org/topic/25/关于c-chrono库中类型方面的问题</guid><dc:creator><![CDATA[sunrisepeak]]></dc:creator><pubDate>Thu, 31 Oct 2024 08:18:52 GMT</pubDate></item><item><title><![CDATA[opencv无法使用image show，工程可以正常构建生成可执行文件]]></title><description><![CDATA[<p dir="auto">@Vilote 在 opencv无法使用image show，工程可以正常构建生成可执行文件 中说：</p>
<blockquote>
<p dir="auto">implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'</p>
</blockquote>
<p dir="auto">上面 {不使用系统库} 遇到的问题可能和xmake包管理器的gtk包名问题有关系, 最近两天修复了</p>
<p dir="auto">https://github.com/xmake-io/xmake-repo/pull/5748</p>
<p dir="auto">可以用下面的命令更新包索引</p>
xrepo clean 
xrepo update-repo -f

]]></description><link>http://forum.d2learn.org/topic/19/opencv无法使用image-show-工程可以正常构建生成可执行文件</link><guid isPermaLink="true">http://forum.d2learn.org/topic/19/opencv无法使用image-show-工程可以正常构建生成可执行文件</guid><dc:creator><![CDATA[sunrisepeak]]></dc:creator><pubDate>Thu, 17 Oct 2024 13:01:11 GMT</pubDate></item><item><title><![CDATA[如何把imgui和OpenGL结合？]]></title><description><![CDATA[<p dir="auto">@sunrisepeak 我明白了，原来在imgui的例子里已经有了OpenGL的渲染例子，我报错的原因就是在main里又加了新的OpenGL的渲染代码进去😁 感谢指导</p>
]]></description><link>http://forum.d2learn.org/topic/16/如何把imgui和opengl结合</link><guid isPermaLink="true">http://forum.d2learn.org/topic/16/如何把imgui和opengl结合</guid><dc:creator><![CDATA[lu9943]]></dc:creator><pubDate>Fri, 11 Oct 2024 00:34:56 GMT</pubDate></item><item><title><![CDATA[怎么理解aarch64里的堆栈和寄存器？]]></title><description><![CDATA[<p dir="auto">@lu9943 在 怎么理解aarch64里的堆栈和寄存器？ 中说：</p>
<blockquote>
<p dir="auto">这我就很纳闷了，要是往上生长，那不就是开辟空间是add吗？然后sp不是往上移动了吗？真的被这个绕晕了呀！（文章出处链接文本）</p>
</blockquote>
<p dir="auto">其实用 <strong>往上生长</strong> 这个词是不合适的, 因为这设计到 内存图怎么画<br />
而使用 <strong>往低地址生长</strong> 进行记忆。 那么:</p>

如果内存图最上面是地址0, 那就是 <strong>往上生长</strong>
反之, 如果 内存地址0在最下面 那么就是 <strong>往下生长</strong>

<p dir="auto">333561cb-e053-42a0-8ad7-ed23ac3f7933-image.png</p>
]]></description><link>http://forum.d2learn.org/topic/10/怎么理解aarch64里的堆栈和寄存器</link><guid isPermaLink="true">http://forum.d2learn.org/topic/10/怎么理解aarch64里的堆栈和寄存器</guid><dc:creator><![CDATA[sunrisepeak]]></dc:creator><pubDate>Sat, 05 Oct 2024 10:31:01 GMT</pubDate></item></channel></rss>