用 Python Turtle 绘制经典汤姆猫:重温卡通角色的经典魅力

news2024/12/17 22:48:18

用 Python Turtle 绘制经典汤姆猫:重温卡通角色的经典魅力

  • 🐸 前言 🐸
  • 🐞往期绘画>>点击进所有绘画🐞
  • 🐋 效果图 🐋
  • 🐉 代码 🐉

🐸 前言 🐸

汤姆猫,这个陪伴了无数人童年的经典卡通角色,凭借着他那滑稽又机智的性格,深深印刻在了我们的记忆中。从追逐杰瑞的紧张场面到他那笨拙却又充满魅力的形象,汤姆猫一直是卡通世界的明星。在今天的教程中,我们将利用 Python 的 Turtle 模块来绘制出一个经典的 汤姆猫 形象,展现他的独特风采。
虽然汤姆猫的形象看似简单,但要通过编程来精确地呈现出他的细节和神态,仍然是一个有趣的挑战。在这个过程中,我们不仅可以通过绘图掌握 Turtle 的基本操作,还能体验到将动画角色转化为代码的乐趣。

🐞往期绘画>>点击进所有绘画🐞

序号链接
01🦖用 Python 与 Turtle 创作属于你的“冰墩墩”!🦖
02🦖用 Python 与 Turtle 创作属于你的“雪容融”!🦖
03🦖百变小樱魔法阵全解析🦖
04🦖魔法少女全解析🦖
05🦖重现汤姆劈树的经典瞬间🦖
06🐿️喜羊羊与灰太狼之喜羊羊绘画🐿️
07🐿️喜羊羊与灰太狼之懒羊羊绘画🐿️
08🐿️喜羊羊与灰太狼之沸羊羊翻身🐿️
09🐿️神奇宝贝🐿️
10⏰Q 版蜘蛛侠:代码里的超级英雄⏰
11⏰经典汤姆猫:重温卡通角色的经典魅力⏰
12⏰经典杰瑞鼠:捕捉卡通世界中的小聪明⏰
13⏰罗小黑:用代码呈现可爱与奇幻的萌宠⏰
14🎃麻衣学姐:从代码中描绘温柔的学姐形象🎃
15🎃小猪佩奇的涂鸦乐园🎃
16💥💥更多点击💥💥

🐋 效果图 🐋

在这里插入图片描述

🐉 代码 🐉

# coding=gbk

import turtle

def plotLine(points, pencolor=None, width=None, speed=None):
    '''
    功能:画折线
    参数:
    - points : 一系列点,用列表或元组表示
    - pencolor : 画笔颜色,默认不变
    - width : 画笔宽度,默认不变
    - speed : 绘制速度,默认不变
    '''
    # 记录旧参数
    oldpencolor = turtle.pencolor()
    oldwidth = turtle.width()
    oldspeed = turtle.speed()

    # 修改新参数
    if pencolor is not None:
        turtle.pencolor(pencolor)
    if width is not None:
        turtle.width(width)
    if speed is not None:
        turtle.speed(speed)
    
    # 绘制折线
    turtle.up()
    turtle.goto(points[0])
    turtle.down()
    for point in points[1:]:
        turtle.goto(point)
    
    # 恢复旧参数
    turtle.pencolor(oldpencolor)
    turtle.width(oldwidth)
    turtle.speed(oldspeed)


def plotPoly(points, fill=False, pencolor=None, fillcolor=None,
             width=None, speed=None):
    '''
    功能:绘制封闭多边形
    '''
    # 保存旧参数
    oldfillcolor = turtle.fillcolor()

    # 更新新参数
    if fillcolor is not None:
        turtle.fillcolor(fillcolor)

    # 绘制封闭多边形
    points_plotline = list(points) + [points[0]]
    if fill:
        turtle.begin_fill()
        plotLine(points_plotline, pencolor, width, speed)
        turtle.end_fill()
    else:
        plotLine(points_plotline, pencolor, width, speed)

    # 恢复旧参数
    turtle.fillcolor(oldfillcolor)

# 设置一些参数
turtle.setup(452, 680, 100, 100)

# 绘制

