WUP-MY-LABEL-PRINTER 旻佑热敏打印机标签打印uniapp插件使用说明

插件地址:WUP-MY-LABEL-PRINTER 旻佑热敏打印机标签打印安卓库

简介

  1. 本插件主要用于旻佑热敏打印机打印标签,不支持票据打印。
  2. 适用于旻佑的各型支持标签打印的热敏打印机。
  3. 本插件开发时使用的打印机型号为MY-805嵌入式面板打印机,其他型号请先试用测试。
  4. 使用本插件需要在Android 5.0以上设备使用。
  5. 插件支持uniapp的vue2 和 vue3 版本;uniapp x没做支持,可自行测试。
  6. 初始化流程:获取设备-打开设备-设置多字节模式及编码。
  7. 打印流程:标签页开始-绘制内容-打印,打印每一页标签都是这个流程。
    在这里插入图片描述
    在这里插入图片描述

方法

方法引入

import { sayHi, 需引入的其他方法 } from "@/uni_modules/WUP-MY-LABEL-PRINTER";

插件测试方法

sayHi("wup-my-label-printer", function (res) {console.log("sayHi", res)
})

枚举本地USB打印设备

enumUsb((res) => {console.log("enumUsb", res)
})

打开USB设备

  • usbDeviceStr:枚举的USB列表的中USB设备名
  • autoReplyMode:自动回传模式 0,不开启;1,开启
openUsb(usbDeviceStr, autoReplyMode, (res) => {console.log("openUsb", res)
})

启用标签模式

labelEnableLabelMode((res) => {console.log("labelEnableLabelMode", res)
})

关闭标签模式

labelDisableLabelMode((res) => {console.log("labelEnableLabelMode", res)
})

全切纸

打印时全切纸推荐使用labelPagePrintAndFullCutPaper,不推荐打印后再单独调用,可能出现切纸位置不准确问题。

fullCutPaper((res) => {console.log("fullCutPaper", res)
})

半切纸

打印时半切纸推荐使用labelPagePrintAndHalfCutPaper,不推荐打印后再单独调用,可能出现切纸位置不准确问题。

halfCutPaper((res) => {console.log("halfCutPaper", res)
})

设置打印机为多字节模式及编码

  • encoding:编码 0,GBK;1,UTF8;3,BIG5;4,ShiftJIS;5,EUCKR
setMultiByteEncoding(encoding, (res) => {that.msg = JSON.stringify(res)console.log("setMultiByteEncoding", res)
})

校准标签纸(更换不同规格标签纸,需要校准)

labelCalibrateLabel((res) => {console.log("labelCalibrateLabel", res)
})

走纸到标签缝隙处

labelFeedLabel((res) => {console.log("labelFeedLabel", res)
})

打印机退纸到打印位置(适用于标签打印开头定位)

labelBackPaperToPrintPosition((res) => {console.log("labelBackPaperToPrintPosition", res)
})

打印机进纸到撕纸位置(适用于标签打印结束定位)

labelFeedPaperToTearPosition((res) => {console.log("labelFeedPaperToTearPosition", res)
})

指示一个标签页面的开始,并设置标签页的大小,参考点坐标和页面旋转角度

  • x:页面起始点X轴坐标
  • y:页面起始点Y轴坐标
  • width:页面宽度
  • height:页面高度
  • rotation:页面旋转 0,页面不旋转;1,页面旋转90° 标签打印不支持旋转属性,默认0就好。
labelPageBegin(x, y, width, height, rotation, (res) => {console.log("labelPageBegin", res)
})

将标签页上的内容打印到标签纸上

  • copies:打印分数[1 - 255]
labelPagePrint(copies, (res) => {console.log("labelPagePrint", res)
})

将标签页上的内容打印到标签纸上,并半切纸

  • copies:打印分数[1 - 255]
labelPagePrintAndHalfCutPaper(copies, (res) => {console.log("labelPagePrintAndHalfCutPaper", res)
})

将标签页上的内容打印到标签纸上,并全切纸

  • copies:打印分数[1 - 255]
labelPagePrintAndFullCutPaper(copies, (res) => {console.log("labelPagePrintAndFullCutPaper", res)
})

