VB6轻松读写Mifare ClassIc芯片NDEF标签源码

2024-02-01 12:10

本文主要是介绍VB6轻松读写Mifare ClassIc芯片NDEF标签源码,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

       NDEF 全称 NFC data exchange format 即 nfc 数据交换格式,是一种标准化的数据格式,可用于在任何兼容的NFC设备与另一个NFC设备或标签之间交换信息。数据格式由NDEF消息和NDEF记录组成。

      NDEF信息可以写到不同类型的NFC芯片中,如Ntag系列芯片标、15693系列芯片、MifareClassic系列芯片、Forum_Type4_Tag标签等,不同类型的芯片NDEF信息的存储方式也略有不同,这就大大增加了NDEF信息写入、读取的难度。

        广州荣士电子将各种不同类型的NDEF记录类型的写入、读取方式都函数化,开发人员不需再了解复杂的NDEF记录格式,只需调用相应的函数就可快速写入正确的NDEF信息。

 本示例使用的发卡器:Android Linux RFID读写器NFC发卡器WEB可编程NDEF文本/智能海报/-淘宝网 (taobao.com) 

一、NDEF函数声明 
Public Declare Function piccclear_ndeftag Lib "OUR_MIFARE.dll" (ByVal ctrlword As Byte, ByRef serial As Byte, ByRef oldkey As Byte) As BytePublic Declare Function piccwrite_ndeftag Lib "OUR_MIFARE.dll" (ByVal ctrlword As Byte, ByRef serial As Byte, ByRef oldkey As Byte, ByRef newkey As Byte) As BytePublic Declare Function piccread_ndeftag Lib "OUR_MIFARE.dll" (ByVal ctrlword As Byte, ByRef serial As Byte, ByRef oldkey As Byte) As BytePublic Declare Sub tagbuf_clear Lib "OUR_MIFARE.dll" ()Public Declare Function tagbuf_addtext Lib "OUR_MIFARE.dll" (ByVal languagecodestr As String, ByVal languagecodestrlen As Long, ByVal textstr As String, ByVal textstrlen As Long) As BytePublic Declare Function tagbuf_adduri Lib "OUR_MIFARE.dll" (ByVal languagecodestr As String, ByVal languagecodestrlen As Long, ByVal titlestr As String, ByVal titlestrlen As Long, ByVal uriheaderindex As Long, ByVal uristr As String, ByVal uristrlen As Long) As BytePublic Declare Function tagbuf_addbusinesscard Lib "OUR_MIFARE.dll" (ByVal infostr As String, ByVal infostrlen As Long) As BytePublic Declare Function tagbuf_addwifi Lib "OUR_MIFARE.dll" (ByVal ssidstr As String, ByVal ssidstrlen As Long, ByVal authtype As Long, ByVal crypttype As Long, ByVal keystr As String, ByVal keystrlen As Long) As BytePublic Declare Function tagbuf_addbluetooth Lib "OUR_MIFARE.dll" (ByVal blenamestr As String, ByVal blenamestrlen As Long, ByRef blemac As Byte) As BytePublic Declare Function tagbuf_addapp Lib "OUR_MIFARE.dll" (ByVal packagestr As String, ByVal packagestrlen As Long) As BytePublic Declare Function tagbuf_adddata Lib "OUR_MIFARE.dll" (ByVal typestr As String, ByVal typestrlen As Long, ByVal datastr As String, ByVal datastrlen As Long) As BytePublic Declare Sub tagbuf_read Lib "OUR_MIFARE.dll" (ByVal revstr As String, ByRef revstrlen As Long, ByRef recordnumber As Long)Public Declare Sub tagbuf_forumtype4_clear Lib "OUR_MIFARE.dll" ()Public Declare Function forumtype4request Lib "OUR_MIFARE.dll" (ByVal ctrlword As Byte, ByRef serial As Byte, ByRef seriallen As Byte) As BytePublic Declare Function forumtype4_write_ndeftag Lib "OUR_MIFARE.dll" (ByVal ctrlword As Byte, ByRef serial As Byte, ByRef seriallen As Byte, ByRef ndefwritekey As Byte) As BytePublic Declare Function forumtype4_read_ndeftag Lib "OUR_MIFARE.dll" (ByVal ctrlword As Byte, ByRef serial As Byte, ByRef seriallen As Byte, ByRef ndefreadkey As Byte) As Byte
二、写入NDEF文本类型标签
Dim mypiccserial(0 To 6) As Byte
Dim mypicckey(0 To 15) As Byte
Dim mypiccseriallen(1) As ByteDim oldpicckey(0 To 5) As Byte '需要认证的密码
Dim newpicckey(0 To 5) As Byte '需要认证的密码Dim dispstr As String
Dim status As Byte
Dim myctrlword As Byte
Dim languagecodestr As String
Dim languagecodestrlen As Long
Dim textstr As String
Dim textstrlen As Longlanguagecodestr = "en"
languagecodestrlen = 2textstr = Trim(Text1.Text)  '文本
textstrlen = LenB(StrConv(textstr, vbFromUnicode))CheckCardTypeIf CardType = 3 Then    'MifareClasstagbuf_clear    status = tagbuf_addtext(languagecodestr, languagecodestrlen, textstr, textstrlen)If (status = 0) Thenmyctrlword = &H80 + &H10status = piccwrite_ndeftag(myctrlword, mypiccserial(0), oldpicckey(0), newpicckey(0))dispstr = "MifareClassUid:" + cardstr + ",写入NDEF文本"dispriv dispstr, statusElsedispstr = "MifareClassUid:" + cardstr + ",生成NDEF文本数据"dispriv dispstr, statusEnd If
ElseIf CardType = 4 Then    'forumtype4tagbuf_forumtype4_clear    status = tagbuf_addtext(languagecodestr, languagecodestrlen, textstr, textstrlen)If (status = 0) Thenmyctrlword = 0      '0表示标签无密码,如设置密码取值  &H40 ,mypicckey 存放密码status = forumtype4_write_ndeftag(myctrlword, mypiccserial(0), mypiccseriallen(0), mypicckey(0))dispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",写入NDEF文本"dispriv dispstr, statusElsedispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",生成NDEF文本数据"dispriv dispstr, statusEnd If
End If
三、写入NDEF智能海报
Dim dispstr As String
Dim status As Byte
Dim myctrlword As Byte
Dim mypiccserial(0 To 6) As Byte
Dim mypicckey(0 To 15) As Byte
Dim mypiccseriallen(1) As ByteDim languagecodestr As String
Dim languagecodestrlen As Long
Dim titlestr As String
Dim titlestrlen As Long
Dim uriheaderindex As Long
Dim uristr As String
Dim uristrlen As Longlanguagecodestr = "en"      '语言编码,英文为en,中文为zh
languagecodestrlen = 2titlestr = Trim(Text4.Text)     '标题
titlestrlen = LenB(StrConv(titlestr, vbFromUnicode))uriheaderindex = Combo2.ListIndex   '链接前缀uristr = Trim(Text18.Text)  '链接
uristrlen = LenB(StrConv(uristr, vbFromUnicode))CheckCardTypeIf CardType = 3 Thentagbuf_clear    status = tagbuf_adduri(languagecodestr, languagecodestrlen, titlestr, titlestrlen, uriheaderindex, uristr, uristrlen)If (status = 0) Thenmyctrlword = &H80 + &H10status = piccwrite_ndeftag(myctrlword, mypiccserial(0), mypiccseriallen(0), mypicckey(0))dispstr = "MifareClassUid:" + cardstr + ",写入NDEF访问网址"dispriv dispstr, statusElsedispstr = "MifareClassUid:" + cardstr + ",生成NDEF访问网址数据"dispriv dispstr, statusEnd If
ElseIf CardType = 4 Thentagbuf_forumtype4_clear    status = tagbuf_adduri(languagecodestr, languagecodestrlen, titlestr, titlestrlen, uriheaderindex, uristr, uristrlen)If (status = 0) Thenmyctrlword = 0      '0表示标签无密码,如设置密码取值  &H40 ,mypicckey 存放密码status = forumtype4_write_ndeftag(myctrlword, mypiccserial(0), mypiccseriallen(0), mypicckey(0))dispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",写入NDEF访问网址"dispriv dispstr, statusElsedispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",生成NDEF访问网址数据"dispriv dispstr, statusEnd If
End If
四、写入NDEF地图座标 
Dim dispstr As String
Dim status As Byte
Dim myctrlword As ByteDim mypiccserial(0 To 6) As Byte
Dim mypicckey(0 To 15) As Byte
Dim mypiccseriallen(1) As ByteDim oldpicckey(0 To 5) As Byte '需要认证的密码
Dim newpicckey(0 To 5) As Byte '需要认证的密码Dim languagecodestr As String
Dim languagecodestrlen As Long
Dim titlestr As String
Dim titlestrlen As Long
Dim uriheaderindex As Long
Dim uristr As String
Dim uristrlen As Longlanguagecodestr = "en"      '语言编码,英文为en,中文为zh
languagecodestrlen = 2titlestr = Trim(Text6.Text)     '标题
titlestrlen = LenB(StrConv(titlestr, vbFromUnicode))uriheaderindex = 0      '地理位置没有链接前缀uristr = "geo:" & Trim(Text2.Text) & "," & Trim(Text3.Text) '地址位置
uristrlen = LenB(StrConv(uristr, vbFromUnicode))CheckCardTypeIf CardType = 3 Thentagbuf_clear    status = tagbuf_adduri(languagecodestr, languagecodestrlen, titlestr, titlestrlen, uriheaderindex, uristr, uristrlen)If (status = 0) Thenmyctrlword = &H80 + &H10status = piccwrite_ndeftag(myctrlword, mypiccserial(0), mypiccseriallen(0), mypicckey(0))dispstr = "MifareClassUid:" + cardstr + ",写入NDEF地图坐标"dispriv dispstr, statusElsedispstr = "MifareClassUid:" + cardstr + ",生成NDEF地图坐标数据"dispriv dispstr, statusEnd If
ElseIf CardType = 4 Thentagbuf_forumtype4_clearstatus = tagbuf_adduri(languagecodestr, languagecodestrlen, titlestr, titlestrlen, uriheaderindex, uristr, uristrlen)If (status = 0) Thenmyctrlword = 0      '0表示标签无密码,如设置密码取值  &H40 ,mypicckey 存放密码status = forumtype4_write_ndeftag(myctrlword, mypiccserial(0), mypiccseriallen(0), mypicckey(0))dispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",写入NDEF地图坐标"dispriv dispstr, statusElsedispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",生成NDEF地图坐标数据"dispriv dispstr, statusEnd If
End If
五、写入NDEF控制标签蓝牙连接 
Dim dispstr As String
Dim status As Byte
Dim myctrlword As ByteDim mypiccserial(0 To 6) As Byte
Dim mypicckey(0 To 15) As Byte
Dim mypiccseriallen(1) As ByteDim oldpicckey(0 To 5) As Byte '需要认证的密码
Dim newpicckey(0 To 5) As Byte '需要认证的密码Dim blenamestr As String
Dim blenamestrlen As Long
Dim blemac(0 To 5) As Byte '蓝牙MAC地址blenamestr = Trim(Text8.Text)
blenamestrlen = LenB(StrConv(blenamestr, vbFromUnicode))macstr = Split(Text9, ":")
blemac(0) = "&H" & macstr(0)
blemac(1) = "&H" & macstr(1)
blemac(2) = "&H" & macstr(2)
blemac(3) = "&H" & macstr(3)
blemac(4) = "&H" & macstr(4)
blemac(5) = "&H" & macstr(5)CheckCardTypeIf CardType = 3 Thentagbuf_clear    status = tagbuf_addbluetooth(blenamestr, blenamestrlen, blemac(0))If (status = 0) Thenmyctrlword = &H80 + &H10status = piccwrite_ndeftag(myctrlword, mypiccserial(0), oldpicckey(0), newpicckey(0))dispstr = "MifareClassUid:" + cardstr + ",写入NDEF蓝牙连接"dispriv dispstr, statusElsedispstr = "MifareClassUid:" + cardstr + ",生成NDEF蓝牙连接数据"dispriv dispstr, statusEnd If
ElseIf CardType = 4 Thentagbuf_forumtype4_clear    status = tagbuf_addbluetooth(blenamestr, blenamestrlen, blemac(0))If (status = 0) Thenmyctrlword = 0      '0表示标签无密码,如设置密码取值  &H40 ,mypicckey 存放密码status = forumtype4_write_ndeftag(myctrlword, mypiccserial(0), mypiccseriallen(0), mypicckey(0))dispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",写入NDEF蓝牙连接"dispriv dispstr, statusElsedispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",生成NDEF蓝牙连接数据"dispriv dispstr, statusEnd If
End If
六、写入NDEF控制标签连接WIFI热点 
Dim dispstr As String
Dim status As Byte
Dim myctrlword As ByteDim mypiccserial(0 To 6) As Byte
Dim mypicckey(0 To 15) As Byte
Dim mypiccseriallen(1) As ByteDim oldpicckey(0 To 5) As Byte '需要认证的密码
Dim newpicckey(0 To 5) As Byte '需要认证的密码Dim ssidstr As String
Dim ssidstrlen As LongDim authtype As Long
Dim crypttype As LongDim keystr As String
Dim keystrlen As Longssidstr = Trim(Text12.Text)    'WIFI名称
ssidstrlen = LenB(StrConv(ssidstr, vbFromUnicode))authtype = Combo3.ListIndex    '加密方式crypttype = Combo4.ListIndex    '加密算法keystr = Trim(Text11.Text)    '密码
keystrlen = LenB(StrConv(keystr, vbFromUnicode))CheckCardTypeIf CardType = 3 Thentagbuf_clear    status = tagbuf_addwifi(ssidstr, ssidstrlen, authtype, crypttype, keystr, keystrlen)If (status = 0) Thenmyctrlword = &H80 + &H10status = piccwrite_ndeftag(myctrlword, mypiccserial(0), oldpicckey(0), newpicckey(0))dispstr = "MifareClassUid:" + cardstr + ",写入NDEF无线热点连接"dispriv dispstr, statusElsedispstr = "MifareClassUid:" + cardstr + ",生成NDEF无线热点连接数据"dispriv dispstr, statusEnd If
ElseIf CardType = 4 Thentagbuf_forumtype4_clear    status = tagbuf_addwifi(ssidstr, ssidstrlen, authtype, crypttype, keystr, keystrlen)If (status = 0) Thenmyctrlword = 0      '0表示标签无密码,如设置密码取值  &H40 ,mypicckey 存放密码status = forumtype4_write_ndeftag(myctrlword, mypiccserial(0), mypiccseriallen(0), mypicckey(0))dispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",写入NDEF无线热点连接"dispriv dispstr, statusElsedispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",生成NDEF无线热点连接数据"dispriv dispstr, statusEnd If
End If
七、写入NDEF控制标签电子名片 
Dim dispstr As String
Dim status As Byte
Dim myctrlword As ByteDim mypiccserial(0 To 6) As Byte
Dim mypicckey(0 To 15) As Byte
Dim mypiccseriallen(1) As ByteDim oldpicckey(0 To 5) As Byte '需要认证的密码
Dim newpicckey(0 To 5) As Byte '需要认证的密码Dim infostr As String
Dim infostrlen As Long'名片信息
infostr = "BEGIN:VCARD" & Chr(10)
infostr = infostr & "VERSION:3.0" & Chr(10)
infostr = infostr & "FN:" & Trim(Text14.Text) & Chr(10)    '姓名
infostr = infostr & "TEL:" & Trim(Text13.Text) & Chr(10)    '电话
infostr = infostr & "ORG:" & Trim(Text15.Text) & Chr(10)    '单位名称
infostr = infostr & "ADR:" & Trim(Text19.Text) & Chr(10)    '地址
infostr = infostr & "EMAIL:" & Trim(Text16.Text) & Chr(10)    '邮箱
infostr = infostr & "URL:" & Trim(Text17.Text) & Chr(10)    '网址
infostr = infostr & "END:VCARD"infostrlen = LenB(StrConv(infostr, vbFromUnicode))CheckCardTypeIf CardType = 3 Thentagbuf_clear    status = tagbuf_addbusinesscard(infostr, infostrlen)   '可以写入多条记录If (status = 0) Thenmyctrlword = &H80 + &H10status = piccwrite_ndeftag(myctrlword, mypiccserial(0), oldpicckey(0), newpicckey(0))dispstr = "MifareClassUid:" + cardstr + ",写入NDEF电子名片"dispriv dispstr, statusElsedispstr = "MifareClassUid:" + cardstr + ",生成NDEF电子名片数据"dispriv dispstr, statusEnd If
ElseIf CardType = 4 Thentagbuf_forumtype4_clear    status = tagbuf_addbusinesscard(infostr, infostrlen)   '可以写入多条记录If (status = 0) Thenmyctrlword = 0      '0表示标签无密码,如设置密码取值  &H40 ,mypicckey 存放密码status = forumtype4_write_ndeftag(myctrlword, mypiccserial(0), mypiccseriallen(0), mypicckey(0))dispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",写入NDEF电子名片"dispriv dispstr, statusElsedispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",生成NDEF电子名片数据"dispriv dispstr, statusEnd If
End If
八、写入NDEF控制标签呼叫电话 
Dim dispstr As String
Dim status As Byte
Dim myctrlword As ByteDim mypiccserial(0 To 6) As Byte
Dim mypicckey(0 To 15) As Byte
Dim mypiccseriallen(1) As ByteDim oldpicckey(0 To 5) As Byte '需要认证的密码
Dim newpicckey(0 To 5) As Byte '需要认证的密码Dim languagecodestr As String
Dim languagecodestrlen As Long
Dim uristr As String
Dim uristrlen As Longlanguagecodestr = "en"      '语言编码,英文为en,中文为zh
languagecodestrlen = 2uristr = Trim(Text10.Text)  '呼叫电话
uristrlen = LenB(StrConv(uristr, vbFromUnicode))CheckCardTypeIf CardType = 3 Thentagbuf_clear    status = tagbuf_adduri(languagecodestr, languagecodestrlen, "", 0, 5, uristr, uristrlen)If (status = 0) Thenmyctrlword = &H80 + &H10status = piccwrite_ndeftag(myctrlword, mypiccserial(0), oldpicckey(0), newpicckey(0))dispstr = "MifareClassUid:" + cardstr + ",写入NDEF呼叫电话"dispriv dispstr, statusElsedispstr = "MifareClassUid:" + cardstr + ",生成NDEF呼叫电话数据"dispriv dispstr, statusEnd IfElseIf CardType = 4 Thentagbuf_forumtype4_clear    status = tagbuf_adduri(languagecodestr, languagecodestrlen, "", 0, 5, uristr, uristrlen)If (status = 0) Thenmyctrlword = 0      '0表示标签无密码,如设置密码取值  &H40 ,mypicckey 存放密码status = forumtype4_write_ndeftag(myctrlword, mypiccserial(0), mypiccseriallen(0), mypicckey(0))dispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",写入NDEF呼叫电话"dispriv dispstr, statusElsedispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",生成NDEF呼叫电话数据"dispriv dispstr, statusEnd If
End If
九、读取NDEF标签信息
Dim dispstr As String
Dim status As Byte
Dim mypiccserial(0 To 6) As Byte
Dim mypicckey(0 To 15) As Byte
Dim mypiccseriallen(1) As Byte
Dim myctrlword As Byte
Dim oldpicckey(0 To 5) As Byte '需要认证的密码Dim ndefstr As String
Dim revstrlen(1) As Long
Dim recordnumber(1) As LongCheckCardTypeIf CardType = 3 Thenmyctrlword = &H80 + &H10status = piccread_ndeftag(myctrlword, mypiccserial(0), oldpicckey(0))If (status = 0) Thenndefstr = String(2048, 0)tagbuf_read ndefstr, revstrlen(0), recordnumber(0)dispstr = "MifareClassUid:" + cardstr + ",读取卡内NDEF信息"dispriv dispstr, statusText22 = ndefstrElsedispstr = "MifareClassUid:" + cardstr + ",读取卡内NDEF信息"dispriv dispstr, statusEnd If
ElseIf CardType = 4 Thenmyctrlword = 0      '0表示标签无密码,如设置密码取值  &H40 ,mypicckey 存放密码status = forumtype4_read_ndeftag(myctrlword, mypiccserial(0), mypiccseriallen(0), mypicckey(0))If (status = 0) Thenndefstr = String(2048, 0)tagbuf_read ndefstr, revstrlen(0), recordnumber(0)dispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",读取卡内NDEF信息"dispriv dispstr, statusText22 = ndefstrElsedispstr = "NFC_Forum_Type4_Tag卡:" + cardstr + ",读取卡内NDEF信息"dispriv dispstr, statusEnd If
End If

 

