Vb6 TCP Server服务端监听多个RFID读卡器客户端上传的刷卡数据

news2024/11/23 23:19:56

本示例使用设备介绍:WIFI无线4G网络RFID云读卡器远程网络开关物流网阅读器TTS语音-淘宝网 (taobao.com) 

Option Explicit

Const BUSY As Boolean = False    '定义常量
Const FREE As Boolean = True

Dim ConnectState() As Boolean   '定义连接状态
Dim ServerSendbuf() As Byte     '数据发送缓冲

Private Sub Check1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Check1.Value > 0 Then Frame1.Visible = True Else Frame1.Visible = False
End Sub

Private Sub Command1_Click()
initsock
End Sub

Private Sub Command10_Click()
Dim copstr As String
Dim i As Long
Clipboard.Clear
copstr = ""
For i = 0 To List2.ListCount
    copstr = copstr & List2.List(i)
    copstr = copstr & vbCrLf
Next

Clipboard.SetText (copstr)
MsgBox "TCP通讯报文列表已拷贝!", vbInformation + vbOKOnly, "提示"
End Sub

Private Sub Command2_Click()
GetSendData 5
ButtonSend
End Sub

Private Sub Command3_Click()
Dim i As Integer
Dim sockid As Integer
Dim dispinf As String

On Error Resume Next

For i = List1.ListCount - 1 To 0 Step -1   '要用倒序
    If List1.Selected(i) = True Then
        sockid = Val(Mid(List1.List(i), 1, 2))
        Sock(sockid).Close
        
        ConnectState(sockid) = FREE
        
        dispinf = Format(Now, "HH:MM:SS") & " 连接 " & sockid & " 已关闭"
        List2.AddItem (dispinf)
        List2.ListIndex = List2.ListCount - 1
         
        List1.RemoveItem i
    End If
Next
End Sub

Private Sub Command4_Click()
GetSendData 0
ButtonSend
End Sub

Private Sub Command5_Click()
GetSendData 1
ButtonSend

End Sub

Private Sub Command6_Click()
GetSendData 2
ButtonSend
End Sub

Private Sub Command7_Click()
GetSendData 3
ButtonSend
End Sub

Private Sub Command8_Click()
GetSendData 4
ButtonSend
End Sub

Private Sub Command9_Click()
List2.Clear
End Sub

Private Sub Form_Load()
Dim i As Integer

For i = 1 To 255
    Combo9.AddItem (Format(i, "0"))
Next
Combo9.ListIndex = 19
Combo2.ListIndex = 1
Combo3.ListIndex = 0
Combo8.ListIndex = 1

Command1_Click
End Sub

Private Sub Listener_Close()
'MsgBox "close"
Dim dispinf As String
dispinf = Format(Now, "HH:MM:SS") & " 监听服务已关闭!"
List2.AddItem (dispinf)
List2.ListIndex = List2.ListCount - 1
End Sub

Private Sub Listener_ConnectionRequest(ByVal requestID As Long)
Dim SockIndex As Integer
Dim SockNum As Integer
Dim dispinf As String
Dim onlines As String

On Error Resume Next

dispinf = Format(Now, "HH:MM:SS") & " " & requestID & "连接请求"

SockNum = UBound(ConnectState)   '查找连接的用户数
If SockNum > 100 Then
    dispinf = dispinf & SockIndex & " ,当前连接数>100,系统不接受新连接!"
    List2.AddItem (dispinf)
    List2.ListIndex = List2.ListCount - 1
    Exit Sub
End If


SockIndex = FindFreeSocket()   '查找空闲的sock

If SockIndex > SockNum Then    '如果已有的sock都忙,而且sock数不超过15个,动态添加sock
    Load Sock(SockIndex)
End If
ConnectState(SockIndex) = BUSY
Sock(SockIndex).LocalPort = 0
Sock(SockIndex).Tag = SockIndex
Sock(SockIndex).Accept (requestID)  '接受请求

onlines = Format(SockIndex, "00") & "|" & Format(requestID, "00000") & "|" & Listener.RemoteHostIP & ":" & Listener.RemotePort
dispinf = dispinf & SockIndex & "接受请求," & Listener.RemoteHostIP & ":" & Listener.RemotePort

