- 博客(1)
- 资源 (10)
- 收藏
- 关注
原创 javax.swing.border 边框
import javax.swing.border.*; label.setBorder(new SoftBevelBorder(SoftBevelBorder.LOWERED));
2005-12-17 23:20:00 1064
《OpenCV3编程入门》书本配套源代码【OpenCV2示例程序源代码工程合集】
【1】书本正篇程序源代码
【2】附赠示例程序源代码
配套程序说明.doc
欢迎购买《OpenCV3编程入门》一书!
本书有OpenCV2、OpenCV3两套独立的书本配套示例程序供选择使用。
此为书本配套的OpenCV2版示例程序源代码工程合集。开发测试环境为Windows7 64位旗舰版、Visual Stuido 2010 、OpenCV 2.4.9,理论上支持OpenCV 2系列的所有版本的编译运行。
另有OpenCV3版的详细注释的示例程序源代码工程、书本配套可独立运行的exe执行程序合集分别提供下载。
2017-11-02
飞机大战源码(python+pygame)
用python+pygame实现的飞机大战的源码,包含资源,可直接运行。通过鼠标控制。
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
exit()
# 绘画背景
screen.blit(background,(0, 0))
# 检测游戏状态
if not gameover:
# 定位鼠标的x, y坐标
x, y = pygame.mouse.get_pos()
# 发射子弹
interval_b -= 1
if interval_b < 0:
bullets[index_b].restart()
interval_b = 100
index_b = (index_b + 1) % count_b
for b in bullets:
if b.active:
# 检查子弹命中情况
for e in enemies:
# 击中敌机,分数加100
if checkHit(e, b):
score += 100
b.move()
screen.blit(b.image, (b.x, b.y))
# 绘画机群
for e in enemies:
e.move()
screen.blit(e.image, (e.x, e.y))
if checkCrash(e, plane):
gameover = True
e.move()
screen.blit(e.image, (e.x, e.y))
plane.move()
screen.blit(plane.image, (plane.x, plane.y))
# 屏幕左上角显示分数
text = font.render("Score: %d" % score, 1, (0, 0, 0))
screen.blit(text, (0, 0))
else:
text = font.render("Score: %d" % score, 1, (0, 0, 0))
screen.blit(text, (190, 400))
# 游戏结束后,检测鼠标抬起就“重置游戏”
if gameover and event.type == pygame.MOUSEBUTTONUP:
plane.restart()
for e in enemies:
e.restart()
for b in bullets:
b.active = False
score = 0
gameover = False
pygame.display.update()
2017-10-11
lombok.jar
eclipse / myeclipse 手动安装 lombok
1. 将 lombok.jar 复制到 myeclipse.ini / eclipse.ini 所在的文件夹目录下
2. 打开 eclipse.ini / myeclipse.ini,在最后面插入以下两行并保存:
-Xbootclasspath/a:lombok.jar
-javaagent:lombok.jar
3.重启 eclipse / myeclipse
下面介绍几个我常用的 lombok 注解:
@Data :注解在类上;提供类所有属性的 getting 和 setting 方法,此外还提供了equals、canEqual、hashCode、toString 方法
@Setter:注解在属性上;为属性提供 setting 方法
@Getter:注解在属性上;为属性提供 getting 方法
@Log4j :注解在类上;为类提供一个 属性名为log 的 log4j 日志对象
@NoArgsConstructor:注解在类上;为类提供一个无参的构造方法
@AllArgsConstructor:注解在类上;为类提供一个全参的构造方法
2016-04-19
jface.nl1_3.2.1
org.eclipse.jface.nl1_3.2.1.v200609270227.jar
org.eclipse.jface.text.nl1_3.2.1.v200609270227.jar
2010-08-10
jface_3.6,jar
org.eclipse.core.commands_3.6.0.I20100512-1500.jar
org.eclipse.core.runtime_3.6.0.v20100505.jar
org.eclipse.equinox.common_3.6.0.v20100503.jar
org.eclipse.jface.text_3.6.0.v20100526-0800.jar
org.eclipse.jface_3.6.0.I20100601-0800.jar
org.eclipse.osgi_3.6.0.v20100517.jar
org.eclipse.text_3.5.0.v20100601-1300.jar
swt.jar
2010-08-07
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人