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

本示例使用设备介绍: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

 

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

Kubernetes实战(四)-部署docker harbor私有仓库

1 Docker原生私有仓库Registry 1.1 原生私有仓库Registry概述 Docker的仓库主要分两类&#xff1a; 私有仓库公有仓库 共有仓库只要在官方注册用户&#xff0c;登录即可使用。但对于仓库的使用&#xff0c;企业还是会有自己的专属镜像&#xff0c;所以私有库的搭建也是很有…

数字化广告运营,小迈科技的关键一步

数据驱动广告运营是小迈科技提升整体经营效率、构建竞争优势的重要选择。 截止目前&#xff0c;小迈科技已经完成了数据驱动的广告运营体系的搭建&#xff0c;并通过与神策数据的深入合作&#xff0c;借力神策客户旅程分析平台&#xff0c;在广告投放、运营活动等各个环节实现了…

网络安全从业者用于学习和了解可以访问的顶级黑客论坛

黑客论坛目前已经成为了网络犯罪者的数字聚集地。在这些论坛上我们可以看见最新的数据泄露事件,软件的漏洞,以及黑客教程。下面我将向大家分享目前还可以访问的顶级黑客论坛,网络安全从业者用于学习和了解。 1.XSS.is(俄罗斯黑客论坛) 推出时间:2013年,2018年9月重新推出…

Jdk 1.8 for mac 详细安装教程(含版本切换)

Jdk 1.8 for mac 详细安装教程&#xff08;含版本切换&#xff09; 官网下载链接 https://www.oracle.com/cn/java/technologies/downloads/#java8-mac 一、选择我们需要安装的jdk版本&#xff0c;这里以jdk8为例&#xff0c;下载 macOS 版本&#xff0c;M芯片下载ARM64版本…

centos7安装docker容器

卸载老版本&#xff1a; $ sudo yum remove docker \docker-client \docker-client-latest \docker-common \docker-latest \docker-latest-logrotate \docker-logrotate \docker-engine/var/lib/docker/路径下存在镜像、数据卷、容器等&#xff0c;在卸载的时候是不会自动删除…

不同规模的企业如何借助宁盾LDAP统一用户认证实现安全和效率需求?

中小企业要解决安全和业务效率问题&#xff0c;须提前规划软件基础设施&#xff0c;其中最基础的部分是建立统一账号和统一用户身份认证体系。这个体系相当于在软件系统之间建立了一套统一的身份标准&#xff0c;基于这套标准创建的账号让员工方便、高效地访问公司内的大部分软…

【解密ChatGPT】:从过去到未来,揭示其发展与变革

&#x1f38a;专栏【ChatGPT】 &#x1f33a;每日一句&#xff1a;天行健,君子以自强不息,地势坤,君子以厚德载物 ⭐欢迎并且感谢大家指出我的问题 文章目录 一、ChatGPT的发展历程 二、ChatGPT的技术原理 三、ChatGPT的应用场景 四、ChatGPT的未来趋势 五、总结 引言:随着…

基于SSM的高校疫情防控出入信息管理系统(有报告)。Javaee项目。

演示视频&#xff1a; 基于SSM的高校疫情防控出入信息管理系统&#xff08;有报告&#xff09;。Javaee项目。 项目介绍&#xff1a; 采用M&#xff08;model&#xff09;V&#xff08;view&#xff09;C&#xff08;controller&#xff09;三层体系结构&#xff0c;通过Sprin…

三天打鱼两天晒网

文章目录 前言一、题目描述 二、题目分析 三、解题 程序运行代码 前言 本系列为选择结构编程题&#xff0c;点滴成长&#xff0c;一起逆袭。 一、题目描述 二、题目分析 三、解题 程序运行代码 #include<stdio.h> int main(){int n;scanf("%d",&n);i…

开发常用的 3种 API 监控报告- Eolink Apikit

API 监控报告是一种监测 API 异常的工具。在 API 管理中&#xff0c;查看 API 异常监控的监控报告&#xff0c;是 Eolink Apikit 常用的功能。Eolink Apikit 的监控报告有3种&#xff1a; 单接口监控报告 流程监控报告 项目监控报告 1、单接口监控报告 单接口监控报告通常关…

jira Licenses更新步骤

