<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[新爷的专栏]]></title><description><![CDATA[微斯人，吾谁与归？]]></description><link>https://blog.csdn.net/zison_sun</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; zison_sun]]></copyright><item><title><![CDATA[使用pyinstaller打包pyqt的程序，运行后提示ModuleNotFoundError: No module named ‘Ui_main‘]]></title><link>https://blog.csdn.net/zison_sun/article/details/144407048</link><guid>https://blog.csdn.net/zison_sun/article/details/144407048</guid><author>zison_sun</author><pubDate>Wed, 11 Dec 2024 18:12:14 +0800</pubDate><description><![CDATA[使用pyqt UI编辑器生成了main.ui ，main.ui编译成了Ui_main.py。解决方法：pyinstaller -Fw main.py --paths=.main.py 使用当前目录下的Ui_main.py。使用--path 增加没找到的模块的路径，重新打包即可。环境：window+python3.9+pyqt6。打包过程没报错，运行报错。]]></description><category></category></item><item><title><![CDATA[线刷包 骗子网站]]></title><link>https://blog.csdn.net/zison_sun/article/details/128081911</link><guid>https://blog.csdn.net/zison_sun/article/details/128081911</guid><author>zison_sun</author><pubDate>Mon, 28 Nov 2022 16:09:10 +0800</pubDate><description><![CDATA[工具不能自动刷机，只是个下载刷机包的下载器，下载的刷机包里面一个刷机文档。基本不能用，感觉就是网上搜集的 一些刷机教程。都没整理就拿出来卖钱。]]></description><category></category></item><item><title><![CDATA[[学习flex] 1.利用flex实现文字和谐小程序]]></title><link>https://blog.csdn.net/zison_sun/article/details/125621410</link><guid>https://blog.csdn.net/zison_sun/article/details/125621410</guid><author>zison_sun</author><pubDate>Tue, 05 Jul 2022 15:53:30 +0800</pubDate><description><![CDATA[灵感来自于09平台dota1 ，游戏选手对喷时经常互飙国粹，问候对方全家，后来09平台进行了聊天和谐，不和谐的文字都会被*** 替换今天我就就用flex实现类似的效果。话不多说上flex代码：


使用flex生成C代码


编译C代码：


执行模拟程序：


可以将生成的replace_word.c 稍加修改嵌入自己的项目中即可实现聊天河蟹。^_^...]]></description><category></category></item><item><title><![CDATA[《Game Scripting Mastery》一本被中文翻译耽误的书]]></title><link>https://blog.csdn.net/zison_sun/article/details/125619441</link><guid>https://blog.csdn.net/zison_sun/article/details/125619441</guid><author>zison_sun</author><pubDate>Tue, 05 Jul 2022 14:39:29 +0800</pubDate><description><![CDATA[《Game Scripting Mastery》中文名《游戏脚本高级编程》，各种蹩脚的翻译，更多的像是google翻译的，译者不仅英语能力不行，计算机概念也缺乏，真是糟蹋了好书。]]></description><category></category></item><item><title><![CDATA[巧用clang 的sanitize检测内存越界]]></title><link>https://blog.csdn.net/zison_sun/article/details/125403967</link><guid>https://blog.csdn.net/zison_sun/article/details/125403967</guid><author>zison_sun</author><pubDate>Wed, 22 Jun 2022 10:23:58 +0800</pubDate><description><![CDATA[巧用clang sanitize 定位内存泄漏


不适用任何特殊编译选项编译这段代码：


运行后出现下面的结果：


使用gdb 看堆栈：


可以看到出错的位置在itree_node_id_clone 中realloc 失败了。但是检查代码，这里的代码并没有问题，使用malloc,calloc 替换后情况类似。于是我们借助clang的sanitizer 来定位问题，使用如下编译选项：


后重新编译运行，结果如下：


