​草莓熊python turtle绘图代码(玫瑰花版)附源代码

news2024/7/2 3:42:42

​草莓熊python turtle绘图代码(玫瑰花版)附源代码

目录

一、前言

二、草莓熊手持玫瑰花成品效果图

三、代码演示方法和代码命令解释

四、草莓熊手持的玫瑰花源代码

五、相关资源图片

六、我的“草莓熊python turtle绘图(玫瑰花版)”绘图源代码

七、草莓熊python turtle绘图(风车版)附源代码

逆境清醒 原创Python 绘图作品:


一、前言

    我(逆境清醒)博客中的代码是完整源代码,你从我博客拷贝代码后本机运行就能看到和我博客上同样的运行效果(只要我网络没有被全h)。我乐意分享,不需要你去关注任何账号,不强求任何人成为我的粉丝,也不需要你以任何形式购买源代码,只要你是个人学习用,或者通过我的代码能带给你身边的朋友开心快乐,我愿意为此尽一分力。

    请记住,不要从其他地方下载和购买我的绘图代码(包括可执行的exe文件,小心代码被篡改有病毒) 。我只有一个博客,就是CSDN的,逆境清醒的博客: https://blog.csdn.net/weixin_69553582

    另,请尊重作者原创的不易,转载请注明来源。代码里请保留作者相关的版权信息。这些不会影响代码展示效果。

二、草莓熊手持玫瑰花成品效果图

    上次我画草莓熊是手持风车版的,这次我画的草莓熊是手持玫瑰花的特别版,想送玫瑰花逗朋友开心的可以留意一下。

    如果你将草莓熊python动画送给你朋友时,他(她)喜欢,请在心里悄悄告诉我一声,让我也跟着开心一下。生活不易,我希望自己的努力和付出能带给别人真正的开心和快乐!虽然你我并不认识,虽然逆境清醒已经很笨,但我还是选择坚持做个单纯善良的人。

 来一张没有底图的,效果如下:

三、代码演示方法和代码命令解释

    将源代码完整拷贝,保存成:你的文件名.py   ,然后在python环境下运行。你会看到和我一样的草莓熊效果。

    代码的语法解释部分,可点击查看文章里的介绍:草莓熊python turtle绘图代码

四、草莓熊手持的玫瑰花源代码

    草莓熊手里的玫瑰花是我原创的玫瑰花,画了好久。。。是多层立体玫瑰,效果如图:

       请点击查看:立体多层玫瑰绘图源码__玫瑰花python 绘图源码集锦

五、相关资源图片

  “草莓熊手持玫瑰花”效果图里的底图如下,需要的可以下载。保存成:ditu3.gif,放在草莓熊代码的同一个目录里。

  如果你有自己喜欢的底图,可以将第19行的  “#t.bgpic("ditu3.gif")”  这句里的图片文件名替换成你自己的图片文件名,记得将注释的#符号取消。

六、我的“草莓熊python turtle绘图(玫瑰花版)”绘图源代码

#-*- coding: UTF-8 -*-
import turtle as t
 
"""
=================================================
@Project ->Adversity Awake 草莓熊系列
@类别     : 草莓熊->草莓熊之3
@Author  : 逆境清醒
@Date    : 2022/11/10 1:46
@Desc    :https://blog.csdn.net/weixin_69553582
=================================================
"""
# 设置背景颜色,窗口位置以及大小
 
t.colormode(255)# 颜色模式
t.speed(0)
t.screensize(850,760,"white")#画布大小背景颜色
t.setup(width=850, height=760,startx=None, starty=None) #绘图窗口的大小和起始坐标
#t.bgpic("ditu3.gif")
t.title("逆境清醒草莓熊!")#设置绘图窗口的标题
t.resizemode('noresize')  #大小调整模式:auto,user,noresize
t.tracer(1)   
 
 
 
 
def mlingpen(x, y):
    t.penup()
    t.goto(x, y)
    t.pendown()