points = [
    (8, 275), (6, 268), (4, 261), (1, 253), (1, 247), 
    (-7, 245), (-14, 243), (-22, 240), (-30, 236), (-34, 233), 
    (-39, 229), (-43, 223), (-46, 217), (-48, 212), (-50, 205), 
    (-51, 199), (-52, 195), (-64, 195), (-68, 194), (-73, 190), 
    (-74, 187), (-74, 177), (-72, 172), (-69, 167), (-68, 163), 
    (-65, 159), (-62, 155), (-58, 149), (-55, 144), (-53, 140), 
    (-50, 132), (-47, 129), (-37, 129), (-32, 125), (-27, 121), 
    (-26, 119), (-26, 115), (-30, 112), (-34, 108), (-37, 102), 
    (-40, 95), (-41, 81), (-44, 76), (-47, 70), (-49, 63), 
    (-52, 56), (-53, 48), (-54, 42), (-57, 35), (-58, 27), 
    (-59, 23), (-80, 24), (-88, 20), (-93, 14), (-96, 2), 
    (-98, -8), (-100, -25), (-101, -35), (-103, -41), (-104, -50), 
    (-103, -59), (-97, -64), (-91, -65), (-84, -72), (-72, -71), 
    (-64, -67), (-59, -66), (-59, -66), (-58, -76), (-57, -87), 
    (-79, -108), (-88, -122), (-91, -130), (-91, -130), (-90, -141), 
    (-90, -141), (-87, -147), (-82, -153), (-76, -159), (-93, -161), 
    (-103, -163), (-117, -158), (-124, -160), (-133, -166), (-144, -177), 
    (-143, -191), (-141, -197), (-136, -203), (-128, -204), (-123, -205), 
    (-123, -205), (-115, -209), (-112, -211), (-102, -212), (-95, -208), 
    (-73, -199), (-63, -196), (-38, -194), (-31, -196), (-22, -197), 
    (-15, -192), (-16, -185), (-17, -181), (-27, -170), (-39, -149), 
    (-37, -147), (-26, -144), (-4, -143), (37, -158), (19, -177), 
    (14, -179), (7, -188), (4, -193), (6, -200), (14, -204), 
    (36, -212), (67, -227), (75, -234), (78, -241), (84, -245), 
    (93, -248), (104, -246), (113, -242), (123, -237), (133, -229), 
    (135, -219), (134, -204), (127, -199), (113, -197), (109, -198), 
    (99, -192), (88, -189), (75, -185), (62, -185), (63, -182), 
    (89, -164), (90, -160), (90, -150), (86, -139), (72, -115), 
    (68, -107), (68, -98), (76, -91), (91, -62), (96, -54), 
    (104, -26), (112, -10), (120, 1), (129, 10), (140, 15), 
    (153, 20), (136, 23), (120, 22), (108, 17), (91, 4), 
    (80, -10), (71, -23), (67, -33), (55, -47), (45, -36), 
    (38, -19), (56, -18), (63, -15), (70, -9), (73, -3), 
    (71, 26), (64, 52), (57, 71), (49, 86), (39, 102), 
    (28, 116), (23, 119), (19, 120), (21, 125), (27, 130), 
    (42, 131), (51, 130), (45, 136), (41, 138), (48, 140), 
    (55, 137), (62, 132), (65, 130), (66, 139), (64, 150), 
    (59, 169), (65, 169), (74, 175), (83, 184), (90, 194), 
    (97, 209), (102, 217), (109, 225), (115, 229), (110, 233), 
    (102, 236), (86, 240), (63, 240), (46, 235), (39, 241), 
    (35, 248), (32, 254), (31, 248), (32, 243), (29, 249), 
    (25, 258), (21, 263), (16, 268), (13, 271), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.33, 0.39, 0.45), width=2)

