Python 一步一步教你用pyglet仿制鸿蒙系统里的时钟

news2025/9/21 7:30:31

目录

鸿蒙时钟

1. 绘制圆盘

2. 创建表类

3. 绘制刻度

4. 刻度数值

5. 添加指针

6. 转动指针

7. 联动时间

8. 时钟走动


鸿蒙时钟

本篇将用python pyglet库复刻华为手机鸿蒙系统闹钟程序的时钟,先在上图中抓取出时分秒针及刻度、表盘的颜色RGB值:

bHour = (42, 43, 48, 255)
bMinute = (70, 71, 75, 255)
rSecond = (240, 70, 20, 255)
gScale = 215, 220, 230
wBackground = 248, 250, 252

1. 绘制圆盘

首先要画一圆Circle,并用直线Line等分成60份。

        self.circle = pyglet.shapes.Circle(x, y, R, color=wBackground, batch=batch)
        self.scales = [pyglet.shapes.Line(x, y, x+R*cos(i*Pi/30), y+R*sin(i*Pi/30),
                            width=2, color=gScales, batch=batch) for i in range(60)]

直线除圆心外的另一端点的坐标计算公式,如下图所示:

代码:

import pyglet
from math import pi, sin, cos

window = pyglet.window.Window(800, 500, caption='圆盘')
pyglet.gl.glClearColor(1, 1, 1, 1)
batch = pyglet.graphics.Batch()

R = 200
wBackground = 248, 250, 252
gScales = 215, 220, 230

class Watch:
    def __init__(self, x, y):
        self.circle = pyglet.shapes.Circle(x, y, R, color=wBackground, batch=batch)
        self.scales = [pyglet.shapes.Line(x, y, x+R*cos(i*pi/30), y+R*sin(i*pi/30),
                            width=2, color=gScales, batch=batch) for i in range(60)]

@window.event
def on_draw():
    window.clear()
    batch.draw()

watch = Watch(window.width/2, window.height/2)

pyglet.app.run()

2. 创建表类

改造这个Watch类,可设置圆心和半径,并让它成为pyglet.window.Window的子类。

import pyglet
from math import sin, cos, pi

wBackground = (248, 250, 252, 255)
gScales = (215, 220, 230, 255)

class Watch(pyglet.window.Window):  
    def __init__(self, x, y, R=200, width=800, height=500, caption='圆盘'): 
        super().__init__(width, height, caption=caption)
        pyglet.gl.glClearColor(1, 1, 1, 1)
        self.batch = pyglet.graphics.Batch()
        self.circle = pyglet.shapes.Circle(x, y, R,  
                        color=wBackground, batch=self.batch)
        self.scales = [pyglet.shapes.Line(x, y, x+R*cos(i*pi/30), y+R*sin(i*pi/30),  
                        width=2, color=gScales, batch=self.batch) for i in range(60)]
    def on_draw(self):
        self.clear()
        self.batch.draw()
    def run(self):
        pyglet.app.run()

watch = Watch(500, 300, 150)
watch.run()

3. 绘制刻度

扩大圆面并缩短和加粗直线,表盘和刻度的大致轮廓就出现了。

代码: 

import pyglet
from math import sin, cos, pi

wBackground = (248, 250, 252, 255)
gScales = (215, 220, 230, 255)

class Watch(pyglet.window.Window):  
    def __init__(self, x, y, R=200, width=800, height=500, caption='刻度'): 
        super().__init__(width, height, caption=caption)
        pyglet.gl.glClearColor(1, 1, 1, 1)
        self.batch = pyglet.graphics.Batch()
        self.circle = pyglet.shapes.Circle(x, y, R*1.05,  
                        color=wBackground, batch=self.batch)
        self.scales = [pyglet.shapes.Line(x+R*cos(i*pi/30), y+R*sin(i*pi/30),
                        x+R*0.95*cos(i*pi/30), y+0.95*R*sin(i*pi/30),
                        width=3, color=gScales, batch=self.batch) for i in range(60)]
        for i, scale in enumerate(self.scales):
            if i%5==0:
                scale.width, scale.x2, scale.y2 = 5, x+R*0.92*cos(i*pi/30), y+0.92*R*sin(i*pi/30)
    def on_draw(self):
        self.clear()
        self.batch.draw()
    def run(self):
        pyglet.app.run()

watch = Watch(400, 250)
watch.run()

4. 刻度数值