def rose(): #rose
    t.seth(90)
    mlingpen(-225, -60)
    t.pensize(10)
    t.pencolor("#035025")
    t.circle(300,30)
    mlingpen(-240, 70)

    t.pensize(2)
    t.color("#000000", "#22ac38")
    t.seth(12)
    mlingpen(-235,40)
    t.lt(40)
    t.fd(50)
    t.begin_fill()
    t.circle(-150,30)
    t.circle(-2,140)
    t.circle(-150,43)
    t.up()
    t.end_fill()
    mlingpen(-235,40)
    t.lt(330)
    t.fd(50)
    t.begin_fill()
    t.circle(-150,30)
    t.circle(-2,140)
    t.circle(-150,43)
    t.up()
    t.end_fill()
    mlingpen(-235,40)
    t.lt(260)
    t.fd(50)
    t.begin_fill()
    t.circle(-150,30)
    t.circle(-2,140)
    t.circle(-150,43)
    t.up()
    t.end_fill()
    t.pensize(2)
    t.seth(12)
    mlingpen(-210,60)  
    t.begin_fill()
    t.color("#000000", "#f8c0c8")
    t.circle(50,150)
    t.rt(20)
    t.fd(40)
    t.rt(40)
    t.circle(15,130)
    t.fd(50)
    t.circle(15,80)
    t.up()
    t.end_fill()
    t.pensize(2)
    t.seth(12)
    mlingpen(-210,65)  
    t.begin_fill()
    t.color("#f5aab5", "#f5aab5")
    t.circle(34,150)
    t.rt(20)
    t.fd(30)
    t.rt(40)
    t.circle(10,130)
    t.fd(50)
    t.circle(15,80)
    t.up()
    t.end_fill()
    t.pensize(2)
    t.seth(12)
    mlingpen(-210,65)  
    t.begin_fill()
    t.color("#f198a5", "#f198a5")
    t.circle(30,150)
    t.rt(20)
    t.fd(30)
    t.rt(40)
    t.circle(10,130)
    t.fd(50)
    t.circle(15,80)
    t.up()
    t.end_fill()
    t.pensize(2)
    t.seth(12)
    mlingpen(-210,65)  
    t.begin_fill()
    t.color("#ee8998", "#ee8998")
    t.circle(20,150)
    t.rt(20)
    t.fd(30)
    t.rt(40)
    t.circle(10,130)
    t.fd(50)
    t.circle(15,80)
    t.up()
    t.end_fill()
    mlingpen(-220,80)  
    t.begin_fill()
    t.color("#e56e7f", "#e56e7f")
    t.circle(15,200)
    t.rt(20)
    t.fd(30)
    t.rt(40)
    t.circle(10,130)
    t.fd(50)
    t.circle(15,80)
    t.up()
    t.end_fill()
    t.seth(35)
    mlingpen(-230,90)  
    t.begin_fill()
    t.color("#000000", "#fda7b5")
    t.circle(50,50)
    t.rt(40)
    t.circle(25,200)
    t.up()
    t.end_fill()
    t.seth(130)
    mlingpen(-294.51,142.14)  
    t.begin_fill()
    t.color("#000000", "#fdadb8")
    t.circle(20,100)
    t.rt(90)
    t.circle(10,180)
    t.rt(90)
    t.circle(15,130)
    t.rt(110)
    t.circle(30,130)
    t.rt(50)
    t.circle(50,80)
    t.up()
    t.end_fill()
    t.seth(80)
    mlingpen(-240,140)  
    t.begin_fill()
    t.color("#000000", "#fe8e9e")
    t.circle(10,100)
    t.rt(90)
    t.circle(12,150)
    t.rt(90)
    t.circle(15,130)
    t.rt(50)
    t.circle(50,80)
    t.rt(10)
    t.circle(50,80)
    t.goto(-240,140)
    t.up()
    t.end_fill()
    t.seth(80)
    mlingpen(-250,140)  
    t.begin_fill()
    t.color("#f9788b", "#f9788b")
    t.circle(5,130)
    t.rt(90)
    t.circle(10,170)
    t.rt(100)
    t.circle(10,130)
    t.rt(70)
    t.circle(40,80)
    t.rt(40)
    t.circle(30,30)
    t.goto(-250,140)
    t.up()
    t.end_fill()
    t.seth(10)
    mlingpen(-245, 80)
    t.begin_fill()  
    t.color("#000000", "#ef5f7a")
    t.seth(35)
    t.circle(30,80)
    t.rt(80)
    t.circle(10,150)
    t.rt(80)
    t.circle(17,200)
    t.rt(60)
    t.circle(29,120)
    t.goto(-245, 80)
    t.up()
    t.end_fill()
    t.seth(10)
    mlingpen(-250, 85)
    t.begin_fill()  
    t.color("#ef758c", "#ef758c")
    t.seth(35)
    t.circle(25,80)
    t.rt(80)
    t.circle(6,150)
    t.rt(80)
    t.circle(12,210)
    t.rt(60)
    t.circle(23,120)
    t.goto(-250, 85)
    t.up()
    t.end_fill()
    t.seth(0)  
    mlingpen(-250,125)
    t.pensize(5)
    t.dot("#ff4969")
    t.pensize(2)
    mlingpen(-266.97,121.26)
    t.pencolor("#321320")
    t.fillcolor("#f04969")
    t.begin_fill()
    t.rt(80)
    t.circle(12,150)
    t.rt(80)
    t.circle(6,270)
    t.rt(150)
    t.circle(10,180)
    t.up()
    t.end_fill()
    #t.color("#000000", "#f04969")
    t.seth(-70)
    mlingpen(-210,100)  
    t.begin_fill()
    t.color("#000000", "#f04969")
    t.rt(20)
    t.fd(30)
    t.circle(-40,170)
    t.lt(20)
    t.fd(20) 
    t.goto(-210,100)
    t.up()
    t.end_fill()
    t.seth(-70)
    mlingpen(-215,90)  
    t.begin_fill()
    t.color("#ee627d", "#ee627d")
    t.rt(20)
    t.fd(20)
    t.circle(-35,170)
    t.lt(20)
    t.fd(15)
    t.goto(-220,90)
    t.up()
    t.end_fill()
    t.seth(-70)
    mlingpen(-220,80)  
    t.begin_fill()
    t.color("#f47a91", "#f47a91")
    t.rt(20)
    t.fd(10)
    t.circle(-28,170)
    t.lt(20)
    t.fd(10)
    t.goto(-220,90)
    t.up()
    t.end_fill()
    t.seth(150)
    mlingpen(-220,100)  
    t.begin_fill()
    t.color("#000000", "#f7cad1")
    t.circle(20,80)
    t.rt(10)
    t.circle(-40,70)
    t.rt(10)
    t.circle(20,80)
    t.rt(5)
    t.circle(5,180)
    t.rt(80)
    t.circle(20,70)
    t.rt(80)
    t.circle(40,60)
    t.rt(10)
    t.circle(40,110)
    t.goto(-220,100) 
    t.up()
    t.end_fill()
    t.seth(150)
    mlingpen(-220,98)  
    t.begin_fill()
    t.color("#ffe9f2", "#ffe9f2")
    t.circle(15,80)
    t.rt(7)
    t.circle(-45,75)
    t.rt(8)
    t.circle(20,50)
    t.rt(5)
    t.circle(2,200)
    t.rt(80)
    t.circle(15,85)
    t.rt(80)
    t.circle(40,60)
    t.rt(20)
    t.circle(30,70)
    t.goto(-220,98) 
    t.up()
    t.end_fill()
    t.seth(150)
    mlingpen(-180,55)  
    t.begin_fill()
    t.color("#000000", "#f7cad1")
    t.circle(30,80)
    t.rt(10)
    t.circle(-60,70)
    t.rt(5)
    t.circle(30,80)
    t.rt(5)
    t.circle(5,180)
    t.rt(90)
    t.circle(30,80)
    t.rt(80)
    t.circle(40,70)
    t.circle(20,50)
    t.rt(90)
    t.circle(20,95)
    t.goto(-180,55)
    t.up()
    t.end_fill()
    t.seth(150)
    mlingpen(-190,50)  
    t.begin_fill()
    t.color("#f7e0e3", "#f7e0e3")
    t.circle(25,80)
    t.rt(8)
    t.circle(-55,75)
    t.rt(3)
    t.circle(25,60)
    t.rt(6)
    t.circle(5,200)
    t.rt(90)
    t.circle(30,80)
    t.rt(80)
    t.circle(22,80)
    t.circle(20,40)
    t.rt(80)
    t.circle(15,90)
    t.goto(-190,50)
    t.up()
    t.end_fill()


 
