当前位置: 首页 > news >正文

Python编程:创意爱心表白代码集

在寻找一种特别的方式来表达你的爱意吗?使用Python编程,你可以创造出独一无二的爱心图案,为你的表白增添一份特别的浪漫。这里为你精选了六种不同风格的爱心表白代码,让你的创意和情感通过代码展现出来。

话不多说,咱直接上代码!

目录

    • 1. 紫色浪漫:心形表白
    • 2. 爱意满满:Love2 I Love You
    • 3. 红色热情:心形与文字结合
    • 4. 爱的箭矢:一箭穿心效果
    • 5. 一箭穿心文字版
    • 6. 爱心一行代码:简洁表白

1. 紫色浪漫:心形表白

在这里插入图片描述

#1-1导入turtle模块进行设计
import turtle
import time#1-2画心形圆弧
def hart_arc():for i in range(200):turtle.right(1)turtle.forward(2)def move_pen_position(x, y):turtle.hideturtle()  # 隐藏画笔(先)turtle.up()  # 提笔turtle.goto(x, y)  # 移动画笔到指定起始坐标(窗口中心为0,0)turtle.down()  # 下笔turtle.showturtle()  # 显示画笔love = "听闻小姐治家有方,鄙人余生愿闻其详?" #input("请输入表白话语:")
signature = "先生" #input("请签署你的名字:")
date= "" #input("请写上日期:")if love == '':love = 'I Love You'#1-3初始化
turtle.setup(width=800, height=500)  # 窗口(画布)大小
turtle.color('black', 'Pink')  # 画笔颜色
turtle.pensize(5)  # 画笔粗细
turtle.speed(100)  # 描绘速度
# 初始化画笔起始坐标
move_pen_position(x=0, y=-180)  # 移动画笔位
turtle.left(140)  # 向左旋转140度turtle.begin_fill()  # 标记背景填充位置#1-4画图和展示
turtle.forward(224)  # 向前移动画笔,长度为224
# 画爱心圆弧
hart_arc()  # 左侧圆弧
turtle.left(120)  # 调整画笔角度
hart_arc()  # 右侧圆弧
# 画心形直线( 右下方 )
turtle.forward(224)turtle.end_fill()  # 标记背景填充结束位置move_pen_position(x=70, y=160)  # 移动画笔位置
turtle.left(185)  # 向左旋转180度
turtle.circle(-110,185)  # 右侧圆弧
# 画心形直线( 右下方 )
#turtle.left(20)  # 向左旋转180度
turtle.forward(50)
move_pen_position(x=-180, y=-180)  # 移动画笔位置
turtle.left(180)  # 向左旋转140度# 画心形直线( 左下方 )
turtle.forward(600)  # 向前移动画笔,长度为224# 在心形中写上表白话语
move_pen_position(0,50)  # 表白语位置
turtle.hideturtle()  # 隐藏画笔
turtle.color('#CD5C5C', 'pink')  # 字体颜色
# font:设定字体、尺寸(电脑下存在的字体都可设置)  align:中心对齐
turtle.write(love, font=('Arial', 20, 'bold'), align="center")# 签写署名和日期
if (signature != '') & (date != ''):turtle.color('red', 'pink')time.sleep(2)move_pen_position(220, -180)turtle.hideturtle()  # 隐藏画笔turtle.write(signature, font=('Arial', 20), align="center")move_pen_position(220, -220)turtle.hideturtle()  # 隐藏画笔turtle.write(date, font=('Arial', 20), align="center")#1-5点击窗口关闭程序
window = turtle.Screen()
window.exitonclick()

2. 爱意满满:Love2 I Love You

在这里插入图片描述

