宇宙无限
发表于 2021-1-1 23:11
我一个朋友写的Java代码
他真的就把main写成了mian,而且配置文件叫peizi.yml
没错,是peizi,不是peizhi
面相拼音编程结果拼音还没学好
而且还中文编程,变量名全都是中文
甚至那个配置文件里的key都是中文
麻了
————
再说一个,有一个人写的代码:
if(value=="真") return true; else if(value=="假") return false;
我真的怀疑他是易语言转过来的
敢想敢做敢拼
发表于 2021-1-1 23:12
说起最烂的代码就不得不提起 Gitee 的热门仓库:
开源中国/bullshit-codes
仓库简介:本仓库的目的就是为了收集坑爹代码,可以让别人不掉坑或者少掉坑,可以避免自己掉坑,或许哈哈一乐。如果你觉得这个仓库有意思,别忘了给个 Star 哦。
勇敢的树袋熊1
发表于 2021-1-1 23:14
某京字头国企 轨道交通方面项目…
4年经验的姑娘的C#代码…
这…可能对变量是干啥用的不是很清楚吧…
WPF控件里的代码…
……这控件真可怜,没事就检查一下自己是不是丁克父母的所生…
这段代码一开始真没明白是干啥用的…后来发现控件里有个timer,大概明白是希望当控件remove之后不再执行后续操作。
结果上讲…用c#原生代码干掉了CG实现了内存泄露效果…这个控件每次显示之后无法释放,永世不得超生
十二音阶囤
发表于 2021-1-1 23:19
程序员和程序员的体质不能一概而论,我曾在极端愤怒下三小时写出1600行,跪着改了三天都运行不了
形腿望舞
发表于 2021-1-1 23:20
就是我写的,我在高中时候,在步步高电子词典上面有一个basic模拟器,可以写小程序,编程语言是基于quick basic修改的,当时我自学了一下,写了一个文字游戏,现在看来不忍直视,变量名全是拼音,全篇逻辑全靠goto,那时候还不会用函数去控制流程。
Const bai=&HFFFFFF '白色
Const hei=&H000000 '黑色
Const shui=&H555555 '深灰色
Const qhui=&HAAAAAA '浅灰色
color(hei,bai,bai)
Const key_0=48
const key_1=49
const key_2=50
const key_3=51
const key_4=52
const key_5=53
const key_6=54
const key_7=55
const key_8=56
const key_9=57
Const key_a=65
const key_b=66
const key_c=67
const key_d=68
const key_e=69
const key_f=70
const key_g=71
const key_h=72
const key_i=73
const key_j=74
Declare Function tk()
Declare Function js()
Declare Function p()
Declare Function getkey()
Function tk()
Cls
Print "本游戏由冰封飞飞制作"
Print "谢谢使用"
Print "初学乍练,有不好的地方"
Print "希望大家提出建议"
p
End
End Function
Function js()
Cls
Print "经过一番恶战"
Print "邪恶的斯巴达克终于"
Print "倒下了,你逃离暗黑学校"
Print "回到地球"
p
tk()
End Function
Function p()
WAITKEY()
End Function
Function getkey()
getkey=waitkey()
End Function
lv=0
Exp=0
expmax=100
gj=100
fy=50
hp=300
hpmax=300
mpmax=100
mp=100
y1=5
y2=0
y3=0
y4=5
y5=0
y6=0
y7=5
y8=0
y9=0
y10=0
y11=0
y12=0
y13=0
y14=0
y15=0
fp=5
mg1=0
mg2=0
mg3=0
mg4=0
money=1000
Cls
Print "校园历险记"
p
font(font_24hei)
Print " Ⅱ "
Print "----------ver1.0"
p
Cls
font(font_16song)
Print "你在宇宙中飞行--"
Print "轰--轰--轰"
Print "飞机失事你坠入了暗黑学校"
p
Print "这里充满凶险又不乏"
Print "和谐与安乐"
p
Cls
Print "但-那终究不是你的家园"
Print "逃离吧----"
Print "努力吧----"
p
Cls
font(font_24song)
Print "出"
Print "发"
Print "喽"
Print "!"
p
'----------------主程序------------
1
Cls
font(font_12song)
Print "123456 "
Print "状 对 买 打 修 升"
Print "态 话 卖 工 炼 级"
Print "7890E "
Print "打 赌 猜 储 退"
Print "怪 博 数 存 出"
key=getkey()
If key=key_1 Then
GoTo 101
Else If key=key_2 Then
GoTo 102
Else If key=key_3 Then
GoTo 103
Else If key=key_4 Then
GoTo 104
Else If key=key_5 Then
GoTo 105
Else If key=key_6 Then
GoTo 106
Else If key=key_7 Then
GoTo 107
Else If key=key_8 Then
GoTo 108
Else If key=key_9 Then
GoTo 109
Else If key=key_0 Then
GoTo 110
Else If key=key_e Then
tk()
Else
GoTo 1
End If
'----------状态---------
101 Cls
Print "等级",lv
Print "经验",Exp;"/";expmax
Print "体力",hp;"/";hpmax
Print "魔法",mp;"/";mpmax
Print "攻击力",gj
Print "防御力",fy
Print "金钱",money
Print "-----0返回---------"
key=getkey()
If key=key_0 Then
GoTo 1
Else
GoTo 101
End If
'---------------对话----------
102 Cls
Print "1游戏介绍人"
Print "2挑战人"
Print "0--返回---"
key=getkey()
If key=key_1 Then
GoTo 1021
Else If key=key_2 Then
GoTo 1022
Else If key=key_0 Then
GoTo 1
Else
GoTo 102
End If
1021 Cls
Print "你想做什么?0--返回"
Print "1买卖 2打工"
Print "3修炼 4升级"
Print "5打怪 6游戏"
key=getkey()
If key=key_1 Then
GoTo 10211
Else If key=key_2 Then
GoTo 10212
Else If key=key_3 Then
GoTo 10213
Else If key=key_4 Then
GoTo 10214
Else If key=key_5 Then
GoTo 10215
Else If key=key_6 Then
GoTo 10216
Else If key=key_0 Then
GoTo 102
Else
GoTo 1021
End If
10211 Cls
Print "你可以在商店买卖"
Print "血药(大,中,小)"
Print "法药(大,中,小)"
Print "暗器(飞镖,飞刀,飞剑)"
Print "等----"
Print "并且可以买到修炼中使用的属性点"
p
GoTo 1021
10212 Cls
Print "打工是利用你的经验值"
Print "来换取金钱的交易"
Print "随着等级的提升换取量越来越大"
p
GoTo 1021
10213 Cls
Print "修炼可以提升你的功击"
Print "防御或魔法攻击"
Print "修炼攻击防御一次消耗一个"
Print "属性点,修炼魔法根据魔法等级"
Print "递增"
p
GoTo 1021
10214 Cls
Print "这个游戏由于修炼打工"
Print "等,会用到大量的经验值"
Print "所以当经验值超过上限"
Print "不会自动升级,需要手"
Print "动升级"
p
GoTo 1021
10215
Cls
Print "练级场地有能力大小不同的"
Print "各种怪物,可根据你的能力"
Print "进行练级"
Print "战斗胜利后会获得经验值"
Print "金钱以及随即获得属性点"
Print "战斗失败,游戏结束"
Print "战斗中可以使用血药法药"
Print "以及暗器"
p
GoTo 1021
10216 Cls
Print "赌博为压大小"
Print "2个骰子点数和大于7为大,小于"
Print "7为小,你可压大或小。但点数等于"
Print "7庄家通吃"
Print "胜利3倍赢钱"
Print "输了押金全部没收"
p
Cls
Print "猜数字为无本金游戏"
Print "从0--9选一个数"
Print "如果大了或小了都会提示"
Print "有3次机会"
Print "猜中会得到相应金钱"
Print "随着级别增加而增加"
p
GoTo 1021
1022 Cls
Print "你确定要挑战boss吗"
Print "1是 2否 "
key=getkey()
If key=key_1 Then
GoTo 10222
Else If key=key_2 Then
GoTo 102
Else
GoTo 1022
End If
'-----------买卖-------------
103 Cls
Print "你要买还是卖?"
Print "1 买"
Print "2 卖"
Print "0---返回"
key=getkey()
If key=key_1 Then
GoTo 1031
Else If key=key_2 Then
GoTo 1032
Else If key=key_0 Then
GoTo 1
Else
GoTo 103
End If
1031
Cls
Print "B--下页 C--返回"
Print "1小血药--100",y1
Print "2中血药--250",y2
Print "3大血药--500",y3
Print "4小法药--150",y4
Print "5中法药--300",y5
Print "6大法药--700",y6
Print "7飞镖----500",y7
Print "8飞刀----800",y8
Print "9飞剑---1200",y9
key=getkey()
If key=key_1 And money>99 Then
y1=y1+1
money=money-100
Else If key=key_2 And money>249 Then
y2=y2+1
money=money-250
Else If key=key_3 And money>499 Then
y3=y3+1
money=money-500
Else If key=key_4 And money>149 Then
y4=y4+1
money=money-150
Else If key=key_5 And money>299 Then
y5=y5+1
money=money-300
Else If key=key_6 And money>699 Then
y6=y6+1
money=money-700
Else If key=key_7 And money>499 Then
y7=y7+1
money=money-500
Else If key=key_8 And money>799 Then
y8=y8+1
money=money-800
Else If key=key_9 And money>1199 Then
y9=y9+1
money=money-1200
Else If key=key_b Then
GoTo 10312
Else If key=key_c Then
GoTo 103
Else
GoTo 1031
End If
GoTo 1031
10312 Cls
Print "A---上页C---返回"
Print "1毒箭------5000",y10
Print "2勾魂箭---10000",y11
Print "3万箭穿心-25000",y12
Print "4属性点---20000"
key=getkey()
If key=key_1 And money>4999 Then
y10=y10+1
money=money-5000
Else If key=key_2 And money>9999 Then
y11=y11+1
money=money-10000
Else If key=key_3 And money>24999 Then
y12=y12+1
money=money-25000
Else If key=key_4 And money>19999 Then
fp=fp+1
money=money-20000
Else If key=key_a Then
GoTo 1021
Else If key=key_c Then
GoTo 103
Else
GoTo 10312
End If
GoTo 10312
1032 Cls
Print "B---下页C---返回"
Print "1小血药---50",y1
Print "2中血药--125",y2
Print "3大血药--250",y3
Print "4小法药---75",y4
Print "5中法药--150",y5
Print "6大法药--350",y6
Print "7飞镖----250",y7
Print "8飞刀----400",y8
Print "9飞剑----600",y9
key=getkey()
If key=key_1 And y1>0 Then
money=money+50
y1=y1-1
Else If key=key_2 And y2>0 Then
money=money+125
y2=y2-1
Else If key=key_3 And y3>0 Then
money=money+250
y3=y3-1
Else If key=key_4 And y4>0 Then
money=money+75
y4=y4-1
Else If key=key_5 And y5>0 Then
money=money+150
y5=y5-1
Else If key=key_6 And y6>0 Then
money=money+350
y6=y6-1
Else If key=key_7 And y7>0 Then
money=money+250
y7=y7-1
Else If key=key_8 And y8>0 Then
money=money+400
y8=y8-1
Else If key=key_9 And y9>0 Then
money=money+600
y9=y9-1
Else If key=key_b Then
GoTo 10322
Else If key=key_c Then
GoTo 103
Else
GoTo 1032
End If
GoTo 1032
10322 Cls
Print "A---上页C---返回"
Print "1毒箭------2500",y10
Print "2勾魂箭----5000",y11
Print "3万箭穿心-12500",y12
key=getkey()
If key=key_1 And y10>0 Then
money=money+2500
y10=y10-1
Else If key=key_2 And y11>0 Then
money=money+5000
y11=y11-1
Else If key=key_3 And y12>0 Then
money=money+12500
y12=y12-1
Else If key=key_AThen
GoTo 1032
Else If key=key_c Then
GoTo 103
Else
GoTo 10322
End If
GoTo 10322
'---------------打工------------
104 Cls
Print "你要做什么? A--退出"
Print "1做包子 0级以上"
Print "2栽树 5级以上"
Print "3运石块 10级以上"
Print "4做家具 20级以上"
Print "5盖房 30级以上"
key=getkey()
If key=key_1 And Exp>249 Then
money=money+300
Exp=exp-250
Print "你得到了300块钱"
p
Else If key=key_2 And lv>4 And Exp>499 Then
money=money+900
Exp=exp-500
Print "你得到了900元钱"
p
Else If key=key_3 And lv>9 And Exp>1499 Then
money=money+5000
Exp=exp-1500
Print "你得到了5000元钱"
p
Else If key=key_4 And lv>19 And Exp>4999 Then
money=money+30000
Exp=exp-5000
Print "你得到了30000元钱"
p
Else If key=key_5 And lv>29 And Exp>6999 Then
money=money+75000
Exp=exp-7000
Print "你得到了75000元钱"
p
Else If key=key_a Then
GoTo 1
End If
GoTo 104
'------------修炼-----------
105
Cls
Print "你要修炼什么?A--退出"
Print "1攻击"
Print "2防御"
Print "------魔法-------"
Print "3飞沙走石 5级以上---魔法等级";mg1
Print "4水漫金山 10级以上--魔法等级";mg2
Print "5天诛地灭 15级以上--魔法等级";mg3
Print "6乾坤烈焰 30级以上--魔法等级";mg4
Print "属性点",fp;"个"
key=getkey()
If key=key_1 And fp>0 Then
gj=gj+10
fp=fp-1
Else If key=key_2 And fp>0 Then
fy=fy+8
fp=fp-1
Else If key=key_3 And fp>0 And lv>4 Then
mg1=mg1+1
fp=fp-1
Else If key=key_4 And fp>1 And lv>9 Then
mg2=mg2+1
fp=fp-2
Else If key=key_5 And fp>2 And lv>14 Then
mg3=mg3+1
fp=fp-3
Else If key=key_6 And fp>mg4 And lv>29 Then
mg4=mg4+1
fp=fp-(mg4+1)
Else If key=key_a Then
GoTo 1
Else
GoTo 105
End If
GoTo 105
'-----------------升级-----------------
106 Cls
Print "你确定你要升级吗?"
Print "你的等级",lv
Print "经验值",Exp;"/";expmax
Print "1我确定要升级"
Print "2我再考虑一下"
key=getkey()
If key=key_1 And Exp>expmax-1 Then
lv=lv+1
Exp=Exp-expmax
expmax=expmax+lv*lv*20
hpmax=hpmax+lv*20
hp=hpmax
mpmax=mpmax+lv*10
mp=mpmax
gj=gj+lv*5
fy=fy+lv*5
Print "你升级了!"
p
Else If key=key_2 Then
GoTo 1
Else
GoTo 106
End If
GoTo 106
'----------------打怪---------------
107 Cls
Print "---升级场---0退出"
Print "1 0---- 5练级区"
Print "2 5----10练级区"
Print "3 10---20练级区"
Print "4 20---30练级区"
Print "5 头目级怪练级区"
key=getkey()
If key=key_1 Then
GoTo 1071
Else If key=key_2 Then
GoTo 1072
Else If key=key_3 Then
GoTo 1073
Else If key=key_4 Then
GoTo 1074
Else If key=key_5 Then
GoTo 1075
Else If key=key_0 Then
GoTo 1
Else
GoTo 107
End If
1071 Cls
Print "0---5级练级区"
Print "1 妖魔"
Print "2 妖魔斗士"
Print "3 狼人"
Print "4 巨蚁"
Print "0---返回---"
key=getkey()
If key=key_1 Then
GoTo 10711
Else If key=key_2 Then
GoTo 10712
Else If key=key_3 Then
GoTo 10713
Else If key=key_4 Then
GoTo 10714
Else If key=key_0 Then
GoTo 107
Else
GoTo 1071
End If
1072 Cls
Print "5---10级练级场"
Print "1 骷髅"
Print "2 骷髅斗士"
Print "3 侏儒"
Print "4 侏儒斗士"
Print "0--返回"
key=getkey()
If key=key_1 Then
GoTo 10730
Else If key=key_2 Then
GoTo 10715
Else If key=key_3 Then
GoTo 10716
Else If key=key_4 Then
GoTo 10717
Else If key=key_0 Then
GoTo 107
Else
GoTo 1072
1073
Cls
Print "10---20练级区"
Print "1 夏洛克"
Print "2 变形虫"
Print "3 魅影"
Print "4 雪怪"
Print "0-返回"
key=getkey()
If key=key_1Then
GoTo 10718
Else If key=key_2 Then
GoTo 10719
Else If key=key_3 Then
GoTo 10720
Else If key=key_4 Then
GoTo 10721
Else If key=key_0 Then
GoTo 107
Else
GoTo 1073
End If
1074 Cls
Print "20---30级练级场"
Print "1 毒蝎"
Print "2 亚利安"
Print "3 邪恶蜥蜴"
Print "4 死神"
Print "0---返回"
key=getkey()
If key=key_1 Then
GoTo 10722
Else If key=key_2 Then
GoTo 10723
Else If key =key_3 Then
GoTo 10724
Else If key=key_4 Then
GoTo 10725
Else If key=key_0 Then
GoTo 107
Else
GoTo 1074
End If
1075
Print "头目级怪物练级区"
Print "1 死亡骑士"
Print "2 巨蚁女皇"
Print "3 冰之女皇"
Print "4 不死鸟"
Print "0---返回"
key=getkey()
If key=key_1 Then
GoTo 10726
Else If key=key_2 Then
GoTo 10727
Else If key=key_3 Then
GoTo 10728
Else If key=key_4 Then
GoTo 10729
ElseIf key=key_0 Then
GoTo 107
Else
GoTo 1075
End If
10711
ds$="妖魔"
hpd=50
gjd=20
fyd=20
mond=100
expd=50
sj=10
Kill=0
GoTo 1076
10712
ds$="妖魔斗士"
hpd=80
gjd=30
fyd=25
mond=125
expd=80
Kill=0
sj=10
GoTo 1076
10713
ds$="狼人"
hpd=100
gjd=50
Kill=0
fyd=40
mond=200+Rnd(10)
expd=100
sj=10
GoTo 1076
10714
ds$="巨蚁"
hpd=120
Kill=0
gjd=60
fyd=50
mond=200+Rnd(20)
expd=120
sj=10
GoTo 1076
10730
ds$="骷髅"
hpd=200
gjd=80
Kill=0
fyd=50
mond=200+Rnd(50)
expd=150
sj=5
GoTo 1076
10715
ds$="骷髅斗士"
hpd=220
gjd=100
fyd=100
Kill=0
mond=250+Rnd(10)
expd=180
sj=5
GoTo 1076
10716
ds$="侏儒"
hpd=250
gjd=120
fyd=100
Kill=0
mond=300
expd=200
sj=5
GoTo 1076
10717
ds$="侏儒斗士"
hpd=280
gjd=130
fyd=110
Kill=0
mond=300+Rnd(10)
expd=220
sj=5
GoTo 1076
10718
ds$="夏洛克"
hpd=300
Kill=0
gjd=150
fyd=120
mond=350+Rnd(50)
expd=300
sj=4
GoTo 1076
10719
ds$="变形虫"
hpd=320
gjd=160
Kill=0
fyd=140
mond=350+Rnd(100)
expd=350
sj=5
GoTo 1076
10720
ds$="魅影"
hpd=500
gjd=200
Kill=0
fyd=160
mond=500+Rnd(100)
expd=400
sj=5
GoTo 1076
10721
ds$="雪怪"
hpd=600
gjd=250
Kill=0
fyd=140
mond=500+Rnd(10)
expd=450
sj=5
GoTo 1076
10722
ds$="毒蝎"
hpd=800
gjd=300
Kill=0
fyd=200
mond=600+Rnd(100)
expd=500
sj=3
GoTo 1076
10723
ds$="亚利安"
hpd=1000
Kill=0
gjd=350
fyd=250
mond=800+Rnd(100)
expd=800
sj=3
GoTo 1076
10724
ds$="邪恶蜥蜴"
hpd=1500
gjd=500
Kill=0
fyd=200
mond=1000+Rnd(200)
expd=1000
sj=3
GoTo 1076
10725
ds$="死神"
hpd=2000
gjd=600
Kill=0
fyd=300
mond=2000-Rnd(500)
expd=1500
sj=3
GoTo 1076
10726
ds$="死亡骑士"
hpd=5000
Kill=0
gjd=1200
fyd=500
mond=10000-Rnd(5000)
expd=2000
sj=1
GoTo 1076
10727
ds$="巨蚁女皇"
hpd=6000
gjd=800
Kill=0
fyd=800
mond=10000-Rnd(3000)
expd=2500
sj=1
GoTo 1076
10728
ds$="冰之女皇"
hpd=100000
gjd=400
Kill=0
fyd=100
mond=10000-Rnd(3000)
expd=3000
sj=1
GoTo 1076
10729
ds$="不死鸟"
hpd=8000
gjd=1000
Kill=0
fyd=500
mond=10000+Rnd(1000)
expd=4000
sj=1
GoTo 1076
10222
ds$="斯巴达克"
hpd=50000
gjd=2000
fyd=1200
mond=100000+Rnd(1000)
expd=10000
sj=1
Kill=1
GoTo 1076
p
1076 Cls
Print ds$;"体力:";hpd
Print "你的体力";hp;"/";hpmax
Print "你的魔法";mp;"/";mpmax
Print " 1234 "
Print "物 魔 使逃"
Print "理 法 用跑"
Print "攻 攻 物 "
Print "击 击 品 "
key=getkey()
If key=key_1 Then
GoTo 10761
Else If key=key_2 Then
GoTo 107620
Else If key=key_3 Then
GoTo 107630
Else If key=key_4 Then
GoTo 107640
Else
GoTo 1076
End If
10761
s1=gj-fyd/2-Rnd(fyd/2)
d1=gjd-fy/2-Rnd(fy/2)
a=Rnd(10)+1
Cls
If s1<2 Then
hpd=hpd-a
Print &#34;你的攻击使&#34;;ds$;&#34;损失&#34;;a;&#34;点体力&#34;
p
GoTo 10762
Else
hpd=hpd-s1
Print &#34;你的攻击使&#34;;ds$;&#34;损失&#34;;s1;&#34;点体力&#34;
p
GoTo 10762
End If
10762
If hpd<1 Then
GoTo 10763
End If
If d1<2 Then
hp=hp-a
Print ds$;&#34;的攻击使你损失&#34;;a;&#34;点体力&#34;
p
Else
hp=hp-d1
Print ds$;&#34;的攻击使你损失&#34;;d1;&#34;点体力&#34;
p
End If
GoTo 10764
10763
If Rnd(sj)=0 Then
fp=fp+1
qn=1
Else
qn=0
End If
If Kill=1 Then
GoTo 10223
End If
Cls
Exp=Exp+expd
money=money+mond
Print &#34;战斗胜利&#34;
Print &#34;你获得经验&#34;;expd
Print &#34;你获得金钱&#34;;mond
Print &#34;你获得潜能点&#34;;qn;&#34;点&#34;
p
GoTo 107
10764
If hp<1 Then
e1=(Rnd(Exp+1))/20
Exp=exp-e1
m1=(Rnd(money+1))/50
money=money-m1
hp=hpmax
mp=mpmax
Cls
Print &#34;战斗失败&#34;
Print &#34;经验损失&#34;;e1
Print &#34;金钱损失&#34;;m1
p
GoTo 1
Else
GoTo 1076
End If
10223
js()
107620
Cls
Print &#34;你使用什么魔法&#34;
Print &#34;1飞沙走石 20点mp&#34;
Print &#34;2水漫金山 50点mp&#34;
Print &#34;3天诛地灭 150点mp&#34;
Print &#34;4乾坤烈焰 300点mp&#34;
Print &#34;0-----返回----&#34;
key=getkey()
If key=key_1 And mg1>0 And mp>19 Then
mf1=mg1*5+Rnd(200)+Rnd(gj/10)
mp=mp-20
hpd=hpd-mf1
Cls
Print &#34;你念咒使用飞沙走石&#34;
Print &#34;满天黄沙,风起云涌&#34;
Print &#34;使&#34;;ds$;&#34;损伤&#34;;mf1;&#34;点体力&#34;
p
Else If key=key_2 And mg2>0 And mp>49 Then
mf2=mg2*7+Rnd(300)+Rnd(gj/9)
mp=mp-50
hpd=hpd-mf2
Cls
Print &#34;你召唤水龙冲塌房屋&#34;
Print &#34;使&#34;;ds$;&#34;损伤&#34;;mf2;&#34;点体力&#34;
p
Else If key=key_3 And mg3>0 And mp>149 Then
mf3=mg3*15+Rnd(400)+Rnd(gj/8)
mp=mp-150
hpd=hpd-mf3
Print &#34;轰--轰--轰&#34;
Print &#34;3记响雷划破天空直&#34;
Print &#34;劈&#34;;ds$;&#34;的天灵盖&#34;
Print &#34;使&#34;;ds$;&#34;损失&#34;;mf3;&#34;点体力&#34;
p
Else If key=key_4 And mg4>0 And mp>299 Then
mf41=mg4*5+Rnd(100)+Rnd(gj/10)
mf42=mg4*10+Rnd(200)+Rnd(gj/8)
mg43=mg4*20+Rnd(300)+Rnd(gj/5)
mp=mp-300
hpd=hpd-mf41-mf42-mf43
cls
Print &#34;你一挥袖子点起一阵三味真火&#34;
Print &#34;使&#34;;ds$;&#34;损伤&#34;;mf41;&#34;点体力&#34;
p
Cls
Print &#34;你再一挥袖子,摆起火龙阵&#34;
Print &#34;使&#34;;ds$;&#34;损伤&#34;;mf42;&#34;点体力&#34;
p
Cls
Print &#34;你用尽全力,一挥袖子&#34;
Print &#34;天崩地裂,火焰四起&#34;
Print &#34;使&#34;;ds$;&#34;损伤&#34;;mf43;&#34;点体力&#34;
p
Else If key=key_0 Then
GoTo 1076
Else
GoTo 107620
End If
GoTo 10762
107630
Cls
Print &#34;B---下页C---返回&#34;
Print &#34;1小血药&#34;;y1
Print &#34;2中血药&#34;;y2
Print &#34;3大血药&#34;;y3
Print &#34;4小法药&#34;;y4
Print &#34;5中法药&#34;;y5
Print &#34;6大法药&#34;;y6
Print &#34;7飞镖&#34;;y7
Print &#34;8飞刀&#34;;y8
Print &#34;9飞剑&#34;;y9
key=getkey()
If key=key_1 And y1>0 Then
hp=hp+100
y1=y1-1
Else If key=key_2 And y2>0 Then
hp=hp+500
y2=y2-1
Else If key=key_3 And y3>0 Then
hp=hp+1200
y3=y3-1
Else If key=key_4 And y4>0 Then
mp=mp+100
y4=y4-1
Else If key=key_5 And y5>0 Then
mp=mp+400
y4=y4-1
Else If key=key_6 And y6>0 Then
mp=mp+800
y6=y6-1
Else If key=key_7 And y7>0 Then
hpd=hpd-200
y7=y7-1
Print &#34;你使用飞镖使&#34;;ds$;&#34;损失200点体力&#34;
p
Else If key=key_8 And y8>0 Then
hpd=hpd-300
y8=y8-1
Print &#34;你使用飞刀使&#34;;ds$;&#34;损失300点体力&#34;
p
Else If key=key_9 And y9>0 Then
hpd=hpd-400
y9=y9-1
Print &#34;你使用飞剑使&#34;;ds$;&#34;损失400点体力&#34;
p
Else If key=key_bThen
GoTo 107631
Else If key=key_c Then
GoTo 1076
Else
GoTo 107630
End If
If hp>hpmax-1 Then
hp=hpmax
End If
If mp>mpmax-1 Then
mp=mpmax
End If
GoTo 10762
107631
Cls
Print &#34;A---上页C---返回&#34;
Print &#34;1毒箭 &#34;;y10
Print &#34;2勾魂箭 &#34;;y11
Print &#34;3万箭穿心 &#34;;y12
key=getkey()
If key=key_1 And y10>0 Then
Cls
hpd=hpd-500
y10=y10-1
Print &#34;你使用毒箭使&#34;;ds$;&#34;损失500点体力&#34;
p
Else If key=key_2 And y11>0 Then
Cls
aq1=Rnd(gj)+500
hpd=hpd-aq1
y11=y11-1
Print &#34;你使用勾魂箭使&#34;;ds$;&#34;损失&#34;;aq1;&#34;点体力&#34;
p
Else If key=key_2 And y12>0 Then
Cls
aq2=800+Rnd(gj*2)
hpd=hpd-aq2
y12=y12-1
Print &#34;你使用万箭穿心使&#34;;ds$;&#34;损失&#34;;aq2;&#34;点体力&#34;
p
Else If key=key_a Then
GoTo 107630
Else If key=key_c Then
GoTo 1076
Else
GoTo 107631
End If
GoTo 10762
107640
Cls
tp=Rnd(2)
If tp=1 Then
Print &#34;逃跑成功&#34;
p
GoTo 1
Else
Print &#34;逃跑失败&#34;
p
GoTo 1076
End If
&#39;-----------------赌博--------------
108 Cls
tz1=Rnd(6)+1
tz2=Rnd(6)+1
he=tz1+tz2
Print &#34;押大小来!黄大小坐庄来!&#34;
Print &#34;1大&#34;
Print &#34;2小&#34;
Print &#34;3 不赌了&#34;
key=getkey()
If key=key_1 Then
dx=1
GoTo 1081
Else If key=key_2 Then
dx=2
GoTo 1082
Else If key=key_3 Then
GoTo 1
Else
GoTo 108
End If
1081
Cls
Print &#34;客官您压的大&#34;
Print &#34;请输入您压的金额&#34;
Input je
If je >moneyOr je< 1 Then
Print &#34;超出范围&#34;
p
p
GoTo 1081
End If
GoTo 1083
1082
Cls
Print &#34;客官您压的小&#34;
Print &#34;请输入您压的金额&#34;
Input je
If je >moneyOr je< 1 Then
Print &#34;超出范围&#34;
p
p
GoTo 1082
End If
GoTo 1083
1083
If he>7 Then
dxd=1
Else If he<7 Then
dxd=2
Else
dxd=3
End If
If dx=dxd Then
money=money+2*je
Print &#34;恭喜你,你赢了&#34;
Print &#34;你获得了&#34;;2*je;&#34;块钱(不包含押金)&#34;
p
p
GoTo 108
Else
money=money-je
Print &#34;哈哈,你输了&#34;
Print &#34;你输了&#34;;je;&#34;块钱&#34;
p
p
GoTo 108
End If
&#39;------------------猜数字-----------------
109
d=0
szd=Rnd(10)
1091
Cls
If d>=3 Then
Print &#34;你猜得次数到了&#34;
p()
GoTo 1
End If
Print &#34;请从0--9中选取1个数字&#34;
Input &#34;请输入你猜得数字&#34;,sz
If sz<0 Or sz>9 Then
Print &#34;超出范围&#34;
p
GoTo 1091
End If
If sz>szd Then
Print &#34;大了&#34;
p()
p
Else If sz<szd Then
Print &#34;小了&#34;
p()
p
Else
hd=lv*lv*20
money=money+hd
Print &#34;恭喜,你猜中了&#34;
Print &#34;你获得了&#34;;hd;&#34;元钱&#34;
p()
p
GoTo 1
End If
d=d+1
GoTo 1091
&#39;-------------------
110
Cls
Print &#34;你是读取还是储存&#34;
Print &#34;1储存&#34;
Print &#34;2读取&#34;
Print &#34;0---返回---&#34;
key=getkey()
If key=key_1 Then
GoTo 1101
Else If key=key_2 Then
GoTo 1102
Else If key=key_0 Then
GoTo 1
Else
GoTo 110
End If
1101
Cls
Print &#34;储存中&#34;
Print &#34;1 进度1&#34;
Print &#34;2 进度2&#34;
Print &#34;3 进度3&#34;
Print &#34;0--返回---&#34;
key=getkey()
If key=key_1 Then
OPEN &#34;JL1.sav&#34; FOR BINARY AS #1
Put #1,lv
Put #1,hp
Put #1,hpmax
Put #1,mp
Put #1,mpmax
Put #1,Exp
Put #1,expmax
Put #1,gj
Put #1,fy
Put #1,money
Put #1,mg1
Put #1,mg2
Put #1,mg3
Put #1,mg4
Put #1,fp
Put #1,y1
Put #1,y2
Put #1,y3
Put #1,y4
Put #1,y5
Put #1,y6
Put #1,y7
Put #1,y8
Put #1,y9
Put #1,y10
Put #1,y11
Put #1,y12
Put #1,y13
Put #1,y14
Put #1,y15
CLOSE #1
Print &#34;储存成功&#34;
p
Else If key=key_2 Then
OPEN &#34;JL2.sav&#34; FOR BINARY AS #2
Put #2,lv
Put #2,hp
Put #2,hpmax
Put #2,mp
Put #2,mpmax
Put #2,Exp
Put #2,expmax
Put #2,gj
Put #2,fy
Put #2,money
Put #2,mg1
Put #2,mg2
Put #2,mg3
Put #2,mg4
Put #2,fp
Put #2,y1
Put #2,y2
Put #2,y3
Put #2,y4
Put #2,y5
Put #2,y6
Put #2,y7
Put #2,y8
Put #2,y9
Put #2,y10
Put #2,y11
Put #2,y12
Put #2,y13
Put #2,y14
Put #2,y15
CLOSE #2
Print &#34;储存成功&#34;
p
Else If key=key_3 Then
OPEN &#34;JL3.sav&#34; FOR BINARY AS #3
Put #3,lv
Put #3,hp
Put #3,hpmax
Put #3,mp
Put #3,mpmax
Put #3,Exp
Put #3,expmax
Put #3,gj
Put #3,fy
Put #3,money
Put #3,mg1
Put #3,mg2
Put #3,mg3
Put #3,mg4
Put #3,fp
Put #3,y1
Put #3,y2
Put #3,y3
Put #3,y4
Put #3,y5
Put #3,y6
Put #3,y7
Put #3,y8
Put #3,y9
Put #3,y10
Put #3,y11
Put #3,y12
Put #3,y13
Put #3,y14
Put #3,y15
CLOSE #3
Print &#34;储存成功&#34;
p
Else If key=key_0 Then
GoTo 110
Else GoTo 1101
End If
1102
Cls
Print &#34;读取中&#34;
Print &#34;1 进度1&#34;
Print &#34;2 进度2&#34;
Print &#34;3 进度3&#34;
Print &#34;0 返回&#34;
key=getkey()
If key=key_1 Then
OPEN &#34;JL1.sav&#34; FOR BINARY AS #1
get #1,lv
get #1,hp
get #1,hpmax
get #1,mp
get #1,mpmax
get #1,Exp
get #1,expmax
get #1,gj
get #1,fy
get #1,money
get #1,mg1
get #1,mg2
get #1,mg3
get #1,mg4
get #1,fp
get #1,y1
get #1,y2
get #1,y3
get #1,y4
get #1,y5
get #1,y6
get #1,y7
get #1,y8
get #1,y9
get #1,y10
get #1,y11
get #1,y12
get #1,y13
get #1,y14
get #1,y15
Close #1
Print &#34;读取成功&#34;
p
Else If key=key_2 Then
OPEN &#34;JL1.sav&#34; FOR BINARY AS #2
get #2,lv
get #2,hp
get #2,hpmax
get #2,mp
get #2,mpmax
get #2,Exp
get #2,expmax
get #2,gj
get #2,fy
get #2,money
get #2,mg1
get #2,mg2
get #2,mg3
get #2,mg4
get #2,fp
get #2,y1
get #2,y2
get #2,y3
get #2,y4
get #2,y5
get #2,y6
get #2,y7
get #2,y8
get #2,y9
get #2,y10
get #2,y11
get #2,y12
get #2,y13
get #2,y14
get #2,y15
Close #2
Print &#34;读取成功&#34;
p
Else If key=key_3 Then
OPEN &#34;JL1.sav&#34; FOR BINARY AS #3
get #3,lv
get #3,hp
get #3,hpmax
get #3,mp
get #3,mpmax
get #3,Exp
get #3,expmax
get #3,gj
get #3,fy
get #3,money
get #3,mg1
get #3,mg2
get #3,mg3
get #3,mg4
get #3,fp
get #3,y1
get #3,y2
get #3,y3
get #3,y4
get #3,y5
get #3,y6
get #3,y7
get #3,y8
get #3,y9
get #3,y10
get #3,y11
get #3,y12
get #3,y13
get #3,y14
get #3,y15
Close #3
Print &#34;读取成功&#34;
p
p
Else If key=key_0 Then
GoTo 110
Else
GoTo 1102
End If
GoTo1102
塞翁364
发表于 2021-1-1 23:22
新接的项目:
欲辞职。
音乐之家1
发表于 2021-1-1 23:22
这个月的绩效应该满了。
川普写的代码:
十二音阶囤
发表于 2021-1-1 23:31
布置一任务给一实习生,让他处理一批数据,然后过了一会他问我,这个文件明明我看有几百M啊,为啥读出来只有28字节。我说没道理啊,我过去看看,代码长这样(代码是python写的)
file = &#39;\Document\mock_data\train.csv&#39;
print(len(file))当场吐血。。
再来一张图,知道这张图来历的举个手:
jimmy肖明
发表于 2021-1-1 23:41
最烂的代码一般都不是码农写的,而是做科研的人自己写,自己用的代码,一般是用来做科学计算和处理数据的。
我的代码都在我的云存储里面默默的躺着 = = 考虑过有一天放出来在github上面,但是考虑到太丢人,一直没有实施。。。
就放荡不羁就h
发表于 2021-1-1 23:49
看遍了 C++啊,Java 啊,PHP 啊之类的后,来看点清流吧
看样子 HTML和 CSS 确实不算编程语言
不得不说写这代码的人着实厉害
什么?你说前面十几行看起来还挺正常?注意后面的
// 此代码前面省略了约 300 行,后面约省略 1200 行,没错,所有 CSS 全写在同一个文件里
@media only screen and (min-width:320px) {html {font-size:9px !important;}
}
@media only screen and (min-width:375px) {html {font-size:10px !important}
}
@media only screen and (min-width:414px) {html {font-size:11px !important;}
}
/* 常用样式 */
.overF {overflow:hidden;}
.bold {font-weight:bold;}
.font13 {font-size:13px;}
.font14 {font-size:14px;}
.font15 {font-size:15px;}
.font16 {font-size:16px;}
.font18 {font-size:18px;}
.clearfix {overflow:hidden;}
.show {display:block !important;}
.hide {display:none !important;}
.inlineb_show {display:inline-block !important;}
.f-l {float:left;}
.f-r {float:right;}
.z-index101 {z-index:101 !important;}
.tmargin14 {margin-top:14px;}
.txt_l {text-align:left;}
.txt_r {text-align:right;}
.txt_c {text-align:center;}
.txt_j {text-align:justify;}
.line-clamp1 {white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.over-h {overflow:hidden;}
.group:before,.group:after {background-color:rgba(200,199,204,.5);}
.bgf9f9 {background:#f9f9f9 !important;}
.bgtrans {background:transparent !important;}
.nopad {padding:0 !important;}
.red {color:#ff4200 !important;}
.green {color:green;}
.gray {color:gray;}
.colorW {color:#ffffff !important;background-color:transparent !important;}
/* 网页样式 */
.navbar-nav > .active > a {color:#005fa2 !important;background-color:transparent !important;}
.mouse {/*position:absolute;*//*left:50%;*//*transform:translate(-50%,100%);*//*bottom:-8px;*/margin-top:2rem;text-align:center;color:#ffffff;font-size:13px;}
/* 高度限定 */
@media screen and (min-height:600px) and (max-height:900px) {.imageRight-title:after {display:none;}
.imageRight-content {margin-top:20px !important;}
.container4-image {margin-left:0 !important;margin-right:10px !important;}
.container4-rightBox * {line-height:26px !important;}
.container4-title {font-size:24px !important;}
.case-text {padding-top:20px !important;line-height:22px !important;}
.tips {margin:1vh 0 2vh 0 !important;}
.footer1 div {margin-bottom:0.5vh !important;}
}
.formItem {margin:5vh 0 2vh 0;}
@media screen and (min-height:900px) {#container3 {height:25vh !important;}
#container-comment {height:20vh !important;}
}
.icon-barW {background-color:#ffffff !important;}
/* 宽度限定 */
@media screen and (min-width:0px) and (max-width:600px) {.caseImg3-box-title,.caseImg3-box-text,.caseImg3-box-button {margin-top:0.5vh !important}
h1 {font-size:38px !important;}
.container5-photo-box:first-child {margin-bottom:20px;}
.container5-photo-box:nth-child(2) {margin-bottom:20px;}
.imageRight {padding:30px !important;}
.imageRight-title:after {display:none;}
.imageRight-content {margin-top:20px !important;line-height:25px !important;}
.footer1 .container {margin:0 !important;}
.container6-title {padding-bottom:20px;}
.imageRight-content {width:auto !important;text-align:justify !important;font-size:13px !important;}
.imageRight {padding-top:calc(50px + 2vh) !important;padding-bottom:calc(30px + 2vh) !important;width:100% !important;height:auto !important;}
.readMore {margin:20px auto !important;}
.bgF7 {display:none !important;}
.container3-txt {font-size:14px !important;}
.HeaderTop-container {padding:0 !important;}
.navbar-toggle {margin-right:30px !important;}
.title1 {font-size:2rem;color:#ffffff;font-weight:600;}
.title2 * {line-height:1.4rem;}
.bgImage1 {height:auto !important;}
#container1 {height:70px !important;}
#container2 {height:auto !important;}
#container6 {height:auto !important}
.imageLeft {width:100% !important;height:calc(100vw / 1.5) !important;}
.caseImg3-box {margin-left:-13% !important;padding:2rem 0;background-color:#dfe0e2;overflow:hidden;}
.caseImg3-box-title * {font-size:4vw !important;}
.caseImg3-text-box * {text-align:center;}
.solvePlan-text-box {height:auto !important;}
.backW {height:auto !important;}
.container4-content {font-size:13px !important;line-height:18px !important;text-align:justify !important;}
.footer1 * {font-size:13px !important;}
.container3-txt {width:90% !important;}
.container4-image {margin:0 !important;margin-left:-10px !important;float:left !important;width:40% !important;}
.container4-rightBox {width:60% !important;float:left;padding-left:10px !important;}
#container1 {padding:0 !important;}
.caseImg {width:98% !important;}
.caseImg3-box-button {padding:1vw 3vw !important;}
.footer1 {padding:10px 0 !important;height:auto !important;}
.comment {height:auto !important;}
.container5-text {width:90% !important;line-height:30px;margin:auto;text-align:left !important;}
.formItem {margin:50px 0 0 0 !important;}
#yourPhone,#yourName {display:block;margin:auto !important;width:250px !important;float:none !important;margin-bottom:20px !important;}
.askDescription-box {margin:0 !important;}
#consult {display:block;margin:auto !important;margin-top:30px !important;margin-bottom:40px !important;width:250px !important;float:none !important;}
.container5-photo-box {width:50% !important;}
.caseImg1 {height:auto !important;width:80% !important;}
.caseImg2 {height:180px !important;}
#container4 {padding:0 !important;padding-bottom:30px !important;}
.container4-title {width:100% !important;font-size:16px !important;text-align:left !important;}
.container4-div {width:80% !important;margin:20px 10% 0 10% !important;height:auto !important;padding:0 !important;text-align:center;}
.container3-txt {margin-top:20px !important;line-height:22px !important;}
.pad40 {padding:calc(50px + 2vh) 0 0 0 !important;}
.footer1 .container div {margin-bottom:5px !important;}
.case-text {width:80% !important;margin-bottom:30px !important;text-align:left !important;font-size:14px !important;}
.container4-content {margin-top:1.8vw !important;}
.caseImg2 {height:100% !important;}
.caseImg2-title {font-size:6vw !important;}
.caseImg2-box {width:100% !important;height:calc(100vw / 1.8) !important;float:left;position:relative;}
.askDescription-box {margin:0 5%;}
.ontainer6-title {margin:40px 0 20px 0;}
.formItem {margin-top:0 !important;}
}
@media screen and (min-width:0px) and (max-width:700px) {.tips {margin-bottom:20px !important;}
.width33 {float:none !important;width:250px !important;margin:auto auto 50px auto;text-align:center;}
.width33 label {text-align:left;}
.caseImg3-box-text {}
.caseImg3-box-english {top:28% !important;}
.caseImg3-box-button,.caseImg3-box-text,.caseImg3-box-title,.caseImg3-box-english {transform:translate(-50%,0);}
}我看到这么多!important 的时候的心情就是这样的: