小球逃跑小游戏 python
小球逃跑 - Python 版 运行: python ball_escape.py 依赖: pip install pygame 操作: A/D 或 ← → 控制小球滚动 | 空格 跳跃 | R 重开 | ESC 退出 import os import sys import random import math import pygame # 配置 W, H 900, 640 FPS 60 GRAVITY 0.42 BALL_RADIUS 11 BAR_WIDTH 220 BAR_HEIGHT 14 # 颜色 COL_BG_TOP (15, 20, 40) COL_BG_BOT (30, 15, 45) COL_BALL (255, 90, 120) COL_BALL_LIGHT (255, 180, 200) COL_BAR (90, 200, 255) COL_BAR_LIGHT (180, 240, 255) COL_SPIKE (220, 60, 80) COL_SPIKE_LIGHT (255, 130, 150) COL_SPRING (120, 255, 150) COL_SPRING_DARK (40, 180, 80) COL_LAVA (255, 100, 30) COL_LAVA_LIGHT (255, 200, 80) COL_TEXT (230, 240, 255) COL_STAR (255, 255, 200) # 平台类型 PLATFORM_NORMAL normal PLATFORM_SPIKE spike # 滚针掉血 PLATFORM_SPRING spring # 弹簧弹起 PLATFORM_LAVA lava # 岩浆掉血 PLATFORM_ICE ice # 冰面滑 PLATFORM_MOVING moving # 移动 # 字体 def find_font(candidates): for p in candidates: if os.path.exists(p): return p return None def get_cn_font(size): path find_font([ C:/Windows/Fonts/msyh.ttc, C:/Windows/Fonts/simhei.ttf, C:/Windows/Fonts/simsun.ttc, /System/Library/Fonts/PingFang.ttc, /usr/share/fonts/truetype/wqy/wqy-microhei.ttc, /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc, ]) if path: return pygame.font.Font(path, size) return pygame.font.Font(None, size) # 粒子 class Particle: __slots__ (x, y, vx, vy, life, color, size, gravity) def __init__(self, x, y, color, speed3, size4, gravity0.2): angle random.random() * math.pi * 2 spd random.random() * speed 1 self.x x self.y y self.vx math.cos(angle) * spd self.vy math.sin(angle) * spd - 1 self.life 1.0 self.color color self.size random.random() * size 2 self.gravity gravity def update(self): self.x self.vx self.y self.vy self.vy self.gravity self.vx * 0.97 self.life - 0.025 def draw(self, surf): if self.life 0: return alpha int(self.life * 255) r int(self.size * self.life) if r 1: return s pygame.Surface((r * 2, r * 2), pygame.SRCALPHA) pygame.draw.circle(s, (*self.color, alpha), (r, r), r) surf.blit(s, (self.x - r, self.y - r)) # 飘字 class FloatText: __slots__ (text, x, y, vy, life, color, font) def __init__(self, text, x, y, color, font): self.text text self.x x self.y y self.vy -1.8 self.life 1.0 self.color color self.font font def update(self): self.y self.vy self.vy * 0.95 self.life - 0.025 def draw(self, surf): if self.life 0: return alpha int(self.life * 255) s self.font.render(self.text, True, self.color) s.set_alpha(alpha) rect s.get_rect(center(self.x, self.y)) surf.blit(s, rect) # 平台 class Platform: def __init__(self, x, y, w, ptype, angle0.0): self.x x self.y y self.w w self.h BAR_HEIGHT self.type ptype self.angle angle self.base_angle angle self.angle_speed 0.0 self.vx 0.0 self.base_x x self.move_range 0 self.move_timer 0 self.spring_anim 0.0 self.hit_cooldown 0 # 各类型属性 if ptype PLATFORM_MOVING: self.vx random.choice([-1.5, 1.5]) self.move_range random.randint(60, 140) elif ptype PLATFORM_SPIKE: self.angle_speed random.choice([-1.2, 1.2]) * 0.02 elif ptype PLATFORM_NORMAL: self.angle_speed 0.0 def update(self): # 旋转 if self.type PLATFORM_SPIKE: self.angle self.angle_speed elif self.type PLATFORM_MOVING: self.x self.vx if abs(self.x - self.base_x) self.move_range: self.vx * -1 # 弹簧动画恢复 if self.spring_anim 0: self.spring_anim * 0.88 if self.spring_anim 0.02: self.spring_anim 0 # 冷却 if self.hit_cooldown 0: self.hit_cooldown - 1 def get_line(self): 返回平台的两端坐标 cx, cy self.x, self.y half self.w / 2 cos_a math.cos(self.angle) sin_a math.sin(self.angle) x1 cx - half * cos_a y1 cy - half * sin_a x2 cx half * cos_a y2 cy half * sin_a return (x1, y1, x2, y2) def draw(self, surf): x1, y1, x2, y2 self.get_line() # 颜色 if self.type PLATFORM_NORMAL: color COL_BAR light COL_BAR_LIGHT elif self.type PLATFORM_SPIKE: color COL_SPIKE light COL_SPIKE_LIGHT elif self.type PLATFORM_SPRING: color COL_SPRING light (200, 255, 210) elif self.type PLATFORM_LAVA: color COL_LAVA light COL_LAVA_LIGHT elif self.type PLATFORM_ICE: color (150, 220, 255) light (220, 245, 255) else: color (180, 180, 220) light (220, 220, 255) # 弹簧震动效果 if self.type PLATFORM_SPRING and self.spring_anim 0: offset math.sin(pygame.time.get_ticks() * 0.05) * self.spring_anim * 6 else: offset 0 # 阴影 pygame.draw.line(surf, (0, 0, 0, 80), (x1 2, y1 3), (x2 2, y2 3), self.h 4) # 主体 pygame.draw.line(surf, color, (x1, y1 offset), (x2, y2 offset), self.h) # 高光 pygame.draw.line(surf, light, (x1, y1 - 2 offset), (x2, y2 - 2 offset), 3) # 特殊装饰 if self.type PLATFORM_SPIKE: # 滚针上的小刺 n 8 for i in range(n 1): t i / n px x1 (x2 - x1) * t py y1 (y2 - y1) * t offset # 计算垂直方向 dx x2 - x1 dy y2 - y1 length math.hypot(dx, dy) if length 0: nx -dy / length ny dx / length pygame.draw.circle(surf, light, (int(px nx * 10), int(py ny * 10)), 3) elif self.type PLATFORM_SPRING: # 弹簧圈 for i in range(4): sx x1 (x2 - x1) * 0.5 sy y1 (y2 - y1) * 0.5 offset - 6 - i * 4 if self.spring_anim 0: sy offset * 0.5 pygame.draw.circle(surf, light, (int(sx), int(sy)), 4, 2) elif self.type PLATFORM_LAVA: # 岩浆气泡 for i in range(3): bx x1 (x2 - x1) * (0.25 i * 0.25) by y1 (y2 - y1) * (0.25 i * 0.25) offset t pygame.time.get_ticks() * 0.005 i r 3 math.sin(t) * 2 pygame.draw.circle(surf, COL_LAVA_LIGHT, (int(bx), int(by - 8)), int(r)) # 小球 class Ball: def __init__(self, x, y): self.x x self.y y self.vx 0 self.vy 0 self.radius BALL_RADIUS self.hp 100 self.max_hp 100 self.invincible 0 self.on_platform None self.jump_cooldown 0 self.trail [] def update(self): # 记录轨迹 self.trail.append((self.x, self.y)) if len(self.trail) 12: self.trail.pop(0) # 重力 self.vy GRAVITY if self.vy 18: self.vy 18 # 应用速度 self.x self.vx self.y self.vy # 边界 if self.x self.radius: self.x self.radius self.vx abs(self.vx) * 0.5 if self.x W - self.radius: self.x W - self.radius self.vx -abs(self.vx) * 0.5 # 无敌 if self.invincible 0: self.invincible - 1 if self.jump_cooldown 0: self.jump_cooldown - 1 def draw(self, surf): # 轨迹 for i, (tx, ty) in enumerate(self.trail): ratio i / len(self.trail) r int(self.radius * ratio * 0.8) if r 1: continue alpha int(60 * ratio) s pygame.Surface((r * 2, r * 2), pygame.SRCALPHA) pygame.draw.circle(s, (255, 120, 150, alpha), (r, r), r) surf.blit(s, (tx - r, ty - r)) # 闪烁无敌 if self.invincible 0 and (self.invincible // 4) % 2 0: return # 光晕 glow_r self.radius 6 glow pygame.Surface((glow_r * 2, glow_r * 2), pygame.SRCALPHA) pygame.draw.circle(glow, (255, 100, 140, 80), (glow_r, glow_r), glow_r) surf.blit(glow, (self.x - glow_r, self.y - glow_r)) # 主体 pygame.draw.circle(surf, COL_BALL, (int(self.x), int(self.y)), self.radius) # 高光 pygame.draw.circle(surf, COL_BALL_LIGHT, (int(self.x - self.radius * 0.3), int(self.y - self.radius * 0.3)), self.radius // 3) # 眼睛 eye_dx 3 eye_dy -2 pygame.draw.circle(surf, (30, 20, 30), (int(self.x eye_dx), int(self.y eye_dy)), 3) pygame.draw.circle(surf, (30, 20, 30), (int(self.x - eye_dx), int(self.y eye_dy)), 3) # 眼珠高光 pygame.draw.circle(surf, (255, 255, 255), (int(self.x eye_dx 1), int(self.y eye_dy - 1)), 1) pygame.draw.circle(surf, (255, 255, 255), (int(self.x - eye_dx 1), int(self.y eye_dy - 1)), 1) # 游戏 class Game: def __init__(self): pygame.init() self.screen pygame.display.set_mode((W, H)) pygame.display.set_caption(小球逃跑) self.clock pygame.time.Clock() self.font_sm get_cn_font(15) self.font_md get_cn_font(20) self.font_lg get_cn_font(32) self.font_xl get_cn_font(48) self.reset() def reset(self): self.ball Ball(W // 2, 80) self.platforms [] self.particles [] self.floats [] self.camera_y 0 self.target_camera_y 0 self.score 0 self.depth 0 # 下潜深度 self.max_depth 0 self.game_over False self.stars [] self.frame 0 # 生成星星背景 for _ in range(80): self.stars.append({ x: random.randint(0, W), y: random.randint(0, H), size: random.random() * 2 0.5, brightness: random.random() * 0.5 0.5, parallax: random.random() * 0.3 0.1, }) # 初始平台横杆 self.platforms.append(Platform(W // 2, 180, BAR_WIDTH, PLATFORM_NORMAL)) self.next_platform_y 180 self.platform_count 1 # 生成一些初始平台 for _ in range(8): self.spawn_platform() def spawn_platform(self): 生成一个新平台位置在当前最下方平台之下 self.next_platform_y random.randint(90, 140) y self.next_platform_y # 随机类型和位置 # 难度深度越深越容易出现危险平台 depth_factor min(1.0, self.depth / 3000) normal_w max(0.05, 0.4 - depth_factor * 0.25) spike_w 0.2 depth_factor * 0.15 spring_w 0.2 lava_w 0.05 depth_factor * 0.15 ice_w 0.05 moving_w 0.1 depth_factor * 0.1 r random.random() cum normal_w ptype PLATFORM_NORMAL if r cum: cum spike_w ptype PLATFORM_SPIKE if r cum: cum spring_w ptype PLATFORM_SPRING if r cum: cum lava_w ptype PLATFORM_LAVA if r cum: cum ice_w ptype PLATFORM_ICE if r cum: ptype PLATFORM_MOVING # 宽度 if ptype PLATFORM_SPIKE: w random.randint(90, 160) elif ptype PLATFORM_SPRING: w random.randint(50, 80) elif ptype PLATFORM_LAVA: w random.randint(80, 130) elif ptype PLATFORM_ICE: w random.randint(140, 200) elif ptype PLATFORM_MOVING: w random.randint(100, 150) else: w random.randint(140, 220) # 位置 margin w / 2 20 x random.randint(int(margin), int(W - margin)) # 角度部分平台微倾 angle 0.0 if ptype PLATFORM_SPIKE: angle random.uniform(-0.3, 0.3) elif ptype PLATFORM_NORMAL: angle random.uniform(-0.15, 0.15) self.platforms.append(Platform(x, y, w, ptype, angle)) self.platform_count 1 # ---------- 更新 ---------- def update(self): if self.game_over: # 游戏结束后粒子继续飘 for p in self.particles[:]: p.update() if p.life 0: self.particles.remove(p) for f in self.floats[:]: f.update() if f.life 0: self.floats.remove(f) return self.frame 1 # 控制小球 keys pygame.key.get_pressed() move 0 if keys[pygame.K_a] or keys[pygame.K_LEFT]: move - 1 if keys[pygame.K_d] or keys[pygame.K_RIGHT]: move 1 # 根据平台类型调整加速度 accel 0.8 max_speed 6.5 if self.ball.on_platform and self.ball.on_platform.type PLATFORM_ICE: accel 0.25 max_speed 8 if move ! 0: self.ball.vx move * accel if abs(self.ball.vx) max_speed: self.ball.vx max_speed * (1 if self.ball.vx 0 else -1) else: # 摩擦 self.ball.vx * 0.96 if abs(self.ball.vx) 0.1: self.ball.vx 0 # 更新小球 self.ball.on_platform None self.ball.update() # 更新平台 for p in self.platforms: p.update() # 碰撞检测小球与平台 for p in self.platforms: self.check_collision(p) # 更新粒子 for p in self.particles[:]: p.update() if p.life 0: self.particles.remove(p) for f in self.floats[:]: f.update() if f.life 0: self.floats.remove(f) # 相机跟随向下 self.target_camera_y max(0, self.ball.y - H * 0.35) self.camera_y (self.target_camera_y - self.camera_y) * 0.08 # 深度计分 if self.ball.y self.max_depth: gained int((self.ball.y - self.max_depth) * 0.5) self.depth gained self.score gained if gained 0: self.floats.append(FloatText( f{gained}, self.ball.x, self.ball.y - 40, (255, 220, 100), self.font_sm )) self.max_depth self.ball.y # 补充新平台 while self.next_platform_y self.camera_y H 200: self.spawn_platform() # 移除屏幕上方太远的平台 self.platforms [p for p in self.platforms if p.y self.camera_y - 300] # 血量消耗越深越快 depth_hp_drain self.depth / 8000.0 self.ball.hp - depth_hp_drain # 掉落检测 if self.ball.y self.camera_y H 100: self.ball.hp 0 # 死亡 if self.ball.hp 0: self.ball.hp 0 self.game_over True # 爆炸粒子 for _ in range(40): self.particles.append(Particle( self.ball.x, self.ball.y, random.choice([COL_BALL, COL_BALL_LIGHT, (255, 255, 255)]), speed6, size6, gravity0.3 )) def check_collision(self, p): 检测小球与平台碰撞 if p.hit_cooldown 0 and p.type in (PLATFORM_SPIKE, PLATFORM_LAVA): return x1, y1, x2, y2 p.get_line() # 计算球心到线段的最近点 dx x2 - x1 dy y2 - y1 length_sq dx * dx dy * dy if length_sq 0.001: return t ((self.ball.x - x1) * dx (self.ball.y - y1) * dy) / length_sq t max(0, min(1, t)) closest_x x1 t * dx closest_y y1 t * dy # 距离 dist_x self.ball.x - closest_x dist_y self.ball.y - closest_y dist math.hypot(dist_x, dist_y) if dist self.ball.radius p.h / 2 2: # 计算法线方向 if dist 0.001: nx, ny 0, -1 else: nx dist_x / dist ny dist_y / dist # 判断球是否在平台上方 # 平台法线朝上的判定球心在平台线的上方 # 用平台角度判断 bar_nx -math.sin(p.angle) bar_ny math.cos(p.angle) # 如果球在平台上方 if ny * bar_ny nx * bar_nx 0.3 or self.ball.vy 0: # 站上平台 overlap self.ball.radius p.h / 2 - dist self.ball.x nx * overlap * 0.9 self.ball.y ny * overlap * 0.9 # 弹性碰撞速度反射 dot self.ball.vx * nx self.ball.vy * ny if dot 0: self.ball.vx - 1.6 * dot * nx self.ball.vy - 1.6 * dot * ny # 沿平台方向的摩擦力 # 把速度分解为法线方向和切线方向 tangent_x -ny tangent_y nx t_speed self.ball.vx * tangent_x self.ball.vy * tangent_y # 摩擦 if p.type PLATFORM_ICE: t_speed * 0.995 else: t_speed * 0.92 self.ball.vx nx * (self.ball.vx * nx self.ball.vy * ny) tangent_x * t_speed self.ball.vy ny * (self.ball.vx * nx self.ball.vy * ny) tangent_y * t_speed # 平台特殊效果 if p.type PLATFORM_SPRING: # 弹簧向上弹 self.ball.vy -13 p.spring_anim 1.0 p.hit_cooldown 15 for _ in range(15): self.particles.append(Particle( self.ball.x, self.ball.y self.ball.radius, COL_SPRING, speed3, size3 )) self.floats.append(FloatText( 弹!, self.ball.x, self.ball.y - 30, (120, 255, 150), self.font_md )) elif p.type PLATFORM_SPIKE and p.hit_cooldown 0: # 滚针掉血 dmg 15 self.ball.hp - dmg self.ball.invincible 40 p.hit_cooldown 30 self.ball.vy -5 # 弹一下 for _ in range(20): self.particles.append(Particle( self.ball.x, self.ball.y, random.choice([COL_SPIKE, COL_SPIKE_LIGHT, (255, 255, 255)]), speed5, size4 )) self.floats.append(FloatText( f-{dmg}, self.ball.x, self.ball.y - 30, (255, 100, 120), self.font_md )) elif p.type PLATFORM_LAVA and p.hit_cooldown 0: # 岩浆持续掉血 dmg 8 self.ball.hp - dmg self.ball.invincible 25 p.hit_cooldown 20 self.ball.vy -6 for _ in range(20): self.particles.append(Particle( self.ball.x, self.ball.y, random.choice([COL_LAVA, COL_LAVA_LIGHT, (255, 200, 100)]), speed5, size5 )) self.floats.append(FloatText( f-{dmg}, self.ball.x, self.ball.y - 30, (255, 160, 80), self.font_md )) # 记录站立平台 if self.ball.vy -2: self.ball.on_platform p # ---------- 绘制 ---------- def draw(self): # 背景渐变 for y in range(H): ratio y / H r int(COL_BG_TOP[0] * (1 - ratio) COL_BG_BOT[0] * ratio) g int(COL_BG_TOP[1] * (1 - ratio) COL_BG_BOT[1] * ratio) b int(COL_BG_TOP[2] * (1 - ratio) COL_BG_BOT[2] * ratio) pygame.draw.line(self.screen, (r, g, b), (0, y), (W, y)) # 星空视差 for s in self.stars: sy (s[y] - self.camera_y * s[parallax]) % H brightness s[brightness] * (0.7 0.3 * math.sin(self.frame * 0.05 s[x])) color (int(255 * brightness), int(255 * brightness), int(220 * brightness)) pygame.draw.circle(self.screen, color, (int(s[x]), int(sy)), int(s[size])) # 深度刻度线 grid_start int(self.camera_y // 100) * 100 for gy in range(grid_start, grid_start H 200, 100): sy gy - self.camera_y if 0 sy H: alpha 60 s pygame.Surface((W, 1), pygame.SRCALPHA) s.fill((100, 150, 200, alpha)) self.screen.blit(s, (0, sy)) txt self.font_sm.render(f{gy}m, True, (100, 130, 170)) self.screen.blit(txt, (5, sy 2)) # 平台 for p in self.platforms: screen_y p.y - self.camera_y if -100 screen_y H 100: # 临时修改y用于绘制 old_y p.y p.y screen_y p.draw(self.screen) p.y old_y # 粒子 for p in self.particles: p.draw(self.screen) # 小球 if not self.game_over: old_y self.ball.y self.ball.y self.ball.y - self.camera_y self.ball.draw(self.screen) self.ball.y old_y # 飘字 for f in self.floats: f.draw(self.screen) # UI self._draw_ui() # 游戏结束 if self.game_over: self._draw_game_over() def _draw_ui(self): # 血条背景 bar_x, bar_y 20, 20 bar_w, bar_h 260, 24 pygame.draw.rect(self.screen, (40, 30, 60), (bar_x, bar_y, bar_w, bar_h), border_radius12) # 血条 hp_ratio max(0, self.ball.hp / self.ball.max_hp) hp_w int(bar_w * hp_ratio) if hp_ratio 0.5: hp_color (100, 255, 150) elif hp_ratio 0.25: hp_color (255, 220, 80) else: hp_color (255, 80, 100) if hp_w 0: pygame.draw.rect(self.screen, hp_color, (bar_x, bar_y, hp_w, bar_h), border_radius12) # 边框 pygame.draw.rect(self.screen, (180, 200, 255), (bar_x, bar_y, bar_w, bar_h), 2, border_radius12) # 血量数字 hp_text self.font_md.render(fHP {int(self.ball.hp)}, True, (255, 255, 255)) self.screen.blit(hp_text, (bar_x 10, bar_y 2)) # 分数 score_text self.font_lg.render(f分数: {int(self.score)}, True, COL_TEXT) self.screen.blit(score_text, (W - score_text.get_width() - 20, 15)) # 深度 depth_text self.font_md.render(f深度: {int(self.depth)}m, True, (150, 200, 255)) self.screen.blit(depth_text, (W - depth_text.get_width() - 20, 55)) # 操作提示 hint self.font_sm.render( A/D 或 ← → 滚动 | 空格 跳跃 | R 重开 | ESC 退出, True, (120, 140, 180) ) self.screen.blit(hint, (W // 2 - hint.get_width() // 2, H - 28)) def _draw_game_over(self): # 遮罩 overlay pygame.Surface((W, H), pygame.SRCALPHA) overlay.fill((0, 0, 0, 160)) self.screen.blit(overlay, (0, 0)) title self.font_xl.render(小球坠落了..., True, (255, 100, 130)) title_rect title.get_rect(center(W // 2, H // 2 - 80)) self.screen.blit(title, title_rect) score_text self.font_lg.render(f最终分数: {int(self.score)}, True, (255, 220, 100)) score_rect score_text.get_rect(center(W // 2, H // 2)) self.screen.blit(score_text, score_rect) depth_text self.font_md.render(f最深深度: {int(self.depth)}m, True, (150, 200, 255)) depth_rect depth_text.get_rect(center(W // 2, H // 2 45)) self.screen.blit(depth_text, depth_rect) hint self.font_md.render(按 R 重新开始, True, (200, 220, 255)) hint_rect hint.get_rect(center(W // 2, H // 2 110)) self.screen.blit(hint, hint_rect) # ---------- 跳跃 ---------- def jump(self): if self.game_over: return if self.ball.on_platform and self.ball.jump_cooldown 0: self.ball.vy -12 self.ball.on_platform None self.ball.jump_cooldown 15 for _ in range(10): self.particles.append(Particle( self.ball.x, self.ball.y self.ball.radius, (150, 200, 255), speed3, size3, gravity0.15 )) # ---------- 主循环 ---------- def run(self): running True while running: for e in pygame.event.get(): if e.type pygame.QUIT: running False elif e.type pygame.KEYDOWN: if e.key pygame.K_ESCAPE: running False elif e.key pygame.K_r: self.reset() elif e.key pygame.K_SPACE: self.jump() self.update() self.draw() pygame.display.flip() self.clock.tick(FPS) pygame.quit() sys.exit() if __name__ __main__: print( * 50) print( 小球逃跑) print( * 50) print( A/D 或 ← → 控制小球滚动) print( 空格 跳跃 | R 重开 | ESC 退出) print( * 50) Game().run()