在整点的刻度值边上用标签标注上1~12的数字。

self.labels = [pyglet.text.Label(str((2-i)%12+1), font_size=24, color=(0,0,0,255),
                        x=x+R*0.82*cos(i*pi/6), y=y+0.82*R*sin(i*pi/6)+5, anchor_x='center', 
                        anchor_y='center', batch=self.batch) for i in range(12)]

代码:

import pyglet
from math import sin, cos, pi

wBackground = (248, 250, 252, 255)
gScales = (215, 220, 230, 255)
rSecond = (240, 70, 20, 255)

class Watch(pyglet.window.Window):  
    def __init__(self, x, y, R=200, width=800, height=500, caption='指针'): 
        super().__init__(width, height, caption=caption)
        pyglet.gl.glClearColor(1, 1, 1, 1)
        self.batch = pyglet.graphics.Batch()
        self.circle = pyglet.shapes.Circle(x, y, R*1.05, color=wBackground, batch=self.batch)
        self.scales = [pyglet.shapes.Line(x+R*cos(i*pi/30), y+R*sin(i*pi/30),
                        x+R*0.95*cos(i*pi/30), y+0.95*R*sin(i*pi/30),
                        width=3, color=gScales, batch=self.batch) for i in range(60)]
        for i,scale in enumerate(self.scales):
            if i%5==0:
                scale.width, scale.x2, scale.y2 = 5, x+R*0.92*cos(i*pi/30), y+0.92*R*sin(i*pi/30)
        self.labels = [pyglet.text.Label(str((2-i)%12+1), font_size=R*0.12, color=(0,0,0,255),
                        x=x+R*0.82*cos(i*pi/6), y=y+0.82*R*sin(i*pi/6)-R*0.06, anchor_x='center',
                        batch=self.batch) for i in range(12)]
    def on_draw(self):
        self.clear()
        self.batch.draw()
    def run(self):
        pyglet.app.run()

watch = Watch(400, 250)
watch.run()

5. 添加指针

时、分、秒针,用三个圆三条直线来表示。

        self.circle1 = pyglet.shapes.Circle(x, y, R*0.08, color=bHour)
        self.hour = pyglet.shapes.Line(x, y, x+R*0.7, y, width=9, color=bHour)
        self.minute = pyglet.shapes.Line(x, y, x+R*0.9, y, width=7, color=bMinute)
        self.second = pyglet.shapes.Line(x, y, x+R*1.1, y, width=5, color=rSecond)
        self.circle2 = pyglet.shapes.Circle(x, y, R*0.05, color=rSecond)
        self.circle3 = pyglet.shapes.Circle(x, y, R*0.02, color=wWhite)

不用担心秒针长过表盘圆面,转动前会作“移动”处理。

代码:

import pyglet
from math import sin, cos, pi

wBackground = (248, 250, 252, 255)
gScales = (215, 220, 230, 255)
rSecond = (240, 70, 20, 255)
bMinute = (70, 71, 75, 255)
bHour   = (42, 43, 48, 255)
wWhite  = (255, 255, 255, 255)

class Watch(pyglet.window.Window):  
    def __init__(self, x, y, R=200, width=800, height=500, caption='指针'): 
        super().__init__(width, height, caption=caption)
        pyglet.gl.glClearColor(1, 1, 1, 1)
        self.batch = pyglet.graphics.Batch()
        self.circle = pyglet.shapes.Circle(x, y, R*1.05, color=wBackground, batch=self.batch)
        self.scales = [pyglet.shapes.Line(x+R*cos(i*pi/30), y+R*sin(i*pi/30),
                        x+R*0.95*cos(i*pi/30), y+0.95*R*sin(i*pi/30),
                        width=3, color=gScales, batch=self.batch) for i in range(60)]
        for i,scale in enumerate(self.scales):
            if i%5==0:
                scale.width, scale.x2, scale.y2 = 5, x+R*0.92*cos(i*pi/30), y+0.92*R*sin(i*pi/30)
        self.labels = [pyglet.text.Label(str((2-i)%12+1), font_size=R*0.12, color=(0,0,0,255),
                        x=x+R*0.82*cos(i*pi/6), y=y+0.82*R*sin(i*pi/6)-R*0.06, anchor_x='center',
                        batch=self.batch) for i in range(12)]
        self.circle1 = pyglet.shapes.Circle(x, y, R*0.08, color=bHour, batch=self.batch)
        self.hour = pyglet.shapes.Line(x, y, x+R*0.7, y, width=9, color=bHour, batch=self.batch)
        self.minute = pyglet.shapes.Line(x, y, x+R*0.9, y, width=7, color=bMinute, batch=self.batch)
        self.second = pyglet.shapes.Line(x, y, x+R*1.1, y, width=5, color=rSecond, batch=self.batch)
        self.circle2 = pyglet.shapes.Circle(x, y, R*0.05, color=rSecond, batch=self.batch)
        self.circle3 = pyglet.shapes.Circle(x, y, R*0.02, color=wWhite, batch=self.batch)
    def on_draw(self):
        self.clear()
        self.batch.draw()
    def run(self):
        pyglet.app.run()

