[go-nuts] any way to save an image to 8-bit indexed png format?

2016-07-12 Thread sleepy
I need to shrink images to as small as possible with an acceptable quality. found https://tinypng.com/ could convert the image to 8-bit indexed png, which is best fit my requirement. however, I need to do this by my go program, any hints for this? thanks in advance. -- You received this messag

Re: [go-nuts] Re: any way to save an image to 8-bit indexed png format?

2016-07-14 Thread sleepy
Thanks, I will try it. 在 2016年7月14日星期四 UTC+8上午10:54:40,Nigel Tao写道: > > On Thu, Jul 14, 2016 at 2:07 AM, > > wrote: > > [haven't actually checked if the PNG package will work with this - but > this > > would be the way to go if supported] > > The PNG package should work with this: > https:/

[go-nuts] Re: IDE for GOLANG

2016-08-02 Thread sleepy
In my idea, the best one at present is Visual Studio Code + Go extension 在 2016年8月2日星期二 UTC+8下午8:25:21,kritika...@indiamart.com写道: > > Hi, > is there IDE for creating a web service in GOLANG by u

[go-nuts] blocks when trying to reset a timer

2016-12-12 Thread sleepy
from the documentation of *func (*Timer) Reset * > > To reuse an active timer, always call its Stop method first and—if it had > expired—drain the value from its channel. For example: > if !t.Stop() { > <-t.C > } > t.Reset(d) > but my code blocks at th

[go-nuts] Re: blocks when trying to reset a timer

2016-12-12 Thread sleepy
seems I know what is wrong: my timer is not an *active* one. 在 2016年12月13日星期二 UTC+8下午3:09:30,sleepy写道: > > from the documentation of *func (*Timer) Reset > <https://golang.org/pkg/time/#Timer.Reset>* > >> >> To reuse an active timer, always call its Stop method f

[go-nuts] Is the result of FindStringSubmatch correct?

2020-03-02 Thread sleepy
https://play.golang.org/p/YoNyiKo-lTc package main import ( "fmt" "regexp" ) func main() { s := `([^ ]+ ?)*` re := regexp.MustCompile(s) fmt.Printf("%q\n", re.FindStringSubmatch("aaa bbb ccc")) } I expect the output to be: > ["aaa bbb ccc" "aaa " "bbb " "ccc"] > > but the actual output is: >