This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
FARM_FINGERPRINT("UserCustomerID + salt"), -- => -3587376224092439943 | |
mod(abs(FARM_FINGERPRINT("UserCustomerID + salt")), 100) -- => 43 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"testing" | |
"time" | |
) | |
func BenchmarkTimeDate(b *testing.B) { | |
now := time.Now() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml family_tree | |
package "磯野家" { | |
[磯野波平] | |
[(石田)フネ] | |
[磯野カツオ] | |
[磯野ワカメ] | |
() " " as m0 | |
[磯野波平] - m0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"errors" | |
"testing" | |
"github.com/google/go-cmp/cmp" | |
"github.com/google/go-cmp/cmp/cmpopts" | |
"google.golang.org/grpc/codes" | |
"google.golang.org/grpc/status" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"errors" | |
"fmt" | |
"time" | |
"golang.org/x/sync/errgroup" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "pry" | |
# http://nabetani.sakura.ne.jp/yokohamarb/103mask/ | |
def solve(mask) | |
# 0. 入力を、1a(16) => 26(10) => 11010(2) にする | |
# 1. 11010(2) => [2, 8, 16] にする | |
# 2. arrの要素数で分岐する、4つ以下 or それ以上 | |
# 2a. 全部のconbinationを取って、数字変換して、終わり | |
# 2b. 下4つの組み合わせの前13つと、最後2つを取って、終わり |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "pry" | |
# どう書く 2019-04-06 | |
# http://nabetani.sakura.ne.jp/hena/orde32rects/ | |
# | |
# 方針 | |
# 1. 各入力矩形で塗ったかどうかを点ごとに記録する | |
# 2. 全体を舐めてその点がどの図形に属しているかを判定しつつ、面積と縦横別の面積を記録する | |
# 3. 各図形のうち長方形になっているものを選択して面積を返してソートする | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "pry" | |
# どう書く 2019-04-06 | |
# http://nabetani.sakura.ne.jp/hena/orde32rects/ | |
# | |
# 方針 | |
# 1. 各入力矩形で塗ったかどうかを点ごとに記録する | |
# 2. 全体を舐めてその点がどの図形に属しているかを判定しつつ、面積と縦横別の面積を記録する | |
# 3. 各図形のうち長方形になっているものを選択して面積を返してソートする | |
# |
https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto
gRPC Code | HTTP Status Code |
---|---|
OK = 0 | 200 OK |
CANCELLED = 1 | 499 Client Closed Request |
UNKNOWN = 2 | 500 Internal Server Error |
INVALID_ARGUMENT = 3 | 400 Bad Request |