import turtle as t
import math as mtif __name__ == "__main__":t.screensize(800,600,'white')t.pensize(10)t.speed(10)#爱心1t.color('black','pink')t.begin_fill()for i in range(-90,90,5):x=mt.cos(mt.radians(i))y=float(pow(mt.cos(mt.radians(i)),2/3))+float(mt.sin(mt.radians(i)))t.penup()# print(int(x*50)+10,int(y*50)+10)t.goto(int(x*50)+50,int(y*50)+30)t.pendown()t.forward(1)t.penup()t.goto(-int(x*50)+50,int(y*50)+30)t.pendown()t.forward(1)t.penup()t.end_fill()#爱心2t.goto(0,10)t.penup()t.begin_fill()for i in range(0,360,5):r=60*(1-mt.sin(mt.radians(i)))t.penup()t.left(5)t.forward(r)t.pendown()t.forward(1)t.penup()t.backward(r+1)t.pendown()t.end_fill()#Lt.penup()t.goto(-200,0)t.left(90)t.begin_fill()t.pendown()t.forward(100)t.right(90)t.forward(20)t.right(90)t.forward(80)t.left(90)t.forward(40)t.right(90)t.forward(20)t.right(90)t.forward(60)t.end_fill()#ot.penup()t.goto(-80,0)t.pendown()t.begin_fill()t.circle(-50)t.end_fill()t.penup()t.color('pink','black')t.begin_fill()t.goto(-80,20)t.pendown()t.circle(-30)t.end_fill()t.color('black','pink')#Et.penup()t.goto(120, 0)t.right(180)t.left(90)t.begin_fill()t.pendown()t.forward(100)#上t.right(90)t.forward(60)#横t.right(90)t.forward(20)#竖t.right(90)t.forward(40)#横t.left(90)t.forward(20)#竖t.left(90)t.forward(40)#横t.right(90)t.forward(20)t.right(90)t.forward(40)t.left(90)t.forward(20)t.left(90)t.forward(40)t.right(90)t.forward(20)t.right(90)t.forward(60)t.end_fill()t.mainloop()

3. 红色热情:心形与文字结合

在这里插入图片描述