List1.AddItem (onlines)
List1.ListIndex = List1.ListCount - 1
List1.Selected(List1.ListCount - 1) = True

List2.AddItem (dispinf)
List2.ListIndex = List2.ListCount - 1
End Sub

Private Sub Listener_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
'MsgBox "err"
Dim dispinf As String
dispinf = Format(Now, "HH:MM:SS") & " 监听到异常错误!"
List2.AddItem (dispinf)
List2.ListIndex = List2.ListCount - 1
End Sub

Private Sub Sock_Close(Index As Integer)
Dim dispinf As String
Dim i As Integer

If Sock(Index).State <> sckClosed Then
    Sock(Index).Close
End If
ConnectState(Index) = FREE

dispinf = Format(Now, "HH:MM:SS") & " 连接 " & Index & " 已关闭"
List2.AddItem (dispinf)
List2.ListIndex = List2.ListCount - 1

For i = 0 To List1.ListCount - 1
    If Val(Mid(List1.List(i), 1, 2)) = Index Then
        List1.RemoveItem i
        Exit For
    End If
Next
End Sub

Private Sub Sock_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Dim dx As String
Dim dispinf As String
Dim dispstr As String
Dim i As Integer
Dim TcpData() As Byte
Dim IPort As String
Dim doublecardhao  As Double
Dim card10str As String

Sock(Index).GetData TcpData
IPort = Sock(Index).RemoteHostIP & ":" & Sock(Index).RemotePort

For i = 0 To bytesTotal - 1
   dispstr = dispstr + Right("00" + Hex(TcpData(i)), 2) + " "
Next
dispinf = Format(Now, "HH:MM:SS") & " FromIP " & IPort & " :" & dispstr
List2.AddItem (dispinf)
List2.ListIndex = List2.ListCount - 1