观察结果，发现idps_itree.c:53 这里溢出了，...]]></description><category></category></item><item><title><![CDATA[动态二进制翻译简述]]></title><link>https://blog.csdn.net/zison_sun/article/details/124707944</link><guid>https://blog.csdn.net/zison_sun/article/details/124707944</guid><author>zison_sun</author><pubDate>Wed, 11 May 2022 13:56:12 +0800</pubDate><description><![CDATA[动态二进制翻译，看名字就知道了必然对应有一个静态二进制翻译。那什么叫二进制翻译呢。二进制翻译主要是一个体系架构的机器码翻译成另一个平台的机器码。通常被用来跑异构平台软件，例如box86 可以在arm 芯片的Linux 上跑 x86 linux 的应用程序。动态二进制主要用在CPU 的模拟，box86,qeme都用到了这些技术。

动态二进制翻译与JIT(及时编译) 不同的地方在于:JIT 是将 字节码 翻译成本地机器码，而二进制翻译是机器码到机器码的翻译。



JIT 前面有词法解析，语...]]></description><category></category></item><item><title><![CDATA[1《游戏脚本高级编程》之命令脚本的随想]]></title><link>https://blog.csdn.net/zison_sun/article/details/124704445</link><guid>https://blog.csdn.net/zison_sun/article/details/124704445</guid><author>zison_sun</author><pubDate>Wed, 11 May 2022 10:46:53 +0800</pubDate><description><![CDATA[最近在阅读《游戏脚本高级编程》，这本书的内容涵盖很广，讲述了解释器在游戏领域的一个实现，很适合学习编译原理，虚拟机设计。如果有同学看《龙书，虎书》等看的云里雾里，可以先以此书接下地气，不至于丧失了信心，以及继续学下去的动力。

好回到命令脚本。

大家有没有想过同样是文本，同样是由主程序读取，然后按文本文件的逻辑执行，命令脚本与配置文件的差别？

命令脚本是不涉及到变量，循环，条件逻辑的脚本。我们以一个创建窗口后移动窗口，在闪烁窗口的功能来举例，通常格式内容如下：


script_crea...]]></description><category></category></item><item><title><![CDATA[一次编写摸鱼神器遇到的中文乱码的问题]]></title><link>https://blog.csdn.net/zison_sun/article/details/123482756</link><guid>https://blog.csdn.net/zison_sun/article/details/123482756</guid><author>zison_sun</author><pubDate>Mon, 14 Mar 2022 17:00:22 +0800</pubDate><description><![CDATA[目的：编写一个类似桌面歌词的摸鱼看小说神器

遇到的问题：从磁盘assic 编码（gb2312编码）的中文文件中读取指定数量的文字会出现乱码。

VS工程是多字节编码，有的文字能正常显示，有的不行。那就不是字符集转换的问题，这里不存在转换的必要。



分析gb2312 一个字是由两个BYTE组成，如果指定读取50个BYTE，其中有一个BYTE 不是汉字而是 字符 那么就会导致解码错位。

于是 ，解决办法就是，每次读取N个BYTE， 遍历这N个BYTE，判断是否又奇数个Byte 小于0xA0 (汉字的两个]]></description><category></category></item><item><title><![CDATA[C语言中使用&& 取标号的一个实验]]></title><link>https://blog.csdn.net/zison_sun/article/details/115861272</link><guid>https://blog.csdn.net/zison_sun/article/details/115861272</guid><author>zison_sun</author><pubDate>Mon, 19 Apr 2021 11:39:03 +0800</pubDate><description><![CDATA[C语言中&amp;&amp; 的另一种用法：取lable ，标号。 配合goto 一起使用，某些场景下会有意想不到的效果

#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

int main(int argc,char * argv[])
{
	static const void * gt[3] = {&amp;&amp;_goto1,&amp;&amp;_goto2,&amp;&amp;_goto3};
	
	goto *gt[2];

_goto1.]]></description><category></category></item><item><title><![CDATA[arm 上 Box86对比QEMU 的一点感受]]></title><link>https://blog.csdn.net/zison_sun/article/details/115698579</link><guid>https://blog.csdn.net/zison_sun/article/details/115698579</guid><author>zison_sun</author><pubDate>Wed, 14 Apr 2021 14:48:32 +0800</pubDate><description><![CDATA[实测BOX64 因为使用了neno在浮点数方面 比QEMU 快非常多。