watch = Watch(400, 250)
watch.run()

6. 转动指针

时、分、秒针的转动运用Line控件的旋转属性.rotation,这种方法要比修改端点坐标要方便。

默认的旋转中心是直线的左端点,属性.anchor_position可以修改中心坐标。

        self.second.anchor_position = (R*0.1, 0)
        self.second.rotation = 210
        self.minute.rotation = 24
        self.hour.rotation = 160

代码:

import pyglet
from math import sin, cos, pi

wBackground = (248, 250, 252, 255)
gScales = (215, 220, 230, 255)
rSecond = (240, 70, 20, 255)
bMinute = (70, 71, 75, 255)
bHour   = (42, 43, 48, 255)
wWhite  = (255, 255, 255, 255)

class Watch(pyglet.window.Window):  
    def __init__(self, x, y, R=200, width=800, height=500, caption='指针'): 
        super().__init__(width, height, caption=caption)
        pyglet.gl.glClearColor(1, 1, 1, 1)
        self.batch = pyglet.graphics.Batch()
        self.circle = pyglet.shapes.Circle(x, y, R*1.05, color=wBackground, batch=self.batch)
        self.scales = [pyglet.shapes.Line(x+R*cos(i*pi/30), y+R*sin(i*pi/30),
                        x+R*0.95*cos(i*pi/30), y+0.95*R*sin(i*pi/30),
                        width=3, color=gScales, batch=self.batch) for i in range(60)]
        for i,scale in enumerate(self.scales):
            if i%5==0:
                scale.width, scale.x2, scale.y2 = 5, x+R*0.92*cos(i*pi/30), y+0.92*R*sin(i*pi/30)
        self.labels = [pyglet.text.Label(str((2-i)%12+1), font_size=R*0.12, color=(0,0,0,255),
                        x=x+R*0.82*cos(i*pi/6), y=y+0.82*R*sin(i*pi/6)-R*0.06, anchor_x='center',
                        batch=self.batch) for i in range(12)]
        self.circle1 = pyglet.shapes.Circle(x, y, R*0.08, color=bHour, batch=self.batch)
        self.hour = pyglet.shapes.Line(x, y, x+R*0.7, y, width=9, color=bHour, batch=self.batch)
        self.minute = pyglet.shapes.Line(x, y, x+R*0.9, y, width=7, color=bMinute, batch=self.batch)
        self.second = pyglet.shapes.Line(x, y, x+R*1.1, y, width=5, color=rSecond, batch=self.batch)
        self.circle2 = pyglet.shapes.Circle(x, y, R*0.05, color=rSecond, batch=self.batch)
        self.circle3 = pyglet.shapes.Circle(x, y, R*0.02, color=wWhite, batch=self.batch)
        self.second.anchor_position = (R*0.1, 0)
        self.second.rotation = 210
        self.minute.rotation = 24
        self.hour.rotation = 160
    def on_draw(self):
        self.clear()
        self.batch.draw()
    def run(self):
        pyglet.app.run()

watch = Watch(400, 250)
watch.run()

7. 联动时间

联动系统时钟,使用datetime.now()获取当前时间的时、分、秒的值。

        now = datetime.now()
        h, m, s = now.hour, now.minute, now.second
        self.second.rotation = -90 + s*6
        self.minute.rotation = -90 + m*6 + s/10
        self.hour.rotation = -90 + h%12*30 + m/2

代码:

import pyglet
from math import sin, cos, pi
from datetime import datetime

wBackground = (248, 250, 252, 255)
gScales = (215, 220, 230, 255)
rSecond = (240, 70, 20, 255)
bMinute = (70, 71, 75, 255)
bHour   = (42, 43, 48, 255)
wWhite  = (255, 255, 255, 255)