Select Case TcpData(0)
       Case &HC1, &HCF
            If TcpData(0) = &HC1 Then
                dispstr = "数据解析:接收到IC卡刷卡数据,读卡器IP["
            Else
                dispstr = "数据解析:接收到IC卡离开读卡器,读卡器IP["
            End If
            dispstr = dispstr + Trim(Str(TcpData(1))) + "." + Trim(Str(TcpData(2))) + "." + Trim(Str(TcpData(3))) + "." + Trim(Str(TcpData(4)))
            dispstr = dispstr + "],机号["
            '机号
            dispstr = dispstr + Format(Str$(CLng(TcpData(5)) + CLng(TcpData(6)) * 256), "00000")
            
            dispstr = dispstr + "],数据包序号["
            '数据包序号,每个包都不一样,按递增1变化
            dispstr = dispstr + Format(Str$(CLng(TcpData(7)) + CLng(TcpData(8)) * 256), "00000")
            
            dispstr = dispstr + "],卡号长度[" + Trim(Str(TcpData(9)))
            
            dispstr = dispstr + "],16进制卡号["
            For i = 10 To 9 + TcpData(9)
                dispstr = dispstr + Right("00" + Hex(TcpData(i)), 2)
            Next
            
            doublecardhao = TcpData(13)
            doublecardhao = doublecardhao * 256
            doublecardhao = doublecardhao + TcpData(12)
            doublecardhao = doublecardhao * 256
            doublecardhao = doublecardhao + TcpData(11)
            doublecardhao = doublecardhao * 256
            doublecardhao = doublecardhao + TcpData(10)
            card10str = Right("0000000000" + CStr(doublecardhao), 10)
            dispstr = dispstr + "],转10进制卡号[" + card10str
            
            dispstr = dispstr + "],唯一硬件序号["
            
            For i = 10 + TcpData(9) To bytesTotal - 1
                dispstr = dispstr + Right("00" + Hex(TcpData(i)), 2)
            Next
            dispstr = dispstr + "]"
            
            List2.AddItem (dispstr)
            List2.AddItem ("")
            List2.ListIndex = List2.ListCount - 1

            If Check1.Value > 0 Then Response Index, IPort
            
       Case &HD1, &HDF
            If TcpData(0) = &HD1 Then
                dispstr = "数据解析:接收到ID卡刷卡数据,读卡器IP["
            Else
                dispstr = "数据解析:接收到ID卡离开读卡器,读卡器IP["
            End If
            
            dispstr = dispstr + Trim(Str(TcpData(1))) + "." + Trim(Str(TcpData(2))) + "." + Trim(Str(TcpData(3))) + "." + Trim(Str(TcpData(4)))
            dispstr = dispstr + "],机号["
            '机号
            dispstr = dispstr + Format(Str$(CLng(TcpData(5)) + CLng(TcpData(6)) * 256), "00000")
            
            dispstr = dispstr + "],数据包序号["
            '数据包序号,每个包都不一样,按递增1变化
            dispstr = dispstr + Format(Str$(CLng(TcpData(7)) + CLng(TcpData(8)) * 256), "00000")
            
            doublecardhao = TcpData(12)
            doublecardhao = doublecardhao * 256
            doublecardhao = doublecardhao + TcpData(11)
            doublecardhao = doublecardhao * 256
            doublecardhao = doublecardhao + TcpData(10)
            doublecardhao = doublecardhao * 256
            doublecardhao = doublecardhao + TcpData(9)
            card10str = Right("0000000000" + CStr(doublecardhao), 10)
                        
            
            dispstr = dispstr + "],16进制卡号["
            dispstr = dispstr + Right("00" + Hex(TcpData(9)), 2) + Right("00" + Hex(TcpData(10)), 2) + Right("00" + Hex(TcpData(11)), 2) + Right("00" + Hex(TcpData(12)), 2) + Right("00" + Hex(TcpData(13)), 2) + "],转10进制卡号[" + card10str
            
            dispstr = dispstr + "],唯一硬件序号["
            
            For i = 14 To bytesTotal - 1
                dispstr = dispstr + Right("00" + Hex(TcpData(i)), 2)
            Next
            dispstr = dispstr + "]"
            
            List2.AddItem (dispstr)
            List2.AddItem ("")
            List2.ListIndex = List2.ListCount - 1

             If Check1.Value > 0 Then Response Index, IPort
      Case &HF3
            dispstr = "数据解析:接收到读卡器心跳包,读卡器IP["
            dispstr = dispstr + Trim(Str(TcpData(1))) + "." + Trim(Str(TcpData(2))) + "." + Trim(Str(TcpData(3))) + "." + Trim(Str(TcpData(4)))
            dispstr = dispstr + "],机号["
            '机号
            dispstr = dispstr + Format(Str$(CLng(TcpData(5)) + CLng(TcpData(6)) * 256), "00000")
            
            dispstr = dispstr + "],数据包序号["
            '数据包序号,每个包都不一样,按递增1变化
            dispstr = dispstr + Format(Str$(CLng(TcpData(7)) + CLng(TcpData(8)) * 256), "00000") + "],"
            
            dispstr = dispstr + "心跳包类型[" + Right("00" + Hex(TcpData(9)), 2) + "],"
                
            dispstr = dispstr + "长度[" + Right("00" + Hex(TcpData(10)), 2) + "],"
            
            dispstr = dispstr + "继电器状态[" + Right("00" + Hex(TcpData(11)), 2) + "],"
            
            dispstr = dispstr + "外部输入状态[" + Right("00" + Hex(TcpData(12)), 2) + "],"
            
            dispstr = dispstr + "随机动态码[" + Right("00" + Hex(TcpData(13)), 2) + Right("00" + Hex(TcpData(14)), 2) + Right("00" + Hex(TcpData(15)), 2) + Right("00" + Hex(TcpData(16)), 2) + "],"
                            

            dispstr = dispstr + "唯一硬件序号["
            For i = 17 To bytesTotal - 1
                dispstr = dispstr + Right("00" + Hex(TcpData(i)), 2)
            Next
            dispstr = dispstr + "]"
                
            
            List2.AddItem (dispstr)
            List2.AddItem ("")
            List2.ListIndex = List2.ListCount - 1
End Select
End Sub

