爱意满满的作品展示区。
hanxiV2EX

分享一个每天自动生产一个随机数的工具

  •  
  •   hanxiV2EX ·
    hanxi · Dec 19, 2020 via Android · 3978 views
    This topic created in 2150 days ago, the information mentioned may be changed or developed.
    使用 github 的 actions 实现的,每天零点会生成随机数到 releases 页面。

    https://github.com/hanxi/day-random/releases

    经常看到 v2 上有堆楼需要用到随机数,用这个工具就不用自己去生产随机数了,是不是有点杀鸡用牛刀🔪的感觉?


    我这个帖子 https://www.v2ex.com/t/736918 在使用这个工具。
    7 replies  •  2020-12-21 12:55:24 +08:00
    hanxiV2EX
    hanxiV2EX
    OP
    Dec 19, 2020 via Android
    1
    goodbest
    goodbest
    Dec 19, 2020❤️1
    2
    有点意思,建议 tag 改为日期,方便索引,防止冲突
    hanxiV2EX
    hanxiV2EX
    OP
    Dec 19, 2020 via Android
    3
    @goodbest 建议不错,马上改
    hanxiV2EX
    hanxiV2EX
    OP
    Dec 19, 2020
    4
    @goodbest 已经把 tag 改为日期时间
    hanxiV2EX
    hanxiV2EX
    OP
    Dec 20, 2020 via Android
    5
    随机数已经出来,比预定的时间晚了几分钟。这样也不影响结果,只要不是提前出随机数。
    frandy
    frandy
    Dec 21, 2020
    6
    github 的 actions 由于队列的原因,精确的时间很难把控,而且是 yml 里的 schedule 是 utc 时间,不是北京时间。
    hanxiV2EX
    hanxiV2EX
    OP
    Dec 21, 2020 via Android
    7
    @frandy 精确度不影响结果产生,很定是延迟出随机数的。中奖楼层截止时间按照 v 站的时间就行,开奖是手工的,结果延迟出来也是准确的。

    特意选择 utc 时间的,v 站的签到刷新时间也是北京时间 8 点。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1576 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 08:04 · PVG 16:04 · LAX 00:04 · JFK 03:04
    ♥ Do have faith in what you're doing.