class Watch(pyglet.window.Window):  
    def __init__(self, x, y, R=200, width=800, height=500, caption='指针'): 
        super().__init__(width, height, caption=caption)
        pyglet.gl.glClearColor(1, 1, 1, 1)
        self.batch = pyglet.graphics.Batch()
        self.circle = pyglet.shapes.Circle(x, y, R*1.05, color=wBackground, batch=self.batch)
        self.scales = [pyglet.shapes.Line(x+R*cos(i*pi/30), y+R*sin(i*pi/30),
                        x+R*0.95*cos(i*pi/30), y+0.95*R*sin(i*pi/30),
                        width=3, color=gScales, batch=self.batch) for i in range(60)]
        for i,scale in enumerate(self.scales):
            if i%5==0:
                scale.width, scale.x2, scale.y2 = 5, x+R*0.92*cos(i*pi/30), y+0.92*R*sin(i*pi/30)
        self.labels = [pyglet.text.Label(str((2-i)%12+1), font_size=R*0.12, color=(0,0,0,255),
                        x=x+R*0.82*cos(i*pi/6), y=y+0.82*R*sin(i*pi/6)-R*0.06, anchor_x='center',
                        batch=self.batch) for i in range(12)]
        self.circle1 = pyglet.shapes.Circle(x, y, R*0.08, color=bHour, batch=self.batch)
        self.hour = pyglet.shapes.Line(x, y, x+R*0.7, y, width=9, color=bHour, batch=self.batch)
        self.minute = pyglet.shapes.Line(x, y, x+R*0.9, y, width=7, color=bMinute, batch=self.batch)
        self.second = pyglet.shapes.Line(x, y, x+R*1.1, y, width=5, color=rSecond, batch=self.batch)
        self.circle2 = pyglet.shapes.Circle(x, y, R*0.05, color=rSecond, batch=self.batch)
        self.circle3 = pyglet.shapes.Circle(x, y, R*0.02, color=wWhite, batch=self.batch)
        self.second.anchor_position = (R*0.1, 0)
        self.update()
    def update(self):
        now = datetime.now()
        h, m, s = now.hour, now.minute, now.second
        self.second.rotation = -90 + s*6
        self.minute.rotation = -90 + m*6 + s/10
        self.hour.rotation = -90 + h%12*30 + m/2
    def on_draw(self):
        self.clear()
        self.batch.draw()
    def run(self):
        pyglet.app.run()

watch = Watch(400, 250)
watch.run()

8. 运行时钟

使用pyglet.clock.schedule_interval(self.update, 0.2)每秒更新5次。

总得来说,本次复刻比较完美,但直线控件在非水平或垂直状态,特别是小夹角时锯齿很严重。

完整代码:

import pyglet
from math import sin, cos, pi
from datetime import datetime

class Watch(pyglet.window.Window):  
    def __init__(self, x, y, R=200, width=800, height=500, caption='时钟'): 
        super().__init__(width, height, caption=caption)
        wBackground = (248, 250, 252, 255)
        gScales = (215, 220, 230, 255)
        rSecond = (240, 70, 20, 255)
        bMinute = (70, 71, 75, 255)
        bHour   = (42, 43, 48, 255)
        wWhite  = (255, 255, 255, 255)
        pyglet.gl.glClearColor(1, 1, 1, 1)
        self.batch = pyglet.graphics.Batch()
        self.circle = pyglet.shapes.Circle(x, y, R*1.05, color=wBackground, batch=self.batch)
        self.scales = [pyglet.shapes.Line(x+R*cos(i*pi/30), y+R*sin(i*pi/30),
                        x+R*0.95*cos(i*pi/30), y+0.95*R*sin(i*pi/30),
                        width=3, color=gScales, batch=self.batch) for i in range(60)]
        for i,scale in enumerate(self.scales):
            if i%5==0:
                scale.width, scale.x2, scale.y2 = 5, x+R*0.92*cos(i*pi/30), y+0.92*R*sin(i*pi/30)
        self.labels = [pyglet.text.Label(str((2-i)%12+1), font_size=R*0.12, color=(0,0,0,255),
                        x=x+R*0.82*cos(i*pi/6), y=y+0.82*R*sin(i*pi/6)-R*0.06, anchor_x='center',
                        batch=self.batch) for i in range(12)]
        self.circle1 = pyglet.shapes.Circle(x, y, R*0.08, color=bHour, batch=self.batch)
        self.hour = pyglet.shapes.Line(x, y, x+R*0.7, y, width=9, color=bHour, batch=self.batch)
        self.minute = pyglet.shapes.Line(x, y, x+R*0.9, y, width=7, color=bMinute, batch=self.batch)
        self.second = pyglet.shapes.Line(x, y, x+R*1.1, y, width=5, color=rSecond, batch=self.batch)
        self.circle2 = pyglet.shapes.Circle(x, y, R*0.05, color=rSecond, batch=self.batch)
        self.circle3 = pyglet.shapes.Circle(x, y, R*0.02, color=wWhite, batch=self.batch)
        self.second.anchor_position = (R*0.1, 0)
        self.update(self.event)
        pyglet.clock.schedule_interval(self.update, 0.2)
    def update(self, event):
        now = datetime.now()
        h, m, s = now.hour, now.minute, now.second
        self.second.rotation = -90 + s*6
        self.minute.rotation = -90 + m*6 + s/10
        self.hour.rotation = -90 + h%12*30 + m/2
    def on_draw(self):
        self.clear()
        self.batch.draw()
    def run(self):
        pyglet.app.run()