import turtle as tdef face(x, y):           #脸t.setheading(-90)t.penup()t.goto(x, y)t.pendown()t.backward(15)   # 左脸t.circle(70,-80)t.setheading(80)   # 左耳t.circle(-150, 15)t.circle(-15, 180)t.setheading(-115)t.circle(-150, 13)t.setheading(10)t.circle(-100,10)t.setheading(70)    # 右耳t.circle(-150, 20)t.circle(-15, 180)t.circle(-150, 16)t.setheading(10)t.setheading(160)   # 右脸t.circle(60, -130)t.setheading(-75)t.forward(40)def word(x, y):             # “如何骗人”t.pensize(2)t.pencolor("black")t.setheading(0)t.penup()t.goto(x, y)t.pendown()t.forward(10)   # “如”t.penup()t.setheading(90)t.forward(8)t.pendown()t.setheading(-120)t.forward(15)t.setheading(-45)t.forward(12)t.penup()t.setheading(80)t.forward(15)t.pendown()t.setheading(-125)t.forward(16)t.penup()t.setheading(42)t.forward(16)t.pendown()t.setheading(-90)t.forward(10)t.penup()t.backward(11)t.pendown()t.setheading(0)t.forward(8)t.setheading(-90)t.forward(10)t.penup()t.setheading(180)t.forward(8)t.pendown()t.setheading(0)t.forward(8)t.penup()        # “何”t.goto(x+7,y-18)t.pendown()t.setheading(-135)t.forward(13)t.penup()t.goto(x+5, y - 20)t.pendown()t.setheading(-90)t.forward(16)t.penup()t.goto(x+11, y-18)t.pendown()t.setheading(0)t.forward(13)t.penup()t.goto(x+12, y-22)t.pendown()t.setheading(-90)t.forward(8)t.penup()t.goto(x + 12, y - 22)t.pendown()t.setheading(0)t.forward(6)t.setheading(-90)t.forward(8)t.penup()t.goto(x + 11, y - 31)t.pendown()t.setheading(0)t.forward(6)t.penup()t.goto(x + 21, y - 19)t.pendown()t.setheading(-90)t.forward(18)t.setheading(145)t.forward(5)t.penup()           # “骗”t.goto(x + 40, y+3)t.pendown()t.setheading(0)t.forward(10)t.setheading(-90)t.forward(7)t.penup()t.goto(x + 45, y + 3)t.pendown()t.setheading(-90)t.forward(10)t.setheading(0)t.forward(7)t.setheading(-100)t.forward(10)t.setheading(145)t.forward(4)t.penup()t.goto(x+38, y-12)t.pendown()t.setheading(0)t.forward(11)t.penup()t.goto(x+57, y+9)t.pendown()t.setheading(-45)t.forward(4)t.penup()t.goto(x+54, y+3)t.pendown()t.setheading(0)t.forward(13)t.setheading(-90)t.forward(5)t.setheading(180)t.forward(12)t.penup()t.goto(x + 54, y + 3)t.pendown()t.setheading(90)t.circle(90,-10)t.penup()t.goto(x + 56, y-5)t.pendown()t.setheading(-90)t.forward(11)t.penup()t.goto(x + 56, y - 5)t.pendown()t.setheading(0)t.forward(13)t.setheading(-90)t.forward(12)t.setheading(145)t.forward(4)t.penup()t.goto(x + 56, y - 10)t.pendown()t.setheading(0)t.forward(13)t.penup()t.goto(x + 56, y - 10)t.pendown()t.setheading(0)t.forward(13)t.penup()t.goto(x + 60, y - 4)t.pendown()t.setheading(-90)t.forward(10)t.penup()t.goto(x + 64, y - 4)t.pendown()t.setheading(-90)t.forward(10)t.penup()          # “人”t.goto(x + 60, y - 19)t.pendown()t.setheading(70)t.circle(50, -30)t.penup()t.goto(x + 56, y - 27)t.pendown()t.setheading(130)t.circle(-50, -20)def book(x,y):           #书t.setheading(-90)t.penup()t.goto(x, y)t.fillcolor("red")t.begin_fill()t.pendown()t.forward(60)t.setheading(0)t.circle(-100, 25)t.setheading(90)t.forward(59)t.setheading(-25)t.circle(-100, -25)t.penup()t.setheading(-14)t.forward(46)t.pendown()t.setheading(15)t.circle(-100, 25)t.setheading(-90)t.forward(58)t.setheading(-11)t.circle(-105, -25)t.end_fill()def eyes(x, y):         # 五官t.setheading(-20)t.penup()t.goto(x, y)t.pendown()t.forward(10)t.setheading(0)t.penup()t.forward(10)t.pendown()t.setheading(20)t.forward(10)t.setheading(-160)t.penup()t.forward(50)t.pendown()t.setheading(0)t.forward(15)t.penup()t.forward(25)t.pendown()t.forward(18)t.setheading(-145)t.penup()t.forward(45)t.pendown()t.setheading(0)t.forward(10)def cheek(x, y):          #腮红t.setheading(0)for i in range(1, 4):t.color("pink")t.pensize(4)t.penup()t.right(110)t.goto(x, y)t.pendown()t.forward(9)t.left(110)x += 9t.pencolor("black")def hands(x,y):     # 小手手t.penup()t.goto(x, y)t.pendown()t.fillcolor("white")t.begin_fill()t.circle(10)t.end_fill()t.penup()t.setheading(5)t.forward(120)t.pendown()t.fillcolor("white")t.begin_fill()t.setheading(-165)t.forward(35)t.circle(10,180)t.forward(15)t.end_fill()def heart(x,y,z):      # 爱心t.setheading(110)t.pensize(2)t.pencolor("black")t.penup()t.goto(x,y)t.pendown()t.fillcolor("red")t.begin_fill()     #左半边t.circle(50,180)t.circle(180,37)t.left(46)      #右半边t.circle(180,37)t.circle(50, 182)t.end_fill()def main():"""主函数"""t.pensize(0)t.speed(6)face(-95, 55)eyes(-45, 110)cheek(-80, 80)cheek(0, 80)book(-110, 55)hands(-110,5)word(-100,35)heart(150,0,1)t.hideturtle()t.exitonclick()if __name__ == "__main__":main()

4. 爱的箭矢:一箭穿心效果

在这里插入图片描述