points = [
    (-67, 181), (-67, 181), (-67, 176), (-67, 176), (-68, 167), 
    (-68, 167), (-63, 156), (-63, 156), (-54, 144), (-54, 144), 
    (-52, 134), (-46, 129), (-37, 130), (-34, 128), (-27, 127), 
    (-20, 129), (-11, 134), (-3, 140), (3, 147), (8, 154), 
    (-4, 155), (-11, 157), (-16, 160), (-20, 165), (-22, 171), 
    (-20, 177), (-16, 183), (-9, 187), (-5, 199), (-1, 208), 
    (-1, 220), (-7, 225), (-13, 223), (-17, 219), (-19, 221), 
    (-21, 222), (-23, 228), (-27, 228), (-30, 225), (-35, 223), 
    (-35, 228), (-38, 228), (-41, 225), (-45, 221), (-48, 214), 
    (-50, 207), (-52, 196), (-51, 192), (-51, 186), (-58, 186), 
    (-64, 184), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.85, 0.8, 0.82), width=2)

turtle.up()
turtle.goto((-46, 140))
turtle.down()
turtle.pencolor((0.32, 0.24, 0.26))
turtle.dot(9)

points = [
    (-51, 167), (-47, 170), (-44, 174), (-39, 176), (-42, 180), 
    (-46, 182), (-49, 182), (-54, 181), (-57, 179), (-58, 176), 
    (-56, 171), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.08, 0.09, 0.09), width=2)

turtle.up()
turtle.goto((-51, 178))
turtle.down()
turtle.pencolor((1, 1, 1))
turtle.dot(5)

points = [
    (-21, 214), (-17, 220), (-11, 223), (-7, 224), (-3, 222), 
    (-1, 218), (-2, 208), (-4, 200), (-6, 194), (-8, 188), 
    (-11, 185), (-16, 182), (-19, 179), (-22, 175), (-25, 177), 
    (-29, 179), (-32, 180), (-31, 184), (-30, 190), (-29, 198), 
    (-27, 204), (-23, 210), (-20, 216), (-15, 221), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.93, 0.84, 0.3), width=2)

# 右眼
points = [
    (-40, 226), (-44, 220), (-47, 215), (-49, 210), (-51, 203), 
    (-52, 195), (-51, 189), (-51, 186), (-45, 185), (-43, 191), 
    (-41, 196), (-40, 199), (-38, 207), (-36, 213), (-35, 219), 
    (-35, 226), (-38, 228), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.91, 0.86, 0.29), width=2)

points = [
    (-49, 210), (-46, 211), (-43, 211), (-43, 208), (-43, 205), 
    (-44, 201), (-45, 198), (-46, 195), (-48, 193), (-51, 194), 
    (-51, 197), (-51, 200), (-50, 204), (-49, 207), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.05, 0.09, 0.06), width=2)

# 左眼
points = [
    (-24, 207), (-20, 207), (-18, 205), (-17, 198), (-19, 193), 
    (-20, 188), (-22, 185), (-23, 183), (-26, 183), (-29, 186), 
    (-29, 191), (-29, 198), (-27, 202), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.09, 0.09, 0.05), width=2)

# 双眼之间
points = [
    (-34, 223), (-30, 223), (-28, 227), (-24, 228), (-22, 227), 
    (-22, 224), (-22, 222), (-19, 222), (-16, 221), (-19, 218), 
    (-22, 213), (-24, 210), (-26, 205), (-28, 202), (-29, 199), 
    (-30, 194), (-31, 190), (-31, 185), (-33, 182), (-36, 185), 
    (-41, 185), (-44, 184), (-43, 190), (-42, 194), (-39, 200), 
    (-38, 205), (-36, 212), (-35, 218), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.63, 0.62, 0.58), width=2)



# 胡子
points = [
    (-62, 180), (-73, 187), (-81, 190), (-91, 193), (-102, 195), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (-63, 176), (-78, 175), (-86, 174), (-94, 173), (-100, 172), 
    (-105, 171), (-110, 170), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (-30, 173), (-17, 177), (-4, 179), (6, 181), (20, 180), 
    (31, 181), (38, 180), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (-30, 165), (-15, 165), (-4, 161), (7, 158), (16, 155), 
    (26, 150), (34, 146), (42, 143), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

# 眉毛
points = [
    (-33, 234), (-30, 237), (-27, 238), (-26, 237), (-25, 236), 
    (-24, 235), (-26, 235), (-28, 235), (-30, 235), (-31, 235), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.25, 0.25, 0.27), width=2)