watch = Watch(400, 250)
watch.run()

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

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

相关文章

分布式解决方案

目录 1. 分布式ID1-1. 传统方案1-2. 分布式ID特点1-3. 实现方案1-4. 开源组件 1. 分布式ID 1-1. 传统方案 时间戳UUID 1-2. 分布式ID特点 全局唯一高并发高可用 1-3. 实现方案 方案总结: 号段模式 有两台服务器,给第一台服务器分配0-100&#xff0…

考虑局部遮阴的光伏PSO-MPPT控制MATLAB仿真

微❤关注“电气仔推送”获得资料(专享优惠) 简介 光伏电池阵列的输出特性曲线不是线性变化的。当光伏电池遮荫时,产生的功 率会不断变化,致使光伏电池阵列的输出功率不断变化,其输出特性曲线呈现多峰值的现象。 多峰…

外包干了30天,技术明显退步。。

🍅 视频学习:文末有免费的配套视频可观看 🍅 点击文末小卡片,免费获取软件测试全套资料,资料在手,涨薪更快 这次来聊一个大家可能也比较关心的问题,那就是就业城市选择的问题。而谈到这个问题&a…

简单BFF架构设计

又到周五了有了一个小时的闲暇时间简单写点东西,介绍一个简单的BFF的架构。BFF:Backends For Frontends,其实现在是个比较常见的前端架构设计的方案,其最大的优势便在于前端可以高度自由的在Node层做一些server端才可以做的东西,比如SSR、登录…

Day24:安全开发-PHP应用文件管理模块显示上传黑白名单类型过滤访问控制

目录 文件管理模块-上传-过滤机制 文件管理模块-显示-过滤机制 思维导图 PHP知识点 功能:新闻列表,会员中心,资源下载,留言版,后台模块,模版引用,框架开发等 技术:输入输出&#…

示波器探头的使用

