1. MQTT Message 2. Decode MQTT FixedHeader 3. Decode MQTT VariableHeader 3.1 If Connect Type 3.2 If Publish Type 3.2 If SUBSCRIBE:UNSUBSCRIBE:SUBACK:U ...
分类:
其他好文 时间:
2019-10-31 16:15:08
阅读次数:
97
FFmpeg官网:http://www.ffmpeg.org 官网介绍 FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play ...
分类:
系统相关 时间:
2019-10-31 13:28:13
阅读次数:
111
#python3,str和bytes类型相互转换工具类#file:python3_endecode_helper.pydef to_str(bytes_or_str): if isinstance(bytes_or_str,bytes): value = bytes_or_str.decode('U ...
分类:
编程语言 时间:
2019-10-31 13:16:44
阅读次数:
89
XPath,全称XML Path Language,即XML路径语言,它是一门在XML文档中查找信息的语言。它最初是用来搜寻XML文档的,但是它同样适用于HTML文档的搜索。 所以在做爬虫时,我们完全可以使用XPath来做相应的信息抽取。本节中,我们就来介绍XPath的基本用法。 1. XPath概 ...
分类:
其他好文 时间:
2019-10-30 16:28:51
阅读次数:
111
1、编码与解码 通常我们习惯将编码(Encode)称为序列化(serialization),它将对象序列化为字节数组,用于网络传输、数据持久化或者其它用途。反之,解码(Decode)称为反序列化(deserialization),它把从网络、磁盘等读取的字节数组还原成原始对象(通常是原始对象的拷贝) ...
分类:
Web程序 时间:
2019-10-30 16:23:59
阅读次数:
112
一种编码想要转成另一种编码,需要先解码成万国码:Unicode,然后再从Unicode转成其他编码。 例如GBK格式想要转成utf-8,需要先按照 gbk 的格式 decode 成 unicode,再从 unicode 格式 encode 成utf-8 one kind of code >Unico ...
分类:
编程语言 时间:
2019-10-30 11:39:45
阅读次数:
67
``` import redis pool = redis.ConnectionPool(host='localhost', port=6379,encoding="UTF-8",decode_responses=True) r = redis.Redis(connection_pool=pool)... ...
分类:
编程语言 时间:
2019-10-28 14:54:39
阅读次数:
73
function ad(){ $res=DB::table("category")->get(); $res= json_encode($res); $res= json_decode($res,1); $arr= $this->gettree($res,0); var_dump($arr);} f ...
分类:
其他好文 时间:
2019-10-27 21:05:34
阅读次数:
118
https://www.cnblogs.com/xqnq2007/p/7429584.html 当使用python编程时,编码问题一直很让人头疼,程序中经常会碰到如下错误提示: UnicodeDecodeError: 'ascii' codec can't decode byte 0x?? in p ...
分类:
其他好文 时间:
2019-10-27 16:19:06
阅读次数:
84
1 文本和字节序列 我们都知道字符串,就是由一些字符组成的序列构成串,那么字符又是什么呢?计算机只能识别二进制的东西,那么计算机又为什么会显示我们的汉字,或者是某个字母呢? 由于最早发明使用计算机是美国人,他们为了解决了英语如何在电脑上显示,就制定了一套标准:ASCII ((American Sta ...
分类:
编程语言 时间:
2019-10-27 10:19:57
阅读次数:
92