mling_circle_list = iter([  # 每段弧线(半径,弧角度数)
    (18, 360), (14, 360), (10, 360), (6, 360),
    (18, 360), (14, 360), (10, 360), (6, 360),
])
 
 
def mling_draw_eyeball(zb1,zb2,zb3,zb4):  
    for zb, color_ in zip([zb1,zb2,zb3,zb4], ['#ffffff', '#482d08', '#000000', '#ffffff']):
        t.penup()
        t.goto(*zb)
        t.pendown()
        t.begin_fill()
        t.setheading(0)
        t.color(color_)
        t.pencolor('#000000')
        t.pensize(2)
        t.circle(*next(mling_circle_list))
        t.end_fill()
 
t.penup()
p = t.home()
t.pencolor("#321320")
t.fillcolor("#cb3263")
t.pensize(4)
t.goto(120,110)
t.pendown()
t.begin_fill()
t.goto(200,0)
t.left(-40)
t.circle(-110,105)
t.left(75)
t.goto(170,-110)
t.left(-80)
t.circle(30,40)
t.left(60)
t.circle(-80,70)
t.left(83)
t.circle(-35,95)
t.goto(60,-270)
t.left(-80)
t.circle(-65,70)
t.left(63)
t.circle(35,30)
t.left(130)
t.circle(-65,70)
t.goto(-120,-270)
t.left(-110)
t.circle(-35,80)
t.left(83)
t.circle(-80,50)
t.left(60)
t.circle(-80,60)
t.left(60)
t.circle(30,30)
t.left(20)
t.circle(80,80)
t.left(-105)
t.circle(-70,150)
t.left(50)
t.circle(-170,50)
t.goto(120,110)
#Author:Adversity Awake
t.end_fill()
t.penup()
p = t.home()
t.pencolor("#321320")
t.fillcolor("#ffffff")
t.pensize(4)
t.goto(90,60)
t.pendown()
t.begin_fill()
t.right(30)
t.circle(-130,360)
t.end_fill()
t.penup()
p = t.home()
t.pencolor("#321320")
#t.fillcolor("#f3d2ad")
t.fillcolor("#015426")
t.pensize(4)
t.goto(-250,-55)
t.dot("blue")
t.seth(0)
t.pendown()
t.begin_fill()
t.right(-55)
#t.circle(-45,270)
t.circle(-35,70)
t.goto(-200,-165)
t.goto(-250,-165)
t.goto(-220,-75)
t.goto(-250,-55)
t.end_fill()
 