相关新闻

Linux内核内存泄漏排查:/proc/vmallocinfo实战指南

Linux内核内存泄漏排查:/proc/vmallocinfo实战指南

1. 为什么你需要关注 /proc/vmallocinfo第一次在服务器上看到/proc/vmallocinfo的时候,我正被一个内核模块的内存泄漏问题折磨了整整两天。free显示内存充足,slabtop也看不出异常,但系统就是越来越慢,最后 OOM Killer 开始随机杀进…

2026/10/11 13:14:24 阅读更多 →
AI Agent开发必备:轻量级本地运行时驾驶舱

AI Agent开发必备:轻量级本地运行时驾驶舱

1. 项目概述:当终端窗口堆满屏幕,AI Agent 真的需要一个“驾驶舱”你有没有过这样的时刻:调试一个本地 AI Agent 流程,开一个终端跑 LLM 接口服务,再开一个跑向量数据库,第三个起 RAG 检索服务,…

2026/10/10 10:16:58 阅读更多 →
90套职业装PSD形象照素材模板:分层换脸与职场应用指南

90套职业装PSD形象照素材模板:分层换脸与职场应用指南

市面上打着“职业形象照PSD素材”旗号的资源很多,但真正能直接用、分层干净、服装和姿态都不过时的稀缺模板,其实非常难找。我手里这套90套男女士职业装形象照PSD素材模板,算是这些年攒下来的硬货,覆盖了西装、商务休闲、职业套裙…