points = [
    (-11, 231), (-9, 234), (-5, 236), (1, 236), (4, 235), 
    (7, 233), (9, 231), (10, 229), (11, 225), (11, 223), 
    (11, 219), (10, 216), (8, 220), (7, 223), (5, 227), 
    (4, 229), (2, 231), (-2, 231), (-6, 231), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.1, 0.13, 0.14), width=2)

points = [
    (9, 245), (-1, 251), (-9, 254), (-16, 255), (-26, 256), 
    (-16, 256), (-7, 255), (0, 253), (5, 251), (17, 247), 
    (13, 252), (7, 258), (2, 262), (-5, 265), (-16, 269), 
    (-7, 267), (0, 264), (5, 263), (11, 261), (17, 257), 
    (22, 254), (27, 250), (29, 246), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (114, 229), (108, 233), (99, 234), (89, 235), (79, 234), 
    (71, 232), (62, 228), (56, 223), (51, 217), (49, 212), 
    (50, 204), (53, 199), (60, 197), (65, 199), (69, 202), 
    (69, 199), (65, 197), (68, 193), (65, 192), (62, 193), 
    (59, 192), (55, 190), (56, 186), (56, 182), (56, 177), 
    (58, 173), (61, 171), (65, 170), (71, 173), (77, 178), 
    (84, 186), (88, 193), (92, 203), (97, 211), (102, 216), 
    (107, 224), (110, 227), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.72, 0.45, 0.54), width=2)

points = [
    (-31, 66), (-31, 74), (-36, 79), (-42, 79), (-45, 72), 
    (-48, 65), (-50, 57), (-52, 51), (-56, 42), (-58, 30), 
    (-60, 18), (-61, 6), (-62, -9), (-62, -17), (-62, -28), 
    (-62, -39), (-61, -58), (-60, -71), (-57, -87), (-51, -104), 
    (-45, -117), (-38, -125), (-28, -133), (-12, -137), (3, -134), 
    (17, -131), (26, -124), (32, -101), (22, -76), (14, -57), 
    (5, -42), (0, -27), (-3, -8), (-3, 12), (-2, 27), 
    (-1, 36), (1, 49), (-2, 64), (-15, 76), (-20, 76), 
    (-26, 73), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.62, 0.59, 0.62), width=2)

points = [
    (-68, 24), (-78, 25), (-85, 21), (-89, 18), (-93, 13), 
    (-95, 6), (-96, 0), (-98, -13), (-101, -31), (-101, -36), 
    (-103, -38), (-103, -46), (-103, -52), (-102, -59), (-98, -64), 
    (-92, -65), (-85, -71), (-79, -72), (-71, -72), (-66, -68), 
    (-60, -66), (-61, -52), (-62, -39), (-62, -29), (-63, -18), 
    (-63, -8), (-61, 5), (-60, 15), (-59, 24), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.85, 0.8, 0.82), width=2)

points = [
    (-12, 33), (-21, 33), (-32, 34), (-39, 29), (-44, 23), 
    (-47, 13), (-49, 5), (-50, -5), (-50, -14), (-50, -23), 
    (-52, -27), (-55, -36), (-58, -45), (-57, -55), (-49, -62), 
    (-40, -62), (-35, -68), (-28, -71), (-21, -69), (-16, -66), 
    (-15, -63), (-5, -63), (1, -61), (4, -58), (7, -52), 
    (6, -38), (2, -31), (-7, -29), (-6, -20), (-6, -12), 
    (-5, -4), (-6, 7), (-8, 11), (-4, 16), (-8, 20), 
    (-12, 22), (-9, 26), (-10, 31), (-12, 32), (-18, 33), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.85, 0.8, 0.82), width=2)

points = [
    (-66, 24), (-59, 24), (-60, 20), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.55, 0.55, 0.56), width=2)

points = [
    (-66, 13), (-63, 16), (-61, 16), (-61, 10), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.4, 0.39, 0.4), width=2)

