首页   注册   登录
 2oTp 最近的时间轴更新

2oTp

V2EX 第 372143 号会员,加入于 2018-12-22 10:59:25 +08:00
2oTp 最近回复了
14 亿猪
<!DOCTYPE html>
<html>
<body>
<canvas
id="myCanvas"
width="290"
height="290"
style="border:1px solid #d3d3d3;"
>
Your browser does not support the HTML5 canvas tag.</canvas
>

<script>
var lines = `
11111110101101100000001111111
10000010100100011000101000001
10111010111100101010001011101
10111010011000001110101011101
10111010010100010101001011101
10000010100101000100001000001
11111110101010101010101111111
00000000101110011111000000000
00111010100000010000011100111
10101101011011000110101011101
00100011101100001001000110010
10011101111111011111101010001
01011110101110000101110100111
01010000010010101001011010011
11100110011111001000010100110
01000001001100100111010110010
10100011000001000000010101100
10001101001101110000001010000
10100010001101101000101010000
10111000011110010000110010000
10001110001001011111111111100
00000000111001010001100011001
11111110000010011011101011110
10000010010011011010100010001
10111010111101001000111111110
10111010101010000110010100000
10111010110101110100011010110
10000010001101110101010010010
11111110011011100001011001100`
.split('\n')
.filter(s => s)
var c = document.getElementById('myCanvas')
var ctx = c.getContext('2d')
ctx.beginPath()
lines.forEach((line, line_num) =>
line
.split('')
.forEach(
(bit, column) =>
+bit && ctx.rect(line_num * 10, column * 10, 10, 10)
)
)
ctx.fill()
</script>
</body>
</html>
身在福中不知福啊
76 天前
回复了 www6688w 创建的主题 程序员 发现一个非常牛皮的网站代码!
啥, 中文变量名居然也行
@CallMeReznov
xbmc media center - Kodi | Open Source Home Theater Software
----------------
Kodi is a free media player that is designed to look great on your big
screen TV but is just as home on a small screen.

打开 http://www.xbmc.org 重定向到 https://kodi.tv 之后返回 404 了...
谢谢各位的回复🙏🙏🙏
我才发现 http-server 有两个地址👀...一直以为只有 127.0.0.1 的...

[/tmp ] $ http-server . -p80
Starting up http-server, serving .
Available on:
http://127.0.0.1:80
http://192.168.1.189:80
Hit CTRL-C to stop the server
注意不是 127.0.0.1:80 端口嗷, 手机访问不了
首先这样这样, 然后这样这样, 最后 copy paste 一下就好了
关于   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   1690 人在线   最高记录 5043   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.3 · 22ms · UTC 00:01 · PVG 08:01 · LAX 16:01 · JFK 19:01
♥ Do have faith in what you're doing.