import turtle as tt.color('white','red')t.begin_fill()t.width(5)t.left(135)t.fd(100)t.right(180)t.circle(50,-180)t.left(90)t.circle(50,-180)t.right(180)t.fd(100)t.pu()t.goto(50,-30)t.pd()t.right(90)t.fd(100)t.right(180)t.circle(50,-180)t.left(90)t.circle(50,-180)t.right(180)t.fd(100)t.end_fill()t.hideturtle()t.pu()t.goto(250,-70)t.pd()t.color('black')t.width(5)t.left(70)t.fd(50)t.fd(-50)t.left(70)t.fd(50)t.fd(-50)t.left(145)t.fd(20)t.left(145)t.fd(50)t.fd(-50)t.left(70)t.fd(50)t.fd(-50)t.left(145)t.fd(20)t.left(145)t.fd(50)t.fd(-50)t.left(70)t.fd(50)t.fd(-50)t.left(145)t.width(3)t.fd(220)t.right(90)t.pu()t.fd(10)t.pd()t.left(90)t.circle(10,180)t.circle(10,-90)t.right(90)t.fd(-10)t.pu()t.fd(90)t.left(90)t.fd(10)t.left(90)t.pd()t.circle(10,180)t.circle(10,-90)t.left(90)t.fd(100)t.begin_fill()t.left(30)t.fd(15)t.right(35)t.fd(50)t.right(150)t.fd(50)t.right(62)t.fd(25)t.end_fill()t.done()

5. 一箭穿心文字版

在这里插入图片描述

from turtle import *
import turtle
from tkinter import *
import subprocess
import os
import random as randef Circlemove(size):for i in range(200):right(1)forward(1 * size)def Heart(x, y, size):setturtle(x, y)speed(0.6)color('red', 'pink')begin_fill()left(140)forward(111.65 * size)Circlemove(size)left(120)Circlemove(size)forward(111.65 * size)end_fill()penup()def setturtle(x, y):penup()goto(x, y)pendown()def Line():speed(0.6)pensize(10)setheading(0)setturtle(-300, 0)left(12)forward(210)setturtle(80, 80)forward(150)def LineHead():pensize(1)speed(0.5)color('red', 'red')begin_fill()left(120)forward(20)right(150)forward(35)right(120)forward(35)right(150)forward(20)end_fill()def SavePicture():ts = getscreen()ts.getcanvas().postscript(file="520.ps", colormode='color')window = turtle.Screen()window.exitonclick()def main():Love_Words = ["我喜欢的样子,你都有。"]Love_Letter = ["有你陪伴的日子,真好。", "遇见你,此生甚幸。"]Random_Number = ran.randint(0, len(Love_Words) - 1)setup(800, 600, 0, 0)getscreen().tracer(30, 0)hideturtle()pensize(3)color('black', 'pink')Heart(0, -25, 0.75)home()Heart(-80, -50, 1)Line()LineHead()pencolor("purple")speed(0.6)j = 0for i in Love_Words[Random_Number]:j = j + 1setturtle(j * 25 - 250, -150 + ran.randint(-1, 1) * 7)write(i, font=("楷体", 25, "normal"))j = 0pencolor("purple")for i in Love_Letter:j = j + 1setturtle(-400, 275 - j * 27)write(i, font=("楷体", 25, "normal"))pencolor('black')SavePicture()if __name__ == '__main__':main()

6. 爱心一行代码:简洁表白

在这里插入图片描述

print('\n'.join([''.join([('Love'[(x-y) % len('Love')] if ((x*0.05)**2+(y*0.1)**2-1)**3-(x*0.05)**2*(y*0.1)**3 <= 0 else ' ') for x in range(-30, 30)]) for y in range(30, -30, -1)]))
👇 源码资料获取 · 技术与交流 👇

在这里插入图片描述

相关文章:

Python编程:创意爱心表白代码集

在寻找一种特别的方式来表达你的爱意吗&#xff1f;使用Python编程&#xff0c;你可以创造出独一无二的爱心图案&#xff0c;为你的表白增添一份特别的浪漫。这里为你精选了六种不同风格的爱心表白代码&#xff0c;让你的创意和情感通过代码展现出来。 话不多说&#xff0c;咱…...