有时候我们不想花钱使用jira,那么只有通过一个月以续期的方式来使用jira。下面提供下自己实测的方式 1、获取License Key 登录地址&#xff1a;https://my.atlassian.com 登录自己的Google账号&#xff0c;进入到下面账号&#xff0c;然后点击“New Trial License” product上…

C/C++轻量级并发TCP服务器框架Zinx-游戏服务器开发004:游戏核心消息处理 - 玩家类的实现

文章目录 0 代码仓库1 需求2 AOI设计2.1 AOI算法简介2.2 AOI数据结构及实现2.2.1 玩家2.2.2 网格对象2.2.3 游戏世界矩形2.2.4 获取周围玩家的实现2.2.5 代码测试 2.3 GameRole结合AOI创建玩家2.3.1 创建游戏世界全局对象-GameRole继承AOIWorld的Player2.3.2 把玩家到游戏世界的…

聊聊MySQL中的死锁

欢迎关注微信公众号&#xff1a;互联网全栈架构 死锁是指两个或者多个事务互相持有对方所需的资源&#xff0c;从而导致它们都无法继续执行的情况。下图是一个死锁的示例&#xff0c;事务1锁住了id1的数据&#xff08;比如更新id1的数据记录&#xff09;&#xff0c;同时请求锁…

【数据结构】树与二叉树(一):树(森林)的基本概念:父亲、儿子、兄弟、后裔、祖先、度、叶子结点、分支结点、结点的层数、路径、路径长度、结点的深度、树的深度

文章目录 5.1 树的基本概念5.1.1 树的定义树有序树、无序树 5.1.2 森林的定义5.1.3 树的术语1. 父亲&#xff08;parent&#xff09;、儿子&#xff08;child&#xff09;、兄弟&#xff08;sibling&#xff09;、后裔&#xff08;descendant&#xff09;、祖先&#xff08;anc…

虚幻5.3打包Windows失败

缺失UnrealGame二进制文件。 必须使用集成开发环境编译该UE项目。或者借助虚幻编译工具使用命令行命令进行编译 解决办法&#xff1a; 1.依次点击平台-项目启动程序 2.点击后面的按钮进行设置 3.稍等后&#xff0c;打包后的程序即可运行&#xff0c;之后就可以愉快的打包了

win 命令替代鼠标的操作

操作方式都是在 winR 输入框输入或者终端输入 1、快速打开 控制面板 运行control 2、快速打开 电源选项 运行powercfg.cpl 3、快速打开 网络连接 运行ncpa.cpl 4、快速打开 程序和功能 运行appwiz.cpl 5、快速打开 Windows Defender防火墙 运行Firewall.cpl 6、快速打开 鼠标 …

麒麟系统rsync备份数据

第一步设置两台机器之间免密登录 在主机A 使用root用户生成配对密钥 ssh-keygen -t rsa 遇到提示回车默认即可&#xff0c;公钥被存放在用户目录下.ssh 如root用户下 即/root/.ssh/id_rsa.pub就是公钥 将主机A中 /root/.ssh/id_rsa.pub复制到主机B中.ssh 目录并改名auth…

qt+opengl 三维坐标系(三)

文章目录 前言一、深度测和投影矩阵、观察矩阵二、绘制坐标系三、添加箭头四、添加文字五、放大缩小六、旋转七、移动八、完整代码总结 前言 效果如图 一、深度测和投影矩阵、观察矩阵 这部分不明白&#xff0c;网上查的都是这个步骤&#xff0c;用起来也没问题。 void MOp…

3.29每日一题(微分方程的几何应用题:重点考察)

1、画图&#xff0c;把题目中的条件标出来 2、通过题目中的条件设出正确的微分方程&#xff08;解题的关键&#xff09; 注&#xff1a;用点斜式设方程的时候&#xff0c;注意Y - y y&#xff08;X - x&#xff09;中&#xff08;x&#xff0c;y&#xff09;为曲边上的动点&a…

jenkins Java heap space

jenkins Java heap space&#xff0c;是内存不够。 两个解决方案&#xff1a; 一&#xff0c;修改配置文件 windows系统中&#xff0c;找到Jenkins的安装路径&#xff0c; 修改jenkins.xml 将 -Xmx256m 改为 -Xmx1024m 或者更大 重启jenkins服务。 二&#xff0c;jenkins增…