这篇关于VB6轻松读写Mifare ClassIc芯片NDEF标签源码的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/667233

相关文章

闲置电脑也能活出第二春?鲁大师AiNAS让你动动手指就能轻松部署

对于大多数人而言,在这个“数据爆炸”的时代或多或少都遇到过存储告急的情况,这使得“存储焦虑”不再是个别现象,而将会是随着软件的不断臃肿而越来越普遍的情况。从不少手机厂商都开始将存储上限提升至1TB可以见得,我们似乎正处在互联网信息飞速增长的阶段,对于存储的需求也将会不断扩大。对于苹果用户而言,这一问题愈发严峻,毕竟512GB和1TB版本的iPhone可不是人人都消费得起的,因此成熟的外置存储方案开

10. 文件的读写

10.1 文本文件 操作文件三大类: ofstream:写操作ifstream:读操作fstream:读写操作 打开方式解释ios::in为了读文件而打开文件ios::out为了写文件而打开文件,如果当前文件存在则清空当前文件在写入ios::app追加方式写文件ios::trunc如果文件存在先删除,在创建ios::ate打开文件之后令读写位置移至文件尾端ios::binary二进制方式

JAVA智听未来一站式有声阅读平台听书系统小程序源码

智听未来,一站式有声阅读平台听书系统 🌟 开篇:遇见未来,从“智听”开始 在这个快节奏的时代,你是否渴望在忙碌的间隙,找到一片属于自己的宁静角落?是否梦想着能随时随地,沉浸在知识的海洋,或是故事的奇幻世界里?今天,就让我带你一起探索“智听未来”——这一站式有声阅读平台听书系统,它正悄悄改变着我们的阅读方式,让未来触手可及! 📚 第一站:海量资源,应有尽有 走进“智听