腾讯IM SDK:TUIKit发送多张图片

一、问题描述 在使用腾讯IM DEMO&#xff08;https://github.com/TencentCloud/chat-uikit-vue.git&#xff09;时发现其只支持发送一张图片&#xff1a; 二、解决方案 // src\TUIKit\components\TUIChat\message-input-toolbar\image-upload\index.vue<inputref"inp…...

《本地部署开源大模型》在Ubuntu 22.04系统下ChatGLM3-6B高效微调实战

在Ubuntu 22.04系统下ChatGLM3-6B高效微调实战 无论是在单机单卡&#xff08;一台机器上只有一块GPU&#xff09;还是单机多卡&#xff08;一台机器上有多块GPU&#xff09;的硬件配置上启动ChatGLM3-6B模型&#xff0c;其前置环境配置和项目文件是相同的。如果大家对配置过程还…...

Python 脚本来自动发送每日电子邮件报告

安装必要的库 我们将使用 smtplib 发送邮件&#xff0c;以及 email.mime 来创建电子邮件内容。另外&#xff0c;为了让脚本自动定时运行&#xff0c;可以使用操作系统的计划任务工具&#xff08;如 Linux 的 cron 或 Windows 的 Task Scheduler&#xff09;。 创建邮件内容 使…...

大语言模型与ChatGPT:深入探索与应用

文章目录 1. 前言2. 大语言模型的概述2.1 什么是大语言模型&#xff1f;2.2 Transformer架构的核心2.3 预训练与微调 3. ChatGPT的架构与技术背景3.1 GPT模型的演进3.2 ChatGPT的工作原理 4. ChatGPT的实际应用4.1 日常对话助手4.2 内容生成与写作4.3 编程辅助4.4 教育与学习辅…...

【从零开始的LeetCode-算法】3164.优质数对的总数 II

给你两个整数数组 nums1 和 nums2&#xff0c;长度分别为 n 和 m。同时给你一个正整数 k。 如果 nums1[i] 可以被 nums2[j] * k 整除&#xff0c;则称数对 (i, j) 为 优质数对&#xff08;0 < i < n - 1, 0 < j < m - 1&#xff09;。 返回 优质数对 的总数。 示…...

FastDFS VS MinIO:文件存储与对象存储的抉择(包含SpringBoot集成FastDFS范例)

FastDFS vs MinIO&#xff1a;文件存储与对象存储的抉择&#xff08;包含SpringBoot集成FastDFS范例&#xff09; 我坐在窗边&#xff0c;随着飞机穿过云层&#xff0c;在云层之上滑翔。可以清晰的看到飞机在天空留下的痕迹&#xff0c;不知道那是蔚蓝中的纯白&#xff0c;还是…...

【Redis】缓存预热、雪崩、击穿、穿透、过期删除策略、内存淘汰策略

Redis常见问题总结&#xff1a; Redis常见问题总结Redis缓存预热Redis缓存雪崩Redis缓存击穿Redis缓存穿透 Redis 中 key 的过期删除策略数据删除策略 Redis内存淘汰策略一、Redis对过期数据的处理&#xff08;一&#xff09;相关配置&#xff08;二&#xff09;内存淘汰流程&a…...

【LeetCode】每日一题 2024_10_15 三角形的最大高度(枚举、模拟)

前言 每天和你一起刷 LeetCode 每日一题~ LeetCode 启动&#xff01; 题目&#xff1a;三角形的最大高度 代码与解题思路 久违的简单题 这道题读完题目其实不难想到有两条路可以走&#xff1a; 1、题目很明显只有两种情况&#xff0c;枚举是第一个球是红球还是蓝球这两种情…...

2024版最新网络安全工程师入门教程(非常详细)从零基础入门到精通,看完这一篇就够了

前言 想要成为网络安全工程师&#xff0c;却苦于没有方向&#xff0c;不知道从何学起的话&#xff0c;下面这篇 网络安全入门 教程可以帮你实现自己的网络安全工程师梦想&#xff0c;如果想学&#xff0c;可以继续看下去&#xff0c;文章有点长&#xff0c;希望你可以耐心看到…...

