.netcore TSC打印机打印

此文章给出两种打印案例,

第一种是单列打印,第二种是双列打印

需要注意打印机名称的设置,程序中使用的打印机名称为999,电脑中安装打印机时名称也要为999。

以下是我在使用过程中总结的一些问题:

一 TSC打印机使用使用过程中遇到的问题

1、打印机刚连上就报警。

一般是纸张或色带安装有问题,纸张要放到档杆的下方。

2、打印机显示正常,DiagTool工具无法连接到打印机,无论点什么都提示“Port Open Error”。

如果使用USB模式,需要用线把打印机和电脑连接起来,同时打印机需插上网线。工具中,通讯接口选择USB,点击“读取状态”,正常显示待机中,点击“读取”,会重置工具中的各参数。

点击“网络设定”,指定IP地址,这里设置为192.168.50.222

如果用服务器连接打印机,这个时候已经添加了打印机,登录服务器,找到打印机,打开打印机属性-端口,打印机名称或ip地址设置为与打印机ip一致即可。

3、打印机打印完成后报警。

检查纸张,纸张安装过紧或档条没压住纸,都会导致此问题。

接下来上代码

二 打印方式

2.1 单列打印

这种打印方式示例中,打印的位置是可以配置的

using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Imagine.Mes.MesTrackV3.Application.CommonTool;
using Imagine.Mes.MesTrackV3.Application.Dtos;
using Volo.Abp.DependencyInjection;
using Newtonsoft.Json;
using System.IO;
using Newtonsoft.Json.Linq;namespace Imagine.Mes.MesTrackV3.Application.Services
{/// <summary>/// 打印服务/// </summary>public interface IPrintService{/// <summary>/// 打印流程卡/// </summary>/// <param name="printType">打印枚举 0-二维码;1-条形码</param>/// <param name="body">流程卡集合</param>/// <returns></returns>Task PrintLotAsync(PrintEnum printType, List<PrintLotInDto> body);}public class PrintService : IPrintService,IScopedDependency{private readonly ILogger<PrintService> _logger;public PrintService(ILogger<PrintService> logger){_logger = logger;}#region 打印流程卡/// <summary>/// 打印流程卡/// </summary>/// <param name="printType">打印枚举 0-二维码;1-条形码</param>/// <param name="body">流程卡集合</param>/// <returns></returns>/// <exception cref="Exception"></exception>public async Task PrintLotAsync(PrintEnum printType, List<PrintLotInDto> body){try{List<PrintLotInDto> printOutboundOrderList = new List<PrintLotInDto>();var jsonObject=await GetJsonFileAsync("CommonTool\\PrintLot.json");for (int i = 0; i < body.Count; i++){await PrintLotAsync(printType,jsonObject, new PrintLotInDto{LotNo = body[i].LotNo,ProductCode = body[i].ProductCode,ProductName = body[i].ProductName,Quantity = body[i].Quantity,WorkOrderNo = body[i].WorkOrderNo,UnitName= body[i].UnitName});}}catch (Exception ex){_logger.LogError($"打印流程卡错误:{ex}");throw new Exception($"打印流程卡错误:{ex.Message}");}}/// <summary>/// 打印流程卡/// </summary>/// <param name="printType">打印类型:0-二维码;1-条形码</param>/// <param name="jsonObject"></param>/// <param name="param"></param>/// <returns></returns>private async Task PrintLotAsync(PrintEnum printType, JObject jsonObject, PrintLotInDto param){#region 模板string port = "999";string currentEncoding = "utf-16";string chineseFont = "宋体";byte[] lotNo = Encoding.GetEncoding(currentEncoding).GetBytes($"批 次 号:{param.LotNo}");byte[] productCode = Encoding.GetEncoding(currentEncoding).GetBytes($"产品编码:{param.ProductCode}");byte[] productName = Encoding.GetEncoding(currentEncoding).GetBytes($"产品名称:{param.ProductName}");byte[] quantity = Encoding.GetEncoding(currentEncoding).GetBytes($"数    量:{param.Quantity} {param.UnitName}");byte[] workOrderNo = Encoding.GetEncoding(currentEncoding).GetBytes($"工 单 号:{param.WorkOrderNo}");byte[] date = Encoding.GetEncoding(currentEncoding).GetBytes($"打印日期:{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");byte status = TSCLIB_DLL.usbportqueryprinter();//0 = idle, 1 = head open, 16 = pause, following <ESC>!? command of TSPL manual//打印机共享名999int openport = TSCLIB_DLL.openport(@$"{port}");//M 纸张宽度  ,N 纸张高度TSCLIB_DLL.sendcommand("SIZE 100 mm, 80 mm");TSCLIB_DLL.sendcommand("SPEED 4");TSCLIB_DLL.sendcommand("DENSITY 12");TSCLIB_DLL.sendcommand("DIRECTION 1");TSCLIB_DLL.sendcommand("SET TEAR ON");TSCLIB_DLL.sendcommand("CODEPAGE UTF-8");TSCLIB_DLL.clearbuffer();if (printType == PrintEnum.QRCode)//打印二维码{//文字(x边距,y边距,字体高度,旋转,字体样式,下划线,字体,文字内容)TSCLIB_DLL.windowsfontUnicode(Convert.ToInt32(jsonObject["lotNo"]["x"]), Convert.ToInt32(jsonObject["lotNo"]["y"]), Convert.ToInt32(jsonObject["lotNo"]["size"]), 0, 0, 0, chineseFont, lotNo);TSCLIB_DLL.windowsfontUnicode(Convert.ToInt32(jsonObject["productCode"]["x"]), Convert.ToInt32(jsonObject["productCode"]["y"]), Convert.ToInt32(jsonObject["productCode"]["size"]), 0, 0, 0, chineseFont, productCode);TSCLIB_DLL.windowsfontUnicode(Convert.ToInt32(jsonObject["productName"]["x"]), Convert.ToInt32(jsonObject["productName"]["y"]), Convert.ToInt32(jsonObject["productName"]["size"]), 0, 0, 0, chineseFont, productName);TSCLIB_DLL.windowsfontUnicode(Convert.ToInt32(jsonObject["quantity"]["x"]), Convert.ToInt32(jsonObject["quantity"]["y"]), Convert.ToInt32(jsonObject["quantity"]["size"]), 0, 0, 0, chineseFont, quantity);TSCLIB_DLL.windowsfontUnicode(Convert.ToInt32(jsonObject["workOrderNo"]["x"]), Convert.ToInt32(jsonObject["workOrderNo"]["y"]), Convert.ToInt32(jsonObject["workOrderNo"]["size"]), 0, 0, 0, chineseFont, workOrderNo);TSCLIB_DLL.windowsfontUnicode(Convert.ToInt32(jsonObject["date"]["x"]), Convert.ToInt32(jsonObject["date"]["y"]), Convert.ToInt32(jsonObject["date"]["size"]), 0, 0, 0, chineseFont, date);//二维码//QRCODE x,y,ECC Level,cell width(二维码大小),mode,rotation(旋转),[model,mask,]"content"TSCLIB_DLL.sendcommand($"QRCODE {Convert.ToInt32(jsonObject["qRCode"]["x"])},{Convert.ToInt32(jsonObject["qRCode"]["y"])},H,{Convert.ToInt32(jsonObject["qRCode"]["size"])},A,0,M2,\"{param.LotNo}\"");}else// 打印条码.{// 在 (450, 200) 的坐标上// 以 Code128 的条码方式// 条码高度 300// 打印条码的同时,还打印条码的文本信息.// 旋转的角度为 0 度// 条码 宽 窄 比例因子为 7:7// 条码内容为:barCode//BARCODE X,Y,”code type”,height,human readable,rotation,narrow,wide,[alignment,]”content“TSCLIB_DLL.barcode("30", "30", "128", "180", "1", "0", "6", "6", $"{param.LotNo}");}//TSCLIB_DLL.sendcommand(String.Format("QRCODE 740,320,H,8,A,0,M2,\"{0}\"", trayCode));//DMATRIX码  。DMATRIX 命令,740,320,90,90  指定 X 坐标,指定 Y 坐标,条码区域宽度//TSCLIB_DLL.sendcommand($"DMATRIX 740,320,90,90,x18,30,30,\"{trayCode}\"");int printlabel = TSCLIB_DLL.printlabel("1", "1");TSCLIB_DLL.closeport();#endregionawait Task.CompletedTask;}#endregion 打印流程卡#region 获取json文件内容private async Task<JObject> GetJsonFileAsync(string path){try{// 获取文件的绝对路径string filePath = Path.Combine(AppContext.BaseDirectory, path);string jsonContent = string.Empty;//json内容var exists = System.IO.File.Exists(filePath);if (!exists) throw new Exception($"配置文件[{path.Split("\\")[path.Split("\\").Length - 1]}]不存在");// 读取文件的内容using (StreamReader file = File.OpenText(filePath)){jsonContent = await file.ReadToEndAsync();}// 解析JSON到JObjectJObject jsonObj = JObject.Parse(jsonContent);// 反序列化//var plcModel = JsonConvert.DeserializeObject<List<PLCModel>>(jsonContent);return jsonObj;}catch (Exception ex){_logger.LogError(ex.ToString(), ex);throw new Exception(ex.Message);}}#endregion}
}
/// <summary>
/// 打印流程卡
/// </summary>
public class PrintLotInDto
{/// <summary>/// 批次号/// </summary>public string LotNo {  get; set; }/// <summary>/// 产品名称/// </summary>public string ProductName {  get; set; }/// <summary>/// 产品编码/// </summary>public string ProductCode { get; set; }/// <summary>/// 数量/// </summary>public int Quantity {  get; set; }/// <summary>/// 工单号/// </summary>public string WorkOrderNo {  get; set; }/ <summary>/ 打印日期/ </summary>//public DateTime Date { get; set; }/// <summary>/// 单位名称/// </summary>public string UnitName {  get; set; }
}/// <summary>
/// 打印枚举
/// </summary>
public enum PrintEnum
{QRCode = 0,//二维码BarCode = 1//条形码
}