获取文本字符风格值(异步)

  • bold:是否加粗 false,否;true,是
  • underline:是否下划线 false,否;true,是
  • highlight:是否反白(黑底白字) false,否;true,是
  • strikethrough:是否删除线 false,否;true,是(MY805测试无效
  • rotation:旋转 0,不旋转;1,90°;2,180°;3,270°
  • widthscale:字体宽度放大倍数
  • heightscale:字体高度放大倍数
getLabelTextStyle(bold, underline, highlight, strikethrough, rotation, widthscale, heightscale, (res) => {console.log("getLabelTextStyle", res)
})

获取文本字符风格值(同步)

  • bold:是否加粗 false,否;true,是
  • underline:是否下划线 false,否;true,是
  • highlight:是否反白(黑底白字) false,否;true,是
  • strikethrough:是否删除线 false,否;true,是(MY805测试无效
  • rotation:旋转 0,不旋转;1,90°;2,180°;3,270°
  • widthscale:字体宽度放大倍数
  • heightscale:字体高度放大倍数
const res = getLabelTextStyleSync(bold, underline, highlight, strikethrough, rotation, widthscale, heightscale)
console.log("getLabelTextStyleSync", res)

在标签页面上指定位置绘制文本(只能单行打印)。

labelDrawText(x, y, font, style, str, (res) => {that.msg = JSON.stringify(res)console.log("labelDrawText", res)
})

在标签页指定位置绘制一维条码

  • x:页面起始点X轴坐标
  • y:页面起始点Y轴坐标
  • nBarcodeType:标识条码类型 0,UPCA;1,UPCE;2,EAN13;3,EAN8;4,CODE39;5,ITF;6,CODEBAR;7,CODE93;8,CODE128;9,CODE11;10,MSI;11,128M;12,EAN128;13,25C;14,39C;15,39;16,EAN13PLUS2;17,EAN13PLUS5;18,EAN8+2;19,EAN8PLUS5;20,POST;21,UPCAPLUS2;22,UPCAPLUS5;23,UPCEPLUS2;24,UPCEPLUS5;25,CPOST;26,MSIC;27,PLESSEY;28,ITF14;29,EAN14;
  • nBarcodeTextPrintPosition:条码可读字符位置 0,不显示可读字符;1,下方显示;2,上方显示;3,上方和下方显示
  • height:条码高度
  • unitwidth:码块单元宽度
  • rotation:旋转 0,不旋转;1,90°;2,180°;3,270°
  • str:要打印的条码
labelDrawBarcode(x, y, nBarcodeType, nBarcodeTextPrintPosition, height, unitwidth,  rotation, str, (res) => {console.log("labelDrawBarcode", res)
})

在标签页指定位置绘制二维码

  • x:页面起始点X轴坐标
  • y:页面起始点Y轴坐标
  • nVersion:字符版本(不知道用处,默认0就好)
  • nECCLevel:ECC纠错等级 1,L:7%,低纠错,数据多;2,M:15%,中纠错;3,Q:优化纠错;4,H:30%,最高纠错,数据少
  • unitwidth:码块单元宽度(MY-805实测最大可为8,超过8会出现打印无反应,可以根据实际调整)
  • rotation:旋转 0,不旋转;1,90°;2,180°;3,270°
  • str:要打印的二维码
labelDrawQRCode(x, y, nVersion, nECCLevel, unitwidth,  rotation, str, (res) => {console.log("labelDrawQRCode", res)
})

在标签页指定位置绘制 PDF417 条码

  • x:页面起始点X轴坐标
  • y:页面起始点Y轴坐标
  • column:列数,表述每行容纳多少码字。一个码字为 17*UnitWidth 个点。行数由打印机自动产生,行数范围限定为 3~90。ColNum 的取值范围:[1,30]。
  • nAspectRatio:条码模块的高宽比
  • nECCLevel:ECC纠错等级,取值范围[0, 8]
    纠错等级取值纠错码数可存资料量(字节)
    021108
    141106
    281101
    3161092
    4321072
    5641024
    6128957
    7256804
    8512496
  • unitwidth:码块单元宽度,取值范围[1, 3]
  • rotation:旋转 0,不旋转;1,90°;2,180°;3,270°
  • str:要打印的PDF417条码
labelDrawPDF417Code(x, y, column, nAspectRatio, nECCLevel, unitwidth,  rotation, str, (res) => {console.log("labelDrawPDF417Code", res)
})

在标签页指定位置绘制位图

  • x:页面起始点X轴坐标
  • y:页面起始点Y轴坐标
  • dstw:要打印的宽度
  • dsth:要打印的高度
  • pszFile:图片路径,插件assets目录下路径,不需含assets
  • binaryzation_method:图片二值化算法 0,表示抖动算法;1,表示阀值算法;2,表示误差扩散法。具体效果请测试查看。
  • compression_method:最终打印数据的压缩方式 0,不压缩;1,一级压缩;2,二级压缩
labelDrawImageFromFile(x, y, dstw, dsth, pszFile, binaryzation_method, compression_method, (res) => {console.log("labelDrawImageFromFile", res)
})

在标签页指定位置绘制线段

  • startx:直线段起始点 x 坐标值,取值范围:[0, Page_Width-1]。
  • starty:直线段起始点 y 坐标值,取值范围:[0,Page_Height-1]。
  • endx:直线段终止点 x 坐标值,取值范围:[0, Page_Width-1]。
  • endy:直线段终止点 y 坐标值,取值范围:[0,Page_Height-1]。
  • linewidth:直线段线宽,取值范围:[1,Page_Height-1]。
  • linecolor:直线段颜色线条颜色,0,白色;1,是黑色
labelDrawLine(startx, starty, endx, endy, linewidth, linecolor, (res) => {console.log("labelDrawLine", res)
})

在标签页指定位置绘制矩形

  • x:页面起始点X轴坐标
  • y:页面起始点Y轴坐标
  • width:矩形宽度
  • height:矩形高度
  • color:矩形颜色 0,白色;1,是黑色
labelDrawRect(x, y, width, height, color, (res) => {console.log("labelDrawRect", res)
})

在标签页指定位置绘制矩形框

  • x:页面起始点X轴坐标
  • y:页面起始点Y轴坐标
  • width:矩形宽度
  • height:矩形高度
  • borderwidth:矩形框边框宽度
  • bordercolor:矩形框边框颜色 0,白色;1,是黑色
labelDrawBox(x, y, width, height, borderwidth, bordercolor, (res) => {console.log("labelDrawBox", res)
})

获取开发包版本字符串

getLibraryVersion((res) => {console.log("getLibraryVersion", res)
})

示例代码

<template><view><view style="margin-top: 50px;padding: 0 15px;"><button @click="enumUsb" type="primary" style="margin-bottom: 15px;">usb设备列表</button><button @click="openUsb" type="primary" style="margin-bottom: 15px;">打开usb设备</button><button @click="halfCutPaper" type="primary" style="margin-bottom: 15px;">半切纸</button><button @click="fullCutPaper" type="primary" style="margin-bottom: 15px;">全切纸</button><button @click="getLibraryVersion" type="primary" style="margin-bottom: 15px;">获取开发包版本字符串</button><button @click="labelEnableLabelMode" type="primary" style="margin-bottom: 15px;">开启标签打印</button><button @click="labelDisableLabelMode" type="primary" style="margin-bottom: 15px;">关闭标签打印</button><button @click="labelCalibrateLabel" type="primary" style="margin-bottom: 15px;">校准标签纸</button><button @click="labelFeedLabel" type="primary" style="margin-bottom: 15px;">走纸到标签缝隙处</button><button @click="labelBackPaperToPrintPosition" type="primary" style="margin-bottom: 15px;">退纸到打印位置</button><button @click="labelFeedPaperToTearPosition" type="primary" style="margin-bottom: 15px;">进纸到撕纸位置</button><view style="margin: 50px 0 15px 0;font-size: 2rem;font-weight: bold;">打印</view><button @click="labelPageBegin" type="primary" style="margin-bottom: 15px;">标签页开始</button><!-- <button @click="getLabelTextStyle" type="primary" style="margin-bottom: 15px;">获取文本样式</button> --><button @click="labelDrawText" type="primary" style="margin-bottom: 15px;">绘制文本</button><button @click="labelDrawBarcode" type="primary" style="margin-bottom: 15px;">绘制条形码</button><button @click="labelDrawQRCode" type="primary" style="margin-bottom: 15px;">绘制二维码</button><button @click="labelDrawPDF417Code" type="primary" style="margin-bottom: 15px;">绘制PDF417</button><button @click="labelDrawImageFromFile" type="primary" style="margin-bottom: 15px;">绘制本地图片</button><button @click="labelDrawLine" type="primary" style="margin-bottom: 15px;">绘制线段</button><button @click="labelDrawRect" type="primary" style="margin-bottom: 15px;">绘制矩形</button><button @click="labelDrawBox" type="primary" style="margin-bottom: 15px;">绘制矩形框</button><button @click="labelPagePrint" type="primary" style="margin-bottom: 15px;">打印</button><button @click="labelPagePrintAndHalfCutPaper" type="primary" style="margin-bottom: 15px;">半切打印</button><button @click="labelPagePrintAndFullCutPaper" type="primary" style="margin-bottom: 15px;">全切打印</button><button @click="print" type="primary" style="margin-bottom: 15px;">完整打印示例</button></view><view style="padding: 15px 30px;">{{msg}}</view></view>
</template><script>import { fullCutPaper, halfCutPaper, openUsb, sayHi, setMultiByteEncoding, enumUsb, getLibraryVersion, labelEnableLabelMode, labelDisableLabelMode, labelCalibrateLabel, labelFeedLabel, labelBackPaperToPrintPosition, labelFeedPaperToTearPosition, labelPageBegin, labelDrawText, labelPagePrint, getLabelTextStyle, getLabelTextStyleSync, labelDrawBarcode, labelDrawQRCode, labelDrawPDF417Code, labelDrawImageFromFile, labelDrawLine, labelDrawRect, labelDrawBox, labelPagePrintAndFullCutPaper, labelPagePrintAndHalfCutPaper } from "@/uni_modules/WUP-MY-LABEL-PRINTER";export default {data() {return {msg: "",deviceInx: 0,}},onLoad() {let that = thissayHi("wup-my-label-printer", function (res) {console.log("sayHi", res)})},methods: {print () {let that = thislabelPageBegin(0, 0, 530, 390, 0, (res) => {that.msg = JSON.stringify(res)console.log("labelPageBegin", res)})labelDrawText(10, 10, 24, getLabelTextStyleSync(true, false, false, true, 0, 1, 1), "Hello World!", (res) => {that.msg = JSON.stringify(res)console.log("labelDrawText", res)})labelDrawQRCode(10, 40, 0, 1, 4, 0, "https://blog.csdn.net/Douz_lungfish", (res) => {that.msg = JSON.stringify(res)console.log("labelDrawQRCode", res)})labelDrawImageFromFile(200, 30, 125, 125, "logo.png", 0, 0, (res) => {that.msg = JSON.stringify(res)console.log("labelDrawImageFromFile", res)})labelDrawLine(10, 180, 300, 180, 5, 1, (res) => {that.msg = JSON.stringify(res)console.log("labelDrawLine", res)})labelDrawBox(0, 10, 530, 380, 2, 1, (res) => {that.msg = JSON.stringify(res)console.log("labelDrawBox", res)})labelPagePrintAndFullCutPaper(1, (res) => {that.msg = JSON.stringify(res)console.log("labelPagePrintAndFullCutPaper", res)})},getLabelTextStyle () {let that = this// bold, underline, highlight, strikethrough, rotation, widthscale, heightscalegetLabelTextStyle(true, true, false, false, 1, 1, 1, (res) => {that.msg = JSON.stringify(res)console.log("getLabelTextStyle", res)})const res1 = getLabelTextStyleSync(true, true, false, false, 1, 1, 1)console.log("getLabelTextStyleSync", res1)},labelPagePrint () {let that = thislabelPagePrint(1, (res) => {that.msg = JSON.stringify(res)console.log("labelPagePrint", res)})},labelPagePrintAndHalfCutPaper () {let that = thislabelPagePrintAndHalfCutPaper(1, (res) => {that.msg = JSON.stringify(res)console.log("labelPagePrintAndHalfCutPaper", res)})},labelPagePrintAndFullCutPaper () {let that = thislabelPagePrintAndFullCutPaper(1, (res) => {that.msg = JSON.stringify(res)console.log("labelPagePrintAndFullCutPaper", res)})},labelDrawText () {let that = thislabelDrawText(10, 10, 24, getLabelTextStyleSync(true, false, false, true, 0, 1, 1), "Hello World!", (res) => {that.msg = JSON.stringify(res)console.log("labelDrawText", res)})},labelDrawBarcode () {let that = thislabelDrawBarcode(10, 70, 0, 1, 60, 2, 0, "02031344565", (res) => {that.msg = JSON.stringify(res)console.log("labelDrawBarcode", res)})},labelDrawQRCode () {let that = this// x, y, nVersion, nECCLevel, unitwidth,  rotation, strlabelDrawQRCode(10, 10, 0, 1, 8, 0, "https://blog.csdn.net/Douz_lungfish", (res) => {that.msg = JSON.stringify(res)console.log("labelDrawQRCode", res)})},labelDrawPDF417Code () {let that = this// x, y, column, nAspectRatio, nECCLevel, unitwidth,  rotation, strlabelDrawPDF417Code(10, 10, 5, 5, 0, 3, 0, "Hello World!", (res) => {that.msg = JSON.stringify(res)console.log("labelDrawPDF417Code", res)})},labelDrawImageFromFile () {let that = this// x, y, dstw, dsth, pszFile,  binaryzation_method, compression_methodlabelDrawImageFromFile(10, 30, 200, 200, "la/logo.png", 0, 0, (res) => {that.msg = JSON.stringify(res)console.log("labelDrawImageFromFile", res)})},labelDrawLine () {let that = this// startx, starty, endx, endy, linewidth, linecolorlabelDrawLine(10, 10, 100, 20, 30, 1, (res) => {that.msg = JSON.stringify(res)console.log("labelDrawLine", res)})},labelDrawRect () {let that = this// x, y, width, height, colorlabelDrawRect(10, 10, 100, 80, 1, (res) => {that.msg = JSON.stringify(res)console.log("labelDrawRect", res)})},labelDrawBox () {let that = this// x, y, width, height, borderwidth, bordercolorlabelDrawBox(10, 10, 100, 80, 2, 1, (res) => {that.msg = JSON.stringify(res)console.log("labelDrawBox", res)})},labelPageBegin () {let that = thislabelPageBegin(0, 0, 576, 240, 0, (res) => {that.msg = JSON.stringify(res)console.log("labelPageBegin", res)})},labelFeedPaperToTearPosition () {let that = thislabelFeedPaperToTearPosition((res) => {that.msg = JSON.stringify(res)console.log("labelFeedPaperToTearPosition", res)})},labelBackPaperToPrintPosition () {let that = thislabelBackPaperToPrintPosition((res) => {that.msg = JSON.stringify(res)console.log("labelBackPaperToPrintPosition", res)})},labelFeedLabel () {let that = thislabelFeedLabel((res) => {that.msg = JSON.stringify(res)console.log("labelFeedLabel", res)})},labelCalibrateLabel () {let that = thislabelCalibrateLabel((res) => {that.msg = JSON.stringify(res)console.log("labelCalibrateLabel", res)})},labelDisableLabelMode () {let that = thislabelDisableLabelMode((res) => {that.msg = JSON.stringify(res)console.log("labelEnableLabelMode", res)})},labelEnableLabelMode () {let that = thislabelEnableLabelMode((res) => {that.msg = JSON.stringify(res)console.log("labelEnableLabelMode", res)})},getLibraryVersion () {let that = thisgetLibraryVersion((res) => {that.msg = JSON.stringify(res)console.log("getLibraryVersion", res)})},enumUsb () {let that = thisenumUsb((res) => {that.msg = JSON.stringify(res)console.log("enumUsb", res)})},openUsb () {let that = thisopenUsb('KCEC_USB in FS Mode/0E08F5C2050601006415000055080172', 1, (res) => {that.msg = JSON.stringify(res)if (res.code === 0) {setMultiByteEncoding(1, (res) => {that.msg = JSON.stringify(res)console.log("setMultiByteEncoding", res)})}console.log("openUsb", res)})},halfCutPaper () {let that = thishalfCutPaper((res) => {that.msg = JSON.stringify(res)console.log("halfCutPaper", res)})},fullCutPaper () {let that = thisfullCutPaper((res) => {that.msg = JSON.stringify(res)console.log("fullCutPaper", res)})},}}
</script>

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/403734.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

uni-app--》打造个性化壁纸预览应用平台(二)

&#x1f3d9;️作者简介&#xff1a;大家好&#xff0c;我是亦世凡华、渴望知识储备自己的一名前端工程师 &#x1f304;个人主页&#xff1a;亦世凡华、 &#x1f306;系列专栏&#xff1a;uni-app &#x1f307;座右铭&#xff1a;人生亦可燃烧&#xff0c;亦可腐败&#xf…

深度学习的量化和剪枝

一&#xff1a;背景 如果要将深度学习的AI模型部署到受限设备&#xff08;FPGA&#xff09;上&#xff0c;往往需要更小的存储需求和最低的计算复杂度。当然&#xff0c;还得保持一定的性能&#xff08;下降在能够接受的范围&#xff09;。受限设备资源的环境&#xff0c;一般是…

数据结构与算法--插入排序与选择排序

文章目录 回顾提要排序基本概念排序的分类排序算法的稳定性排序算法的性能指标内排序 排序方法直接插入排序直接插入排序的要点直接插入排序的实现直接插入排序性能分析直接插入排序的适用情景 简单选择排序简单选择排序的要点简单选择排序的执行过程简单选择排序的实现简单选择…

分布式锁:Mysql实现,Redis实现,Zookeeper实现

目录 前置知识 Mysql实现分布式锁 1.get_lock函数 Java代码实现&#xff1a; 2.for update尾缀 Java代码实现&#xff1a; 3.自己定义锁表 Java代码实现&#xff1a; 4.时间戳列实现乐观锁 Java代码实现&#xff1a; Redis实现分布式锁 Zookeeper实现分布式锁&#…

完整搭建windows下mysql8.0源码编译调试环境!

背景&#xff1a; 前段时间一直在看mysql相关的博客&#xff0c;所以对源码起了浓厚的兴趣&#xff0c;所以尝试通过vmware和vscode在windosw环境中搭建一套编译调试的环境~ 看了一下网上的搭建教程基本杂乱无章&#xff0c;想要从零跟着搭建出一个完善的调试环境也不是易事&…

Leetcode3232. 判断是否可以赢得数字游戏

Every day a Leetcode 题目来源&#xff1a;3232. 判断是否可以赢得数字游戏 解法1&#xff1a;3232. 判断是否可以赢得数字游戏 用一个 sum1 统计个位数的和&#xff0c;sum2 统计十位数的和。 只要 sum1 和 sum2 不相等&#xff0c;Alice 拿大的就能赢得这场游戏。 代码…

Maven的依赖范围

依赖的jar包&#xff0c;默认情况下&#xff0c;可以在任何地方使用&#xff0c;可以通过scope来设置作用范围 作用范围&#xff1a; 主程序范围有效&#xff08;main文件夹范围内&#xff09;测试程序范围有效&#xff08;test文件夹范围内&#xff09;是否参与打包运行&…

一次日志记录中使用fastjson涉及到ByteBuffer的教训

背景 目前本人在公司负责的模块中&#xff0c;有一个模块是负责数据同步的&#xff0c;主要是将我们数据产线使用的 AWS Dynamodb 同步的我们的测试QA 的环境的 MongoDB 的库中&#xff0c;去年开始也提供了使用 EMR 批量同步的功能&#xff0c;但是有时候业务也需要少量的数据…

【OpenCV_python】凸包检测 轮廓特征 直方图均衡化 模板匹配 霍夫变换

凸包特征检测 凸包就是图像的最小外接多边形&#xff0c;通过图像的轮廓点&#xff0c;找到距离最远的两个点的直线&#xff0c;根据直线找到距离最远的下一个点&#xff0c;直到所有的点被包围在多边形内 读取图像二值化找图像的轮廓获取凸包点的坐标绘制凸包点 convexHull 获…

程序员如何写PLC程序

PLC是可编程逻辑控制器的简称&#xff0c;常用的编程语言是IEC61131-3&#xff08;梯形图、结构化文本、指令表、功能块、顺序功能图&#xff09;和西门子的SCL。程序员常用的编程语言是JS、Java、Python、C/C、Go等。PLC广泛采用编程工具有codesys、博图等。程序员常用的编程工…

敏捷架构在数字时代的应用:从理论到实践的全面指南

在数字化转型和技术变革的浪潮中&#xff0c;企业面临着不断提升敏捷性和应对复杂环境的挑战。敏捷架构在数字时代的应用不仅从理论层面阐述了敏捷架构的基本原理&#xff0c;还为企业提供了详细的实践指南&#xff0c;帮助企业从理论走向实际操作。本文将从理论与实践的双重视…

STM32——CAN通讯基础知识

CAN 协议简介 CAN 是控制器局域网络 (Controller Area Network) 的简称&#xff0c;它是由研发和生产汽车电子产品著称的德国 BOSCH 公司开发的&#xff0c;并最终成为国际标准(ISO11519以及ISO11898),是国际上应用最广泛的现场总线之一。差异点如下&#xff1a; 高速CAN可以达…

YOLOv8_det/seg/pose/obb推理流程

本章将介绍目标检测、实例分割、关键点检测和旋转目标检测的推理原理,基于onnx模型推理,那么首先就需要了解onnx模型的输入和输出,对输入的图片需要进行预处理的操作,对输出的结果需要进行后处理的操作,这部分内容在我的另一个专栏《YOLOv8深度剖析》中也有介绍,如果对YO…

《机器学习》一元、多元线性回归的实现 No.4

一、一元线性回归实现 先直接看完整代码&#xff1a; import pandas as pd import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegressiondate pd.read_csv(data.csv) #导入数据plt.scatter(date[广告投入],date[销售额]) # 用散点图展示数据 plt.sh…

实训第二十八天(haproxy与利用python实现mysql主从的读写分离)

1、练习 [rootnat ~]# ipvsadm -d -t 192.168.10.101:3306 -r 10.0.0.22:3306 #删除真实主机 nat: [rootnat ~]# ifconfig ens33: flags4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.0.0.10 netmask 255.255.255.0 broadcast 10.0.0.25…

【JVM】深入理解类加载机制(二)

深入理解类加载机制 HSDB工具的使用 Hotspot Debugger(HSDB):JDK原生自带 以Windows系统为例&#xff0c;jdk8的环境&#xff0c;在jdk的lib目录下&#xff0c;启动之前&#xff0c;你需要确保你进入的lib目录和你当前的JAVA_HOME配置的JDK是相同的&#xff0c;否则可能会出现…

2.1 文件内容差异对比方法

2.1 文件内容差异对比方法 文件内容差异对比方法2.1.1 两个字符串的差异对比2.1.2 生成美观的HTML格式文档2.1.3 对比nginx 配置文件差异代码封装 文件内容差异对比方法 介绍如何通过difflib模块实现文件内容差异对比。difflib作为Python的标准库模块无需安装&#xff0c;作用…

2024年运营技术与网络安全态势研究报告:遭遇多次网络威胁的比例暴增

随着 OT 组织不断在其业务环境中集成各种数字工具和技术&#xff0c;它们面临的安全挑战也日益变得愈加复杂和多样化。正如 NIST 指出&#xff0c; “虽然安全解决方案旨在解决典型 IT系统中的一些问题&#xff0c;但将这些相同的解决方案引入不同的 OT 环境时&#xff0c;必须…

ruoyi-vue-pro项目新建模块的接口都报404错误

目录 1. 问题所示2. 原理分析3. 解决方法1. 问题所示 新建模块之后,该模块后端的请求都是返回404,如图所示: 2. 原理分析 抛开这个项目,对于路径请求不成功,返回404 主要的步骤如下: 检查路由配置: 确保在路由配置文件中添加了新模块的路由 例如,在Spring Boot中,这…

vue3+ts 前端word文档下载文件时不预览直接下载方法(支持 doc / excel / ppt / pdf 等)

前端word文档下载文件时不预览直接下载方法支持 doc / excel / ppt / pdf 等 根据需要&#xff0c;要实现一个下载文档的需要 最简单的方法就是使用a标签 如果是相同域可以直接下载&#xff0c;但如果是不同域的&#xff0c;就会先打开一个预览页&#xff0c;在预览页再点下载…