vue中关于router.beforeEach()的用法

router.beforeEach()是Vue.js中的路由守卫&#xff0c;用于在路由跳转前进行校验、取消、重定向等操作。 基本使用&#xff1a; const router new VueRouter({ ... })router.beforeEach((to, from, next) > {// ... }) to: 即将要进入的目标路由对象 from: 当前导航正要…...

C++模板初阶,只需稍微学习;直接起飞;泛型编程

&#x1f913;泛型编程 假设像以前交换两个函数需要&#xff0c;函数写很多个或者要重载很多个&#xff1b;那么有什么办法实现一个通用的函数呢&#xff1f; void Swap(int& x, int& y) {int tmp x;x y;y tmp; } void Swap(double& x, double& y) {doubl…...

【数据结构 | 红黑树】红黑树的性质和插入结点时的调整

文章目录 红黑树红黑树插入时的调整&#xff1f;1. 插入结点是根结点2. 插入结点的叔叔是红色3. 插入结点的叔叔是黑色LL 型RR型LR型RL型 红黑树 前提&#xff1a;二叉搜索树&#xff08;左 < 根 < 右&#xff09;—— 左根右根和**叶子&#xff08;NULL&#xff09;**都…...

mysql学习教程,从入门到精通,SQL导入数据(44)

1.SQL 导出数据 以下是一个关于如何使用 SQL 导出数据的示例。这个示例将涵盖从一个关系数据库管理系统&#xff08;如 MySQL&#xff09;中导出数据到 CSV 文件的基本步骤。 1.1、前提条件 你已经安装并配置好了 MySQL 数据库。你有访问数据库的权限。你知道要导出的表名。…...

【SpringAI】(二)让你的Java程序接入大模型——适合Java宝宝的大模型应用开发

开始之前&#xff0c;如果你对大模型完全没了解过&#xff0c;建议阅读之前的大模型入门文章&#xff1a; 【SpringAI】&#xff08;一&#xff09;从实际场景入门大模型——适合Java宝宝的大模型应用开发 那么今天就开始写一个基于Spring AI程序的HelloWord!将大模型接入到咱…...

音频剪辑在线工具 —— 让声音更精彩

你是否曾梦想过拥有自己的声音创作空间&#xff0c;却苦于复杂的音频编辑软件&#xff1f;接下来&#xff0c;让我们一同揭开这些音频剪辑在线工具的神秘面纱&#xff0c;看看它们如何帮助你实现从录音到发布的无缝衔接。 1.福昕音频剪辑 链接直达>>https://www.foxits…...

​http短连接和长连接​

参考短连接和长连接 短连接&#xff1a;客户端向服务器每进行一次Http操作&#xff0c;都需建立一次连接&#xff0c;任务完成后&#xff0c;断开连接&#xff1b;长连接&#xff1a;建立长连接后&#xff0c;传输数据的连接将不会中断&#xff0c;客户端每次访问服务器时都会…...

日志分析删除

日志分析 场景 运维嫌弃生产环境打印日志过多&#xff0c;而且日志存储需要费用&#xff0c;让我们减少打印日志大小&#xff0c;所以需要分析日志在哪里打印的过多 解决方案 读取生产日志文件&#xff0c;统计分析打印日志的地方&#xff0c;最后删除代码中打印日志的地方…...

DART: Implicit Doppler Tomography for Radar Novel View Synthesis 笔记

Link&#xff1a;https://wiselabcmu.github.io/dart/ Publish&#xff1a; 2024CVPR Abstract DART主要任务就是用来合成雷达距离多普勒图像range-droppler&#xff0c;可用于生成高质量的断层扫描图像。 Related Work 1 Radar Simulation 基于模型的方法 任务&#xff…...

redis-cli执行lua脚本

连接redis服务器命令 redis-cli -h 10.10.xx.xx -p 6380 -a password执行lua脚本传递KEY VALUE redis-cli -h 10.10.xx.xx -p 6380 -a password key1 key2 , arg1 arg2key和参数通过逗号分割&#xff0c;逗号前后必须有一个空格 如下执行lua脚本示例&#xff1a; -- script.…...