points = [
    (-11, 33), (-8, 27), (-13, 24), (-5, 19), (-4, 13), 
    (-8, 12), (-5, 3), (-2, -4), (0, 2), (1, 10), 
    (1, 18), (3, 27), 
    ]
plotPoly(points, True, pencolor=(0.34, 0.38, 0.45),
         fillcolor=(0.34, 0.38, 0.45), width=2)

points = [
    (45, 30), (35, 32), (26, 32), (16, 32), (6, 32), 
    (-11, 33), (-9, 30), (-9, 26), (-13, 24), (-9, 21), 
    (-5, 19), (-3, 16), (-5, 14), (-9, 12), (-6, 8), 
    (-5, 2), (-2, -5), (3, -7), (10, -10), (17, -12), 
    (26, -15), (32, -17), (39, -18), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (14, 54), (17, 46), (20, 40), (22, 36), (23, 32), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (-98, -41), (-100, -36), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (-93, -52), (-92, -58), (-91, -64), (-89, -66), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (-77, -51), (-76, -57), (-73, -62), (-68, -65), (-65, -67), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (-45, -47), (-44, -53), (-43, -58), (-41, -63), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (-28, -48), (-25, -55), (-20, -59), (-15, -62), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (-143, -179), (-140, -174), (-136, -169), (-130, -165), (-126, -162), 
    (-121, -159), (-113, -159), (-106, -160), (-103, -164), (-98, -163), 
    (-93, -162), (-85, -161), (-75, -161), (-71, -161), (-68, -165), 
    (-64, -169), (-59, -172), (-55, -177), (-50, -183), (-50, -179), 
    (-49, -177), (-44, -179), (-45, -175), (-46, -172), (-47, -168), 
    (-44, -167), (-40, -168), (-33, -173), (-35, -168), (-34, -166), 
    (-31, -166), (-28, -169), (-25, -172), (-23, -175), (-19, -180), 
    (-15, -185), (-15, -191), (-20, -196), (-23, -197), (-29, -197), 
    (-32, -196), (-35, -194), (-40, -194), (-59, -194), (-64, -195), 
    (-71, -198), (-77, -199), (-84, -202), (-90, -204), (-95, -208), 
    (-103, -210), (-112, -210), (-118, -208), (-123, -205), (-126, -204), 
    (-135, -203), (-140, -198), (-142, -193), (-143, -186), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.85, 0.8, 0.82), width=2)

points = [
    (20, -177), (25, -176), (29, -176), (25, -182), (31, -178), 
    (38, -178), (40, -180), (37, -184), (34, -187), (32, -189), 
    (39, -187), (41, -189), (39, -192), (38, -196), (44, -194), 
    (48, -191), (53, -190), (59, -187), (70, -186), (81, -186), 
    (90, -189), (98, -192), (105, -194), (108, -197), (118, -195), 
    (125, -198), (129, -200), (133, -204), (135, -209), (135, -217), 
    (133, -227), (130, -231), (125, -235), (120, -238), (115, -240), 
    (108, -245), (101, -247), (96, -247), (86, -247), (80, -243), 
    (79, -241), (73, -234), (70, -230), (63, -227), (56, -222), 
    (43, -217), (28, -211), (18, -207), (10, -203), (5, -196), 
    (7, -188), (12, -183), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.84, 0.8, 0.82), width=2)



points = [
    (-135, -167), (-130, -166), (-125, -166), (-117, -166), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (-124, -204), (-127, -199), (-128, -194), (-126, -189), (-124, -184), 
    (-118, -181), (-110, -178), (-98, -178), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (101, -216), (108, -218), (111, -221), (114, -225), (116, -229), 
    (115, -234), (113, -238), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (124, -206), (130, -209), (133, -214), (134, -220), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (80, -10), (83, -13), (87, -13), (91, -9), (94, -7), 
    (92, -12), (91, -17), (91, -20), (93, -23), (96, -21), 
    (99, -17), (100, -20), (100, -23), (100, -25), (103, -23), 
    (106, -21), (106, -23), (108, -19), (110, -14), (114, -8), 
    (117, -3), (122, 3), (130, 10), (137, 15), (142, 17), 
    (148, 18), (154, 19), (152, 22), (145, 22), (136, 23), 
    (127, 23), (122, 22), (116, 19), (108, 16), (103, 13), 
    (97, 8), (92, 4), (87, 0), (83, -5), 
    ]