Public Function FindFreeSocket()   '寻找空闲的sock
Dim SockCount, i As Integer
SockCount = UBound(ConnectState)
For i = 0 To SockCount
    If ConnectState(i) = FREE Then
        FindFreeSocket = i
        Exit Function
    End If
Next i

ReDim Preserve ConnectState(0 To SockCount + 1)
FindFreeSocket = UBound(ConnectState)
End Function

Private Sub initsock()
Dim dispinf As String
ReDim Preserve ConnectState(0 To 1)
On Error GoTo err1

ConnectState(0) = FREE
ConnectState(1) = FREE

If Listener.State = sckClosed Then
    Listener.LocalPort = CLng(Text1.Text)    '指定网络端口号
    Listener.Listen                          '开始侦听
    
    dispinf = Format(Now, "HH:MM:SS") & " 已创建监听服务!可以接收客户端的连接请求。"
    List2.AddItem (dispinf)
    List2.ListIndex = List2.ListCount - 1
    Command1.Caption = "关闭监听服务"
Else
    Listener.Close
    
    dispinf = Format(Now, "HH:MM:SS") & " 已关闭监听服务!不再接受新的客户端连接请求,已连接的客户端还可以通讯。"
    List2.AddItem (dispinf)
    List2.ListIndex = List2.ListCount - 1
    Command1.Caption = "创建监听服务"
End If

Exit Sub

err1:
    dispinf = Format(Now, "HH:MM:SS") & " 开启监听服务时出现错误:" & Err.Number & Err.Description
    List2.AddItem (dispinf)
    List2.ListIndex = List2.ListCount - 1
End Sub