2026/10/10 10:16:58 阅读更多 →

最新新闻

单链表基础三题详解:删除节点、反转链表与找中间节点

单链表基础三题详解:删除节点、反转链表与找中间节点

链表这块内容,大学里第一次接触的时候觉得简单,无非是节点加指针。可真到动手写题的时候,删除节点能删丢一半,反转链表能绕成环,找中间节点还会因为奇偶数量吵半天。单链表综合练习里的“删除指定值节点”“反转链表”…

2026/10/11 14:44:43 阅读更多 →
C/C++手撸泡泡堂:从SDL2环境搭建到状态机实现

C/C++手撸泡泡堂:从SDL2环境搭建到状态机实现

简介:本资源是一份基于C/C实现的经典2D游戏《泡泡堂》(炸弹人)完整开发项目,面向C初学者与游戏编程入门者,提供从代码逻辑、图形渲染到音画资源集成的全链路实践范例。压缩包共346个文件,含235张PNG/JPG游戏…

2026/10/11 14:44:43 阅读更多 →
GitHub日榜趋势捕获系统:轻量级技术雷达构建指南

GitHub日榜趋势捕获系统:轻量级技术雷达构建指南

1. 项目概述:这不是一份榜单,而是一套可复用的趋势捕获系统“GitHub 日榜趋势速报 | 2026-10-04”——看到这个标题,很多人第一反应是:又一个爬虫脚本定时任务Markdown生成的自动化小工具。但如果你真这么想,就错过了它…