plotPoly(points, True, pencolor=(0.2, 0.2, 0.2),
         fillcolor=(0.85, 0.8, 0.82), width=2)

points = [
    (-24, 115), (-24, 114), (-24, 111), (-24, 109), (-25, 106), 
    (-25, 104), (-26, 101), (-26, 99), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

points = [
    (17, 121), (13, 120), (10, 118), (6, 115), (3, 111), 
    (2, 108), (1, 104), (1, 99), 
    ]
plotLine(points, pencolor=(0.2, 0.2, 0.2), width=2)

turtle.up()
turtle.goto((-47, 206))
turtle.down()
turtle.pencolor((1, 1, 1))
turtle.dot(5)

turtle.up()
turtle.goto((-24, 201))
turtle.down()
turtle.pencolor((1, 1, 1))
turtle.dot(5)


# 隐藏海龟
turtle.hideturtle()
turtle.done()

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

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

相关文章

RabbitMQ个人理解与基本使用

目录 一. 作用: 二. RabbitMQ的5中队列模式: 1. 简单模式 2. Work模式 3. 发布/订阅模式 4. 路由模式 5. 主题模式 三. 消息持久化: 消息过期时间 ACK应答 四. 同步接收和异步接收: 应用场景 五. 基本使用 &#xff…

Y3编辑器文档4:触发器1(界面及使用简介、变量作用域、入门案例)

文章目录 一、触发器简介1.1 触发器界面1.2 ECA语句编辑及快捷键1.3 参数设置1.4 变量设置1.5 实体触发器1.6 触发器复用 二、触发器的多层结构2.1 子触发器(在游戏内对新的事件进行注册)2.2 触发器变量作用域 三、入门案例3.1 使用触发器实现瞬间移动3.…

【DBeaver】连接带kerberos的hive[Apache|HDP]

目录 一、安装配置Kerberos客户端环境 1.1 安装Kerberos客户端 1.2 环境配置 二、基于Cloudera驱动创建连接 三、基于Hive原生驱动创建连接 一、安装配置Kerberos客户端环境 1.1 安装Kerberos客户端 在Kerberos官网下载,地址如下:https://web.mit.edu/kerberos…

bug:uniapp运行到微信开发者工具 白屏 页面空白

1、没有报错信息 2、预览和真机调试都能正常显示,说明代码没错 3、微信开发者工具版本已经是win7能装的最高版本了,1.05版 链接 不打算回滚旧版本 4、解决:最后改调试基础库为2.25.4解决了,使用更高版本的都会报错,所…

【前端】JavaScript自定义 forEach方法详解与原理分析

博客主页: [小ᶻ☡꙳ᵃⁱᵍᶜ꙳] 本文专栏: 前端 文章目录 💯前言💯题目演示与效果演示代码控制台输出结果 💯代码分析与源理解释1. 构造函数 Brray2. 实例化 Brray3. 调用自定义的 forEach 💯比较与拓展1. 比较原…

基于卷积神经网络的Caser算法

将一段交互序列嵌入到一个以时间为纵轴的平面空间中形成“一张图”后,基于卷积序列嵌入的推荐(Caser)算法利用多个不同大小的卷积滤波器,来捕捉序列中物品间的点级(point-level)、联合的(union-…

挑战一个月基本掌握C++(第三天)了解注释、数据类型、变量

一 C注释 程序的注释是解释性语句,您可以在 C 代码中包含注释,这将提高源代码的可读性。所有的编程语言都允许某种形式的注释。 C 支持单行注释和多行注释。注释中的所有字符会被 C 编译器忽略。 C 注释一般有两种: // - 一般用于单行注释…

211-基于FMC的1路1.5G ADC 1路 2.5G DAC子卡

一、板卡概述 FMC-1AD-1DA-1SYNC是我司自主研发的一款1路1G AD采集、1路2.5G DA回放的FMC、1路AD同步信号子卡。板卡采用标准FMC子卡架构,可方便地与其他FMC板卡实现高速互联,可广泛用于高频模拟信号采集等领域。 二、功能介绍 2.1 原理框图 2.2 硬件…

Cloudlog 电台日志系统 request_form SQL注入漏洞复现

0x01 产品简介 Cloudlog 是一个自托管的 PHP 应用程序,可让您在任何地方记录您的业余无线电联系人。使用PHP和MySQL构建的基于Web的业余无线电记录应用程序支持从HF到微波的一般站记录任务。 0x02 漏洞概述 Cloudlog request_form 接口存在未授权SQL注入漏洞,未经身份验证…

Jenkins容器使用宿主机Docker(五)

DevOps之安装和配置 Jenkins (一) DevOps 之 CI/CD入门操作 (二) Sonar Qube介绍和安装(三) Harbor镜像仓库介绍&安装 (四) Jenkins容器使用宿主机Docker(五) Jenkins流水线初体验(六&#…

【大模型】LLaMA-2:Open Foundation and Fine-Tuned Chat Models, July. 2023.

论文:LLaMA-2:Open Foundation and Fine-Tuned Chat Models, July. 2023. 链接:https://arxiv.org/abs/2307.09288 Introduction 创新点 7B - 70B 预训练 微调 开源Llama 2 和Llama 2-Chat,针对对话用例进行了优化Motivation A…

Jmeter直连数据库,jar包下载

运行报错信息:jmeter连接mysql异常:Cannot load JDBC driver class ‘com.mysql.jdbc.Driver‘ 1、下载地址: https://mvnrepository.com/artifact/mysql/mysql-connector-java/ 2、将下载好的jar包 (我的是:mysql-con…

安全攻击平台介绍

目录 XSS攻击平台 Attack API BeEF XSS-Proxy 漏洞平台 cnvd 阿里云漏洞库 攻防演练平台 XCTF 攻防平台 零日靶场(0ops) 安恒靶场(赛宁安全) XSS攻击平台 XSS Payload如此强大,为了使用方便,有安…

webpack处理图片资源

过去在Webpack4时,我们处理图片资源通过file-loader和url-loader进行处理。 现在Webpack5已经将两个Loader功能内置到Webpack里了,我们只需要简单配置即可处理图片资源。 1. 配置 //webpack.config.js const path require("path");module.…

QT数据库(四):QSqlRelationalTableModel 类

关系数据库概念 例如下列departments、majors、studInfo 这 3 个数据表之间存在关系。 主键与外键 标记“**”的是主键字段,标记“*”的是外键字段。主键字段是一个数据表中表示记录唯一性的字段,例如 studInfo 数据表中的 studID 字段。外键字段是与其…

深入C语言文件操作:从库函数到系统调用

引言 文件操作是编程中不可或缺的一部分,尤其在C语言中,文件操作不仅是处理数据的基本手段,也是连接程序与外部世界的重要桥梁。C语言提供了丰富的库函数来处理文件,如 fopen、fclose、fread、fwrite 等。然而,这些库…

【HarmonyOS NEXT】ArkTs数据类型解析与使用

1. 背景 为什么设计ArkTS? 1.1 其它语言有版权【Java?Kotlin?】以及历史问题【Java内存?】 1.2 生态,可复用前端生态的三方库,兼容JS/TS语言生态ArkTs解决了JS/TS中的哪些问题? 2.1 **程序健壮性…

H5 scss 移动端的样式适配

在移动端样式的scss文件中,出现了这些变量 env() 与 constant() 设置安全区域,是css里IOS11新增的属性,webkit的css函数,用于设定安全区域与边界的距离,有4个预定义变量: safe-area-inset-left: 安全区域距…

YOLOv5与ViT目标检测中的热力图应用教程

文章目录 前言一、热力图介绍1、热力图应用说明2、热力图代码整体思路3、实验效果二、heatmap类解读三、GradCAM、GradCAMPlusPlus, GradCAM, XGradCAM, EigenCAM, HiResCAM, LayerCAM等类源码解读1、GradCAM类源码2、BaseCAM类源码解读1、BaseCAM源码2、forward函数源码解读ou…