fisco bcos用caliper0.2.0进行压力测试的安装配置
一、前期环境
1. 硬件
需要外网权限
2. 操作系统
版本要求:Ubuntu >= 16.04, CentOS >= 7, MacOS >= 10.14
3. 基础软件
python 2.7,make,g++,gcc,git
sudo apt install python2.7 make g++ gcc git curl
git config --global url.git://github.com/.insteadOf https://github.com/
4. NodeJS
版本要求:
NodeJS 8 (LTS), 9, 或 10 (LTS),Caliper尚未在更高的NodeJS版本中进行过验证。
安装指南:
建议使用nvm(Node Version Manager)安装,nvm的安装方式如下:
# 安装nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash# 若出现因网络问题导致长时间下载失败,可尝试以下命令
curl -o- https://gitee.com/mirrors/nvm/raw/v0.33.2/install.sh | bash# 加载nvm配置
source ~/.$(basename $SHELL)rc
# 安装Node.js 8
nvm install 8
# 使用Node.js 8
nvm use 8
5. Docker
# 更新包索引
sudo apt-get update
# 安装基础依赖库
sudo apt-get install \apt-transport-https \ca-certificates \curl \gnupg-agent \software-properties-common
# 添加Docker官方GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# 添加docker仓库
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
# 更新包索引
sudo apt-get update
# 安装Docker
sudo apt-get install docker-ce docker-ce-cli containerd.io
#查看Docker版本
docker --version
#添加docker用户组
sudo groupadd docker
#将当前用户添加至docker用户组
sudo gpasswd -a $USER docker
#更新docker用户组
newgrp docker
# 重启Docker服务
sudo service docker restart
# 验证Docker是否已经启动
sudo systemctl status docker
6. Docker Compose
版本要求:>= 1.22.0
安装指南:
#有时候连接错误,多试几次就好了
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
#查看docker-compose版本
docker-compose -v
二、Caliper部署
1. 部署
#建立一个工作目录
mkdir benchmarks && cd benchmarks
#对NPM项目进行初始化
npm init -y
#安装caliper-cli
npm install --only=prod @hyperledger/caliper-cli@0.2.0
#验证caliper-cli安装成功
npx caliper --version
需要改三个配置文件
/home/echo/benchmarks/node_modules/@hyperledger/caliper-fisco-bcos/lib/fiscoBcos.js
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/'use strict';const {BlockchainInterface,CaliperUtils
} = require('@hyperledger/caliper-core');
const installSmartContractImpl = require('./installSmartContract');
const invokeSmartContractImpl = require('./invokeSmartContract');
const generateRawTransactionImpl = require('./generateRawTransactions');
const sendRawTransactionImpl = require('./sendRawTransactions');
const Color = require('./common').Color;
const commLogger = CaliperUtils.getLogger('fiscoBcos.js');/*** Implements {BlockchainInterface} for a FISCO BCOS backend.*/
class FiscoBcos extends BlockchainInterface {/*** Create a new instance of the {FISCO BCOS} class.* @param {string} config_path The absolute path of the FISCO BCOS network configuration file.* @param {string} workspace_root The absolute path to the root location for the application configuration files.*/constructor(config_path, workspace_root) {super(config_path);this.bcType = 'fisco-bcos';this.workspaceRoot = workspace_root;this.fiscoBcosSettings = CaliperUtils.parseYaml(this.configPath)['fisco-bcos'];if (this.fiscoBcosSettings.network && this.fiscoBcosSettings.network.authentication) {for (let k in this.fiscoBcosSettings.network.authentication) {this.fiscoBcosSettings.network.authentication[k] = CaliperUtils.resolvePath(this.fiscoBcosSettings.network.authentication[k], workspace_root);}}}/*** Initialize the {FISCO BCOS} object.* @async* @return {Promise<object>} The promise for the result of the execution.*/async init() {return Promise.resolve();}/*** Deploy the smart contract specified in the network configuration file to all nodes.* @async*/async installSmartContract() {const fiscoBcosSettings = this.fiscoBcosSettings;try {await installSmartContractImpl.run(fiscoBcosSettings, this.workspaceRoot);} catch (error) {commLogger.error(Color.error(`FISCO BCOS smart contract install failed: ${(error.stack ? error.stack : error)}`));throw error;}}/*** Get a context for subsequent operations* 'engine' attribute of returned context object must be reserved for benchmark engine to extend the context* engine = {* submitCallback: callback which must be called once new transaction(s) is submitted, it receives a number argument which tells how many transactions are submitted* }* @param {String} name name of the context* @param {Object} args adapter specific arguments* @param {Integer} clientIdx the client index* @return {Promise<object>} The promise for the result of the execution.*/async getContext(name, args, clientIdx) {return Promise.resolve();}/*** Release a context as well as related resources* @param {Object} context adapter specific object* @return {Promise<object>} The promise for the result of the execution.*/async releaseContext(context) {return Promise.resolve();}/*** Invoke the given smart contract according to the specified options. Multiple transactions will be generated according to the length of args.* @param {object} context The FISCO BCOS context returned by {getContext}.* @param {string} contractID The name of the smart contract.* @param {string} contractVer The version of the smart contract.* @param {Array} args Array of JSON formatted arguments for transaction(s). Each element contains arguments (including the function name) passing to the smart contract. JSON attribute named transaction_type is used by default to specify the function name. If the attribute does not exist, the first attribute will be used as the function name.* @param {number} timeout The timeout to set for the execution in seconds.* @return {Promise<object>} The promise for the result of the execution.*/async invokeSmartContract(context, contractID, contractVer, args, timeout) {let promises = [];try {args.forEach((arg) => {let fcn = null;let fcArgs = [];for (let key in arg) {if (key === 'transaction_type') {fcn = arg[key].toString();} else {fcArgs.push(arg[key].toString());}}promises.push(invokeSmartContractImpl.run(context, this.fiscoBcosSettings, contractID, fcn, fcArgs, this.workspaceRoot));});return await Promise.all(promises);} catch (error) {commLogger.error(Color.error(`FISCO BCOS smart contract invoke failed: ${(error.stack ? error.stack : JSON.stringify(error))}`));throw error;}}/*** Query state from the ledger* @param {Object} context The FISCO BCOS context returned by {getContext}* @param {String} contractID Identity of the contract* @param {String} contractVer Version of the contract* @param {String} key lookup key* @param {String} fcn The smart contract query function name* @return {Promise<object>} The result of the query.*/async queryState(context, contractID, contractVer, key, fcn) {try {return invokeSmartContractImpl.run(context, this.fiscoBcosSettings, contractID, fcn, key, this.workspaceRoot, true);} catch (error) {commLogger.error(Color.error(`FISCO BCOS smart contract query failed: ${(error.stack ? error.stack : error)}`));throw error;}}/*** Generate an raw transaction and store in local file* @param {Object} context The FISCO BCOS context returned by {getContext}* @param {String} contractID Identity of the contract* @param {Object} arg Arguments of the transaction* @param {String} file File path which will be used to store then transaction* @return {TaskStatus} Indicates whether the transaction is written to the file successfully or not*/async generateRawTransaction(context, contractID, arg, file) {return generateRawTransactionImpl.run(this.fiscoBcosSettings, this.workspaceRoot, context, contractID, arg, file);}/*** Send raw transactions* @param {Object} context The FISCO BCOS context returned by {getContext}* @param {Array} transactions List of raw transactions* @return {Promise} The promise for the result of the execution*/async sendRawTransaction(context, transactions) {return sendRawTransactionImpl.run(this.fiscoBcosSettings, context, transactions);}
}module.exports = FiscoBcos;
/home/echo/benchmarks/node_modules/@hyperledger/caliper-fisco-bcos/lib/channelPromise.js
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/'use strict';const tls = require('tls');
const fs = require('fs');
const net = require('net');
const uuidv4 = require('uuid/v4');
const events = require('events');/*** NetworkError exception class thrown in socket connection*/
class NetworkError extends Error {/**** @param {String} msg exception message*/constructor(msg) {super(msg);this.name = 'NetworkError';}
}let emitters = new Map();
let buffers = new Map();
let sockets = new Map();
let lastBytesRead = new Map();/*** Parse response returned by node* @param {Buffer} response Node's response*/
function parseResponse(response) {let seq = response.slice(6, 38).toString();let result = JSON.parse(response.slice(42).toString());let emitter = emitters.get(seq);if(!emitter) {//Stale message receievedreturn;}emitter = emitter.emitter;if (emitter) {let readOnly = Object.getOwnPropertyDescriptor(emitter, 'readOnly').value;if (readOnly) {if (result.error || result.result !== undefined ) {emitter.emit('gotresult', result);}} else {if (result.error || result.status || (result.result && result.result.status)) {emitter.emit('gotresult', result);} else {if (!result.result) {throw new NetworkError(`unknown message receieved, seq=${seq}, data=${response.toString()}`);}}}} else {throw new NetworkError(`unknown owner message receieved, seq=${seq}, data=${response.toString()}`);}
}/*** Create a new TLS socket* @param {String} ip IP of channel server* @param {Number} port Port of channel server* @param {Object} authentication A JSON object contains certificate file path, private key file path and CA file path* @return {TLSSocket} A new TLS socket*/
function createNewSocket(ip, port, authentication) {let secureContextOptions = {key: fs.readFileSync(authentication.key),cert: fs.readFileSync(authentication.cert),ca: fs.readFileSync(authentication.ca),ecdhCurve: 'secp256k1',};let secureContext = tls.createSecureContext(secureContextOptions);let socket = new net.Socket();socket.connect(port, ip);let clientOptions = {rejectUnauthorized: false,secureContext: secureContext,socket: socket};let tlsSocket = tls.connect(clientOptions);tlsSocket.on('error', function (error) {throw new Error(error);});let socketID = `${ip}:${port}`;lastBytesRead.set(socketID, 0);tlsSocket.on('data', function (data) {let response = null;if (data instanceof Buffer) {response = data;}else {response = Buffer.from(data, 'ascii');}if (!buffers.has(socketID)) {// First time to read data from this socketlet expectedLength = null;if (tlsSocket.bytesRead - lastBytesRead.get(socketID) >= 4) {expectedLength = response.readUIntBE(0, 4);}if (!expectedLength || tlsSocket.bytesRead < lastBytesRead.get(socketID) + expectedLength) {buffers.set(socketID, {expectedLength: expectedLength,buffer: response});} else {lastBytesRead.set(socketID, lastBytesRead.get(socketID) + expectedLength);parseResponse(response);buffers.delete(socketID);}} else {// Multiple readinglet cache = buffers.get(socketID);cache.buffer = Buffer.concat([cache.buffer, response]);if (!cache.expectedLength && tlsSocket.bytesRead - lastBytesRead.get(socketID) >= 4) {cache.expectedLength = cache.buffer.readUIntBE(0, 4);}if (cache.expectedLength && tlsSocket.bytesRead - lastBytesRead.get(socketID) >= cache.expectedLength) {lastBytesRead.set(socketID, lastBytesRead.get(socketID) + cache.expectedLength);parseResponse(buffers.get(socketID).buffer);buffers.delete(socketID);}}});return tlsSocket;
}/*** Prepare the data which will be sent to channel server* @param {String} data JSON string of load* @return {Object} UUID and packaged data*/
function packageData(data) {const headerLength = 4 + 2 + 32 + 4;let length = Buffer.alloc(4);length.writeUInt32BE(headerLength + data.length);let type = Buffer.alloc(2);type.writeUInt16BE(0x12);let uuid = uuidv4();uuid = uuid.replace(/-/g, '');let seq = Buffer.from(uuid, 'ascii');let result = Buffer.alloc(4);result.writeInt32BE(0);let msg = Buffer.from(data, 'ascii');return {'uuid': uuid,'packagedData': Buffer.concat([length, type, seq, result, msg])};
}/*** Clear context when a message got response or timeout* @param {String} uuid The ID of an `channelPromise`request*/
function clearContext(uuid) {clearTimeout(emitters.get(uuid).timer);emitters.delete(uuid);buffers.delete(uuid);
}/*** Return channel promise for a request* @param {Object} node A JSON object which contains IP and port configuration of channel server* @param {Object} authentication A JSON object contains certificate file path, private key file path and CA file path* @param {String} data JSON string of load* @param {Number} timeout Timeout to wait response* @param {Boolean} readOnly Is this request read-only?* @return {Promise} a promise which will be resolved when the request is satisfied*/
function channelPromise(node, authentication, data, timeout, readOnly = false) {let ip = node.ip;let port = node.channelPort;let connectionID = `${ip}${port}`;if (!sockets.has(connectionID)) {let newSocket = createNewSocket(ip, port, authentication);newSocket.unref();sockets.set(connectionID, newSocket);}let tlsSocket = sockets.get(connectionID);let dataPackage = packageData(JSON.stringify(data));let uuid = dataPackage.uuid;tlsSocket.socketID = uuid;let packagedData = dataPackage.packagedData;let channelPromise = new Promise(async (resolve, reject) => {let eventEmitter = new events.EventEmitter();Object.defineProperty(eventEmitter, 'readOnly', {value: readOnly,writable: false,configurable: false,enumerable: false});eventEmitter.on('gotresult', (result) => {clearContext(uuid);if (result.error) {reject(result);} else {resolve(result);}return; // This `return` is not necessary, but it may can avoid future trap});eventEmitter.on('timeout', () => {clearContext(uuid);reject({ 'error': 'timeout' });return; // This `return` is not necessary, but it may can avoid future trap});emitters.set(uuid, {emitter: eventEmitter,timer: setTimeout(() => {eventEmitter.emit('timeout');}, timeout)});tlsSocket.write(packagedData);});return channelPromise;
}module.exports = channelPromise;
/home/echo/benchmarks/node_modules/@hyperledger/caliper-fisco-bcos/lib/web3lib/web3sync.js
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/'use strict';const uuidv4 = require('uuid/v4');
const utils = require('./utils');
const Transaction = require('./transactionObject').Transaction;/*** Generate a random number via UUID* @return {Number} random number*/
function genRandomID() {let uuid = uuidv4();uuid = '0x' + uuid.replace(/-/g, '');return uuid;
}/*** Sign a transaction with private key and callback* @param {String} txData transaction data* @param {Buffer} privKey private key* @param {callback} callback callback function* @return {String} signed transaction data*/
function signTransaction(txData, privKey, callback) {let tx = new Transaction(txData);let privateKey = Buffer.from(privKey, 'hex');tx.sign(privateKey);// Build a serialized hex version of the txlet serializedTx = '0x' + tx.serialize().toString('hex');if (callback !== null) {callback(serializedTx);} else {return serializedTx;}
}/*** get transaction data* @param {String} func function name* @param {Array} params params* @return {String} transaction data*/
function getTxData(func, params) {let r = /^\w+\((.*)\)$/g.exec(func);let types = [];if (r[1]) {types = r[1].split(',');}return utils.encodeTxData(func, types, params);
}/*** get signed transaction data* @param {Number} groupId ID of the group where this transaction will be sent to* @param {Buffer} account user account* @param {Buffer} privateKey private key* @param {Buffer} to target address* @param {String} func function name* @param {Array} params params* @param {Number} blockLimit block limit* @return {String} signed transaction data*/
function getSignTx(groupId, account, privateKey, to, func, params, blockLimit) {let txData = getTxData(func, params);let postdata = {data: txData,from: account,to: to,gas: 1000000,randomid: genRandomID(),blockLimit: blockLimit,chainId: 1,groupId: groupId,extraData: '0x0'};return signTransaction(postdata, privateKey, null);
}/*** get signed deploy tx* @param {Number} groupId ID of the group where this transaction will be sent to* @param {Buffer} account user account* @param {Buffer} privateKey private key* @param {Buffer} bin contract bin* @param {Number} blockLimit block limit* @return {String} signed deploy transaction data*/
function getSignDeployTx(groupId, account, privateKey, bin, blockLimit) {let txData = bin.indexOf('0x') === 0 ? bin : ('0x' + bin);let postdata = {data: txData,from: account,to: null,gas: 1000000,randomid: genRandomID(),blockLimit: blockLimit,chainId: 1,groupId: groupId,extraData: '0x0'};return signTransaction(postdata, privateKey, null);
}module.exports.getSignDeployTx = getSignDeployTx;
module.exports.signTransaction = signTransaction;
module.exports.getSignTx = getSignTx;
module.exports.getTxData = getTxData;
进入/home/echo/benchmarks/node_modules/@hyperledger/caliper-fisco-bcos目录,编辑该目录下的package.json文件,在"dependencies"中添加一项"secp256k1": "^3.8.0"
,随后在该目录下执行npm i secp256k1@3.0.0
2. 绑定
npx caliper bind --caliper-bind-sut fisco-bcos --caliper-bind-sdk latest
3. 运行基准测试
#拉取代码
git clone https://gitee.com/vita-dounai/caliper-benchmarks.git
#测试helloworld合约
npx caliper benchmark run --caliper-workspace caliper-benchmarks --caliper-benchconfig benchmarks/samples/fisco-bcos/helloworld/config.yaml --caliper-networkconfig networks/fisco-bcos/4nodes1group/fisco-bcos.json
#执行Solidity版转账合约测试
npx caliper benchmark run --caliper-workspace caliper-benchmarks --caliper-benchconfig benchmarks/samples/fisco-bcos/transfer/solidity/config.yaml --caliper-networkconfig networks/fisco-bcos/4nodes1group/fisco-bcos.json
#执行预编译版转账合约测试
npx caliper benchmark run --caliper-workspace caliper-benchmarks --caliper-benchconfig benchmarks/samples/fisco-bcos/transfer/precompiled/config.yaml --caliper-networkconfig networks/fisco-bcos/4nodes1group/fisco-bcos.json
相关文章:
fisco bcos用caliper0.2.0进行压力测试的安装配置
一、前期环境 1. 硬件 需要外网权限 2. 操作系统 版本要求:Ubuntu > 16.04, CentOS > 7, MacOS > 10.14 3. 基础软件 python 2.7,make,g,gcc,git sudo apt install python2.7 make g gcc git curl git confi…...
正在进行 | 用友企业数智化财务峰会落地广州 高能不断
3月28日,以「智能会计 价值财务」为主题的“2023企业数智化财务创新峰会”登陆广州。 此次用友企业数智化财务创新峰会,邀请了知名院校的专家学者、央国企等大型企业财务数智化领路人以及羊城权威媒体,近千人相约广州越秀国际会议中心,深度聚焦大型企业财务数智化创新应用…...
uniapp - APP云打包、蒲公英平台发布APP的步骤
一、uniapp 云打包 1、注册 dcloud 开发者 首先需要注册一个 dcloud 开发者的账号 dcloud开发者中心:登录 (dcloud.net.cn) 根据流程注册即可。 2、云打包(已安卓为例) 项目创建完成后,查看 dcloud 开发者中心,看是否…...
reposync命令详解--reposync同步aliyunyum库到本地
参考: reposync - 命令 - -桃枝夭夭- - 博客园 0. 简介 reposync 命令简单来说就是可以把指定外网源(repo id)的包同步到本地文件中 1. 安装 reposync 命令 [rootV10SP1-1 ~]# yum install -y dnf-plugins-core2. 常用选项以及参数 选项含义-c [fil…...
OCR之论文笔记TrOCR
文章目录TrOCR: Transformer-based Optical Character Recognition with Pre-trained Models一. 简介二. TrOCR2.1. Encoder2.2 Decoder2.3 Model Initialiaztion2.4 Task Pipeline2.5 Pre-training2.6 Fine-tuning2.7 Data Augmentation三. 实验3.1 Data3.2 Settings3.2 Resul…...
雷电4模拟器安装xposed框架(2022年)
别问我都2202年了为什么还在用雷电4安卓7。我特么哪知道Xposed的相关资料这么难找啊,只能搜到一些老旧的资料,尝试在老旧的平台上实现了。 最初的Xposed框架现在已经停止更新了,只支持到安卓8。如果要在更高版本的安卓系统上使用Xposed得看看…...
微信小程序支付完整流程(前端)
微信小程序中,常见付款给商家的场景,下面列出企业小程序中,从0起步完整微信支付流程。 一,注册微信支付商户号(由上级或法人注册) 接入微信支付 - 微信商户平台 此商户号,需要由主管及更上级领导…...
设置鼠标右键打开方式,添加IDEA的打开方式
一、问题描述 已下载IDEA,但是右键打开之前保存的项目文件,无法显示以IDEA方式打开。 二、解决步骤 1. 打开注册表 winR键输入regedit 2、查找路径为计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell (我找了半天没看到Class…...
LAMP架构之zabbix监控(2):zabbix基础操作
目录 一、zabbix监控节点添加和删除 (1)手动添加 (2)自动添加 (3)按照条件批量添加 (4)使用api工具进行管理 二、针对应用的zabbix监控 一、zabbix监控节点添加和删除 实验说明&a…...
ShareSDK常见问题
QQ-分享报错901111,9001010等 由于QQ现在需要审核后才可以分享(之前分享不需要审核),所以此错误解决方法只需通过腾讯开放平台的审核即可,另外要检查注册好的应用的基本信息,包名、md5签名和Bundle id是不…...
[Spring]一文明白IOC容器和思想
✅作者简介:大家好,我是Philosophy7?让我们一起共同进步吧!🏆 📃个人主页:Philosophy7的csdn博客 🔥系列专栏: 数据结构与算法 👑哲学语录: 承认自己的无知,乃…...
程序人生 | 与足球共舞的火柴人(致敬格拉利什,赋予足球更深的意义)
个人简介 👀个人主页: 前端杂货铺 🙋♂️学习方向: 主攻前端方向,也会涉及到服务端 📃个人状态: 在校大学生一枚,已拿多个前端 offer(秋招) 🚀未…...
MATLAB | R2023a更新了哪些好玩的东西
R2023a来啦!!废话不多说看看新版本有啥有趣的玩意和好玩的特性叭!!把绘图放最前面叭,有图的内容看的人多。。 1 区域填充 可以使用xregion及yregion进行区域填充啦!! x -10:0.25:10; y x.^…...
Python Module — OpenAI ChatGPT API
目录 文章目录目录OpenAI Python SDKopenai.ChatCompletion 模块openai.ChatCompletion.create 函数OpenAI Python SDK 官方文档:https://platform.openai.com/docs/api-reference/introduction OpenAI Python SDK 用于开发与 OpenAI RESTful API 进行交互的客户端…...
Docker学习记录
阅读前请看一下:我是一个热衷于记录的人,每次写博客会反复研读,尽量不断提升博客质量。文章设置为仅粉丝可见,是因为写博客确实花了不少精力。希望互相进步谢谢!! 文章目录阅读前请看一下:我是一…...
Linux-VIM使用
文章目录前言VIM使用1、切换模式2、跳转(1) 跳转到指定行(2) 跳转到首行(3) 跳转到末行3、自动格式化程序4. 大括号对应5. 删除(1)删除一个单词(2)删除光标位置至行尾(3)删除光标位置至行首(4&a…...
Windows安全中心内存完整性无法打开问题的处理方法
Windows11安全中心内存完整性无法打开 今天电脑使用过程中突然看到系统桌面右下角任务栏中 windows安全中心图标出现了警告信息,如下图红框所示: 点击该图标进入windows安全中心的 安全性概览 界面,如下图: 在该界面可以看到出现安…...
在芯片设计行业,从项目的初期到交付,不同的岗位的工程师主要负责什么?
大家都知道在芯片设计行业,项目是至关重要的一环。从项目的初期到交付,不同的岗位的工程师在项目的各环节主要负责什么?他们是怎样配合的?下面看看资深工程师怎么说。 一个项目,从初期到交付的过程是比较漫长的。我们知道最早的时候&#…...
Spring Cloud Alibaba全家桶(七)——Sentinel控制台规则配置
前言 本文小新为大家带来 Sentinel控制台规则配置 相关知识,具体内容包括流控规则(包括:QPS流控规则,并发线程数流控规则),BlockException统一异常处理,流控模式(包括:直…...
mysql-installer安装教程(详细图文)
目录 1.安装 2.配置系统环境变量 3.配置初始化my.ini文件 4.MySQL彻底删除 5.Navicat 安装 1.安装 先去官网下载需要的msi,在这放出官网下载地址下载地址 这里我具体以8.0.28 为安装例子,除了最新版安装界面有些变动以往的都是差不多的。 过去的版本…...
微服务架构第一阶段(nacos,gateWay,RPC)
最近在学习完 springcloud 微服务架构之后,自己用了之前的一个项目计划拆分成微服务的项目,第一阶段要求整合 nacos,RPC以及gateWay,首先来看一下几个技术组件的概念 RPC RPC 框架 —— 远程过程调用协议RPC(Remote …...
【Azure 架构师学习笔记】-Azure Data Factory (5)-Managed VNet
本文属于【Azure 架构师学习笔记】系列。 本文属于【Azure Data Factory】系列。 接上文【Azure 架构师学习笔记】-Azure Data Factory (4)-触发器详解-事件触发器 前言 PaaS服务默认都经过公网传输, 这对很多企业而言并不安全,那么就需要对其进行安全改…...
ActiveMQ(三)
协议配置 ActiveMQ 支持的协议有 TCP 、 UDP、NIO、SSL、HTTP(S) 、VM 这是activemq 的activemq.xml 中配置文件设置协议的地方 <transportConnector name"openwire" uri"tcp://0.0.0.0:61616?maximumCon nections1000&wireFormat.maxFrameSiz…...
区块链多方计算 人工智能学习笔记
区块链:让数据不被篡改,但需要复制数据给每一块,造成数据泄露 多方计算 : 让数据用途可控。数控可用但不可见。 人工智能:数据更难造假 主讲人简介: 徐葳,宾夕法尼亚大学学士(在清华…...
基于opencv的边缘检测方法
1、梯度运算 用OpenCV的形态变换( 膨胀、腐蚀、开运算和闭运算)函数morphologyEx 梯度运算即膨胀结果-腐蚀结果: 【注意】对于二值图像来说,必须是前景图像为白色,背景为黑色,否则需要进行反二值化处理 …...
视频封装格式篇(TS)
本篇介绍下TS的封装格式。 1.什么是TS? TS(Transport Stream,传输流),一种常见的视频封装格式,是基于MPEG-2的封装格式(所以也叫MPEG-TS),后缀为.ts。 2.TS的分层结构 …...
静态路由+DHCP实验(四路由器八PC)
一.200.1.1.0/24子网划分 1.划分八个子网 2.选用前5个,第五个子网再划分4个子网作为骨干 二.规划路由 三.配置(下一跳) 1.先依次实现四个路由器之间全网可通 2.为路由器配置地址池,使用全局模式获取dhcp,指定网关…...
数据挖掘(作业汇总)
目录 环境配置 实验1 数据 作业2 环境配置 实验开始前先配置环境 以实验室2023安装的版本为例: 1、安装anaconda:(anaconda自带Python,安装了anaconda就不用再安装Python了) 下载并安装 Anaconda3-2022.10-Windows-x86_64.ex…...
基于微信小程序的图书馆选座系统源码
开发环境及工具: 大等于jdk1.8,大于mysql5.5,idea(eclipse),微信开发者工具 技术说明: springboot mybatis 小程序 代码注释齐全,没有多余代码,适合学习(…...
K8S 三种探针 readinessProbe、livenessProbe和startupProbe
一、POD状态 Pod 常见的状态 Pending:挂起,我们在请求创建pod时,条件不满足,调度没有完成,没有任何一个节点能满足调度条件。已经创建了但是没有适合它运行的节点叫做挂起,这其中也包含集群为容器创建网络…...
买机票便宜的网站建设/合肥百度推广优化排名
1,重载是用来描述同名函数具有相同或者相似功能,但是参数个数或者类型顺序不一样的函数管理操作 返回值不能作为重载的条件 2,重写是子类对父类同名函数的重新定义 二者区别: 1,作用域不同:重载是在同一…...
做厂房出租有那些推广网站/松原头条新闻今日新闻最新
使用diff命令查看不同版本文件的差异。查看文件的差异:[rootzabbix-server ~]# diff test1.sh test2.sh 2c2,4< echo "hell world"---> echo "hello the world"> echo "test file"> 查看文件的差异,包含信息头…...
莱芜网站优化/谷歌搜索指数查询
参考STM32F407例程,外部SRAM章节。 关于时序的配置,主要是设置这7个参数,如果是SRAM,则只需关注前3个参数,和最后一个参数。 根据F427 datasheet也可以看出,前3个参数均设为0x01。 代码不一定对࿰…...
张家口做网站便宜点的/新产品宣传推广策划方案
5月23日更新:昨天(5月22日),Google 发布了 Chrome 的 v2.0.172.28 版本,这个版本不再需要本文所提供的参数,直接运行就可以在x64的Windows 7下正常运行和使用。 Google Chrome 是一款对CSS支持得非常好的浏…...
网站建站作业/网盘搜索
转载:https://blog.csdn.net/yiyihuazi/article/details/82937399 膜拜大佬,感谢大佬!!!...
宣传推广的十种方式/网站seo方案模板
在使用cJSON解析存储在QString中的带有中文的JSON时,可以使用下面方法: QString转换为cJSON可用的char*类型cJSON *jsonRoot cJSON_Parse(json.toLocal8Bit().data()); cJSON的输出也需要对应的转换cJSON *tempJson cJSON_GetObjectItem(jsonRoot, &qu…...