text
stringlengths
5.51k
28.1k
/* Copyright 2019 The Machine Controller 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 w...
// Responsible for managing the ingester lifecycle. package ingester import ( "fmt" "io" "net/http" "os" "sort" "time" "golang.org/x/net/context" "github.com/go-kit/kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/weaveworks/common/user" "github.com/weaveworks/cortex/pkg/inges...
/* Copyright 2020 The Crossplane 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, ...
// Copyright 2019 Northern.tech AS // // 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 ...
/* In the card game poker, a hand consists of five cards and are ranked, from lowest to highest, in the following way: High Card: Highest value card. One Pair: Two cards of the same value. Two Pairs: Two different pairs. Three of a Kind: Three cards of the same value. Straight: All cards are consecutive values. Flush:...
package planner import ( "github.com/genjidb/genji/document" "github.com/genjidb/genji/internal/database" "github.com/genjidb/genji/internal/expr" "github.com/genjidb/genji/internal/sql/scanner" "github.com/genjidb/genji/internal/stream" ) // SelectIndex attempts to replace a sequential scan by an index scan or ...
package main import ( "github.com/go-telegram-bot-api/telegram-bot-api" "log" "math/rand" "strings" "time" ) type videonote struct { fileId string duration int } var kwsTimMaia = []string{ "tim maia", "que delicia", "que delícia", } var timMaiaAudio = []string{ "CQADAQADVAADMdEYRhqWi07QgrMIAg", "CQADA...
// Copyright © 2019 The Things Network Foundation, The Things Industries B.V. // // 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 // // Un...
package nbns import ( "bytes" "encoding/binary" "fmt" "log" "net" "strings" ) const ( netbiosMaxNameLen = 16 // 1 1 1 1 1 1 // 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 // +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ // | R | Opcode |AA ...
package excl import ( "bytes" "encoding/xml" "errors" "fmt" "os" "path/filepath" "strconv" "strings" ) // Sheet struct for control sheet data type Sheet struct { xml *SheetXML opened bool Rows []*Row Styles *Styles worksheet *Tag sheetView *Tag cols *Ta...
// Package integrationtests contains broad integration integrationtests that // include a bootstrap node, a standalone node, and a browser node. package integrationtests import ( "bufio" "context" "encoding/json" "flag" "fmt" "math/big" "net/http" "net/http/httptest" "os" "os/exec" "path/filepath" "strconv...
// Copyright (c) 2017-2021 Tigera, 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 ...
package api import ( "bytes" "context" "crypto/sha1" "encoding/base64" "encoding/json" "fmt" "io" "net" "net/http" "strconv" "strings" "time" log "github.com/Sirupsen/logrus" "github.com/docker/docker/api/types" docker "github.com/docker/docker/client" "github.com/docker/docker/pkg/jsonmessage" "gith...
// Copyright 2009 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 jpeg implements a JPEG image decoder and encoder. // // JPEG is defined in ITU-T T.81: http://www.w3.org/Graphics/JPEG/itu-t81.pdf. package jpeg imp...
// 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 tls // Delegated credentials for TLS // (https://tools.ietf.org/html/draft-ietf-tls-subcerts) is an IETF Internet // draft and proposed TLS extension. ...
// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: importduplicate.proto package importduplicate import ( bytes "bytes" fmt "fmt" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" github_com_cosmos_gogoproto_sortkeys "github.com/cosmos/gogoproto/sortkeys" proto1 "git...
package distributed_disk import ( "container/list" "context" "io" "log" "os" "path/filepath" "reflect" "sort" "sync" "syscall" "time" "github.com/buildbuddy-io/buildbuddy/enterprise/server/backends/pubsub" "github.com/buildbuddy-io/buildbuddy/enterprise/server/util/diskproxy" "github.com/buildbuddy-io/b...
/* Copyright © 2021 Opsani <<EMAIL>> This file is part of https://github.com/opsani/opsani-ignite */ package cmd import ( "fmt" "io" "math" "sort" "strings" "opsani-ignite/log" "github.com/olekukonko/tablewriter" "gopkg.in/yaml.v3" appmodel "opsani-ignite/app/model" ) type AppTable struct { wr io.Writ...
// Copyright 2020 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 ( "context" "crypto/rand" "encoding/base64" "fmt" "io/ioutil" "os" "os/user" "path/filepath" "reflect" "strings" "time" "github.com/alecthomas/kingpin" "github.com/ghodss/yaml" "github.com/sebidude/kubecrypt/crypto" "github.com/sebidude/kubecrypt/kube" corev1 "k8s.io/api/core/v1" ...
/* 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 smtpd import ( "bufio" "encoding/gob" "errors" "fmt" "io" "io/ioutil" "net/mail" "os" "path/filepath" "sync" "time" "github.com/egggo/inbucket/config" "github.com/egggo/inbucket/log" "github.com/jhillyerd/go.enmime" ) // Name of index file in each mailbox const INDEX_FILE = "index.gob" // We l...
// Copyright 2012 Google, Inc. All rights reserved. // Copyright 2009-2011 <NAME>. All rights reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the LICENSE file in the root of the source // tree. package layers import ( "encoding/binary" "fmt" "github.com/packetbeat...
/* Copyright The containerd 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...
package blockchain import ( "errors" "fmt" "reflect" "sort" "strconv" "strings" "github.com/incognitochain/incognito-chain/common" "github.com/incognitochain/incognito-chain/incognitokey" ) //===================================Util for Beacon============================= func GetStakingCandidate(beaconBlock ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: session/session.proto package session // import "github.com/havoc-io/mutagen/pkg/session" import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import timestamp "github.com/golang/protobuf/ptypes/timestamp" import url "github.co...
/* Copyright 2015 The Kubernetes 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 ag...
//go:build integfuzz // +build integfuzz // 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 requ...
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 // protoc v3.15.8 // source: Trd_UpdateOrder.proto package Trd_UpdateOrder import ( _ "github.com/mymmsc/futu4g/protocol/Common" Trd_Common "github.com/mymmsc/futu4g/protocol/Trd_Common" protoreflect "google.golang.org/...
// 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 models import ( // "gorm.io/gorm" "go-admin/common/models" ) type ErpFinanceAsinSummary struct { models.Model MainImg string `json:"mainImg" gorm:"type:varchar(100);comment:主图"` CommoditySku string `json:"commoditySku" gorm:"type:varchar(100);comment:商品SKU"` CommodityName string `j...
// // June 2016, cisco // // Copyright (c) 2016 by cisco Systems, Inc. // All rights reserved. // // // Extract metrics from telemetry data. This module is independent of // the specific metrics package (e.g. prometheus, opentsdb etc). The // specific metrics package handling can be found in metrics_x.go. // package ma...
package brotli import "math" /* Copyright 2010 Google Inc. All Rights Reserved. Distributed under MIT license. See file LICENSE for detail or copy at https://opensource.org/licenses/MIT */ /* Entropy encoding (Huffman) utilities. */ /* A node of a Huffman tree. */ type huffmanTree struct { total_count_ ...
package fxcore import ( "bytes" "encoding/hex" "encoding/json" "fmt" "math/big" "strconv" "testing" "time" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/x/ibc/testing/mock" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" "gith...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/ads/googleads/v0/services/payments_account_service.proto package services // import "google.golang.org/genproto/googleapis/ads/googleads/v0/services" import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import resources ...
// +build l1xx_md package ob // DO NOT EDIT THIS FILE. GENERATED BY xgen. import ( "bits" "mmio" "unsafe" "stm32/o/l1xx_md/mmap" ) type OB_Periph struct { RDP RRDP USER RUSER WRP01 RWRP01 WRP23 RWRP23 WRP45 RWRP45 WRP67 RWRP67 WRP89 RWRP89 WRP1011 RWRP1011 _ [24]uint32 WRP1213 ...
// Package lexer provides the tokenization functionality of the tootchain. package lexer import ( "bufio" "bytes" "container/list" "context" "fmt" "io/ioutil" "log" "runtime" "strings" "sync" "unicode" "unicode/utf8" "golang.org/x/sync/semaphore" ) // Lexer represents a lexer type Lexer struct { mu ...
package api import ( "context" "encoding/json" "fmt" "io/ioutil" stdlog "log" "net/http" "os" "strconv" "strings" "time" "github.com/dollarshaveclub/acyl/pkg/ghapp" "github.com/dollarshaveclub/acyl/pkg/ghclient" nitroerrors "github.com/dollarshaveclub/acyl/pkg/nitro/errors" "github.com/google/uuid" "gi...
// Copyright (c) 2016 Tigera, 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 applica...
// Copyright © 2017 <NAME> // // 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, publish, distribu...
package butlerd import ( "context" "fmt" "net/http" "sync" "time" "golang.org/x/sync/singleflight" "github.com/itchio/butler/buildinfo" "github.com/itchio/butler/butlerd/horror" "github.com/itchio/butler/butlerd/jsonrpc2" "github.com/itchio/butler/comm" "github.com/itchio/butler/database/models" itchio "...
/* ** Zabbix ** Copyright (C) 2001-2021 Zabbix SIA ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** **...
// Copyright © 2019 Annchain Authors <EMAIL ADDRESS> // // 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 applicab...
/* Copyright 2018 The Multicluster-Controller 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...
// // Go-FTL // // Copyright (C) <NAME>, 2014-2016 // // Do not remove the following lines - used in auto-update. // Version: 0.5.9 // BuildNo: 1811 // FileId: 1011 // package fileserve import ( "fmt" "net/http" "os" "strings" JsonX "github.com/pschlump/JSONx" logrus "github.com/pschlump/pslog" // "github.com...
// Copyright © 2021 The Things Industries B.V. // // 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 message import ( "io" "time" "github.com/pkg/errors" log "github.com/sirupsen/logrus" pb "go.gazette.dev/core/broker/protocol" ) // Sequencer observes read-uncommitted messages from journals and sequences them // into acknowledged, read-committed messages. Read uncommitted messages are fed // to QueueUn...
// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: get_app_dependencies.proto package desktop import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" math "math" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var...
package list import ( "fmt" "sort" "strings" "sync" tea "github.com/charmbracelet/bubbletea" "github.com/muesli/termenv" ) // Model is a bubbletea List of strings type Model struct { listItems []item LessFunc func(fmt.Stringer, fmt.Stringer) bool // function used for sorting EqualsFunc func(fmt.Stringer,...
package mobi import ( "encoding/binary" "errors" "fmt" "os" "reflect" "strconv" ) type MobiReader struct { Mobi } func NewReader(filename string) (out *MobiReader, err error) { out = &MobiReader{} out.file, err = os.Open(filename) if err != nil { return nil, err } out.fileStat, err = out.file.Stat() ...
package rux import ( "context" "io" "io/ioutil" "mime/multipart" "net" "net/http" "net/url" "os" "strings" "time" "github.com/gookit/goutil/netutil/httpctype" ) /************************************************************* * Context *************************************************************/ const ...
package businesslogic import ( "errors" "fmt" "time" ) const ( CompetitionStatusPreRegistration = 1 CompetitionStatusOpenRegistration = 2 CompetitionStatusClosedRegistration = 3 CompetitionStatusInProgress = 4 CompetitionStatusProcessing = 5 CompetitionStatusClosed = 6 Compe...
// Copyright (c) 2018 <NAME> // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package main import ( "math" "testing" // https://golang.org/pkg/testing/ ) func claim(t *testing.T, cond bool) { if !cond { t.Fail() } } // Tuple func TestTuplePoint(t *testing...
package endpoint import ( "reflect" "strconv" "strings" "github.com/wspowell/context" "github.com/wspowell/errors" "github.com/wspowell/log" ) // This file contains all the reflection that is not nice to look at. // Hidden deep down in this file so we can act like it does not exist. const ( structTagPath ...
package cords /* BSD 3-Clause License Copyright (c) 2020–21, <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: 1. Redistributions of source code must retain the above copyright notice, this list...
package box2d import "math" /// The world class manages all physics entities, dynamic simulation, /// and asynchronous queries. The world also contains efficient memory /// management facilities. type WorldFlag uint32 const ( WorldFlagNewFixture WorldFlag = 0x0001 WorldFlagLocked WorldFlag = 0x0002 WorldFl...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/cloud/automl/v1beta1/text_sentiment.proto package automl 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 are not ...
package main import ( "context" "crypto/md5" "encoding/json" "fmt" jwt "github.com/dgrijalva/jwt-go" "io/ioutil" "log" "net/http" "net/url" "strings" "time" ) // type AuthClaims map[string]interface{} type AuthClaims = jwt.MapClaims type AuthInfo struct { ID string Admin bool // Claims jwt.MapClaims...
// Copyright 2016 Intel 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 ...
// Package hireq is a simple http client request builder, inspired from https://github.com/dghubble/sling package hireq import ( "bytes" "context" "io" "net/http" "net/url" "os" "strings" "github.com/gookit/goutil/fsutil" "github.com/gookit/goutil/netutil/httpctype" "github.com/gookit/goutil/netutil/httpreq...
package libvirt import ( "fmt" "unsafe" ) /* #cgo LDFLAGS: -lvirt #include <libvirt/libvirt.h> void domainEventLifecycleCallback_cgo(virConnectPtr c, virDomainPtr d, int event, int detail, void* data); void domainEventGenericCallback_cgo(virConnectPtr c, virDomainPtr d, void* ...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/ads/googleads/v1/services/payments_account_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/resources" _ "...
// Code generated by goyacc - DO NOT EDIT. package parser import __yyfmt__ "fmt" import ( "github.com/potix2/goscheme/ast" "strconv" ) type yySymType struct { yys int exprs []ast.Expr expr ast.Expr tok Token } type yyXError struct { state, xsym int } const ( yyDefault = 57350 yyEofCode = 57344 BOOL...
/* Package epub generates valid EPUB 3.0 files with additional EPUB 2.0 table of contents (as seen here: https://github.com/bmaupin/epub-samples) for maximum compatibility. Basic usage: // Create a new EPUB e := epub.NewEpub("My title") // Set the author e.SetAuthor("<NAME>") // Add a section section1Body := ...
// Copyright 2012 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. // This file exercises the import parser but also checks that // some low-level packages do not have new dependencies added. package build import ( "bytes" ...
/** * Copyright © 2021-present Sveltin contributors <<EMAIL>> * * Use of this source code is governed by Apache 2.0 license * that can be found in the LICENSE file. */ // Package cmd ... package cmd import ( "embed" "errors" "fmt" "strings" "github.com/spf13/afero" "github.com/spf13/cobra" "github.com/sv...
package set import ( "fmt" "github.com/golang/glog" "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/types" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/client-go/dynamic" "k8s.io/kubernetes/pkg/kubectl/cmd/templates" kcmdutil "k8s.io/kubernetes/pkg/kubectl/cm...
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // vespa test command // Author: jonmv package cmd import ( "bytes" "crypto/tls" "encoding/json" "fmt" "github.com/spf13/cobra" "github.com/vespa-engine/vespa/client/go/util" "github.com/vespa-engine/vespa/...
package rql import ( "bytes" "container/list" "database/sql" "errors" "fmt" "math" "reflect" "strings" "sync" "time" "unicode" ) //go:generate easyjson -omit_empty -disallow_unknown_fields -snake_case rql.go // Query is the decoded result of the user input. //easyjson:json type Query struct { // Limit mu...
package bake import ( "context" "io/ioutil" "os" "path" "strconv" "strings" "github.com/docker/buildx/build" "github.com/docker/buildx/util/platformutil" "github.com/docker/docker/pkg/urlutil" hcl "github.com/hashicorp/hcl/v2" "github.com/moby/buildkit/session/auth/authprovider" "github.com/pkg/errors" ) ...
package minersc import ( "0chain.net/chaincore/block" cstate "0chain.net/chaincore/chain/state" sci "0chain.net/chaincore/smartcontractinterface" "0chain.net/chaincore/state" "0chain.net/chaincore/tokenpool" "0chain.net/chaincore/transaction" "0chain.net/core/datastore" "0chain.net/core/encryption" "0chain.ne...
// This file and its contents are licensed under the Apache License 2.0. // Please see the included NOTICE for copyright information and // LICENSE for a copy of the license. package ingestor import ( "context" "fmt" "math" "sort" "strings" "sync" "time" "github.com/jackc/pgconn" "github.com/prometheus/comm...
// Copyright 2018 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...
package p256 import ( "sync" "github.com/coinbase/kryptology/internal" "github.com/coinbase/kryptology/pkg/core/curves/native" "github.com/coinbase/kryptology/pkg/core/curves/native/p256/fp" ) var ( p256PointInitonce sync.Once p256PointParams native.EllipticPointParams p256PointSswuInitOnce sync.Onc...
package edit import ( "errors" "strings" "unicode" "unicode/utf8" "github.com/elves/elvish/pkg/cli" "github.com/elves/elvish/pkg/cli/addons/stub" "github.com/elves/elvish/pkg/cli/term" "github.com/elves/elvish/pkg/eval" "github.com/elves/elvish/pkg/parse" "github.com/elves/elvish/pkg/parse/parseutil" "gith...
// Copyright 2017 syzkaller project authors. All rights reserved. // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. // gen generates instruction tables (ifuzz/insns.go) from Intel XED tables. // Tables used to generate insns.go are checked in in all-enc-instructions.txt....
/* 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 distributed under the License...
package dicom import ( "crypto/sha256" "encoding/base64" "errors" "fmt" "strings" "github.com/gradienthealth/dicom/dicomio" "github.com/gradienthealth/dicom/dicomtag" ) // Constants const ( itemSeqGroup = 0xFFFE unknownGroupName = "Unknown Group" privateGroupName = "Private Data" ) // Element represen...
/* Copyright 2017 The Kubernetes 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, ...
// +build go1.9 // Copyright 2018 Microsoft 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 appl...
// Copyright 2014-2016 The Zurichess 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 main import ( "bufio" "bytes" "errors" "flag" "fmt" "log" "math/rand" "os" "os/exec" "regexp" "runtime" "runtime/pprof" "strco...
/* * Copyright 2019 gRPC 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 t...
// Copyright (c) <NAME> 2017. All rights reserved. // Copyright 2020 OpenFaaS Author(s) // Licensed under the MIT license. See LICENSE file in the project root for full license information. package handlers import ( "context" "encoding/json" "fmt" "io/ioutil" "log" "net/http" "sort" "strconv" "strings" "mat...
package streams import ( "context" "sync" "time" "github.com/matrix-org/dendrite/syncapi/types" userapi "github.com/matrix-org/dendrite/userapi/api" "github.com/matrix-org/gomatrixserverlib" "go.uber.org/atomic" ) // The max number of per-room goroutines to have running. // Too high and this will consume lots...
package commands import ( "fmt" "os" "regexp" "strconv" "strings" "time" "github.com/github/hub/git" "github.com/github/hub/github" "github.com/github/hub/ui" "github.com/github/hub/utils" ) var cmdPullRequest = &Command{ Run: pullRequest, Usage: ` pull-request [-focp] [-b <BASE>] [-h <HEAD>] [-r <REVIEW...
// MIT License // // Copyright (c) 2020 <NAME>, <NAME> and EASE lab // // 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 us...
// Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. // isula-build licensed under the Mulan PSL v2. // You can use this software according to the terms and conditions of the Mulan PSL v2. // You may obtain a copy of Mulan PSL v2 at: // http://license.coscl.org.cn/MulanPSL2 // THIS SOFTWARE IS ...
package box2d import ( "math" ) /// This is an internal class. type B2Island struct { M_listener B2ContactListenerInterface M_bodies []*B2Body M_contacts []B2ContactInterface // has to be backed by pointers M_joints []B2JointInterface // has to be backed by pointers M_positions []B2Position M_velociti...
/* Copyright 2020 The TestGrid 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, so...
package shardmemberfetcher import ( "errors" "fmt" "sync" "time" "github.com/botlabs-gg/yagpdb/v2/bot/eventsystem" "github.com/botlabs-gg/yagpdb/v2/common" "github.com/botlabs-gg/yagpdb/v2/lib/discordgo" "github.com/botlabs-gg/yagpdb/v2/lib/dstate" "github.com/botlabs-gg/yagpdb/v2/lib/dstate/inmemorytracker"...
// Copyright (c) 2017 OysterPack, 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...
// Copyright 2010 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 net import ( "context" "internal/race" "os" "runtime" "sync" "syscall" "unsafe" ) var ( initErr error ioSync uint64 ) // CancelIo Windows A...
package lchain import ( "bytes" "errors" "fmt" "github.com/copernet/copernicus/conf" "github.com/copernet/copernicus/logic/lmempool" "github.com/copernet/copernicus/model/block" "github.com/copernet/copernicus/model/blockindex" "github.com/copernet/copernicus/model/chain" "github.com/copernet/copernicus/model...
// Copyright (C) 2019 The Android Open Source Project // // 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 applica...
// Package netmock is a mock implementation of a subset of the net package. // // netmock simulates TCP-like (i.e., reliable, ordered, error-checked) // communication between hosts on a network. Additionally, netmock allows for // simulating characteristics of real-world networks such as link latency and // network par...
/* Copyright 2019 The HAProxy Ingress Controller 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...
// Copyright (c) 2021 rookie-ninja // // Use of this source code is governed by an Apache-style // license that can be found in the LICENSE file. // Package rkmidjwt is a middleware for JWT package rkmidjwt import ( "context" "errors" "fmt" "github.com/golang-jwt/jwt/v4" "github.com/rookie-ninja/rk-common/error"...
package main import ( "context" "errors" "fmt" "log" "os" "os/signal" "strings" "syscall" "time" "spacemonger" "spacemonger/spacetraders" "github.com/golang-migrate/migrate/v4" _ "github.com/golang-migrate/migrate/v4/database/postgres" _ "github.com/golang-migrate/migrate/v4/source/file" "github.com/j...
package main import ( "errors" "fmt" "sort" "github.com/floren/fs/internal/pack" "github.com/floren/fs/venti" ) const ( MetaMagic = 0x5656fc7a MetaHeaderSize = 12 MetaIndexSize = 4 IndexEntrySize = 8 DirMagic = 0x1c4d9072 ) /* * Mode bits */ const ( ModeOtherExec = (1 << 0) ModeOtherWrite...
// Package maptracker implements a PinTracker component for IPFS Cluster. It // uses a map to keep track of the state of tracked pins. package maptracker import ( "context" "errors" "sync" "go.opencensus.io/trace" "github.com/ipfs/ipfs-cluster/api" "github.com/ipfs/ipfs-cluster/pintracker/optracker" "github.c...