On Fri, May 18, 2018 at 12:26 PM, wrote:
> Hello all. I am creating a custom exporter for FreeNAS
> https://github.com/Maelos/freenas_exporter and am stuck on the conversion of
> the string of bytes provided by the commands output to a float. Here is my
> code, what I have tried, and my results
You could also take a look
at https://godoc.org/github.com/mailru/easygo/netpoll
четверг, 17 мая 2018 г., 3:08:29 UTC+3 пользователь Juliusz Chroboczek
написал:
>
> I'm interfacing with a C library that expects to do its own I/O, but
> wants to be called after a file descriptor is ready for rea
The input is string, so use strconv.ParseFloat, or ParseInt (will there be
non-integer number of cpus?)
Just trim the LF with strings.TrimSpace.
For production use, leave out the grep and bash, read the output lines directly
with bufio.Scanner.
--
You received this message because you are subs
Hello all. I am creating a custom exporter for
FreeNAS https://github.com/Maelos/freenas_exporter and am stuck on the
conversion of the string of bytes provided by the commands output to a
float. Here is my code, what I have tried, and my results:
What I have tried and results (commented so y
Thank you to all those who contributed to this thread. While many Go
programs are written under open source licences, and many Go programmers
contribute to open source in a professional or personal capability, it is
now time to bring the discussion to a close as this thread has moved
outside th
Thanks for responding Michael.
"decorative item not to be used off-road, in uneven terrain, or relied upon
> as protection in case of vehicle roll."
The sticker I’ve been looking at says something like “modifying or
attaching anything to this ROPS will compromise the structure and may cause
i
perhaps some context will make this clearer. no reference is being made to
any actual persons or events.
1. It is the observed habit of people (plaintiff's) bring suit in court
when something goes wrong.
Ex: airplane crash, dark spot on potato chip, food is too hot, etc.
2. Plaintiff's attorneys
I was thinking something like writing an undocumented “Happy New Year!” to
standard out at the start of the year. An obvious but undocumented ‘rm -rf
/‘ attempt was mentioned above.
My first program was a practical joke. On the calculator command line I
said “press enter” then put the program c
Il giorno giovedì 17 maggio 2018 04:57:48 UTC+2, Raulino Neto ha scritto:
>
> Hello Guys, I have to convert a Json to a UTF_16LE and byte array for sign
> a rsa key, someone have idea that how I can do it? Thanks regards.
>
For encoding UTF-8 to UTF-16LE see:
https://godoc.org/golang.org/x/text/e
On Thu, May 17, 2018 at 9:56 AM, Juliusz Chroboczek wrote:
>> If you do this in Go, you should use golang.org/x/sys/unix package
>> rather than the syscall package.
>
> What's the advantage? (In this particular case, not in general.)
The advantage in this particular case is likely minimal. The
math/big's big.Int has a power function:
https://golang.org/pkg/math/big/#Int.Exp
I wrote a power function for big.Float you can find
here: https://github.com/l0k1verloren/float256/blob/master/float256.go#L82
It doesn't check for overflows because I don't think big.Float overflows
from 64 bit
> If you do this in Go, you should use golang.org/x/sys/unix package
> rather than the syscall package.
What's the advantage? (In this particular case, not in general.)
> But since you have to call C anyhow, I would suggest just doing it in C.
Yeah, I guess it's simpler.
> There isn't any way
12 matches
Mail list logo