通信协议
4V通信协议1. 通信方式使用HTTPS的POST方式通信 2.1 POST请求基本格式123456789{ "token": "token str", //身份令牌 "request": "json string", //字符串化的JSON请求消息体 "nonce": 12345, //随机数 "timestamp": 65543216421, //请求的时间戳 "signature": "signature string", //请求的校验码 "encrypt":1, //request是否为加密串 "echostr": "echo string" //随机字符串} 2.2 请求结果的返回格式12345678{ "resp...
TTS 文本转语音
文本转语音TTS 文本转语音包SpeechSDK51 SpeechSDK51LangPack 地址https://www.microsoft.com/en-us/download/details.aspx?id=10121# tts.cpp 代码块12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576// SDK下载地址 https://www.microsoft.com/en-us/download/details.aspx?id=10121// TTS.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include "TTS.h"#include <sapi.h>#pragma comment(lib, "ole32.lib") //CoIn...
Add Two Numbers
https://leetcode.com/problems/add-two-numbers/description/ You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.给定两个非空链表,表示两个非负整数。这些数字以相反的顺序存储,每个节点都包含一个数字。添加两个数字并将其作为一个链表返回。 You may assume the two numbers do not contain any leading zero, except the number 0 itself.你可以假设这两个数字不包含任何前导零,除了数字0本身。 12345678910111213141516171819202122232...
各版本qt与qtcreator下载地址
各版本qt与qtcreator下载地址http://download.qt.io/archive/
url一定要encode
搭建的http文件服务器。http地址由服务端拼接,然而web开发竟然忘记了encode,导致上线后某些文件不能预览(手动滑稽)。
c++ string wstring 转换
string <-> wstring123456789101112#include <boost/locale.hpp>int TestChangeWS(){ // string -> wstring std::wstring wname = boost::locale::conv::to_utf<wchar_t>(name, "GBK"); std::wcout << TEXT("wname:\t") << wname << TEXT("\n"); // wstring -> string std::string sname = boost::locale::conv::from_utf(wname, "GBK"); std::cout << "sname:\t" << sname << "\n&quo...
UTF8-GBK转换
函数文档 123456std::string boost::locale::conv::between ( char const * begin,char const * end,std::string const & to_encoding,std::string const & from_encoding,method_type how = default_method ) Convert a text in range [begin,end) to to_encoding from from_encoding 将范围[begin,end)中的文本从from_encoding转为to_encoding 12345std::string boost::locale::conv::between ( char const * text,std::string const & to_encoding,std::string const & from_encoding,method_type how = default_meth...
VS通过.map文件查找异常代码的位置
VS通过.map文件查找异常代码的位置一、配置VS 1.配置禁用优化 2.配置生成汇编代码 3.配置生成MAP文件 二、查找崩溃代码位置 1.查看崩溃异常偏移 此处异常偏移为000019c3 2.查看程序加载地址 3.对照.MAP文件,查找第一处大于程序加载地址(00400000)+异常偏移(000019c3)的位置 004019e0是第一处大于004019c3的位置,那么崩溃就位于CTestHtmlDlg类OnButtonOk函数中, 4.查看TestHtml.cod 崩溃代码位于OnButtonOK函数 00000+(004019c3-004019b0)=00013的位置注意部分函数起始地址不是00000; 可以看出*p=0为崩溃代码。
微信URL有效性验证
新浪sae服务器php搭建微信echostr问题搭建SAE PHP服务器时其它配置完全正确,但是微信验证服务器有效性时总是出现配置失败的问题。 在echo echostr之前需要清除文本格式代码如下: 12345if ($tmpStr == $signature) { if( !headers_sent() ) header('Content-Type: text/plain'); echo $_GET ["echostr"]; }
简单的俄罗斯方块
简单的俄罗斯方块123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199...