2026/10/11 14:44:43 阅读更多 →
Oracle 19c RAC Linux 7.6实战安装:ASM磁盘权限与udev规则避坑指南

Oracle 19c RAC Linux 7.6实战安装:ASM磁盘权限与udev规则避坑指南

简介:本资源是一份面向Oracle DBA与Linux系统工程师的实战型安装指南,聚焦Red Hat Enterprise Linux 7.6平台部署Oracle 19c RAC高可用集群,重点解决GNS配置SCAN、Flex ASM架构演进、Standalone与Domain Service两种集群模式差异等关键难点。…

2026/10/11 14:44:43 阅读更多 →
MRAM嵌入式非易失存储器为什么能替代SPI Flash频繁擦写

MRAM嵌入式非易失存储器为什么能替代SPI Flash频繁擦写

MRAM的全称是Magnetoresistive RAM,磁阻随机存取存储器。MRAM嵌入式非易失存储器用电子自旋的磁化方向来存储比特,而不是像Flash那样靠浮栅里困住的电荷。这个物理机理的差异,直接换来了四个Flash和EEPROM无法同时给出的特征: 1、…

2026/10/11 14:44:43 阅读更多 →
VPP2:预测得更好,行动得更好

VPP2:预测得更好,行动得更好

目录 1. 研究背景 2. 数据处理流水线 2.1.视频来源与收集 2.2. 视频过滤、分割与标注 2.3 统一动作空间和坐标系 2.4. 统一多视角输入 3. VPP模型策略 3.1 模型三阶段训练 3.2 VLM用于高级规划 4. 实验以及结果 4.1 视频预测质量分析 4.2 策略执行结果分析 5. 总…