rose()
 
t.penup()
p = t.home()
t.pencolor("#321320")
#t.fillcolor("#f3d2ad")
t.fillcolor("#f3d2ad")
t.pensize(4)
t.goto(185,-90)
t.pendown()
t.begin_fill()
t.right(140)
t.circle(43,95)
t.goto(185,-90)
t.end_fill()
t.penup()
t.seth(0)
t.pencolor('#321320')
t.fillcolor('#cb3263')
t.pensize(4)
t.begin_fill()
t.goto(21,0)
t.pendown()
t.circle(123,134)
t.left(-90)
t.circle(40,185)
t.left(-60)
t.circle(120,60)
t.left(-90)
t.circle(50,200)
t.left(-90)
t.circle(100,100)
t.left(-12)
t.circle(100,40)
t.goto(21,0)
t.penup()
#Author:Adversity Awake
t.end_fill()
t.penup()
t.goto(0, 0)
t.seth(0)
t.pencolor('#321320')
t.fillcolor('#ffffff')
t.pensize(4)
t.begin_fill()
t.goto(-70,210)
t.left(140)
t.pendown()
t.circle(30,200)
t.goto(-70,210)
t.penup()
t.end_fill()
t.penup()
t.goto(0, 0)
t.seth(0)
t.pencolor('#321320')
t.fillcolor('#ffffff')
t.pensize(4)
t.begin_fill()
t.goto(90,220)
t.left(45)
t.pendown()
t.circle(22,200)
t.goto(90,220)
t.penup()
t.end_fill()
t.penup()
t.goto(0, 0)
t.seth(0)
t.pencolor('#321320')
t.fillcolor('#ffffff')
t.pensize(4)
t.begin_fill()
t.left(-98)
t.left(90)
t.goto(18,10)
t.pendown()
t.circle(100,134)
t.left(10)
t.circle(110,30)
t.left(10)
t.circle(160,40)
t.circle(85,40)
t.left(2)
t.circle(95,40)
t.left(5)
t.circle(95,60)
t.goto(18,10)
t.penup()
t.end_fill()
t.penup()
p = t.home()
t.pencolor("#321320")
t.fillcolor("#8f3a52")
t.pensize(2)
t.goto(25,240)
t.pendown()
t.begin_fill()
t.goto(60,235)
t.left(30)
t.fd(8)
t.left(90)
t.fd(22)
t.circle(90, 8)
t.left(20)
t.circle(90, 8)
t.left(20)
t.circle(90, 20)
t.left(40)
t.circle(50, 20)
t.end_fill()
t.penup()
t.pensize(12)
t.goto(-2,250)
t.pencolor("#4D1F00")
t.fillcolor("#4D1F00")
t.pendown()
t.goto(60,240)
t.end_fill()
t.penup()
p = t.home()
t.pencolor("#321320")
t.fillcolor("#8f3a52")
t.pensize(2)
t.goto(-55,193)
t.pendown()
t.begin_fill()
t.left(65)
t.circle(-90, 25)
t.goto(-10,230)
t.left(30)
t.fd(8)
t.left(90)
t.fd(18)
t.circle(90, 8)
t.left(20)
t.circle(90, 10)
t.left(40)
t.circle(90, 30)
t.left(30)
t.circle(40, 20)
t.penup()
t.end_fill()
t.pensize(12)
t.goto(-63,195)
t.pencolor("#4D1F00")
t.fillcolor("#4D1F00")
t.pendown()
t.left(100)
t.circle(-85,45)
t.end_fill()
 
