text
stringlengths
5.51k
28.1k
// Copyright 2019 Istio Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
package raftkv import "testing" import "strconv" import "time" import "fmt" import "math/rand" import "log" import "strings" import "sync/atomic" // The tester generously allows solutions to complete elections in one second // (much more than the paper's range of timeouts). const electionTimeout = 1 * ti...
package client import ( "bytes" "database/sql/driver" "encoding/binary" "fmt" "io" "math" "strings" "time" "github.com/CanonicalLtd/go-dqlite/internal/bindings" ) // NamedValues is a type alias of a slice of driver.NamedValue. It's used by // schema.sh to generate encoding logic for statement parameters. ty...
package spider import ( "encoding/csv" "encoding/json" "fmt" "io" "io/ioutil" "log" "net" "net/http" "os" "sort" "strconv" "strings" "time" pb "github.com/mineralres/goshare/pkg/pb/goshare" spiderpb "github.com/mineralres/goshare/pkg/pb/spider" "github.com/mineralres/goshare/pkg/util" ) // SSE sse ty...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
package main import ( "fmt" "image/color" "math" "math/rand" "github.com/hajimehoshi/ebiten" "github.com/hajimehoshi/ebiten/inpututil" "github.com/hajimehoshi/ebiten/text" ) // Draws the next/previous/match buttons that sit below the questions. func drawNextPrevious(screen *ebiten.Image) { if gState.currentL...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 // protoc v3.19.4 // source: envoy/extensions/transport_sockets/tcp_stats/v3/tcp_stats.proto package tcp_statsv3 import ( _ "github.com/cncf/xds/go/udpa/annotations" v3 "github.com/envoyproxy/go-control-plane/envoy/confi...
package dtofactory import ( "fmt" api "k8s.io/api/core/v1" "github.com/turbonomic/kubeturbo/pkg/discovery/dtofactory/property" "github.com/turbonomic/kubeturbo/pkg/discovery/metrics" "github.com/turbonomic/kubeturbo/pkg/discovery/repository" "github.com/turbonomic/kubeturbo/pkg/discovery/stitching" "github.co...
// 研究了一天的状态机,天气也热,正当我写的即将昏迷之际,我突然醒悟了,原来状态机是这么一回事 // - 状态比喻成 数据结构 // - 事件比喻成 用户输入 // - 状态转移则是函数调用 // 如此依赖写成函数,也就是 (Orz 原来如此) // type FSM struct { // State FSMState // TransformFuncs map[FSMState] func() // } // func (f *FSM) UserAction(action FSMAction) { // ... // } package main import ( "errors" "fmt" "io...
package rabbus import ( "context" "errors" "log" "sync" "time" amqpWrap "github.com/maxnilz/rabbus/internal/amqp" "github.com/maxnilz/rabbus/pkg/retry" "github.com/sony/gobreaker" "github.com/streadway/amqp" ) const ( // Transient means higher throughput but messages will not be restored on broker restart...
/* * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. * This source code is licensed under the Apache License Version 2.0. */ package daemon_handler import ( "encoding/json" "fmt" "io/ioutil" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/...
package order import ( "github.com/chargebee/chargebee-go/enum" "github.com/chargebee/chargebee-go/filter" creditNoteEnum "github.com/chargebee/chargebee-go/models/creditnote/enum" orderEnum "github.com/chargebee/chargebee-go/models/order/enum" ) type Order struct { Id string ...
// Copyright 2015 <NAME>. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law...
package bakery import ( "sort" "sync" "time" "golang.org/x/net/context" errgo "gopkg.in/errgo.v1" macaroon "gopkg.in/macaroon.v2" "gopkg.in/macaroon-bakery.v2/bakery/checkers" ) // Op holds an entity and action to be authorized on that entity. type Op struct { // Entity holds the name of the entity to be au...
package block import ( "github.com/df-mc/dragonfly/dragonfly/block/colour" "github.com/df-mc/dragonfly/dragonfly/block/fire" "github.com/df-mc/dragonfly/dragonfly/block/wood" "github.com/df-mc/dragonfly/dragonfly/internal/entity_internal" "github.com/df-mc/dragonfly/dragonfly/internal/item_internal" "github.com/...
package command import ( "bufio" "context" "fmt" "math/big" "os" "sort" "strconv" "strings" "golang.org/x/sync/errgroup" "github.com/spolu/settle/cli" "github.com/spolu/settle/lib/errors" "github.com/spolu/settle/lib/out" "github.com/spolu/settle/mint" "github.com/spolu/settle/mint/lib/plan" ) const (...
/* * Copyright (c) 2020 Baidu, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed...
// Copyright © 2019 Heptio // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writin...
// Copyright 2017 Google Inc. All rights reserved. // Copyright 2018 SIP Solutions. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package getopt provides traditional getopt processing for implementing // commands that use traditional c...
package download import ( "fmt" "github.com/boltdb/bolt" docker "github.com/fsouza/go-dockerclient" "github.com/golang/glog" "github.com/open-horizon/anax/config" "github.com/open-horizon/anax/cutil" "github.com/open-horizon/anax/events" "github.com/open-horizon/anax/exchange" _ "github.com/open-horizon/anax/...
package astprinter import ( "bytes" "io/ioutil" "testing" "github.com/jensneuse/diffview" "github.com/sebdah/goldie" "github.com/stretchr/testify/assert" "github.com/jensneuse/graphql-go-tools/internal/pkg/unsafeparser" "github.com/jensneuse/graphql-go-tools/pkg/operationreport" ) func TestPrint(t *testing....
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/ads/googleads/v1/services/shopping_performance_view_service.proto package services import ( context "context" fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" resources "google.golang.org/genproto/googleapis/ads/googleads/v1/resour...
package engine import ( "fmt" "log" "math" "strings" "sync" ) // Clicks is a time or duration value. // NOTE: A Clicks value can be negative because // it's sometimes relative to the starting time of a Phrase. // XXX - possibly could have a type to distinguish Clicks that are // XXX - used as absolute time versu...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: chat-group.proto package chatgroup import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This...
package controller import ( "context" "fmt" "github.com/golang/protobuf/proto" "go.chromium.org/luci/common/errors" "go.chromium.org/luci/common/logging" "go.chromium.org/luci/gae/service/datastore" "google.golang.org/genproto/protobuf/field_mask" "google.golang.org/grpc/codes" "google.golang.org/grpc/status...
// scripttool is a tool for working with screenplay file formats. // // BSD 2-Clause License // // Copyright (c) 2021, <NAME> // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistribu...
// Copyright 2018 The Kubeflow Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agr...
/* Copyright 2019 Cisco Systems Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software d...
/* * Copyright (c) 2019 InterDigital Communications, Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
package service import ( "os" "reflect" "testing" "time" "goa.design/goa/codegen" "goa.design/goa/codegen/service/testdata" "goa.design/goa/design" "goa.design/goa/dsl" "goa.design/goa/eval" ) type ( inner struct { foo string } hasNonPtrFields struct { inner inner } ) func TestCommonPath(t *testin...
// Copyright 2018 Istio Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
package filproofs import ( "bytes" big "math/big" file "github.com/filecoin-project/specs/systems/filecoin_files/file" sector "github.com/filecoin-project/specs/systems/filecoin_mining/sector" util "github.com/filecoin-project/specs/util" ) func WinSDRParams(cfg sector.SealCfg) *WinStackedDRG_I { // TODO: Brid...
package main import ( "errors" "fmt" ) // Action Tag Constant const ( // Create Table Action Tag TypeCreateTable = "CREATE TABLE" // Alter Table Action Tag TypeAlterTable = "ALTER TABLE" TypeModifyOption = "MODIFY OPTION" TypeModifyColumn = "MODIFY COLUMN" TypeModifyConstraint = "MODIFY CONSTR...
// Copyright (c) <NAME> @bwplotka // Licensed under the Apache License 2.0. package flagarize import ( "net" "net/url" "os" "reflect" "strconv" "strings" "time" "unsafe" "github.com/alecthomas/units" "github.com/bwplotka/flagarize/internal/camelcase" "github.com/pkg/errors" "gopkg.in/alecthomas/kingpin.v...
package cl import ( "go/token" "go/types" "log" "syscall" goast "go/ast" "github.com/goplus/c2go/clang/ast" "github.com/goplus/c2go/clang/types/parser" "github.com/goplus/gox" "github.com/goplus/gox/cpackages" ctypes "github.com/goplus/c2go/clang/types" ) const ( DbgFlagCompileDecl = 1 << iota DbgFlagM...
package rbush_test import ( "fmt" "math" "math/rand" "runtime" "sort" "testing" "time" "github.com/fogleman/gg" "github.com/stretchr/testify/assert" "github.com/tidwall/pinhole" "github.com/tidwall/rbush" ) type rect struct { min, max []float64 } func (r *rect) Rect() (min, max []float64) { return r.mi...
// Licensed to Elasticsearch B.V. under one or more contributor // license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright // ownership. Elasticsearch B.V. licenses this file to you under // the Apache License, Version 2.0 (the "License"); you may // not use ...
package main import ( "bufio" "context" "errors" "fmt" "io" "io/ioutil" "log" "net/http" "net/url" "os" "strings" "unicode/utf8" "fyne.io/fyne/v2" "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/canvas" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/dialog" "fyne.io/fyne/v2/layout" "fyne.io/fyne/v2/storage" ...
/** # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
package main import ( "encoding/json" "fmt" "log" "log/syslog" "net" "os" "os/exec" "os/signal" "path" "path/filepath" "runtime" "runtime/debug" "strings" "syscall" "time" "github.com/hanwen/go-fuse/fuse" "github.com/hanwen/go-fuse/fuse/nodefs" "github.com/hanwen/go-fuse/fuse/pathfs" "github.com/r...
// Code generated by goctl. DO NOT EDIT. package types type PageInfo struct { Page int64 `json:"page,optional" form:"page,optional"` // 页码 PageSize int64 `json:"pageSize,optional" form:"pageSize,optional"` // 每页大小 SearchKey string `json:"searchKey,optional" form:"searchKey,optional"` //...
/* * Copyright 2017-2019 Kopano and its licensors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
// Generated Code -- DO NOT EDIT. //go:generate go run msggen.go messages_test.tmpl messages.xml messages_test.go package ubx import "testing" func TestAckAck(t *testing.T) { testType(t, &AckAck{}) } func TestAckNak(t *testing.T) { testType(t, &AckNak{}) } func TestAidAlm(t *testing.T) ...
package scalers import ( "bytes" "context" "encoding/json" "fmt" "io/ioutil" "net/http" "net/url" "strconv" "strings" "time" v2beta2 "k8s.io/api/autoscaling/v2beta2" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/metrics/pkg...
package ogdat import ( "encoding/json" "errors" "github.com/the42/ogdat/Godeps/_workspace/src/code.google.com/p/go-uuid/uuid" "io" "io/ioutil" "net/url" "reflect" "regexp" "strconv" "strings" "time" ) /* Version10 = "OGD Austria Metadata 1.0" // Version 1.0: 24.10.2011 Version11 = "OGD Austria Metadata 1....
package model import ( "fmt" "strings" "github.com/moxspec/moxspec/util" ) // batteryStatus represents battery unit presence type batteryStatus string // These are the battery presence status const ( BatteryPresent batteryStatus = "present" BatteryNotPresent batteryStatus = "not present" BatteryUnknown ...
package arinc import ( "fmt" "strconv" ) const ( SectionCodeNavaid string = "D" SectionCodeEnroute string = "E" SectionCodeAirport string = "P" SubsectionCodeNavaidNDB = "B" SubsectionCodeNavaidVHF = "" SubsectionCodeAirportRefPoint = "A" SubsectionCodeEnrouteWaypoint = "A" SubsectionC...
package cosmo import ( "math" "strings" "testing" ) var zWCDM = []float64{0.5, 1.0, 2.0, 3.0} // Calculated via Python AstroPy // from astropy.cosmology import wCDM // z = np.asarray([0.5, 1.0, 2.0, 3.0]) var testTableWCDM = map[string]struct { cos WCDM function string exp []float64 }{ // wCDM...
package usage import ( "context" "fmt" "strconv" "time" "github.com/buildbuddy-io/buildbuddy/enterprise/server/util/redisutil" "github.com/buildbuddy-io/buildbuddy/server/environment" "github.com/buildbuddy-io/buildbuddy/server/interfaces" "github.com/buildbuddy-io/buildbuddy/server/tables" "github.com/build...
package offheap import ( "encoding/binary" "fmt" "unsafe" ) //go:generate msgp // Copyright (C) 2015 by <NAME>, Ph.D. // metadata serialization size can never grow bigger // than MetadataHeaderMaxBytes (currently one 4K page), without impacting // backwards compatibility. We reserve this many bytes // at the beg...
// The heart of the system. // Turns templates into real files according to configs/external sources package sources import ( "io" "os" "os/user" "sync" "path/filepath" "sort" "fmt" "encoding/base64" "text/template" "github.com/catalyst/gotiller/util" "github.com/catalyst/...
package config import ( "runtime" "strings" "sync" ) var defaultConcurrency = runtime.GOMAXPROCS(0) // Config 配置 type Config struct { InitPath string // 初始化路径 IgnoreHide bool Debug bool Exclude []string // 排除文件夹,逗号分割 SkipSuffix []string // 跳过文件后缀 Concurrency int Force bool // 使用自定义配置覆盖...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: api/evaluator.proto package pb import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.go...
package raft import ( "context" "github.com/ccassar/raft/internal/raft_pb" "github.com/cenkalti/backoff" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap" grpc_ctxtags "github.com/grpc-ecosystem/go-grpc-middleware/tags" "github.com/grpc-eco...
package gitdir import ( "context" "errors" "fmt" "io/ioutil" "os" "sync" "time" "github.com/fluxcd/go-git-providers/gitprovider" git "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing" "github.com/go-git/go-git/v5/plumbing/object" log "github.com/sirupsen/logrus" "k8s.io/apimachinery/pkg...
/* Package iplib provides enhanced tools for working with IP networks and addresses. These tools are built upon and extend the generic functionality found in the Go "net" package. The main library comes in two parts: a series of utilities for working with net.IP (sort, increment, decrement, delta, compare, convert to ...
/* * gomacro - A Go interpreter with Lisp-like macros * * Copyright (C) 2019 <NAME> * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * * op3.go ...
// Copyright 2015, <NAME>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE.md file. package hashmerge import ( "hash/adler32" "hash/crc32" "hash/crc64" "strings" "testing" ) // shortString truncates long strings into something more human rea...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 // protoc v3.6.1 // source: clihandler.proto package protobuf import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.g...
package main import ( "crypto/tls" "encoding/json" "errors" "fmt" "github.com/Klarrio/traefik-forward-auth/session" "github.com/Klarrio/traefik-forward-auth/util" "net/http" "net/url" "strings" "time" "github.com/namsral/flag" "github.com/sirupsen/logrus" oidc "github.com/Klarrio/traefik-forward-auth/we...
package steps import ( "bytes" "context" "fmt" "log" "os" "os/exec" "path/filepath" "strconv" "strings" "testing" "time" "github.com/gruntwork-io/terratest/modules/helm" "github.com/gruntwork-io/terratest/modules/k8s" . "github.com/onsi/gomega" v1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pk...
package redisb import ( "fmt" "io" ) func prepend(s string, ss []string) []string { return append([]string{s}, ss...) } // int - incr decr incrby decrby strlen func Incr(rw io.ReadWriter, args ...string) (int64, error) { return Int64(rw, prepend("incr", args)...) } func Decr(rw io.ReadWriter, args ...string) (in...
package recipe_parsing import ( "strings" "testing" fuz "github.com/michigan-com/newsfetch/extraction/fuzzy_classifier" ) func TestIngredientClassifierSeparateForDebugging(t *testing.T) { c := NewIngredientClassifier() otag(t, c, "@ingredient", `1 tablespoon lemon juice`) } func TestIngredientClassifierNewBatc...
// 在这里写你的事件 package main import ( "fmt" "io" "os" "path" "path/filepath" "strings" "sort" "math" "runtime" "github.com/ying32/govcl/vcl" "github.com/ying32/govcl/vcl/rtl" "github.com/ying32/govcl/vcl/types" "github.com/ying32/govcl/vcl/types/colors" "github.com/ying32/govcl/vcl/types/keys" ) //::pr...
// Copyright Suneido Software Corp. All rights reserved. // Governed by the MIT license found in the LICENSE file. package compile import ( "strings" "testing" "github.com/apmckinlay/gsuneido/compile/ast" tok "github.com/apmckinlay/gsuneido/compile/tokens" rt "github.com/apmckinlay/gsuneido/runtime" "github.co...
/* * // Copyright (c) 2018 Cisco and/or its affiliates. * // * // Licensed under the Apache License, Version 2.0 (the "License"); * // you may not use this file except in compliance with the License. * // You may obtain a copy of the License at: * // * // http://www.apache.org/licenses/LICENSE-2.0 * // * /...
// Copyright 2017 CoreOS, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
// Copyright 2015 The Gogs Authors. All rights reserved. // Copyright 2018 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package git import ( "bufio" "bytes" "errors" "fmt" "io" "os/exec" "strconv" "strings" "c...
// Copyright 2020 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, ...
package basethird import ( "bytes" "crypto/tls" "crypto/x509" "encoding/json" "errors" "fmt" "io" "io/ioutil" "net" "net/http" "net/url" "os" "strconv" "strings" "sync" "time" "github.com/goees/yago" "github.com/goees/yago/coms/logger" "github.com/levigross/grequests" "github.com/sirupsen/logrus"...
/* Copyright 2020 the Velero contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
/* Copyright 2021 The KodeRover Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
package authentication import ( "context" "crypto/tls" "crypto/x509" "fmt" "net" "net/http" "net/url" "path" "strings" "time" "github.com/efficientgo/tools/core/pkg/backoff" "github.com/go-chi/chi" "github.com/go-kit/kit/log" "github.com/go-kit/kit/log/level" "github.com/golang-jwt/jwt/v4" "github.com...
// Copyright (c) 2014 The VolantMQ Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
package core import ( "fmt" "sort" "strconv" "strings" log "github.com/sirupsen/logrus" rgv1 "github.com/szuecs/routegroup-client/apis/zalando.org/v1" zv1 "github.com/zalando-incubator/stackset-controller/pkg/apis/zalando.org/v1" appsv1 "k8s.io/api/apps/v1" autoscaling "k8s.io/api/autoscaling/v2beta2" v1 "k...
package emulator import ( "fmt" "gbc/pkg/cartridge" ) var done = make(chan int) // FetchMemory8 引数で指定したアドレスから値を取得する func (cpu *CPU) FetchMemory8(addr uint16) (value byte) { switch { case addr >= 0x4000 && addr < 0x8000: // ROMバンク value = cpu.ROMBank.bank[cpu.ROMBank.ptr][addr-0x4000] case addr >= 0x8000 && ...
// Copyright 2022 Antrea Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
// Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package packages import ( "encoding/json" "fmt" "go/parser" "go/token" "os" "path/filepath" "regexp" "sort" "strconv" "strings" "github.com/polaris...
// Code generated by protoc-gen-go. // source: google.golang.org/genproto/googleapis/api/serviceconfig/documentation.proto // DO NOT EDIT! package google_api // import "google.golang.org/genproto/googleapis/api/serviceconfig" import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" // Refe...
// Package coap provides a CoAP client and server. package coap import ( "context" "crypto/tls" "fmt" "net" "reflect" "strconv" "strings" "sync" "sync/atomic" "time" kitNet "github.com/go-ocf/kit/net" ) // Interval for stop worker if no load const idleWorkerTimeout = 10 * time.Second // Maximum number of...
// Copyright 2016 DeepFabric, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed t...
package privval import ( "bytes" "encoding/hex" "errors" "fmt" "github.com/tendermint/tendermint/libs/log" "github.com/dashevo/dashd-go/btcjson" "github.com/tendermint/tendermint/crypto/bls12381" "github.com/tendermint/tendermint/crypto" dashcore "github.com/tendermint/tendermint/dashcore/rpc" tmproto "gi...
package clientapp import ( "context" "fmt" "log" "math/rand" "net" "net/http" "net/url" "os" "os/signal" "path/filepath" "runtime" "sync" "syscall" "time" "github.com/codegangsta/negroni" "github.com/gorilla/mux" "github.com/kiteco/kiteco/kite-go/client/autostart" "github.com/kiteco/kiteco/kite-go/c...
// Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the Lice...
// Code generated by the Pulumi SDK Generator DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package lambda import ( "context" "reflect" "github.com/pkg/errors" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) // Resource Type definition for AWS::Lambda::Fun...
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
// Copyright 2019 The gVisor Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
package gel import ( l "github.com/p9c/p9/pkg/gel/gio/layout" "golang.org/x/exp/shiny/materialdesign/icons" ) type Multi struct { *Window lines *[]string clickables []*Clickable buttons []*ButtonLayout input *Input inputLocation int addClickable *Clickable removeC...
package main import ( "bufio" "context" "encoding/json" "flag" "fmt" "log" "math/rand" "net/http" "os" "os/exec" "strconv" "strings" "time" "github.com/gorilla/mux" "github.com/ldej/go-acapy-client" ) type App struct { client *acapy.Client server *http.Server ledgerURL string ...
// Copyright 2015 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
package main import ( "crypto/sha256" "encoding/json" "fmt" "io/ioutil" "net/http" "strings" "github.com/ghodss/yaml" "github.com/golang/glog" av1 "k8s.io/api/admission/v1" "strconv" admissionregistrationv1 "k8s.io/api/admissionregistration/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/a...
package apu // copy and hack source code from goboy import ( "fmt" "log" "math" "github.com/pokemium/worldwide/pkg/util" ) const ( SAMPLE_RATE = 44100 twoPi = 2 * math.Pi perSample = 1 / float64(SAMPLE_RATE) cpuTicksPerSample = float64(4194304) / SAMPLE_RATE STREAM_LEN = 2940 // 2 * 2 * SAM...
package clientlib import ( "fmt" "math" "math/rand" "sync" "time" "domino/common" "domino/dynamic/config" "domino/dynamic/dynamic" "domino/dynamic/latency" ) type LatInfo struct { addr string // replica network address rt time.Duration // roundtrip time including queuing delay qDelay t...
/* * Copyright (C) 2019 IBM, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy ofthe License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
package models import ( "bytes" "encoding/json" "errors" "fmt" "html/template" "os" "os/exec" "path" "strconv" "strings" "time" "github.com/mjarkk/jsonschema" "github.com/script-development/RT-CV/helpers/jsonHelpers" ) // CV contains all information that belongs to a curriculum vitae // TODO check the j...
// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
// Copyright (c) 2012, <NAME> <<EMAIL>> // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package leveldb import ( "fmt" "sync/atomic" "time" "github.com/Terry2415/De-KV/leveldb/journal" "github.com/Terry2415/De-KV/leveldb/storage"...
package chainfee import ( "context" "encoding/json" "fmt" "io" prand "math/rand" "net" "net/http" "sync" "time" "github.com/decred/dcrd/dcrutil/v2" dcrjson "github.com/decred/dcrd/rpc/jsonrpc/types/v2" "github.com/decred/dcrd/rpcclient/v5" ) const ( // maxBlockTarget is the highest number of blocks conf...
/* Copyright 2019 Cisco Systems Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software d...
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...