I hereby claim:
- I am kerkerj on github.
- I am kerkerj5566 (https://keybase.io/kerkerj5566) on keybase.
- I have a public key ASD9rcO0LY7hGTOgsbDvGdK9v7UiD_wg-EqF_RtBOxWGjgo
To claim this, I am signing this object:
請實作一個 method, 參數為 n,回傳一個 array | |
``` | |
func getFizzBuzz(n int) []string { | |
// TODO | |
} | |
``` | |
1. n 代表的是要回傳的陣列數字 1 ~ n, e.g. n = 6, 代表的是要計算 1 ~ 3,回傳 answer = ["1", "2", "Fizz"] | |
2. 承上會從 1 到 n 去計算 |
const exposes = require('zigbee-herdsman-converters/lib/exposes'); | |
const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); | |
const tuya = require('zigbee-herdsman-converters/lib/tuya'); | |
const e = exposes.presets; | |
// ref: | |
// Neo Smart https://github.com/Koenkk/zigbee-herdsman-converters/blob/854080d81c3fd622d2a6a15b5435193ecad8af68/src/devices/immax.ts#L257-L267 | |
const definition = { | |
fingerprint: [ |
const exposes = require('zigbee-herdsman-converters/lib/exposes'); | |
const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); | |
const tuya = require('zigbee-herdsman-converters/lib/tuya'); | |
const e = exposes.presets; | |
// ref: | |
// Neo Smart https://github.com/Koenkk/zigbee-herdsman-converters/blob/854080d81c3fd622d2a6a15b5435193ecad8af68/src/devices/immax.ts#L257-L267 | |
const definition = { | |
fingerprint: [ |
I hereby claim:
To claim this, I am signing this object:
func CaptureStdout(f func()) string { | |
r, w, _ := os.Pipe() | |
stdout := os.Stdout | |
os.Stdout = w | |
defer func() { | |
os.Stdout = stdout | |
}() | |
f() | |
w.Close() |
kind: pipeline | |
type: docker | |
name: default | |
steps: | |
- name: notify | |
image: plugins/slack-blame | |
settings: | |
token: | |
from_secret: drone_slack_blame_token |
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
ip := "192.168.0.1" | |
encodedIP := Encode(ip) |
version: '2' | |
services: | |
redis: | |
image: redis | |
ports: | |
- "6379" | |
web1: | |
image: my_image:tag | |
environment: | |
- REDIS_URL=redis:6379 |
#!/bin/sh | |
# Generate test coverage statistics for Go packages. | |
# | |
# Works around the fact that `go test -coverprofile` currently does not work | |
# with multiple packages, see https://code.google.com/p/go/issues/detail?id=6909 | |
# | |
# Usage: script/coverage [--html|--coveralls] | |
# | |
# --html Additionally create HTML report and open it in browser | |
# --coveralls Push coverage statistics to coveralls.io |
# example for observer in Ruby | |
require "observer" | |
class Tick | |
include Observable | |
def tick | |
loop do | |
now = Time.now | |
changed |