mling_draw_eyeball((-20,180), (-23,185), (-25,188), (-30,200)) 
mling_draw_eyeball((30, 193), (27, 200), (25,203), (20,213)) 
 
t.penup()
p = t.home()
t.pencolor("#321320")
t.fillcolor("#8f3a52")
t.pensize(3)
t.goto(25,105)
p = t.pos()
t.pendown()
t.begin_fill()
t.circle(85, 65)
t.left(16)
t.circle(30, 55)
t.left(20)
t.circle(145, 58)
t.left(8)
t.circle(20, 55)
t.left(8)
t.circle(50, 65)
t.left(-5)
t.circle(310, 8)
t.end_fill()
t.penup()
t.goto(0, 0)
t.seth(0)
t.pencolor('#321320')
t.fillcolor('#a93e54')
t.pensize(3)
t.begin_fill()
t.left(-20)
t.goto(9,66)
t.pendown()
t.circle(68,40)
t.left(10)
t.circle(65,40)
t.left(160)
t.circle(-75,85)
t.left(158)
t.circle(48,37)
t.goto(9,66)
t.penup()
t.end_fill()
t.color('#987824')
t.penup()
t.goto(260,60)
t.pendown()
t.write("愿\n你\n没\n有\n烦\n恼\n",align="center",font=("黑体",20,"normal"))
t.penup()
t.goto(290,183)
t.pendown()
t.write("逆\n境\n清\n醒\n",align="center",font=("黑体",10,"normal"))
t.hideturtle()
t.done()
 

七、草莓熊python turtle绘图(风车版)附源代码

详细请点击查看:草莓熊python turtle绘图(风车版)附源代码

逆境清醒 原创Python 绘图作品:

草莓熊python turtle绘图(风车版)附源代码

​草莓熊python turtle绘图(玫瑰花版)附源代码

皮卡丘python 海龟绘图(电力球版)附源代码

生日蛋糕系列(1)

立体多层玫瑰绘图(附源码)

DIY披萨饼系列python绘图(1)

   推荐阅读:

  19​​
