期货homes平台以及仿ctp接口
实盘账户或者模拟账户可以下挂多个子账户
子账户也可以是homes母账户,理论上可以一层一层套下去。
所有交易细节全部保存,收盘定时结算。
功能很强大,并且还有很多拓展空间。
连接homes平台,需要用到仿ctp交易接口,声明和ctp一模一样,贴上核心代码:
#pragma once
#include <ascs/ext/tcp.h>
#include <ascs/tcp/client_socket.h>
#include <ascs/service_pump.h>
#include "ThostFtdcUserApiStruct.h"
#include <queue>
#include <fstream>
#include "../FutureHomes/UtilityFunctions.h" using namespace ascs::tcp;
//消息最小长度:body=0
#define REQ_MSG_MIN_SIZE 20
#define RSP_MSG_MIN_SIZE 12
//消息头/尾
#define MSG_HEAD (char)0xDA
#define MSG_END (char)0xDF enum enumRspMsgType
{
OnFrontConnected = 0x01,
OnFrontDisconnected,
OnHeartBeatWarning,
OnRspAuthenticate,
OnRspUserLogin,
OnRspUserLogout,
OnRspUserPasswordUpdate,
OnRspTradingAccountPasswordUpdate,
OnRspOrderInsert,
OnRspParkedOrderInsert,
OnRspParkedOrderAction,
OnRspOrderAction,
OnRspQueryMaxOrderVolume,
OnRspSettlementInfoConfirm,
OnRspRemoveParkedOrder,
OnRspRemoveParkedOrderAction,
OnRspQryOrder,
OnRspQryTrade,
OnRspQryInvestorPosition,
OnRspQryTradingAccount,
OnRspQryInvestor,
OnRspQryTradingCode,
OnRspQryInstrumentMarginRate,
OnRspQryInstrumentCommissionRate,
OnRspQryExchange,
OnRspQryInstrument,
OnRspQryDepthMarketData,
OnRspQrySettlementInfo,
OnRspQryTransferBank,
OnRspQryInvestorPositionDetail,
OnRspQryNotice,
OnRspQrySettlementInfoConfirm,
OnRspQryInvestorPositionCombineDetail,
OnRspQryCFMMCTradingAccountKey,
OnRspQryEWarrantOffset,
OnRspQryInvestorProductGroupMargin,
OnRspQryExchangeMarginRate,
OnRspQryExchangeMarginRateAdjust,
OnRspQryTransferSerial,
OnRspQryAccountregister,
OnRspError,
OnRtnOrder,
OnRtnTrade,
OnErrRtnOrderInsert,
OnErrRtnOrderAction,
OnRtnInstrumentStatus,
OnRtnTradingNotice,
OnRtnErrorConditionalOrder,
OnRspQryContractBank,
OnRspQryParkedOrder,
OnRspQryParkedOrderAction,
OnRspQryTradingNotice,
OnRspQryBrokerTradingParams,
OnRspQryBrokerTradingAlgos,
OnRtnFromBankToFutureByBank,
OnRtnFromFutureToBankByBank,
OnRtnRepealFromBankToFutureByBank,
OnRtnRepealFromFutureToBankByBank,
OnRtnFromBankToFutureByFuture,
OnRtnFromFutureToBankByFuture,
OnRtnRepealFromBankToFutureByFutureManual,
OnRtnRepealFromFutureToBankByFutureManual,
OnRtnQueryBankBalanceByFuture,
OnErrRtnBankToFutureByFuture,
OnErrRtnFutureToBankByFuture,
OnErrRtnRepealBankToFutureByFutureManual,
OnErrRtnRepealFutureToBankByFutureManual,
OnErrRtnQueryBankBalanceByFuture,
OnRtnRepealFromBankToFutureByFuture,
OnRtnRepealFromFutureToBankByFuture,
OnRspFromBankToFutureByFuture,
OnRspFromFutureToBankByFuture,
OnRspQueryBankAccountMoneyByFuture,
OnRtnOpenAccountByBank,
OnRtnCancelAccountByBank,
OnRtnChangeAccountByBank,
//v2
OnRspExecOrderInsert,
OnRspExecOrderAction,
OnRspForQuoteInsert,
OnRspQuoteInsert,
OnRspQuoteAction,
OnRspBatchOrderAction,
OnRspOptionSelfCloseInsert,
OnRspOptionSelfCloseAction,
OnRspCombActionInsert,
OnRspQryProduct,
OnRspQryExchangeRate,
OnRspQrySecAgentACIDMap,
OnRspQryProductExchRate,
OnRspQryProductGroup,
OnRspQryMMInstrumentCommissionRate,
OnRspQryMMOptionInstrCommRate,
OnRspQryInstrumentOrderCommRate,
OnRspQrySecAgentTradingAccount,
OnRspQrySecAgentCheckMode,
OnRspQryOptionInstrTradeCost,
OnRspQryOptionInstrCommRate,
OnRspQryExecOrder,
OnRspQryForQuote,
OnRspQryQuote,
OnRspQryOptionSelfClose,
OnRspQryInvestUnit,
OnRspQryCombInstrumentGuard,
OnRspQryCombAction,
OnRtnBulletin,
OnRtnExecOrder,
OnErrRtnExecOrderInsert,
OnErrRtnExecOrderAction,
OnErrRtnForQuoteInsert,
OnRtnQuote,
OnErrRtnQuoteInsert,
OnErrRtnQuoteAction,
OnRtnForQuoteRsp,
OnRtnCFMMCTradingAccountToken,
OnErrRtnBatchOrderAction,
OnRtnOptionSelfClose,
OnErrRtnOptionSelfCloseInsert,
OnErrRtnOptionSelfCloseAction,
OnRtnCombAction,
OnErrRtnCombActionInsert,
OnRspQueryCFMMCTradingAccountToken, OnGetTradingDay = 0xC8
}; class CThostFtdcTraderSpi; struct CThostFtdcReqUserLoginFieldEx
{
CThostFtdcReqUserLoginField field;
THOST_TE_RESUME_TYPE publicTopic; //公有流
THOST_TE_RESUME_TYPE privateTopic; //私有流
}; #define MSG_UNWRAPPER(func,t1,length)\
assert(length == sizeof(t1)+sizeof(CThostFtdcRspInfoField)+);\
t1 cmp;memset(&cmp, , sizeof(t1));\
auto pMain = memcmp(pBody, &cmp, sizeof(t1))== ? nullptr : (t1*)pBody;\
m_pSpi->func((t1*)pMain, (CThostFtdcRspInfoField*)(pBody + sizeof(t1)), *(int*)(pBody + sizeof(t1) + sizeof(CThostFtdcRspInfoField)), *(bool*)(pBody + sizeof(t1) + sizeof(CThostFtdcRspInfoField) + )); #define MSG_UNWRAPPER_0(func,t1,length)\
assert(length == sizeof(t1));\
m_pSpi->func((t1*)pBody) #define MSG_UNWRAPPER_1(func,t1,length)\
assert(length == sizeof(t1)+sizeof(CThostFtdcRspInfoField));\
m_pSpi->func((t1*)pBody, (CThostFtdcRspInfoField*)(pBody + sizeof(t1))) class my_client_socket : public client_socket_base<ASCS_DEFAULT_PACKER, ASCS_DEFAULT_UNPACKER>
{
public:
my_client_socket(asio::io_context& s) : client_socket_base(s), m_pSpi(nullptr){}
void set_spi_layer(CThostFtdcTraderSpi* p) { m_pSpi = p; } protected:
virtual void on_connect() {
ofs_order.open("./socket_rsp.txt", std::ios_base::app);
} #if ASCS_VER > 10300
virtual bool on_msg_handle(out_msg_type& msg)
#else
virtual bool on_msg(out_msg_type& msg)
#endif
{
m_strBuffer.append(msg.data(), msg.size());
parse_msg(); return true;
} void parse_msg() {
char chType; char* pBody; int nLength; bool bLast;
//检测消息格式
while (check_msg(chType, &pBody, nLength, bLast)) {
distribute(chType, pBody, nLength-RSP_MSG_MIN_SIZE, bLast);
m_strBuffer = m_strBuffer.substr(nLength);
}
} //检测消息
bool check_msg(char& chType, char** ppBody, int& nLength, bool& bLast) {
if (m_strBuffer[] != MSG_HEAD) {
int nPos = m_strBuffer.find(MSG_HEAD);
if (nPos >= )
m_strBuffer = m_strBuffer.substr(nPos);
else
return false;
}
//缓存大小 < MSG_MIN_SIZE,数据未接收全返回
if (m_strBuffer.size() < RSP_MSG_MIN_SIZE) return false;
chType = m_strBuffer[];
nLength = *(int*)(&m_strBuffer[]); //消息长度 < MSG_MIN_SIZE,计算长度不对返回
if (nLength < RSP_MSG_MIN_SIZE && nLength>) return false;
//消息长度==0,错误数据返回
if (nLength == ) {
m_strBuffer = m_strBuffer.substr();
return false;
}
//消息长度 < nLength,大消息未接收全返回
if (m_strBuffer.size() < nLength) return false;
//消息尾不对,返回
if (m_strBuffer[nLength - ] != MSG_END) {
m_strBuffer = m_strBuffer.substr(nLength);
return false;
} *ppBody = &(m_strBuffer[]); //nLength-1起向前推4+4+1个字符
bLast = m_strBuffer[nLength - ];
unsigned int nIndex = *(unsigned int*)(&m_strBuffer[nLength - ]);
return true;
} //派发消息
void distribute(char chType, char* pBody, int nLength, bool& bLast) {
switch (chType)
{
case OnFrontConnected: {
m_pSpi->OnFrontConnected();
break; }
case OnFrontDisconnected: {
m_pSpi->OnFrontDisconnected(*(int*)pBody);
break; }
case OnHeartBeatWarning: {
m_pSpi->OnHeartBeatWarning(*(int*)pBody);
break; }
case OnRspAuthenticate: {
MSG_UNWRAPPER(OnRspAuthenticate, CThostFtdcRspAuthenticateField, nLength);
break; }
case OnRspUserLogin: {
MSG_UNWRAPPER(OnRspUserLogin, CThostFtdcRspUserLoginField, nLength);
break; }
case OnRspUserLogout: {
MSG_UNWRAPPER(OnRspUserLogout, CThostFtdcUserLogoutField, nLength);
break; }
case OnRspUserPasswordUpdate: {
MSG_UNWRAPPER(OnRspUserPasswordUpdate, CThostFtdcUserPasswordUpdateField, nLength);
break; }
case OnRspTradingAccountPasswordUpdate: {
MSG_UNWRAPPER(OnRspTradingAccountPasswordUpdate, CThostFtdcTradingAccountPasswordUpdateField, nLength);
break; }
case OnRspOrderInsert: {
MSG_UNWRAPPER(OnRspOrderInsert, CThostFtdcInputOrderField, nLength);
break; }
case OnRspParkedOrderInsert: {
MSG_UNWRAPPER(OnRspParkedOrderInsert, CThostFtdcParkedOrderField, nLength);
break; }
case OnRspParkedOrderAction: {
MSG_UNWRAPPER(OnRspParkedOrderAction, CThostFtdcParkedOrderActionField, nLength);
break; }
case OnRspOrderAction: {
MSG_UNWRAPPER(OnRspOrderAction, CThostFtdcInputOrderActionField, nLength);
break; }
case OnRspQueryMaxOrderVolume: {
MSG_UNWRAPPER(OnRspQueryMaxOrderVolume, CThostFtdcQueryMaxOrderVolumeField, nLength);
break; }
case OnRspSettlementInfoConfirm: {
MSG_UNWRAPPER(OnRspSettlementInfoConfirm, CThostFtdcSettlementInfoConfirmField, nLength);
break; }
case OnRspRemoveParkedOrder: {
MSG_UNWRAPPER(OnRspRemoveParkedOrder, CThostFtdcRemoveParkedOrderField, nLength);
break; }
case OnRspRemoveParkedOrderAction: {
MSG_UNWRAPPER(OnRspRemoveParkedOrderAction, CThostFtdcRemoveParkedOrderActionField, nLength);
break; }
case OnRspQryOrder: {
MSG_UNWRAPPER(OnRspQryOrder, CThostFtdcOrderField, nLength);
break; }
case OnRspQryTrade: {
MSG_UNWRAPPER(OnRspQryTrade, CThostFtdcTradeField, nLength);
break; }
case OnRspQryInvestorPosition: {
MSG_UNWRAPPER(OnRspQryInvestorPosition, CThostFtdcInvestorPositionField, nLength);
break; }
case OnRspQryTradingAccount: {
MSG_UNWRAPPER(OnRspQryTradingAccount, CThostFtdcTradingAccountField, nLength);
break; }
case OnRspQryInvestor: {
MSG_UNWRAPPER(OnRspQryInvestor, CThostFtdcInvestorField, nLength);
break; }
case OnRspQryTradingCode: {
MSG_UNWRAPPER(OnRspQryTradingCode, CThostFtdcTradingCodeField, nLength);
break; }
case OnRspQryInstrumentMarginRate: {
MSG_UNWRAPPER(OnRspQryInstrumentMarginRate, CThostFtdcInstrumentMarginRateField, nLength);
break; }
case OnRspQryInstrumentCommissionRate: {
MSG_UNWRAPPER(OnRspQryInstrumentCommissionRate, CThostFtdcInstrumentCommissionRateField, nLength);
break; }
case OnRspQryExchange: {
MSG_UNWRAPPER(OnRspQryExchange, CThostFtdcExchangeField, nLength);
break; }
case OnRspQryInstrument: {
MSG_UNWRAPPER(OnRspQryInstrument, CThostFtdcInstrumentField, nLength);
break; }
case OnRspQryDepthMarketData: {
MSG_UNWRAPPER(OnRspQryDepthMarketData, CThostFtdcDepthMarketDataField, nLength);
break; }
case OnRspQrySettlementInfo: {
MSG_UNWRAPPER(OnRspQrySettlementInfo, CThostFtdcSettlementInfoField, nLength);
break; }
case OnRspQryTransferBank: {
MSG_UNWRAPPER(OnRspQryTransferBank, CThostFtdcTransferBankField, nLength);
break; }
case OnRspQryInvestorPositionDetail: {
MSG_UNWRAPPER(OnRspQryInvestorPositionDetail, CThostFtdcInvestorPositionDetailField, nLength);
break; }
case OnRspQryNotice: {
MSG_UNWRAPPER(OnRspQryNotice, CThostFtdcNoticeField, nLength);
break; }
case OnRspQrySettlementInfoConfirm: {
MSG_UNWRAPPER(OnRspQrySettlementInfoConfirm, CThostFtdcSettlementInfoConfirmField, nLength);
break; }
case OnRspQryInvestorPositionCombineDetail: {
MSG_UNWRAPPER(OnRspQryInvestorPositionCombineDetail, CThostFtdcInvestorPositionCombineDetailField, nLength);
break; }
case OnRspQryCFMMCTradingAccountKey: {
MSG_UNWRAPPER(OnRspQryCFMMCTradingAccountKey, CThostFtdcCFMMCTradingAccountKeyField, nLength);
break; }
case OnRspQryEWarrantOffset: {
MSG_UNWRAPPER(OnRspQryEWarrantOffset, CThostFtdcEWarrantOffsetField, nLength);
break; }
case OnRspQryInvestorProductGroupMargin: {
MSG_UNWRAPPER(OnRspQryInvestorProductGroupMargin, CThostFtdcInvestorProductGroupMarginField, nLength);
break; }
case OnRspQryExchangeMarginRate: {
MSG_UNWRAPPER(OnRspQryExchangeMarginRate, CThostFtdcExchangeMarginRateField, nLength);
break; }
case OnRspQryExchangeMarginRateAdjust: {
MSG_UNWRAPPER(OnRspQryExchangeMarginRateAdjust, CThostFtdcExchangeMarginRateAdjustField, nLength);
break; }
case OnRspQryTransferSerial: {
MSG_UNWRAPPER(OnRspQryTransferSerial, CThostFtdcTransferSerialField, nLength);
break; }
case OnRspQryAccountregister: {
MSG_UNWRAPPER(OnRspQryAccountregister, CThostFtdcAccountregisterField, nLength);
break; }
case OnRspError: {
assert(nLength == sizeof(CThostFtdcRspInfoField) + sizeof(CThostFtdcRspInfoField) + );
m_pSpi->OnRspError((CThostFtdcRspInfoField*)pBody, *(int*)(pBody + sizeof(CThostFtdcRspInfoField)), *(bool*)(pBody + sizeof(CThostFtdcRspInfoField) + ));
break; }
case OnRtnOrder: {
MSG_UNWRAPPER_0(OnRtnOrder, CThostFtdcOrderField, nLength);
ofs_order << "order" << ((CThostFtdcOrderField*)pBody)->OrderSysID << "," << ((CThostFtdcOrderField*)pBody)->InsertTime << std::endl;
break; }
case OnRtnTrade: {
MSG_UNWRAPPER_0(OnRtnTrade, CThostFtdcTradeField, nLength);
ofs_order << "trade" << ((CThostFtdcTradeField*)pBody)->OrderSysID << "," <<((CThostFtdcTradeField*)pBody)->TradeID << "," << ((CThostFtdcTradeField*)pBody)->TradeTime << std::endl;
break; }
case OnErrRtnOrderInsert: {
MSG_UNWRAPPER_1(OnErrRtnOrderInsert, CThostFtdcInputOrderField, nLength);
break; }
case OnErrRtnOrderAction: {
MSG_UNWRAPPER_1(OnErrRtnOrderAction, CThostFtdcOrderActionField, nLength);
break; }
case OnRtnInstrumentStatus: {
MSG_UNWRAPPER_0(OnRtnInstrumentStatus, CThostFtdcInstrumentStatusField, nLength);
break; }
case OnRtnTradingNotice: {
MSG_UNWRAPPER_0(OnRtnTradingNotice, CThostFtdcTradingNoticeInfoField, nLength);
break; }
case OnRtnErrorConditionalOrder: {
MSG_UNWRAPPER_0(OnRtnErrorConditionalOrder, CThostFtdcErrorConditionalOrderField, nLength);
break; }
case OnRspQryContractBank: {
MSG_UNWRAPPER(OnRspQryContractBank, CThostFtdcContractBankField, nLength);
break; }
case OnRspQryParkedOrder: {
MSG_UNWRAPPER(OnRspQryParkedOrder, CThostFtdcParkedOrderField, nLength);
break; }
case OnRspQryParkedOrderAction: {
MSG_UNWRAPPER(OnRspQryParkedOrderAction, CThostFtdcParkedOrderActionField, nLength);
break; }
case OnRspQryTradingNotice: {
MSG_UNWRAPPER(OnRspQryTradingNotice, CThostFtdcTradingNoticeField, nLength);
break; }
case OnRspQryBrokerTradingParams: {
MSG_UNWRAPPER(OnRspQryBrokerTradingParams, CThostFtdcBrokerTradingParamsField, nLength);
break; }
case OnRspQryBrokerTradingAlgos: {
MSG_UNWRAPPER(OnRspQryBrokerTradingAlgos, CThostFtdcBrokerTradingAlgosField, nLength);
break; }
case OnRtnFromBankToFutureByBank: {
MSG_UNWRAPPER_0(OnRtnFromBankToFutureByBank, CThostFtdcRspTransferField, nLength);
break; }
case OnRtnFromFutureToBankByBank: {
MSG_UNWRAPPER_0(OnRtnFromFutureToBankByBank, CThostFtdcRspTransferField, nLength);
break; }
case OnRtnRepealFromBankToFutureByBank: {
MSG_UNWRAPPER_0(OnRtnRepealFromBankToFutureByBank, CThostFtdcRspRepealField, nLength);
break; }
case OnRtnRepealFromFutureToBankByBank: {
MSG_UNWRAPPER_0(OnRtnRepealFromFutureToBankByBank, CThostFtdcRspRepealField, nLength);
break; }
case OnRtnFromBankToFutureByFuture: {
MSG_UNWRAPPER_0(OnRtnFromBankToFutureByFuture, CThostFtdcRspTransferField, nLength);
break; }
case OnRtnFromFutureToBankByFuture: {
MSG_UNWRAPPER_0(OnRtnFromFutureToBankByFuture, CThostFtdcRspTransferField, nLength);
break; }
case OnRtnRepealFromBankToFutureByFutureManual: {
MSG_UNWRAPPER_0(OnRtnRepealFromBankToFutureByFutureManual, CThostFtdcRspRepealField, nLength);
break; }
case OnRtnRepealFromFutureToBankByFutureManual: {
MSG_UNWRAPPER_0(OnRtnRepealFromFutureToBankByFutureManual, CThostFtdcRspRepealField, nLength);
break; }
case OnRtnQueryBankBalanceByFuture: {
MSG_UNWRAPPER_0(OnRtnQueryBankBalanceByFuture, CThostFtdcNotifyQueryAccountField, nLength);
break; }
case OnErrRtnBankToFutureByFuture: {
MSG_UNWRAPPER_1(OnErrRtnBankToFutureByFuture, CThostFtdcReqTransferField, nLength);
break; }
case OnErrRtnFutureToBankByFuture: {
MSG_UNWRAPPER_1(OnErrRtnFutureToBankByFuture, CThostFtdcReqTransferField, nLength);
break; }
case OnErrRtnRepealBankToFutureByFutureManual: {
MSG_UNWRAPPER_1(OnErrRtnRepealBankToFutureByFutureManual, CThostFtdcReqRepealField, nLength);
break; }
case OnErrRtnRepealFutureToBankByFutureManual: {
MSG_UNWRAPPER_1(OnErrRtnRepealFutureToBankByFutureManual, CThostFtdcReqRepealField, nLength);
break; }
case OnErrRtnQueryBankBalanceByFuture: {
MSG_UNWRAPPER_1(OnErrRtnQueryBankBalanceByFuture, CThostFtdcReqQueryAccountField, nLength);
break; }
case OnRtnRepealFromBankToFutureByFuture: {
MSG_UNWRAPPER_0(OnRtnRepealFromBankToFutureByFuture, CThostFtdcRspRepealField, nLength);
break; }
case OnRtnRepealFromFutureToBankByFuture: {
MSG_UNWRAPPER_0(OnRtnRepealFromFutureToBankByFuture, CThostFtdcRspRepealField, nLength);
break; }
case OnRspFromBankToFutureByFuture: {
MSG_UNWRAPPER(OnRspFromBankToFutureByFuture, CThostFtdcReqTransferField, nLength);
break; }
case OnRspFromFutureToBankByFuture: {
MSG_UNWRAPPER(OnRspFromFutureToBankByFuture, CThostFtdcReqTransferField, nLength);
break; }
case OnRspQueryBankAccountMoneyByFuture: {
MSG_UNWRAPPER(OnRspQueryBankAccountMoneyByFuture, CThostFtdcReqQueryAccountField, nLength);
break; }
case OnRtnOpenAccountByBank: {
MSG_UNWRAPPER_0(OnRtnOpenAccountByBank, CThostFtdcOpenAccountField, nLength);
break; }
case OnRtnCancelAccountByBank: {
MSG_UNWRAPPER_0(OnRtnCancelAccountByBank, CThostFtdcCancelAccountField, nLength);
break; }
case OnRtnChangeAccountByBank: {
MSG_UNWRAPPER_0(OnRtnChangeAccountByBank, CThostFtdcChangeAccountField, nLength);
break; }
case OnRspQryProduct: {
MSG_UNWRAPPER(OnRspQryProduct, CThostFtdcProductField, nLength);
break;
}
case OnRspQueryCFMMCTradingAccountToken:
{
MSG_UNWRAPPER(OnRspQueryCFMMCTradingAccountToken, CThostFtdcQueryCFMMCTradingAccountTokenField, nLength);
break;
}
}
} private:
CThostFtdcTraderSpi* m_pSpi;
std::string m_strBuffer;
int nMsgSize;
char m_szPackMsg[];
std::ofstream ofs_order;
}; typedef ascs::tcp::single_client_base <my_client_socket> my_single_client;
期货homes平台以及仿ctp接口的更多相关文章
- discuz云平台报调用远程接口失败的问题分析和解决
根据网络两篇文章整理 问题描述:当开通或关闭某个云平台服务的时候,报如下错误信息:调用远程接口失败.请检查您的服务器是否处于内网以及您服务器的防火墙设置. 云平台测试站点的接口文件正常,于是开始在文件 ...
- 一个可扩展的深度学习框架的Python实现(仿keras接口)
一个可扩展的深度学习框架的Python实现(仿keras接口) 动机 keras是一种非常优秀的深度学习框架,其具有较好的易用性,可扩展性.keras的接口设计非常优雅,使用起来非常方便.在这里,我将 ...
- 【经验随笔】Java通过代理访问互联网平台提供的WebService接口的一种方法
背景 通常有两点原因需要通过代理访问互联网平台的提供的WebService接口: 1. 在公司企业内网访问外部互联网平台发布的接口,公司要求通过代理访问外网. 2. 频繁访问平台接口,IP被平台封了, ...
- Java生鲜电商平台-APP/小程序接口传输常见的加密算法及详解
Java生鲜电商平台-APP/小程序接口传输常见的加密算法及详解 说明:Java生鲜电商平台-APP/小程序接口传输常见的加密算法及详解,加密算法,是现在每个软件项目里必须用到的内容. 广泛应用在包括 ...
- 如何在Form++开源组态平台添加硬件采集接口
E-Form++是一套值得推荐的高品质开源C++矢量图形库,C++编程之所以异常困难,主要就是没有很专业的C++基础架构库有关.E-Form++的出现一定程度上填补了这个空白.是开发工控.监控.建模与 ...
- C#微信公众平台开发—高级群发接口
涉及access_token的获取请参考<C#微信公众平台开发—access_token的获取存储与更新> 一.为了实现高级群发功能,需要解决的问题 1.通过微信接口上传图文消息素材时,J ...
- PHP微信公众平台开发1 配置接口
1.简介 微信公众平台是腾讯公司在微信的基础上新增的功能模块,通过这一平台,个人和企业都可以打造一个微信的公众号,并实现和特定群体的文字.图片.语音的全方位沟通.互动. 2.通讯机制 3.注册微信公众 ...
- 如何使用Postman快速简单的调用快递物流平台快递鸟API接口
前沿 快递鸟是一家聚合类的第三方快递物流平台,目前该平台提供的产品主要以API为主.由于API不能直观的看到产品效果,需要进行API对接联调成功后才能真实的看到产品的实际效果.但是如果一上来就写代码进 ...
- php 微信公众平台上传多媒体接口 41005错误
文链接: http://www.maoyupeng.com/wechart-upload-image-errorcode-41005.html PHP的cURL支持通过给CURL_POSTFIELDS ...
随机推荐
- C#常见基础算法
namespace 面试常见算法 { class Program { static void Main(string[] args) { ); Console.WriteLine(n1); Test2 ...
- P1525 关押罪犯【二分+二分图】
输入输出样例 输入 #1 复制 4 6 1 4 2534 2 3 3512 1 2 28351 1 3 6618 2 4 1805 3 4 12884 思路 对于要求最大值最小的问题,不难想到二分. ...
- docker配置搭建gogs
参考文献: https://www.yeboyzq.com/linux/ruanjiananzhuangweihu/1012.html https://www.jianshu.com/p/d92fd4 ...
- 【计算语言学实验】基于 Skip-Gram with Negative Sampling (SGNS) 的汉语词向量学习和评估
一.概述 训练语料来源:维基媒体 https://dumps.wikimedia.org/backup-index.html 汉语数据 用word2vec训练词向量,并用所学得的词向量,计算 pku_ ...
- linux下安装setuptools
wget https://pypi.python.org/packages/07/a0/11d3d76df54b9701c0f7bf23ea9b00c61c5e14eb7962bb29aed866a5 ...
- 轻量级RPC设计与实现第四版
在本版本中引入了SPI机制,关于Java的SPI机制与Dubbo的SPI机制在以前的文章中介绍过. 传送门:Dubbo的SPI机制与JDK机制的不同及原理分析 因为设计的RPC框架是基于Spring的 ...
- javaweb利用javabean将数据库中内容遍历在页面输出
效果如下图 它所实现的就是把数据库中一个表中所有的数据一条一条以表格的形式输出在网页上, 实现方法如下 首先我们要从数据库读取数据,这里要借助javabean来方便我们传递数据 以上面的为例,我要输出 ...
- [[FJOI2016]神秘数][主席树]
明白之后 5min 就写好了-自闭- 这题的题意是问你 \([L,R]\) 区间的数字不能构成的数字的最小值- 首先考虑 如果 \([1,x]\) 可以被表示 那么加入一个 \(a_i\) 显然 \( ...
- Java第四节课总结
动手动脑1:如果类提供了一个自定义的构造方法,将导致系统不再提供默认构造方法.Foo obj1=new Foo()在此处调用应增加参数. 动手动脑2:静态初始化块只执行一次.创建子类型的对象时,也会导 ...
- 汇编语言中LABEL伪指令的功能?
LABEL 一般用作定义变量和标号的属性,它是与紧接着的下一条变量和标号定义语句相关的,其类型可以为BYTE.WORD.DWORD.QWORD.NEAR.FAR等等.用法为:buffer(变量) LA ...