无源探头(Tektronix P2220) 阻抗:1Mhz 衰减:10:1/1:1(与探头上的档位X10/X1相关,如果探头没有档位默认为10:1) 探头型号:电压 高压差分探头(Tektronix P5200A) 阻抗:1Mhz 衰减:50:1/500:1(…

深入理解python之self

首先明确的是self只有在类的方法中才会有,独立的函数或方法是不必带有self的。self在定义类的方法时是必须有的,虽然在调用时不必传入相应的参数。 self名称不是必须的,在python中self不是关键词,你可以定义成a或b或其它名字都可…

Qt 定时器事件

文章目录 1 定时器事件1.1 界面布局1.2 关联信号槽1.3 重写timerEvent1.4 实现槽函数 启动定时器 2 定时器类 项目完整的源代码 QT中使用定时器,有两种方式: 定时器类:QTimer定时器事件:QEvent::Timer,对应的子类是QTi…

Vue.js+SpringBoot开发大学计算机课程管理平台

目录 一、摘要1.1 项目介绍1.2 项目录屏 二、功能模块2.1 实验课程档案模块2.2 实验资源模块2.3 学生实验模块 三、系统设计3.1 用例设计3.2 数据库设计3.2.1 实验课程档案表3.2.2 实验资源表3.2.3 学生实验表 四、系统展示五、核心代码5.1 一键生成实验5.2 提交实验5.3 批阅实…

Clock Verification IP

Clock Verification IP IP 参数及接口 IP 例化界面 相关函数 start_clock //产生时钟 <hierarchy_path>.IF.start_clockstop_clock //停止时钟 <hierarchy_path>.IF.stop_clockset_initial_value //设置时钟初始值为 0 <hierarchy_path>IF.set_initia…

Solidity攻击合约:“被偷走的资金”

在以太坊智能合约开发中&#xff0c;Solidity是最常用的编程语言。然而&#xff0c;由于代码编写不当或缺乏安全意识&#xff0c;合约可能面临各种攻击。本文将通过一个简单的Solidity合约示例&#xff0c;展示一个潜在的攻击合约&#xff0c;并分析其相对于原本合约的危害以及…

TS项目实战三:Express实现登录注册功能后端

使用express实现用户登录注册功能&#xff0c;使用ts进行代码开发&#xff0c;使用mysql作为数据库&#xff0c;实现用户登录、登录状态检测、验证码获取接口及用户注册相关接口功能的实现。 源码下载&#xff1a;[点击下载] (https://download.csdn.net/download/m0_37631110/…

设计模式-行为型模式-观察者模式

观察者模式定义了一种一对多的依赖关系&#xff0c;让多个观察者对象同时监听某一个主题对象。这个主题对象在状态发生变化时&#xff0c;会通知所有观察者对象&#xff0c;使它们能够自动更新自己。[DP] //首先是Observer接口&#xff0c;定义了观察者需要实现的更新方法&…

【Claude 3】一文谈谈Anthropic(Claude) 亚马逊云科技(Bedrock)的因缘际会

文章目录 前言1. Anthropic的诞生2. Anthropic的“代表作”——Claude 3的“三驾马车”3. 亚马逊云科技介绍4. 强大的全托管服务平台——Amazon Bedrock5. 亚马逊云科技(AWS)和Anthropic的联系6. Claude 3模型与Bedrock托管平台的关系7. Clude 3限时体验入口分享【⚠️截止3月1…

[贰],万能开篇HelloWorld

1&#xff0c;新建项目 File/New/Project Android/Android Application Project 输入程序名字HelloWorld Next Next 选择Blank Activity 修改为HelloWorldActivity 2&#xff0c;异常点 No resource found that matches the given name Theme.AppCompat.Light import andro…

c++中string的使用!!!(适合初学者 浅显易懂)

我们先初步的认识一下string,string底层其实是一个模版类 typedef basic_string<char> string; 我们先大致的把string的成员函数列举出来 class string { private: char * str; size_t size; size_t capacity; }; 1.string的六大默认函数 1.1 构造函数、拷贝构造 注&am…

Hadoop生态选择(一)

一、项目框架 1.1技术选型 技术选型主要考虑因素:维护成本、总成本预算、数据量大小、业务需求、行业内经验、技术成熟度。 数据采集传输:Flume&#xff0c;Kafka&#xff0c;DataX&#xff0c;Maxwell&#xff0c;Sqoop&#xff0c;Logstash数据存储:MySQL&#xff0c;HDFS…

【数据库】多表查询:子查询|关联查询 inner join 、left join、right join

一、外键&#xff1a; 就是把一张表的主键拿到另一张表中作为一个普通的字段 通过外键 可以把两张表连接起来 比如&#xff0c;下面【部门】表里的主键 拿到【员工】表里做普通字段&#xff08;外键&#xff09; 员工 部门 1员工&#xff0c;XXX&#xff0c;1部门 1部门&a…

CraxsRat7.4 安卓手机远程管理软件

CRAXSRAT 7.4 最新视频 https://v.douyin.com/iFjrw2aD/ 官方网站下载 http://craxsrat.cn/ 不要问我是谁&#xff0c;我是活雷锋。 http://craxsrat.cn/ CraxsRat CraxsRat7 CraxsRat7.1 CraxsRat7.2 CraxsRat7.3 CraxsRat7.4

[java基础揉碎]super关键字

super关键字: 基本介绍 super代表父类的引用&#xff0c;用于访问父类的属性、方法、构造器 super给编程带来的便利/细节 1.调用父类的构造器的好处(分工明确&#xff0c;父类属性由父类初始化&#xff0c;子类的属性由子类初始化) 2.当子类中有和父类中的成员(属性和方法)重…