18草莓熊python turtle绘图(玫瑰花版)附源代码
17

立体多层玫瑰绘图源码__玫瑰花python 绘图源码集锦

16

皮卡丘python turtle海龟绘图(电力球版)附源代码

15

【CSDN云IDE】个人使用体验和建议(含超详细操作教程)(python、webGL方向)

14

草莓熊python turtle绘图(风车版)附源代码

13用代码过中秋,python海龟月饼你要不要尝一口?
12Python List 列表(创建、索引和切片、列表反转、添加删除修改查找元素)__实例详解(全)
11用代码写出浪漫合集(python 绘制爱心、玫瑰花,字符画爱心、前端特效玫瑰、爱心)
10Python函数方法实例详解全集(更新中...)
9matplotlib 自带绘图样式效果展示速查(全)
8手机屏幕坏了____怎么把里面的资料导出(18种方法)
72022年11月多家权威机构____编程语言排行榜__薪酬状况
6Python中Print()函数的用法___详解(全,例多)
5色彩颜色对照表系列(1~5)(16进制、RGB、CMYK、HSV、中英文名)
4Tomcat端口配置(详细)
3Tomcat 启动闪退问题解决集(八大类详细)
2Apache Tomcat 各版本发行时间( v10.1.0-M17~v3.0)
1Tomcat10安装(Windows环境)(详细)

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

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

相关文章

Sparse编码和字典学习(1)基础知识和python简单实现

Sparse编码和字典学习1. 稀疏表示与字典学习简介1.1 Motivation1.2 字典学习的流程1.3 字典学习的数学模型2 python实现2.1字典学习2.1 稀疏性统计和误差计算参考资料和文献1. 稀疏表示与字典学习简介 1.1 Motivation 字典学习的思想应该源来实际生活中的字典的概念。字典是前…

谷粒商城 -- 项目环境搭建

注:以下的项目环境搭建过程,适用于所有的微服务项目的环境搭建,以后做微服务项目的时候看着这个笔记进行搭建环境即可 一、项目微服务划分图 二、Linux安装Docker 三、Docker安装mysql / redis 四、Vscode下载安装 五、谷粒项目结构创建&a…

碎片化学习Python的又一神作:termux

什么是Termux? 据Termux官网介绍,Termux是一个Android终端仿真器和Linux环境应用程序,运行于内部存储(不在SD卡上),无需root或设置。 系统自动进行最小化安装,使用APT软件包管理器安装其它软件…

【成为红帽工程师】第三天 web服务器

目录 一、www简介 二、网址及http简介 三、www服务器的类型 四、www服务器的基本配置 五、相关实验 一、www简介 (一)什么是www www是world wide web的缩写,也就是全球信息广播的意思。通常说的上网就是使用www来查询 用户所需要的信息…

【十问十答】回归模型知识点

1. 线性回归的假设是什么 线性回归有四个假设: 线性:自变量(x)和因变量(y)之间应该存在线性关系,这意味着x值的变化也应该在相同方向上改变y值。 独立性:特征应该相互独立&#xf…

[附源码]java毕业设计大学生足球预约信息

项目运行 环境配置: Jdk1.8 Tomcat7.0 Mysql HBuilderX(Webstorm也行) Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。 项目技术: SSM mybatis Maven Vue 等等组成,B/S模式 M…

【Java基础】泛型+反射+枚举+Lambda表达式 知识点总结

【大家好,我是爱干饭的猿,本文重点介绍Java基础:泛型、反射、枚举、Lambda表达式知识点总结。 后续会继续分享其他重要知识点总结,如果喜欢这篇文章,点个赞👍,关注一下吧】 上一篇文章&#x…

Redis安装与配置 LInux Centos

1.介绍Redis Redis 是完全开源免费的,遵守BSD协议,内存中的数据结构存储系统,它可以用作数据库、缓存和消息中间件。 特点: 支持数据的持久化,可以将内存中的数据保存到硬盘,在重启后再次加载使用。 支持…

Navigation 组件使用入门

Navigation 组件使用入门https://developer.android.google.cn/guide/navigation/navigation-getting-started 添加依赖 dependencies {def nav_version "2.5.2"implementation "androidx.navigation:navigation-fragment:$nav_version"} 创建导航图 …

