gihnius's recent timeline updates
gihnius

gihnius

V2EX member #44820, joined on 2013-09-02 19:05:56 +08:00
Per gihnius's settings, the topics list is hidden
Deals info, including closed deals, is not hidden
gihnius's recent replies
Ruby:

a.product(b)
Apr 1, 2018
Replied to a topic by molvqingtai macOS MAC 用户谨慎升级 10.13.4 !!!
从 10.13.3 顺利升级,没啥毛病。
Mar 21, 2018
Replied to a topic by 0xABCD Python 撸了个年度进度条提示工具
@gihnius 继续玩:

Go 版加了:

■■■■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■■■■■
■■■■■■■■■■■■■■■■■□□□□
□□□□□□□□□□□□□□□□□□□□□
□□□□□□□□□□□□□□□□□□□□□
□□□□□□□□□□□□□□□□□□□□□
□□□□□□□□□□□□□□□□□□□□□
□□□□□□□□□□□□□□□□□□□□□
□□□□□□□□□□□□□□□□□□□□□
□□□□□□□□□□□□□□□□□□□□□
□□□□□□□□□□□□□□□□□□□□□
□□□□□□□□□□□□□□□□□□□□□
□□□□□□□□□□□□□□□□□□□□□
□□□□□□□□□□□□□□□□□□□□□
□□□□□□□□□□□□□□□□□□□□□
□□□□□□□□□□□□□□□□□□□□□
□□□□□□□□ 22%(80/365)
Mar 21, 2018
Replied to a topic by 0xABCD Python 撸了个年度进度条提示工具
Mar 21, 2018
Replied to a topic by 0xABCD Python 撸了个年度进度条提示工具
@0xABCD Go 版运行快很多。。。
Mar 21, 2018
Replied to a topic by 0xABCD Python 撸了个年度进度条提示工具
再写个 Go 的:
package main

import (
"fmt"
"math"
"strings"
"time"
)

func main() {
now := time.Now()
passed := now.YearDay()
format := "2006-01-02 15:04:05"
end, _ := time.Parse(format, fmt.Sprintf("%d-12-31 23:59:59", now.Year()))
total := end.YearDay()
progress := math.Round((float64(passed) / float64(total)) * 100)
bar := strings.Repeat("▓", int(progress)) + strings.Repeat("░", (100-int(progress)))
fmt.Printf("Progress of this year %d of %d:\n", passed, total)
fmt.Println(bar)
}

感觉够折腾的。。。。。
Mar 21, 2018
Replied to a topic by 0xABCD Python 撸了个年度进度条提示工具
写个 Ruby 的玩玩:
percent = ((Time.now.yday.to_f / Time.now.at_end_of_year.yday) * 100).round
bar = '▓' * percent + '░' * (100 - percent)
puts "Progress of this year:"
puts(bar + percent.to_s + '%')

输出:
Progress of this year:
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░22%
gin
A has many b

B belongs to a

Ruby on Rails 那一套
这不就是 AppleDNS 的目的,找到最近的自然快些。
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3041 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 10ms · UTC 09:35 · PVG 17:35 · LAX 02:35 · JFK 05:35
♥ Do have faith in what you're doing.