但是在普通整数指令方面，QEMU占优势，比BOX64快6倍左右。



以上言论只是个人实测 感受，避免大家入坑。


			arm-qemu-usermod
			box86
		md5 999999
			0m6.225s
			0m6.145s
			0m6.126s
			0m37.809s
			0m38.179s
			0m38.095s
		pi   10000
			
			17m19.986s

			17...]]></description><category></category></item><item><title><![CDATA[巧用static变量初始化结构体!]]></title><link>https://blog.csdn.net/zison_sun/article/details/105819863</link><guid>https://blog.csdn.net/zison_sun/article/details/105819863</guid><author>zison_sun</author><pubDate>Tue, 28 Apr 2020 17:53:42 +0800</pubDate><description><![CDATA[本技巧属于编程中的 奇技淫巧。

 我们封装接口时经常会涉及到类似以下的代码，它的init函数对接口涉及到的结构体进行初始化 ，通常是清0，

 大多数情况下我们会用memset操作结构体 ，如下。



typedef struct tag_interface
{
	int a;
	int b;
	char sztest[10];
} interface_t, * inte...]]></description><category></category></item><item><title><![CDATA[linux下使用了-L 编译带动态库的可执行程序，可执行程序执行没法找到第三方动态库的问题]]></title><link>https://blog.csdn.net/zison_sun/article/details/105550340</link><guid>https://blog.csdn.net/zison_sun/article/details/105550340</guid><author>zison_sun</author><pubDate>Thu, 16 Apr 2020 09:26:22 +0800</pubDate><description><![CDATA[适用情形： 第三方动态库（通常是你自己写的）跟可执行程序同一目录，编译链接通过，执行显示无法找到库。



解决办法： 使用 -Wl,--rpath=你的库路径   。重新link可执行程序。




...]]></description><category></category></item><item><title><![CDATA[markdown 中插入图片不显示的问题解决办法]]></title><link>https://blog.csdn.net/zison_sun/article/details/105533046</link><guid>https://blog.csdn.net/zison_sun/article/details/105533046</guid><author>zison_sun</author><pubDate>Wed, 15 Apr 2020 13:31:18 +0800</pubDate><description><![CDATA[适用情形： 使用 ！[test](test.png)    使用绝对路径，相对路径 均无法插入图片

可以 使用html 的标签&lt;img src="ninjad.png" width = "500" height = "300" alt="图片无法加载时显示的文字" align=center /&gt;