LeetCode 752. 打开转盘锁

今天在看bfs模板的时候看到了一个题目,解密码锁的这道题,半天也没啥思路和行动力,看了人家的java版的注释,花了40分钟才搞懂这个题,也真的是菜。写完之后发现这个题目还可以去优化,用双向bfs去解决&#xf…

Android App开发超实用实例 | 约束布局

从多个角度介绍约束布局设计中的控件定位。 01、约束布局基础 从 Android Studio 2.3版本起,约束布局是Android Studio布局文件的默认布局。其他布局方式在实现复杂一些的布局设计时存在多种或多个布局嵌套的情况,设备调用这样的布局文件就需要花费更多…

(未整理完)十月每日一题打卡

每日打卡 10.1 [重新格式化电话号码 lc1694](1694. 重新格式化电话号码 - 力扣(LeetCode)) 模拟题:特殊情况就是在最后划分完全部三个之后,还剩四个需要变成aa-bb class Solution { public:string reformatNumber(string number…

Redis系列:Redis主从、哨兵、集群介绍

本篇内容包括:Redis 主从架构、Redis 哨兵架构、Redis 集群架构 的介绍等内容~ 文章目录一、Redis 主从架构1、Redis 主从架构2、主从架构原理二、Redis 哨兵模式1、Redis 哨兵模式2、Redis 哨兵模式工作过程三、Redis 集群模式1、Redis 集群模式2、Redi…

【树莓派不吃灰】基础篇⑲ 搭建usb摄像头MJPG-streamer图片流监控,支持远程视频监控访问

目录1. 前言2. 识别摄像头3. MJPG-streamer方案3.1 什么是 MJPG?3.2 MJPG 的优点?3.2 MJPG 的缺点?4. 搭建usb摄像头监控4.1 开启树莓派摄像头开关4.2 查看设备文件4.3 安装必要的库4.4 下载 mjpg-streamer 安装文件4.5 切换到 /mjpg-streame…

基于51单片机的温度甲烷监测报警串口上报proteus仿真原理图PCB

功能介绍: 0.本系统采用STC89C52作为单片机 1.LCD1602液晶实时显示当前温度和甲烷浓度 2.超过甲烷浓度阈值,蜂鸣器报警 3.按键可更改甲烷浓度阈值上限和启动/暂停检测 4.020%浓度,绿色LED点亮 20%~阈值上限,黄色LED点亮&#xff0…

C#操作modbus

modbus使用范围广泛,广泛应用于各类仪表,PLC等。 modbus的好处是免费,属于应用层协议,底层硬件基于485/以太网。 modbus协议本质还是自定义协议。 modbus调试软件: mthings: modbuspoll: 主站/从站,客…

前端静态页面基本开发思路(一)

有不少刚入门前端的同学经常问我前端布局的问题,总是跟我说在面对学校布置的作业或者想自己搭建博客的时候不知道怎么下手,不知道怎么去写静态的页面,每当我解决了一个又一个同学的问题的时候,又有新的同学来问,故思来…

nginx 配置防盗链(了解)

一 防盗链 1.1 防盗链概念 网站上页面的一些静态资源,不想让本站点的静态资源被他人盗取访问。使用nginx判断请求连接的头部refer中是否含有内容以及合法性来进行处理。 referer表示第二次资源的来源地址 1.2 配置规则 valiad_referers none|blocked|server_na…

Spring--IOC基于XML管理bean

IOC容器 IOC思想 IOC:Inversion of Control 即反转控制 获取资源的传统方式 自己做饭:买菜、洗菜、择菜、改刀、炒菜,全过程参与,费时费力,必须清楚了解资源创建整个过程中的全部细节且熟练掌握。 在应用程序中的组件…

Antd表格性能优化

今天来分享一个实际项目的性能优化的内容。 文章目录一、背景介绍二、性能问题原因及解决方案一、背景介绍 国内React项目大多数人选择配套的UI库的时候都会选择Antd。如果是非常简单的页面用Antd的话其实是完全没问题的,性能感觉不到什么瓶颈,样式也还…