PrintLot.json文件内容

{//批次号"lotNo": {"x": 430, //x坐标"y": 320, //y坐标"size": 50 //字体大小},//产品编码"productCode": {"x": 230,"y": 400,"size": 50},//产品名称"productName": {"x": 230,"y": 480,"size": 50},//数量"quantity": {"x": 230,"y": 560,"size": 50},//工单号"workOrderNo": {"x": 230,"y": 640,"size": 50},//打印日期"date": {"x": 230,"y": 720,"size": 50},//二维码"qRCode": {"x": 450,"y": 30,"size": 10 //二维码大小}
}

2.2 双列打印

using Imagine.Mes.MesBase.Application.CommonTool;
using Imagine.Mes.MesBase.Application.Dtos;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;namespace Imagine.Mes.MesBase.Application.Services
{public interface IPrintService{/// <summary>/// 打印库位信息/// </summary>/// <param name="printType"></param>/// <param name="body"></param>/// <returns></returns>Task PrintWarehouselocationsAsync(PrintTypeEnum printType, List<WarehouseLocationNoParam> body);}public class PrintService : IPrintService, ITransientDependency{private readonly ILogger<PrintService> _logger;public PrintService(ILogger<PrintService> logger){_logger = logger;}public async Task PrintWarehouselocationsAsync(PrintTypeEnum printType, List<WarehouseLocationNoParam> body){try{List<PrintWarehouseLocationParam> printQualityInspectionList = new List<PrintWarehouseLocationParam>();for (int i = 0; i < body.Count; i += 2){PrintWarehouseLocationParam printQualityInspection = new PrintWarehouseLocationParam();printQualityInspection.QRCodeContent = body[i].QRCodeContent;printQualityInspection.WarehouseLocationName = body[i].WarehouseLocationName;printQualityInspection.WarehouseLocationNo = body[i].WarehouseLocationNo;printQualityInspection.QRCodeContent2 = i + 1 < body.Count ? body[i + 1].QRCodeContent : null;printQualityInspection.WarehouseLocationName2 = i + 1 < body.Count ? body[i + 1].WarehouseLocationName : null;printQualityInspection.WarehouseLocationNo2 = i + 1 < body.Count ? body[i + 1].WarehouseLocationNo : null;printQualityInspectionList.Add(printQualityInspection);await PrintWarehouselocationAsync(printType, new PrintWarehouseLocationParam{QRCodeContent = printQualityInspection.QRCodeContent,WarehouseLocationName = printQualityInspection.WarehouseLocationName,WarehouseLocationNo = printQualityInspection.WarehouseLocationNo,QRCodeContent2 = printQualityInspection.QRCodeContent2,WarehouseLocationName2 = printQualityInspection.WarehouseLocationName2,WarehouseLocationNo2 = printQualityInspection.WarehouseLocationNo2});}}catch (Exception ex){_logger.LogError($"打印质检单/入库单错误:{ex}");}}/// <summary>/// 打印出库单/入库单/// </summary>/// <param name="printType">打印类型:0-二维码;1-条形码</param>/// <param name="param"></param>/// <returns></returns>private async Task PrintWarehouselocationAsync(PrintTypeEnum printType, PrintWarehouseLocationParam param){#region 模板string port = "999";string currentEncoding = "utf-16";string chineseFont = "宋体";byte[] warehouseLocationNo = null;byte[] warehouseLocationName = null;byte[] warehouseLocationNo2 = null;byte[] warehouseLocationName2 = null;warehouseLocationNo = Encoding.GetEncoding(currentEncoding).GetBytes($"{param.WarehouseLocationNo}");warehouseLocationName = Encoding.GetEncoding(currentEncoding).GetBytes($"{param.WarehouseLocationName}");warehouseLocationNo2 = Encoding.GetEncoding(currentEncoding).GetBytes($"{param.WarehouseLocationNo2}");warehouseLocationName2 = Encoding.GetEncoding(currentEncoding).GetBytes($"{param.WarehouseLocationName2}");byte status = TSCLIB_DLL.usbportqueryprinter();//0 = idle, 1 = head open, 16 = pause, following <ESC>!? command of TSPL manual//打印机共享名999int openport = TSCLIB_DLL.openport(@$"{port}");//M 纸张宽度  ,N 纸张高度TSCLIB_DLL.sendcommand("SIZE 100 mm, 30 mm");TSCLIB_DLL.sendcommand("SPEED 2");TSCLIB_DLL.sendcommand("DENSITY 15");TSCLIB_DLL.sendcommand("DIRECTION 1");TSCLIB_DLL.sendcommand("SET TEAR ON");TSCLIB_DLL.sendcommand("CODEPAGE UTF-8");TSCLIB_DLL.clearbuffer();if (printType == PrintTypeEnum.QRCode)//打印二维码{TSCLIB_DLL.windowsfontUnicode(150, 20, 26, 0, 0, 0, chineseFont, warehouseLocationName);TSCLIB_DLL.sendcommand($"QRCODE 180,55,H,5,A,0,M2,\"{param.QRCodeContent}\"");TSCLIB_DLL.windowsfontUnicode(150, 180, 26, 0, 0, 0, chineseFont, warehouseLocationNo);if (!string.IsNullOrWhiteSpace(param.QRCodeContent2)){TSCLIB_DLL.windowsfontUnicode(550, 20, 26, 0, 0, 0, chineseFont, warehouseLocationName2);TSCLIB_DLL.sendcommand($"QRCODE 580,55,H,5,A,0,M2,\"{param.QRCodeContent2}\"");TSCLIB_DLL.windowsfontUnicode(550, 180, 26, 0, 0, 0, chineseFont, warehouseLocationNo2);}}else// 打印条码.{// 在 (450, 200) 的坐标上// 以 Code128 的条码方式// 条码高度 300// 打印条码的同时,还打印条码的文本信息.// 旋转的角度为 0 度// 条码 宽 窄 比例因子为 7:7// 条码内容为:barCode//BARCODE X,Y,”code type”,height,human readable,rotation,narrow,wide,[alignment,]”content“TSCLIB_DLL.barcode("300", "340", "128", "180", "1", "0", "6", "6", $"{param.QRCodeContent2}");}//TSCLIB_DLL.sendcommand(String.Format("QRCODE 740,320,H,8,A,0,M2,\"{0}\"", trayCode));//DMATRIX码  。DMATRIX 命令,740,320,90,90  指定 X 坐标,指定 Y 坐标,条码区域宽度//TSCLIB_DLL.sendcommand($"DMATRIX 740,320,90,90,x18,30,30,\"{trayCode}\"");int printlabel = TSCLIB_DLL.printlabel("1", "1");TSCLIB_DLL.closeport();#endregionawait Task.CompletedTask;}}/// <summary>/// 打印枚举/// </summary>public enum PrintTypeEnum{QRCode = 0,//二维码BarCode = 1//条形码}
}

/// <summary>
/// 库位码打印参数
/// </summary>
public class WarehouseLocationNoParam
{/// <summary>/// 二维码内容/// </summary>public string QRCodeContent { get; set; }/// <summary>/// 库位名称/// </summary>public string WarehouseLocationName { get; set; }/// <summary>/// 库位编码/// </summary>public string WarehouseLocationNo { get; set; }
}
/// <summary>
/// 库位码打印参数
/// </summary>
public class PrintWarehouseLocationParam
{/// <summary>/// 二维码内容/// </summary>public string QRCodeContent { get; set; }/// <summary>/// 库位名称/// </summary>public string WarehouseLocationName { get; set; }/// <summary>/// 库位编码/// </summary>public string WarehouseLocationNo { get; set; }/// <summary>/// 二维码内容2/// </summary>public string QRCodeContent2 { get; set; }/// <summary>/// 库位名称2/// </summary>public string WarehouseLocationName2 { get; set; }/// <summary>/// 库位编码2/// </summary>public string WarehouseLocationNo2 { get; set; }
}

2.3 用到的公共类

using System.Runtime.InteropServices;namespace Imagine.Mes.MesBase.Application.CommonTool
{public class TSCLIB_DLL{[DllImport("TSCLIB.dll", EntryPoint = "about")]public static extern int about();[DllImport("TSCLIB.dll", EntryPoint = "openport")]public static extern int openport(string printername);[DllImport("TSCLIB.dll", EntryPoint = "barcode")]public static extern int barcode(string x, string y, string type,string height, string readable, string rotation,string narrow, string wide, string code);[DllImport("TSCLIB.dll", EntryPoint = "clearbuffer")]public static extern int clearbuffer();[DllImport("TSCLIB.dll", EntryPoint = "closeport")]public static extern int closeport();[DllImport("TSCLIB.dll", EntryPoint = "downloadpcx")]public static extern int downloadpcx(string filename, string image_name);[DllImport("TSCLIB.dll", EntryPoint = "formfeed")]public static extern int formfeed();[DllImport("TSCLIB.dll", EntryPoint = "nobackfeed")]public static extern int nobackfeed();[DllImport("TSCLIB.dll", EntryPoint = "printerfont")]public static extern int printerfont(string x, string y, string fonttype,string rotation, string xmul, string ymul,string text);[DllImport("TSCLIB.dll", EntryPoint = "printlabel")]public static extern int printlabel(string set, string copy);[DllImport("TSCLIB.dll", EntryPoint = "sendcommand")]public static extern int sendcommand(string printercommand);[DllImport("TSCLIB.dll", EntryPoint = "setup")]public static extern int setup(string width, string height,string speed, string density,string sensor, string vertical,string offset);[DllImport("TSCLIB.dll", EntryPoint = "windowsfont")]public static extern int windowsfont(int x, int y, int fontheight,int rotation, int fontstyle, int fontunderline,string szFaceName, string content);[DllImport("TSCLIB.dll", EntryPoint = "windowsfontUnicode")]public static extern int windowsfontUnicode(int x, int y, int fontheight,int rotation, int fontstyle, int fontunderline,string szFaceName, byte[] content);[DllImport("TSCLIB.dll", EntryPoint = "sendBinaryData")]public static extern int sendBinaryData(byte[] content, int length);[DllImport("TSCLIB.dll", EntryPoint = "usbportqueryprinter")]public static extern byte usbportqueryprinter();}
}

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

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

【区块链+绿色低碳】巴中市生态价值核算创新应用 | FISCO BCOS应用案例

生态产品总值&#xff08;GEP&#xff09;&#xff0c;指一定区域生态系统为人类福祉和经济社会可持续发展提供的产品与服务价值总和&#xff0c;包 括供给产品价值、调节服务价值和文化服务价值。当前&#xff0c;推动生态产品价值有效转化存在“难度量、难抵押、难交易、 难变…

【机器学习算法基础】(基础机器学习课程)-08-决策树和随机森林-笔记

一、决策树之信息论基础 决策树是一种用来做决策的工具&#xff0c;就像我们生活中的选择树。例如&#xff0c;你在选择今天穿什么衣服时&#xff0c;会根据天气情况、出行活动等进行判断。决策树的构建过程涉及一些信息论的概念&#xff0c;用来衡量和选择最好的“分叉点”来进…

Adobe Dimension(DN)安装包软件下载

目录 一、软件简介 二、软件下载 三、注意事项 四、软件功能 五、常用快捷键 快捷键&#xff1a; 一、软件简介 Adobe Dimension&#xff08;简称DN&#xff09;是Adobe公司推出的一款三维设计和渲染软件。与一般的3D绘图软件相比&#xff0c;DN在操作界面和功能上有所不…

Spark实时(一):StructuredStreaming 介绍

文章目录 StructuredStreaming 介绍 一、SparkStreaming实时数据处理痛点 1、复杂的编程模式 2、SparkStreaming处理实时数据只支持Processing Time 3、微批处理&#xff0c;延迟高 4、精准消费一次问题 二、StructuredStreaming概述 三、​​​​​​​​​​​​​​…

python使用 tkinter 生成随机颜色

先看效果: 只要不停点击底部的按钮&#xff0c;每次都会生成新的颜色。炫酷啊。 import random import tkinter import tkinter.messagebox from tkinter import Button# todo """ 1. 设置一个按钮&#xff0c;来让用户选择是否显示颜色值 2. 把按钮换成 Label…

《白话机器学习的数学》第2章——学习回归

2.1设置问题 1.机器学习所做的事情正是从数据中进行学习&#xff0c;然后给出预测值。 2.2定义模型 1.一次函数的表达式&#xff1a; 其中θ叫做参数。 在统计学领域&#xff0c;人们常常使用 θ 来表示未知数和推测值。采用 θ加数字下标的形式&#xff0c;是为了防止当未知数…

网络访问(Socket/WebSocket/HTTP)

概述 HarmonyOS为用户提供了网络连接功能&#xff0c;具体由网络管理模块负责。通过该模块&#xff0c;用户可以进行Socket网络通滚、WebSocket连接、HTTP数据请求等网络通信服务。 Socket网络通信&#xff1a;通过Socket(嵌套字)进行数据通信&#xff0c;支持的协议包括UDP核…

【教程】vscode添加powershell7终端

win10自带的 powershell 是1.0版本的&#xff0c;太老了&#xff0c;更换为powershell7后&#xff0c;在 vscode 的集成终端中没有显示本篇教程记录在vscode添加powershell7终端的过程 打开vscode终端配置 然后来到这个页面进行设置 查看 powershell7 的安装位置&#xff…

JDK HttpClient - Java 11 可用的 JDK 内置的 HTTP 客户端

在 Java 应用的开发中&#xff0c;发送 HTTP 请求是一个常见的需求。应用在开发时&#xff0c;通常会使用流行的开源第三方库作为 HTTP 客户端&#xff0c;如 Apache HttpClient 或 OkHttp 等。这里介绍的是 JDK 自带的 HttpClient 实现&#xff0c;Java 11 可用。说到这里&…

物联网主机 E6000:智慧应急领域的创新力量

在当今瞬息万变的世界中&#xff0c;突发事件和紧急情况时有发生。如何迅速、准确地应对这些挑战&#xff0c;保障人民生命财产安全&#xff0c;成为了社会发展的重要课题。而物联网主机 E6000 的出现&#xff0c;为智慧应急领域带来了全新的解决方案。 一、强大的性能与功能 物…

Java学习 - Spring Boot整合 Thymeleaf 实例

什么是 Thymeleaf Thymeleaf 是新一代的 Java 模板引擎&#xff0c;类似于 Velocity、FreeMarker 等传统引擎&#xff0c;其语言和 HTML 很接近&#xff0c;而且扩展性更高&#xff1b; Thymeleaf 的主要目的是将优雅的模板引入开发工作流程中&#xff0c;并将 HTML 在浏览器中…

ROS话题发布与订阅

续上一篇文章。 我们现在在VScode里面加入订阅方的实现。 demo02_sub.cpp #include "ros/ros.h" #include "std_msgs/String.h"/*订阅方实现&#xff1a;1、包含头文件ROS中文本类型 ---> std_msgs/String.h2、初始化ROS节点3、创建节点句柄4、创建订…

中国篆刻艺术孙溟㠭作品《活着》

活着只是一吸一呼之间&#xff0c;在意觉醒之间&#xff0c;在血液流动之间&#xff0c;抛却灵与肉生死&#xff0c;一切都是惘然。妻吴晓蕾题款&#xff0c;甲辰夏月溟㠭于寒舍小窗下刊石。

力扣高频SQL 50题(基础版)第七题

文章目录 力扣高频SQL 50题&#xff08;基础版&#xff09;第七题1068. 产品销售分析 I题目说明思路分析实现过程准备数据&#xff1a;实现方式&#xff1a;结果截图:总结&#xff1a; 力扣高频SQL 50题&#xff08;基础版&#xff09;第七题 1068. 产品销售分析 I 题目说明 …

PCIe 以太网芯片 RTL8125B 的 spec 和 Linux driver 分析备忘

1,下载 RTL8125B driver 下载页&#xff1a; https://www.realtek.com/Download/List?cate_id584 2,RTL8125B datasheet下载 下载页&#xff1a; https://file.elecfans.com/web2/M00/44/D8/poYBAGKHVriAHnfWADAT6T6hjVk715.pdf3, 编译driver 解压&#xff1a; $ tar xj…

【案例】使用React+redux实现一个Todomvc

About 大家好&#xff0c;我是且陶陶&#xff0c;今天跟大家分享一个redux的todoList案例&#xff0c;通过这个案例能够快速掌握redux的基本知识点&#x1f339; ❤️…❤️…❤️…❤️…❤️…❤️…❤️…❤️…❤️…❤️…❤️…❤️…❤️…❤️…❤️…❤️…❤️…❤️…

Helm部署k8s应用

文章目录 一、概述1、什么是Helm2、特点3、工作流程4、核心概念 二、安装Helm1、二进制版本安装1.1、下载需要的版本1.2、解压1.3、将helm移动到指定路径1.4、验证 三、Helm安装资源顺序四、--set 的格式和限制1、最简单的name/value对2、多个name/value对3、更复杂的表达式4、…

Java语言程序设计基础篇_编程练习题*15.3 (移动小球)

*15.3 (移动小球) 编写一个程序&#xff0c;在面板上移动小球。应该定义一个面板类来显示小球&#xff0c;并提供向左、 向右 、向上和向下移动小球的方法&#xff0c;如图15-24c所示。请进行边界检査以防止球完全移到视线之外 代码展示&#xff1a;编程练习题15_3MoveBall.ja…

鸿蒙OpenHarmony Native API【drawing_pen.h】 头文件

drawing_pen.h Overview Related Modules: [Drawing] Description: 文件中定义了与画笔相关的功能函数 Since: 8 Version: 1.0 Summary Enumerations Enumeration NameDescription[OH_Drawing_PenLineCapStyle] { [LINE_FLAT_CAP], [LINE_SQUARE_CAP], [LINE_ROUND_…

Redis核心技术与实战学习笔记

Redis核心技术与实战学习笔记 最近想沉下心来看下redis&#xff0c;买了蒋德钧老师的《Redis 核心技术与实战》,这里记录一些学习笔记 希望能够坚持下去有想一起学习的童鞋&#xff0c;可以点击跳转到文章尾部获取学习资源,仅供学习不要用于任何商业用途!!! redis知识全景图 …