MySQL9的3个新特性

【图书推荐】《MySQL 9从入门到性能优化&#xff08;视频教学版&#xff09;》-CSDN博客 《MySQL 9从入门到性能优化&#xff08;视频教学版&#xff09;&#xff08;数据库技术丛书&#xff09;》(王英英)【摘要 书评 试读】- 京东图书 (jd.com) 本文讲解MySQL9的3个新特性&…...

《网络基础之 HTTP 协议:状态码含义全解析》

《网络基础之 HTTP 协议&#xff1a;状态码含义全解析》 在网络通信的浩瀚世界中&#xff0c;HTTP 协议犹如一座坚实的桥梁&#xff0c;连接着客户端与服务器。而其中的状态码&#xff0c;则是这座桥梁上的重要标识&#xff0c;为双方的交互提供了关键的反馈信息。 一、状态码…...

java真的正在越来越失去竞争力了吗

题记&#xff1a; java真的在越来越失去竞争力了吗&#xff1f;最近参加校招面试&#xff0c;过程中有问道java的问题&#xff0c;有的同学很直接了当&#xff08;或者是不假思索&#xff09;地说&#xff0c;java已经过时了吧&#xff0c;现在学java的人越来越少了。那么事实…...

【通过zip方式安装mysql服务】

通过zip方式安装mysql服务 Mysql安装包下载mysql安装及环境配置1.解压缩配置环境变量初始化mysql配置安装mysql服务启动MySQL服务连接mysql修改root用户密码 Mysql安装包下载 通过访问mysql官网下载&#xff1a;mysql下载地址 mysql安装及环境配置 1.解压缩 下载完成后&am…...

每日OJ题_WY3小易的升级之路_数学模拟_C++_Java

目录 牛客_WY3小易的升级之路_数学模拟 题目解析 C代码 Java代码 牛客_WY3小易的升级之路_数学模拟 小易的升级之路_牛客题霸_牛客网 (nowcoder.com) 描述&#xff1a; 小易经常沉迷于网络游戏.有一次,他在玩一个打怪升级的游戏,他的角色的初始能力值为 a.在接下来的一段…...

python xml的读取和写入

import xml.etree.ElementTree as ET from xml.dom import minidom# 读取XML文档 tree ET.parse("./xml_3/z_20240827_001.xml") root tree.getroot() # 获取size元素 size_find_0 root.find("size") # 获取width子元素 size_w size_find_0.find("…...

WebGL 小白入门学习

1. WebGL是什么&#xff1f; WebGL&#xff08;Web Graphics Library&#xff09;是一种JavaScript API&#xff0c;它允许你在不需要安装任何额外插件的情况下&#xff0c;直接在浏览器中渲染高性能的2D和3D图形。WebGL利用了用户的图形处理单元&#xff08;GPU&#xff09;来…...

OSI七层协议

OSI&#xff08;Open System Interconnection&#xff09;七层协议&#xff0c;即开放式系统互联参考模型&#xff0c;是一个由国际标准化组织&#xff08;ISO&#xff09;提出的用于描述计算机网络中通信的结构和功能的理论模型。它将网络通信过程分为七个层次&#xff0c;每个…...

超平面(Hyperplane)和半空间(Halfspace)

文章目录 一、超平面&#xff08;Hyperplane&#xff09;1. 定义2. 超平面的方程3. 例子4. 超平面的性质 二、半空间&#xff08;Halfspace&#xff09;1. 定义2. 半空间的表示3. 半空间的性质 三、超平面与半空间的关系四、应用1. 线性规划2. 机器学习3. 计算几何4. 凸分析 五…...

TCP(Transmission Control Protocol,传输控制协议)整理

TCP&#xff08;Transmission Control Protocol&#xff0c;传输控制协议&#xff09;是一种面向连接的、可靠的传输协议&#xff0c;它是OSI&#xff08;Open System Interconnection&#xff0c;开放式系统互联&#xff09;模型中的第四层协议&#xff0c;通常使用于网络中的…...