Private Sub Sock_Error(Index As Integer, ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
Dim dispinf As String
Dim i As Integer

If Sock(Index).State <> sckClosed Then
    Sock(Index).Close
End If
ConnectState(Index) = FREE

dispinf = Format(Now, "HH:MM:SS") & " 连接 " & Index & " 错误提示:" & Description
List2.AddItem (dispinf)
List2.ListIndex = List2.ListCount - 1

For i = 0 To List1.ListCount - 1
    If Val(Mid(List1.List(i), 1, 2)) = Index Then
        List1.RemoveItem i
        Exit For
    End If
Next
End Sub

Private Sub Text5_Click()
Shell Environ("PROGRAMFILES") & "\Internet Explorer\iexplore.exe  " & Trim(Text5)
End Sub

Private Sub Response(Index As Integer, IPort As String)
On Error GoTo err1

If Check1.Value > 0 Then
    If Option1(0) Then
        GetSendData 0
    ElseIf Option1(1) Then
        GetSendData 1
    ElseIf Option1(2) Then
        GetSendData 2
    Else
        GetSendData 3
    End If
End If

Dim dispinf As String
Dim sendstr As String
Dim i As Integer

On Error GoTo err1

For i = 0 To UBound(ServerSendbuf)
   sendstr = sendstr + Right("00" + Hex(ServerSendbuf(i)), 2) + " "
Next

Sock(Index).SendData ServerSendbuf

dispinf = Format(Now, "HH:MM:SS") & " SendTo " & IPort & " :" & sendstr
List2.AddItem (dispinf)
List2.AddItem ("")
List2.ListIndex = List2.ListCount - 1

Exit Sub

err1:
    dispinf = Format(Now, "HH:MM:SS") & " 连接 " & Index & " 传送数据时出错:" & Err.Description
    List2.AddItem (dispinf)
    List2.ListIndex = List2.ListCount - 1
    List1.RemoveItem i

End Sub

Private Sub ButtonSend()
Dim dataArray() As String
Dim sendstr As String
Dim IPort As String
Dim i As Integer
Dim sockid As Integer
Dim dispinf As String

On Error GoTo err1

For i = 0 To UBound(ServerSendbuf)
   sendstr = sendstr + Right("00" + Hex(ServerSendbuf(i)), 2) + " "
Next

For i = 0 To List1.ListCount - 1
    If List1.Selected(i) = True Then
        sockid = Val(Mid(List1.List(i), 1, 2))
        Sock(sockid).SendData ServerSendbuf
        
        dataArray = Split(List1.List(i), "|")
        IPort = dataArray(2)
        dispinf = Format(Now, "HH:MM:SS") & " SendTo " & IPort & " :" & sendstr
        List2.AddItem (dispinf)
        List2.AddItem ("")
        List2.ListIndex = List2.ListCount - 1
    End If
Next
Exit Sub

err1:
    dispinf = Format(Now, "HH:MM:SS") & " 连接 " & sockid & " 传送数据时出错:" & Err.Description
    List2.AddItem (dispinf)
    List2.ListIndex = List2.ListCount - 1
    List1.RemoveItem i
    
End Sub

Private Sub GetSendData(responseid As Integer)    '生成服务器发送缓冲数据
Dim i, J As Integer
Dim longi As Long
Dim dispinf As String
Dim strls As String
Dim lensy, displen, sendbyte As Integer
Dim textbyte() As Byte

Select Case responseid
    Case 0                      '生成显示文字发送数据缓冲
        ReDim ServerSendbuf(38)
        ServerSendbuf(0) = &H5A '命令字,表示驱动蜂鸣器声响
        ServerSendbuf(1) = 0
        ServerSendbuf(2) = 0
        
        If Check2.Value = 1 Then
            ServerSendbuf(3) = Combo2.ListIndex '声音类型
            If Option12.Value = True Then
               ServerSendbuf(3) = ServerSendbuf(3) Or 128
            End If
        Else
            ServerSendbuf(3) = &HFF '不发音
            If Option12.Value = True Then
               ServerSendbuf(3) = ServerSendbuf(3) And 127
            End If
        End If
        
        ServerSendbuf(4) = Combo9.ListIndex  '20 '显示保留时间,单位为秒,为255时表示永久显示
                
        strls = Text7.Text + "                                         "
        textbyte = StrConv(strls, vbFromUnicode)      '字符串转换为字节数组
        For i = 0 To 33
            ServerSendbuf(i + 5) = textbyte(i)
        Next
        
    Case 1              '生成显示文字+蜂鸣响声+继电器+TTS语音发送数据缓冲
        strls = "[v"
        If (Combo8.ListIndex <= 16) Then strls = strls & Format(Combo8.ListIndex, "0") & "]" Else strls = strls & "16]"     '在需要发送的语音字符串中任何位置加入[v10],表示将音量调到10级(范围0~16,0表示静音,16最大,每次重开机后,音量重置为10级)!
        
        strls = strls & Trim(Text3.Text)
        textbyte = StrConv(strls, vbFromUnicode)      '字符串转换为字节数组
        lensy = UBound(textbyte) + 1
        
        displen = 34   '双行屏34,四行屏72
        
        sendbyte = 11 + displen + lensy + 4
        
        ReDim ServerSendbuf(sendbyte)
        ServerSendbuf(0) = &H5C    '命令字,表示驱动TTS合成语音\显示及继电器
        ServerSendbuf(1) = 0
        ServerSendbuf(2) = 0
        
        If Check2.Value = 1 Then
            ServerSendbuf(3) = Combo2.ListIndex '声音类型
            If Option12.Value = True Then
               ServerSendbuf(3) = ServerSendbuf(3) Or 128
            End If
        Else
            ServerSendbuf(3) = &HFF '不发音
            If Option12.Value = True Then
               ServerSendbuf(3) = ServerSendbuf(3) And 127
            End If
        End If
        
        Select Case Combo3.ListIndex
               Case 1
                    ServerSendbuf(4) = &HF1
               Case 2
                    ServerSendbuf(4) = &HF2
               Case 3
                    ServerSendbuf(4) = &HF3
               Case 4
                    ServerSendbuf(4) = &HF4
               Case 5
                    ServerSendbuf(4) = &HF5
               Case 6
                    ServerSendbuf(4) = &HF6
               Case 7
                    ServerSendbuf(4) = &HF7
               Case 8
                    ServerSendbuf(4) = &HF8
               Case Else
                    ServerSendbuf(4) = &HF0
        End Select
        '时长
        i = Val(Trim(Text30.Text))
        ServerSendbuf(5) = i Mod 256
        ServerSendbuf(6) = Int(i / 256) Mod 256
        
        ServerSendbuf(7) = Combo9.ListIndex  '20 '显示保留时间,单位为秒,为255时表示永久显示
        
        ServerSendbuf(8) = 0 '在显示屏中的哪个位置开始
        
        ServerSendbuf(9) = displen '显示字符串长度 0-34为全屏
        strls = Text7.Text + "                                         "
        Dim a() As Byte
        a = StrConv(strls, vbFromUnicode)      '字符串转换为字节数组
        For i = 1 To displen                        '显示文字的ASCII码
            ServerSendbuf(i + 10) = a(i - 1)
        Next
        
        ServerSendbuf(10) = lensy                    '语音长度,最长可为126
        For i = 1 To lensy                     'TTS语音的ASCII码
            ServerSendbuf(i + 10 + displen) = textbyte(i - 1)
        Next
        
        ServerSendbuf(10 + ServerSendbuf(9) + lensy + 1) = &H55
        ServerSendbuf(10 + ServerSendbuf(9) + lensy + 2) = &HAA
        ServerSendbuf(10 + ServerSendbuf(9) + lensy + 3) = &H66
        ServerSendbuf(10 + ServerSendbuf(9) + lensy + 4) = &H99
    
    Case 2      '生成蜂鸣响声发送数据缓冲
        ReDim ServerSendbuf(3)
        ServerSendbuf(0) = &H96 '命令字,表示驱动蜂鸣器声响
        ServerSendbuf(1) = 0    'Tcp通讯,机号00表示任意机器
        ServerSendbuf(2) = 0
        ServerSendbuf(3) = Combo2.ListIndex  '声音类型

   Case 3       '生成继电器开关发送数据缓冲
        ReDim ServerSendbuf(5)
        ServerSendbuf(0) = &H78 '命令字,表示驱动蜂鸣器声响
        ServerSendbuf(1) = 0    'Tcp通讯,机号00表示任意机器
        ServerSendbuf(2) = 0
        Select Case Combo3.ListIndex
               Case 1
                    ServerSendbuf(3) = &HF1
               Case 2
                    ServerSendbuf(3) = &HF2
               Case 3
                    ServerSendbuf(3) = &HF3
               Case 4
                    ServerSendbuf(3) = &HF4
               Case 5
                    ServerSendbuf(3) = &HF5
               Case 6
                    ServerSendbuf(3) = &HF6
               Case 7
                    ServerSendbuf(3) = &HF7
               Case 8
                    ServerSendbuf(3) = &HF8
               Case Else
                    ServerSendbuf(3) = &HF0
        End Select
                
        i = Val(Trim(Text30.Text))  '时长
        ServerSendbuf(4) = i Mod 256
        ServerSendbuf(5) = Int(i / 256) Mod 256

   Case 4       '生成继电器开关发送数据缓冲
        ReDim ServerSendbuf(5)
        ServerSendbuf(0) = &H78 '命令字,表示驱动蜂鸣器声响
        ServerSendbuf(1) = 0    'Tcp通讯,机号00表示任意机器
        ServerSendbuf(2) = 0
        Select Case Combo3.ListIndex
               Case 1
                    ServerSendbuf(3) = &HE1
               Case 2
                    ServerSendbuf(3) = &HE2
               Case 3
                    ServerSendbuf(3) = &HE3
               Case 4
                    ServerSendbuf(3) = &HE4
               Case 5
                    ServerSendbuf(3) = &HE5
               Case 6
                    ServerSendbuf(3) = &HE6
               Case 7
                    ServerSendbuf(3) = &HE7
               Case 8
                    ServerSendbuf(3) = &HE8
               Case Else
                    ServerSendbuf(3) = &HE0
        End Select
                
        i = Val(Trim(Text30.Text))  '时长
        ServerSendbuf(4) = i Mod 256
        ServerSendbuf(5) = Int(i / 256) Mod 256
        
    Case 5      '生成重发刷卡数据发送数据缓冲
        ReDim ServerSendbuf(2)
        ServerSendbuf(0) = &HA7  '命令字:重新获取刷卡信息
        ServerSendbuf(1) = 0    'Tcp通讯,机号00表示任意机器
        ServerSendbuf(2) = 0
        
End Select

End Sub

 

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

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

相关文章

超级好用的几个工具

JamTools JamTools是一个全平台支持的小工具集软件&#xff0c;可用于Windows 7/8/10/11、MacOS、Ubuntu等系统&#xff08;其他系统可自行编译源码进行打包&#xff09;。该工具集包含了多项实用功能&#xff0c;如滚动/区域截屏、录屏、文字识别、多语言互译、多媒体格式转换…

计算机网络——物理层-物理层的基本概念、物理层下面的传输媒体

目录 物理层的基本概念 传输媒体 物理层的基本概念 在计算机网络中&#xff0c;用来连接各种网络设备的传输媒体种类众多。大致可以分为两类。一类是导引型传输媒体&#xff0c;另一类是非导引型传输媒体。 在导引型传输媒体中&#xff0c;常见的有双绞线、同轴电缆、光纤。…

Qt开发流程

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 文章目录 前言一、pandas是什么&#xff1f;二、使用步骤 1.引入库2.读入数据总结 前言 提示&#xff1a;这里可以添加本文要记录的大概内容&#xff1a; 例如&#xff1a;…

是时候和 Confluence 说再见了

作为最早为 Confluence 中文化提供服务的社区&#xff0c;我们也面临着最后的时间了。 Confluence 已经不再为用户签发开源许可证了&#xff0c;这意味着在今年许可证到期后&#xff0c;我们要不就需要把所有数据迁移到 Confluence 云平台上。 要不就自己部署完整的云平台服务…

Apache Airflow (一) : Airflow架构及

&#x1f3e1; 个人主页&#xff1a;IT贫道_大数据OLAP体系技术栈,Apache Doris,Clickhouse 技术-CSDN博客 &#x1f6a9; 私聊博主&#xff1a;加入大数据技术讨论群聊&#xff0c;获取更多大数据资料。 &#x1f514; 博主个人B栈地址&#xff1a;豹哥教你大数据的个人空间-豹…

three.js点滴yan(整理后)

场景、相机和渲染器 Three.js整个系统主要包含场景Scene、相机Camera和WebGL渲染器WebGLRenderer三大块&#xff0c;其中场景又包含模型和光源。WebGL渲染器的主要作用就是把相机对应场景渲染出来&#xff0c;显示在网页Cnavas画布上。 Three.js源码 Three.js各个构造函数对应…

YOLO目标检测——交通标志检测数据集【含对应voc、coco和yolo三种格式标签】

实际项目应用&#xff1a;交通标志识别数据集在自动驾驶、交通安全监控、智能交通系统、驾驶员辅助系统和城市规划等领域都有广泛应用的潜力数据集说明&#xff1a;交通标志识别数据集&#xff0c;真实场景的高质量图片数据&#xff0c;数据场景丰富&#xff0c;含有交通标识3类…

使用Streamlit创建AutoGen用户界面

AutoGen作为一个最大化LLM(如GPT-4)能力的框架而脱颖而出。由微软研究院开发的AutoGen通过提供一种自动化、优化和编排工作流的方法&#xff0c;简化了复杂的、基于多代理llm的应用程序的创建。我们在以前的文章中也有过介绍&#xff0c;你可以与许多GPT交谈&#xff0c;并且GP…

GPU推理提速4倍!FlashDecoding++技术加速大模型推理

推理大模型&#xff08;LLM&#xff09;是AI服务提供商面临的巨大经济挑战之一&#xff0c;因为运营这些模型的成本非常高。FlashDecoding 是一种新的技术&#xff0c;旨在解决这一问题&#xff0c;它通过提高LLM推理速度和降低成本&#xff0c;为使用大模型赚钱提供了新的可能…

从F5 BIG-IP RCE漏洞(CVE-2023-46747)来看请求走私的利用价值

0x01 前言 F5 BIG-IP广域流量管理器是一种网络流量管理设备&#xff0c;用于提升链路性能与可用性。F5在金融行业具有特别广泛的使用量&#xff0c;做过各大银行攻防演练的小伙伴对这个系统应该不会陌生。 最近爆出的CVE-2023-46747漏洞能达到远程RCE的效果&#xff0c;属于严重…

浅谈消防设备电源监控系统在大型建筑内的应用

【摘要】&#xff1a;当建筑内火灾发生时&#xff0c;各类消防设备能否正常运行、能否发挥作用是初期火灾扑救是否成功的重要条件之一&#xff0c;而稳定可靠的消防设备电源则是消防设备正常工作的保障。因此针对消防设备电源的监测系统至关重要。 【关键词】&#xff1a;消防…

Python 既是解释型语言,也是编译型语言

哈喽大家好&#xff0c;我是咸鱼 不知道有没有小伙伴跟我一样&#xff0c;刚开始学习 Python 的时候都听说过 Python 是一种解释型语言&#xff0c;因为它在运行的时候会逐行解释并执行&#xff0c;而 C 这种是编译型语言 不过我今天看到了一篇文章&#xff0c;作者提出 Pytho…

5G与物联网应用:新一代网络技术融合开创新时代

5G与物联网应用&#xff1a;新一代网络技术融合开创新时代 随着信息技术的不断演进&#xff0c;5G和物联网作为新一代网络技术&#xff0c;正在引领我们走向一个更加智能化、互联互通的新时代。本文将分析5G与物联网应用的技术原理、应用场景与发展趋势&#xff0c;并探讨它们…

使用 matlab 的 Robotics ToolBox 完成5自由雄克机械臂的建模与运动学仿真,并计算8个点的运动轨迹,绘制运动动画

机器人包含5个关节&#xff0c;建立以下的DH参数表 matlab代码 %机器人学导论仿真大作业&#xff08;RTB&#xff09; clear clc h figure; axis tight manual filename SchunkRobot_Simulation.gif;%Schunk机械臂参数的输入 L10.35; L20.305; L30.3;%DH参数建立 Joint1 L…

TextMate v2.0.23(文本编辑器)

Mac上好用的文本编辑器是哪个&#xff1f;TextMate 2 mac版是Macos上一款文本编辑器&#xff0c;支持大量编程语言并作为开源开发。该软件与“BBEdit”并成为苹果电脑上的EMACS和vim&#xff0c;对于程序员来说非常的适合&#xff0c;可以定制许多贴心的功能。为专业脚本编写者…

计算一棵二叉树的单分支数(c语言代码实现)

本题代码如下 int num(tree t) {if (!t)return 0;else if ((t->lchild && t->rchildNULL)|| (t->lchildNULL&& t->rchild))//计算单支树return num(t->lchild) num(t->rchild) 1;else return num(t->lchild) num(t->rchild); } 完…

自制数据集:点云变化

代码 在干净的点云数据集中加入噪声时&#xff0c;由于不同点云的尺寸不同&#xff0c;很难控制噪声的幅度。为此&#xff0c;需要将所有点云变换到 [ − 0.5 , 0.5 ] 3 [-0.5,0.5]^3 [−0.5,0.5]3的空间当中。下面是一种将点云数据集中的所有点云变换到 [ − 0.5 , 0.5 ] 3 […

git命令行操作

git remote update origin --prune 更新本地的git分支保持和远程分支一致 git clone -b develop XXX 拉取某个分支的代码 1、创建一个空文件夹&#xff0c;在其中打开Git Bash Here&#xff0c;输入&#xff1a; git clone 刚刚复制的粘贴过来&#xff0c;回车 2、打开你拉下…

ArcGIS Pro设置谷歌影像(无水印)

1 打开软件&#xff0c;命名工程文件&#xff0c;底图&#xff08;Basemap&#xff09;选择【天地图】。 2 点击【视图&#xff08;View&#xff09;】——>【目录面板&#xff08;Catalog pane&#xff09;】&#xff0c;在【门户&#xff08;Portal&#xff09;】中搜索【…

20231107-前端学习炫酷菜单效果和折叠侧边栏

炫酷菜单效果 代码 <!DOCTYPE html> <html lang"en"><head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0"><title>炫酷菜单效果</title><…