2026/10/11 14:43:43 阅读更多 →

日新闻

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

简介:基于 ARIMA、LSTM、Transformer 等模型的流感时间序列预测 Python 源码,面向计算机相关专业课程设计与期末大作业学生,以及项目实战学习者。内容覆盖预处理、平稳性检验、定阶、残差分析、多模型对比预测的完整时序建模流程,…

2026/10/11 0:00:27 阅读更多 →
影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别 做影刀RPA自动化,十个新手有八个栽在"往输入框里填东西"这件事上:要么填不进去,要么填了一半,要么直接把原来内容追加在后面。这背后的根因&…

2026/10/11 0:00:27 阅读更多 →
影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容 1. 认识影刀:什么场景该用RPA采小说数据 起点中文网的页面结构相对稳定——分类榜单、书籍详情、章节内容三块独立页面,跳转链路清晰。这种场景非常适合影刀自动化&#x…

2026/10/11 0:00:27 阅读更多 →

周新闻

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

流感时间序列预测实战:ARIMA/LSTM全流程拆解与避坑指南

简介:基于 ARIMA、LSTM、Transformer 等模型的流感时间序列预测 Python 源码,面向计算机相关专业课程设计与期末大作业学生,以及项目实战学习者。内容覆盖预处理、平稳性检验、定阶、残差分析、多模型对比预测的完整时序建模流程,…

2026/10/11 0:00:27 阅读更多 →
影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别

影刀RPA新手教程:键盘模拟输入实战——输入文本与模拟按键的区别 做影刀RPA自动化,十个新手有八个栽在"往输入框里填东西"这件事上:要么填不进去,要么填了一半,要么直接把原来内容追加在后面。这背后的根因&…

2026/10/11 0:00:27 阅读更多 →
影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容

影刀RPA新手教程:阅文起点小说数据采集实战——书籍信息与章节内容 1. 认识影刀:什么场景该用RPA采小说数据 起点中文网的页面结构相对稳定——分类榜单、书籍详情、章节内容三块独立页面,跳转链路清晰。这种场景非常适合影刀自动化&#x…

2026/10/11 0:00:27 阅读更多 →

月新闻

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/11 10:45:37 阅读更多 →
Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/11 14:36:53 阅读更多 →
黑夜航拍船只数据集训练YOLOV5模型全流程解析

黑夜航拍船只数据集训练YOLOV5模型全流程解析

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/10/11 14:36:54 阅读更多 →