其他 图片无法显示的情形，本人未遇到。仅供参考！
...]]></description><category></category></item><item><title><![CDATA[vmware 不能自适应客户机的解决办法]]></title><link>https://blog.csdn.net/zison_sun/article/details/80589751</link><guid>https://blog.csdn.net/zison_sun/article/details/80589751</guid><author>zison_sun</author><pubDate>Wed, 06 Jun 2018 08:53:11 +0800</pubDate><description><![CDATA[本文适用于：安装了vmware tools 后  ”立即适应客户机 ”仍为灰色，不能自适应的情况。环境：物理机  WIN10            vmware64          ubuntu16.04sudo apt-get install open-vm-tools open-vm-tools-desktop open-vm-tools-dkms...]]></description><category></category></item><item><title><![CDATA[TrieTree（字典树,前缀树） 的实现 (增删改查)]]></title><link>https://blog.csdn.net/zison_sun/article/details/52298773</link><guid>https://blog.csdn.net/zison_sun/article/details/52298773</guid><author>zison_sun</author><pubDate>Wed, 24 Aug 2016 11:39:44 +0800</pubDate><description><![CDATA[字典树TrieTree 的增删改查]]></description><category></category></item><item><title><![CDATA[托盘气球提示 不成功的原因（NOTIFYICONDATA）]]></title><link>https://blog.csdn.net/zison_sun/article/details/5954052</link><guid>https://blog.csdn.net/zison_sun/article/details/5954052</guid><author>zison_sun</author><pubDate>Wed, 20 Oct 2010 14:09:00 +0800</pubDate><description><![CDATA[If you set the NIF_INFO flag in the uFlags member, the standard ToolTip is replaced by a balloon ToolTip. For more discussion of balloon ToolTips, see the Using ToolTip Controls chapter.No more than one balloon ToolTip at at time is displayed for the taskb]]></description><category></category></item><item><title><![CDATA[详解Linux内核之双向循环链表       By邪恶八进制]]></title><link>https://blog.csdn.net/zison_sun/article/details/5874946</link><guid>https://blog.csdn.net/zison_sun/article/details/5874946</guid><author>zison_sun</author><pubDate>Fri, 10 Sep 2010 09:26:00 +0800</pubDate><description><![CDATA[[转载]详解Linux内核之双向循环链表详解Linux内核之双向循环链表<br /><br />信息来源：邪恶八进制信息安全团队（www.eviloctal.com）<br /><br />摘要:      本文详解了内核中面向对象的list结构的原理，以及如何以list为内嵌对象来构造自己的链表结构，如何从内嵌list对象获得自定义的对象指针；探讨了各种宏或者函数的详细使用方法及怎样以通用list结构来操作自定义对象。<br /><br />关键字:   双向循环链表，list，list_entry，ty]]></description><category></category></item><item><title><![CDATA[深入分析 Linux 内核链表]]></title><link>https://blog.csdn.net/zison_sun/article/details/5873154</link><guid>https://blog.csdn.net/zison_sun/article/details/5873154</guid><author>zison_sun</author><pubDate>Thu, 09 Sep 2010 13:22:00 +0800</pubDate><description><![CDATA[2004 年 8 月 01 日本文详细分析了 2.6.x 内核中链表结构的实现，并通过实例对每个链表操作接口进行了详尽的讲解。一、 链表数据结构简介链表是一种常用的组织有序数据的数据结构，它通过指针将一系列数据节点连接成一条数据链，是线性表的一种重要实现方式。相对于数组，链表具有更好的动态性，建立链表时无需预先知道数据总量，可以随机分配空间，可以高效地在链表中的任意位置实时插入或删除数据。链表的开销主要是访问的顺序性和组织链的空间损失。通常链表数据结构至少应包含两个域：数据域和指针域，数据域用于存储数据，指]]></description><category></category></item><item><title><![CDATA[POP 协议常见命令 解释]]></title><link>https://blog.csdn.net/zison_sun/article/details/5868619</link><guid>https://blog.csdn.net/zison_sun/article/details/5868619</guid><author>zison_sun</author><pubDate>Tue, 07 Sep 2010 15:15:00 +0800</pubDate><description><![CDATA[<br />以下对几个常用的pop3命令作一个简单的介绍　： <br />　　命令 　　　参数　　　 状态　　　 描述 <br />　　------------------------------------------ <br />　　user　　　 username 　认可 　　　此命令与下面的pass命令若成功，将导致状态转换 <br />　　pass　　　 password　 认可 <br />　　apop 　　　name,digest 认可 　　　digest是md5消息摘要 <br />　　--]]></description><category></category></item><item><title><![CDATA[类封装 暴雪 哈希表]]></title><link>https://blog.csdn.net/zison_sun/article/details/5861737</link><guid>https://blog.csdn.net/zison_sun/article/details/5861737</guid><author>zison_sun</author><pubDate>Fri, 03 Sep 2010 16:22:00 +0800</pubDate><description><![CDATA[<br />    近期由于需要，研究了魔兽文件打包管理器的相关算法，重点对其文件索引表的生成和查找进行了研究：采用哈希表进行，在冲突方面的处理方面，采用线性探测再散列。在添加和查找过程中进行了三次哈希，第一个哈希值用来查找，后两个哈希值用来校验，这样可以大大减少冲突的几率。 <br />      这里对其进行了简单的封装，扩展时，仅仅需要对结构体进行扩展即可。更为详细的说明，参考代码：【转载请保留版权，谢谢】<br /> <br />一、类声明头文件<br />     ////////////////]]></description><category></category></item></channel></rss>