【数据结构】——原来排序算法搞懂这些就行,轻松拿捏

前言:快速排序的实现最重要的是找基准值,下面让我们来了解如何实现找基准值 基准值的注释:在快排的过程中,每一次我们要取一个元素作为枢纽值,以这个数字来将序列划分为两部分。 在此我们采用三数取中法,也就是取左端、中间、右端三个数,然后进行排序,将中间数作为枢纽值。 快速排序实现主框架: //快速排序 void QuickSort(int* arr, int left, int rig

【Prometheus】PromQL向量匹配实现不同标签的向量数据进行运算

✨✨ 欢迎大家来到景天科技苑✨✨ 🎈🎈 养成好习惯,先赞后看哦~🎈🎈 🏆 作者简介:景天科技苑 🏆《头衔》:大厂架构师,华为云开发者社区专家博主,阿里云开发者社区专家博主,CSDN全栈领域优质创作者,掘金优秀博主,51CTO博客专家等。 🏆《博客》:Python全栈,前后端开发,小程序开发,人工智能,js逆向,App逆向,网络系统安全,数据分析,Django,fastapi

Java ArrayList扩容机制 (源码解读)

结论:初始长度为10,若所需长度小于1.5倍原长度,则按照1.5倍扩容。若不够用则按照所需长度扩容。 一. 明确类内部重要变量含义         1:数组默认长度         2:这是一个共享的空数组实例,用于明确创建长度为0时的ArrayList ,比如通过 new ArrayList<>(0),ArrayList 内部的数组 elementData 会指向这个 EMPTY_EL

如何在Visual Studio中调试.NET源码

今天偶然在看别人代码时,发现在他的代码里使用了Any判断List<T>是否为空。 我一般的做法是先判断是否为null,再判断Count。 看了一下Count的源码如下: 1 [__DynamicallyInvokable]2 public int Count3 {4 [__DynamicallyInvokable]5 get

工厂ERP管理系统实现源码(JAVA)

工厂进销存管理系统是一个集采购管理、仓库管理、生产管理和销售管理于一体的综合解决方案。该系统旨在帮助企业优化流程、提高效率、降低成本,并实时掌握各环节的运营状况。 在采购管理方面,系统能够处理采购订单、供应商管理和采购入库等流程,确保采购过程的透明和高效。仓库管理方面,实现库存的精准管理,包括入库、出库、盘点等操作,确保库存数据的准确性和实时性。 生产管理模块则涵盖了生产计划制定、物料需求计划、

【STM32】SPI通信-软件与硬件读写SPI

SPI通信-软件与硬件读写SPI 软件SPI一、SPI通信协议1、SPI通信2、硬件电路3、移位示意图4、SPI时序基本单元(1)开始通信和结束通信(2)模式0---用的最多(3)模式1(4)模式2(5)模式3 5、SPI时序(1)写使能(2)指定地址写(3)指定地址读 二、W25Q64模块介绍1、W25Q64简介2、硬件电路3、W25Q64框图4、Flash操作注意事项软件SPI读写W2

EMLOG程序单页友链和标签增加美化

单页友联效果图: 标签页面效果图: 源码介绍 EMLOG单页友情链接和TAG标签,友链单页文件代码main{width: 58%;是设置宽度 自己把设置成与您的网站宽度一样,如果自适应就填写100%,TAG文件不用修改 安装方法:把Links.php和tag.php上传到网站根目录即可,访问 域名/Links.php、域名/tag.php 所有模板适用,代码就不粘贴出来,已经打