text stringlengths 3.08k 10.4k |
|---|
package firmware
import (
"crypto/sha256"
"errors"
"io"
"os"
"path/filepath"
"github.com/immune-gmbh/agent/v3/pkg/api"
"github.com/immune-gmbh/agent/v3/pkg/firmware/acpi"
"github.com/immune-gmbh/agent/v3/pkg/firmware/biosflash"
"github.com/immune-gmbh/agent/v3/pkg/firmware/common"
"github.com/immune-gmbh/ag... |
/*
Copyright (c) Facebook, Inc. and 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
Unless required by applicable law or agreed to in... |
// Copyright 2017 ETH Zurich
// Copyright 2018 ETH Zurich, 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 ... |
// Copyright 2014, Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tabletserver
import (
"time"
"github.com/youtube/vitess/go/hack"
mproto "github.com/youtube/vitess/go/mysql/proto"
"github.com/youtube/vitess/go/vt/d... |
package aggregate
import (
"errors"
"vending/app/domain/entity"
"vending/app/domain/obj"
"vending/app/domain/repo"
"vending/app/infrastructure/do"
"vending/app/infrastructure/pkg/util"
"vending/app/infrastructure/pkg/util/snowflake"
"vending/app/types"
)
// 创建订单
// 取消订单
// 修改订单
type orderAggregateRepo struct ... |
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package couchdbstore
import (
"fmt"
"path/filepath"
"sync"
"time"
"github.com/hyperledger/fabric/common/metrics/disabled"
coreconfig "github.com/hyperledger/fabric/core/config"
"github.com/hyperledger/fabric/c... |
// Copyright 2020 VMware, 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 upload
import (
"context"
"errors"
"fmt"
"io"
"io/ioutil"
"mime/multipart"
"net/http"
"strings"
"github.com/prometheus/client_golang/prometheus"
"gitlab.com/gitlab-org/labkit/log"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/api"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/filestore"
"g... |
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"os/exec"
"runtime"
"strings"
)
func streamPythonEOut(stdoutPipe io.ReadCloser, pythonIn io.WriteCloser, c *Client, closeChannel chan string) {
buffer := make([]byte, 100, 1000)
bufferString := ""
for {
select {
case command := <-closeChannel:
... |
package marvin
import (
"context"
"errors"
"net/http"
httptransport "github.com/go-kit/kit/transport/http"
"github.com/golang/protobuf/proto"
"github.com/NYTimes/marvin/internal"
)
type contextKey int
const (
// ContextKeyInboundAppID is populated in the context by default.
// It contains the value of the ... |
// Copyright © 2019 <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 required by applicable law or agreed to in writ... |
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Returns the specified BackendBucket resource. Gets a list of availabl... |
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
package email
import (
"strings"
"testing"
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost-server/v6/model"
"github.com/mattermost/mattermost-server/v6/shared/mail"
)
func Te... |
// Copyright 2017 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, ... |
// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package state
import (
"bytes"
"errors"
"fmt"
"sort"
"github.com/ava-labs/avalanchego/ids"
"github.com/ava-labs/avalanchego/snow/consensus/snowstorm"
"github.com/ava-labs/avalanchego/snow/engine/avalanche/vertex... |
// Copyright 2020 Amazon.com, Inc. or its affiliates. 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. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" fil... |
package seating_system
import (
"errors"
"log"
"strings"
)
type PositionType int
const (
Floor PositionType = iota
Seat
)
type Position struct {
Type PositionType
Occupied bool
}
type SeatingLayout struct {
Layout [][]Position
}
func FindSeatOccupationAfterStabilization(input *string) (int, error) {
o... |
/*
Copyright 2018 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, ... |
package goservice
import (
"context"
"fmt"
"os"
"os/signal"
"github.com/easeq/go-service/broker"
"github.com/easeq/go-service/client"
"github.com/easeq/go-service/component"
"github.com/easeq/go-service/db"
"github.com/easeq/go-service/kvstore"
"github.com/easeq/go-service/logger"
"github.com/easeq/go-serv... |
package main
import (
"crypto/hmac"
"crypto/sha1"
"encoding/hex"
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"strings"
"github.com/go-resty/resty/v2"
"github.com/hashicorp/hcl/v2/hclsimple"
"github.com/jinzhu/now"
)
const (
apiUrl string = "https://www.ifirma.pl/iapi/fakturakraj.j... |
// Copyright (c) 2017 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 appli... |
// Copyright 2019 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 htmlcheck provides a set of functions that check for properties
// of a parsed HTML document.
package htmlcheck
import (
"fmt"
"io"
"regexp"
"st... |
package cmd
import (
"bytes"
"encoding/json"
"fmt"
"github.com/spf13/cobra"
"github.com/weaveworks/wordepress"
"io/ioutil"
"log"
"net/http"
"os"
)
var (
version string
)
func headImage(image *wordepress.Image) (bool, error) {
url := baseURL + "/wp-content/uploads/" + image.Hash + image.Extension
request,... |
/*
Copyright IBM Corp. 2017 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 in wri... |
/*
Copyright 2021.
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 un... |
//go:build windows
// +build windows
/*
* Copyright 2019-2020 by <NAME>
* https://www.fibratus.io
* 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://... |
// Copyright 2016 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, ... |
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package container
import (
"io"
"sync"
"time"
"github.com/hyperledger/fabric/common/flogging"
"github.com/hyperledger/fabric/core/chaincode/persistence"
"github.com/hyperledger/fabric/core/container/ccintf"
"github.com/pkg/er... |
// Copyright 2020 Dragonchain, Inc. or its affiliates. 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 requir... |
// Copyright 2015 The Goga 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 goga
import (
"math"
"github.com/cpmech/gosl/chk"
"github.com/cpmech/gosl/utl"
)
// Metrics holds metric data such as non-dominated Pareto front... |
// Copyright 2019 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 2020 National Library of Norway.
*
* 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 bitcoin
import (
"bytes"
"math/big"
"github.com/btcsuite/btcutil/bech32"
"github.com/blockcypher/cryptosigner/util"
)
// Address logic for Bitcoin family coins
// Base58Alphabet is the base 58 alphabet
const Base58Alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
var (
indexes ... |
package rulengine
import (
"bufio"
"fmt"
"github.com/xlvector/rulengine/expression"
"github.com/xlvector/rulengine/facts"
"github.com/xlvector/rulengine/logic"
"os"
"strings"
)
type RuleEngine struct {
expressions [][]string
expressionNames []string
varCountInExpressions []int
expressionInd... |
package main
import (
"flag"
"fmt"
"io"
"net"
"os"
)
// Client 客户端
type Client struct {
ServerIp string // 对端服务器ip
ServerPort int // 对端服务器端口
Name string // 用户名
conn net.Conn // 和对端服务器建立的连接句柄
flag int // 当前用户从菜单选择的操作模式
}
func NewClient(serverIp string, serverPort int) *Clie... |
package histanal
import (
"bufio"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"math/rand"
"os"
"path/filepath"
"github.com/curusarn/resh/pkg/records"
)
type deviceRecords struct {
Name string
Records []records.EnrichedRecord
}
type userRecords struct {
Name string
Devices []deviceRecords
}
// HistLo... |
/*
Copyright © 2021 NAME HERE <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 applicable law or agreed to in writi... |
package client
import (
"github.com/rancher/norman/types"
)
const (
ClusterAlertGroupType = "clusterAlertGroup"
ClusterAlertGroupFieldAlertState = "alertState"
ClusterAlertGroupFieldAnnotations = "annotations"
ClusterAlertGroupFieldClusterID = "clusterId"
C... |
package interval
import (
"fmt"
"github.com/mewmew/lnp/pkg/cfa"
"github.com/mewmew/lnp/pkg/cfa/primitive"
"github.com/mewmew/lnp/pkg/cfg"
)
// structCompCond structures compound conditionals in the given control flow
// graph.
//
// Pre: G is a control flow graph.
//
// 2-way, n-way, and loops have been str... |
/*
Copyright 2015 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, ... |
// Copyright 2019 Yunion
//
// 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 writi... |
package qsc
import (
"fmt"
"github.com/QOSGroup/kepler/cert"
bacc "github.com/QOSGroup/qbase/account"
qcliacc "github.com/QOSGroup/qbase/client/account"
"github.com/QOSGroup/qbase/client/context"
"github.com/QOSGroup/qbase/client/keys"
qclitx "github.com/QOSGroup/qbase/client/tx"
"github.com/QOSGroup/qbase/txs... |
/*
Copyright 2019 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... |
// Copyright 2020 The Lokomotive 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... |
// 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... |
// Copyright 2018 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... |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package textract
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
type StartDocumentTextDetectionInput struct {
_ struct{} `type:"structure"`
// The idempotent token that's used to ident... |
// Copyright (C) 2015-2022 Asynkron AB All rights reserved
package cluster
import (
"time"
"github.com/asynkron/gofun/set"
"github.com/asynkron/protoactor-go/actor"
"github.com/asynkron/protoactor-go/log"
)
// convenience customary type to represent an empty value
// that takes no space in memory.
type empty st... |
package service
import (
"context"
"github.com/cortezaproject/corteza-server/automation/types"
"github.com/cortezaproject/corteza-server/pkg/actionlog"
internalAuth "github.com/cortezaproject/corteza-server/pkg/auth"
"github.com/cortezaproject/corteza-server/pkg/rbac"
)
type (
accessControl struct {
permissio... |
// Copyright 2021 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 noder
import (
"cmd/compile/internal/base"
"cmd/compile/internal/ir"
"cmd/compile/internal/syntax"
"cmd/compile/internal/typecheck"
"cmd/compile/i... |
// Copyright (c) The Thanos Authors.
// Licensed under the Apache License 2.0.
package info
import (
"context"
"github.com/thanos-io/thanos/pkg/info/infopb"
"github.com/thanos-io/thanos/pkg/store/labelpb"
"google.golang.org/grpc"
)
// InfoServer implements the corresponding protobuf interface
// to provide info... |
/*
Copyright 2020 The Flux 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, softwar... |
/*
* 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 ... |
package application
import (
"github.com/carbocation/interpose"
gorilla_mux "github.com/gorilla/mux"
"github.com/gorilla/sessions"
"github.com/jmoiron/sqlx"
_ "github.com/lib/pq"
"github.com/sendgrid/sendgrid-go"
"github.com/sendgrid/sendgrid-go/helpers/mail"
"github.com/spf13/viper"
"net/http"
"os"
"time"
... |
// Package binary has functions for abusing a binary tree.
package binary
type BinaryTree struct {
root *node
size int
}
// Returns a new, empty binary tree.
func New() *BinaryTree {
return &BinaryTree{size: 0}
}
type node struct {
parent *node
left *node
right *node
value Comparable
}
// A type that imp... |
package config
import (
"path/filepath"
log "github.com/newrelic/newrelic-diagnostics-cli/logger"
"github.com/newrelic/newrelic-diagnostics-cli/tasks"
"github.com/newrelic/newrelic-diagnostics-cli/tasks/base/config"
)
// RubyConfigAgent - This struct defined the sample plugin which can be used as a starting poin... |
// Copyright 2020 DataStax
//
// 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... |
/*
Copyright 2014 Google 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 in ... |
package modules
import (
"context"
"database/sql"
"encoding/json"
"math/rand"
"github.com/heroiclabs/nakama-common/api"
"github.com/heroiclabs/nakama-common/runtime"
"github.com/satori/go.uuid"
)
// Define the bucketed leaderboard storage object
type userBucketStorageObject struct {
ResetTimeUnix uint32 `j... |
package models
import (
"fmt"
"github.com/astaxie/beego/orm"
"time"
)
type Notification struct {
Id int32 ``
NotifyType string ``
Read bool `orm:"default(false)"`
User *User `orm:"rel(fk)"`
Actor *User `orm:"rel(fk)"`
NotifyableType string `... |
package openshift
import (
"context"
"crypto/tls"
"fmt"
"github.com/fabric8-services/fabric8-tenant/auth"
"github.com/fabric8-services/fabric8-tenant/cluster"
"github.com/fabric8-services/fabric8-tenant/configuration"
"github.com/fabric8-services/fabric8-tenant/environment"
"github.com/fabric8-services/fabric8... |
package testing
import (
"fmt"
"net/http"
"testing"
fake "github.com/nttcom/eclcloud/ecl/network/v2/common"
"github.com/nttcom/eclcloud/ecl/network/v2/gateway_interfaces"
"github.com/nttcom/eclcloud/pagination"
th "github.com/nttcom/eclcloud/testhelper"
)
func TestList(t *testing.T) {
th.SetupHTTP()
defer t... |
package main
import (
"fmt"
"github.com/stellar/go/clients/horizonclient"
"github.com/stellar/go/keypair"
"github.com/stellar/go/network"
"github.com/stellar/go/txnbuild"
"io/ioutil"
"log"
"net/http"
)
//创建账户
func createAccount() (*keypair.Full, error) {
pair, err := keypair.Random()
if err != nil {
log.... |
package main_test
import (
"bytes"
"context"
"encoding/json"
"fmt"
"net"
"net/http"
"os"
"sync"
"testing"
"github.com/99designs/gqlgen/graphql/handler"
"github.com/google/go-cmp/cmp"
"google.golang.org/grpc"
"apis/go/todo"
"apis/go/user"
"todoapp/graph"
"todoapp/graph/generated"
"todoapp/todo"
"tod... |
package main
import (
"context"
"io"
"io/ioutil"
"net"
"net/http"
"os"
"os/exec"
"path/filepath"
"runtime"
"strconv"
"strings"
"time"
"golang.org/x/xerrors"
"go.coder.com/flog"
"go.coder.com/sail/internal/codeserver"
)
// loadCodeServer produces a path containing the code-server binary.
// It will at... |
package api
import (
"fmt"
"net/http"
"github.com/pachisi456/Sia/modules"
"github.com/pachisi456/Sia/types"
"github.com/julienschmidt/httprouter"
)
type (
// ExtendedHostDBEntry is an extension to modules.HostDBEntry that includes
// the string representation of the public key, otherwise presented as two
//... |
package tc
import (
"reflect"
"strings"
)
type (
// TypeConverter .
TypeConverter struct {
// String string
String string
// Byte byte
Byte byte
// Bytes []byte
Bytes []byte
// Bool bool
Bool bool
// Int int
Int int
// Int8 int8
Int8 int8
// Int16 int16
Int16 int16
// Int32 in... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: contracts/group.proto
package contracts
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 i... |
package main
import (
"AoC2021/aoc_fun"
"io/ioutil"
"log"
"os"
"strconv"
"strings"
)
type Data struct {
sfls []SnailFishList
}
func parse(line string, data *Data) {
var sfl SnailFishList
cur_nest := 0
for _, r := range line {
switch r {
case ']':
cur_nest--
case '[':
cur_nest++
case ',':
c... |
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package compute
import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// > This content is derived from https://github.com... |
// 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 pgmodel
import (
"encoding/binary"
"fmt"
"math"
"sort"
"strings"
"sync"
"github.com/prometheus/prometheus/pkg/labels"
"github.... |
// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose ei... |
package traverse
import (
"github.com/xunull/goc/commonx"
"github.com/xunull/goc/easy/routine_pool"
"github.com/xunull/goc/file_path"
"github.com/xunull/goc/lang_ext"
"io/fs"
"io/ioutil"
"path"
"path/filepath"
"strings"
"sync"
)
type DirTraverse struct {
Path string
wg *sync.WaitGroup
errChan... |
package main
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"os"
"strings"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spilliams/colors/src/pkg/color"
)
const (
inFileColumnSeparator = "\t"
inFileRowSeparator = "\n"
outFileColumnSeparator = ","
outFileRowSeparator = "\n"
)
fu... |
package wingui
import (
"syscall"
"unsafe"
)
const (
WM_PAINT = 15
BI_RGB = 0
BI_BITFIELDS = 3
DIB_PAL_COLORS = 1
DIB_RGB_COLORS = 0
BLACKNESS = 0x42
DSTINVERT = 0x550009
MERGECOPY = 0xC000CA
MERGEPAINT = 0xBB0226
NOTSRCCOPY = 0x330008
NOTSRCERASE = 0x1100A6
PATCOPY = 0xF00021
... |
/*
Copyright 2020 The Tekton 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, softw... |
// Code generated by go-swagger; DO NOT EDIT.
package blueprint
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.co... |
package soyhtml
import (
"math"
"math/rand"
"strings"
"github.com/robfig/soy/data"
)
type loopFunc func(s *state, key string) data.Value
var loopFuncs = map[string]loopFunc{
"index": funcIndex,
"isFirst": funcIsFirst,
"isLast": funcIsLast,
}
func funcIndex(s *state, key string) data.Value {
return s.con... |
package git
// This file just contains the Git-specific portions of sshd.
import (
"bytes"
"errors"
"fmt"
"io"
"os"
"os/exec"
"path/filepath"
"strings"
"sync"
"text/template"
"github.com/drycc/pkg/log"
"golang.org/x/crypto/ssh"
)
// prereceiveHookTplStr is the template for a pre-receive hook. The follow... |
/*
* 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 sak
import (
"sync"
"testing"
"github.com/google/go-cmp/cmp"
)
type Test_IsZero_I interface {
Do()
}
type Test_isZero_IImplementer struct{}
func (t *Test_isZero_IImplementer) Do() {}
func Test_IsZero(t *testing.T) {
// Some test inputs.
var i1, i2 Test_IsZero_I
i2 = &Test_isZero_IImplementer{}
var ... |
/*
* 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 ... |
// Copyright 2019 Yunion
//
// 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 writi... |
// Copyright (c) 2019 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 to... |
package parser
import (
"fmt"
"github.com/onlyafly/vamos/lang/ast"
"strconv"
"unicode/utf8"
)
// Parse accepts a string and the name of the source of the code, and returns
// the Vamos nodes therein, along with a list of any errors found.
func Parse(input string, sourceName string) (ast.Nodes, ParserErrorList) {
... |
/*
Copyright (c) Facebook, Inc. and 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
Unless required by applicable law or agreed to in... |
package enpass
import (
"crypto/aes"
"crypto/cipher"
"encoding/hex"
"github.com/pkg/errors"
"strings"
)
/*
2020/12/08 08:59:36 > ID
2020/12/08 08:59:36 > uuid
2020/12/08 08:59:36 > created_at
2020/12/08 08:59:36 > meta_updated_at
2020/12/08 08:59:36 > field_updated_at
2020/12/08 08:59:36 > title
2020/12/08 08:59... |
package logdna
// This separation of concerns between request and response bodies is only due
// to inconsistencies in the API data types returned by the PUT versus the ones
// returned by the GET. In a perfect world, they would use the same types.
import (
"encoding/json"
"fmt"
"github.com/hashicorp/terraform-pl... |
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"encoding/json"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-opena... |
// Copyright 2021 Dolthub, 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 quadtree
import (
"github.com/rob05c/sauropoda/dino"
"math/rand"
"time"
)
const elementSize = 100
type Quadtree struct {
root *Node
dinos map[int64]*dino.PositionedDinosaur
}
func (q *Quadtree) GetByID(id int64) (*dino.PositionedDinosaur, bool) {
dino, ok := q.dinos[id]
if !ok {
return nil, false
... |
package mpp
const (
FormatUnknown = Format(iota)
FormatFixInt
FormatFixMap
FormatFixArray
FormatFixStr
FormatNegativeFixInt
FormatNil = Format(0xc0)
FormatNa = Format(0xc1)
FormatFalse = Format(0xc2)
FormatTrue = Format(0xc3)
FormatBin8 = Format(0xc4)
FormatBin16 = Format(0xc5)
F... |
package proxy
import (
"net"
"github.com/AdguardTeam/golibs/log"
"github.com/miekg/dns"
)
const retryNoError = 60 // Retry time for NoError SOA
// CheckDisabledAAAARequest checks if AAAA requests should be disabled or not and sets NoError empty response to given DNSContext if needed
func CheckDisabledAAAARequest... |
package ronykit
import (
"context"
"math"
"net/http"
"sync"
"github.com/clubpay/ronykit/utils"
)
const (
abortIndex = math.MaxInt >> 1
)
type (
// ErrHandler is called when an error happens in internal layers.
// NOTICE: ctx could be nil, make sure you do nil-check before calling its methods.
ErrHandler ... |
package hubspot
import (
"fmt"
"net/http"
"strings"
"github.com/fatih/structs"
)
// ContactProperty defines the structure on the input of any 'Additional Properties' in to a contact entry
type ContactProperty struct {
Property string `json:"property"`
Value string `json:"value"`
}
// Contact is an individu... |
package models
import (
"time"
"github.com/Kamva/mgm/v3"
"github.com/Kamva/mgm/v3/operator"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
)
type Download struct {
Document `bson:",inline"` // inc... |
// uses scrypt for password key derivation, and chacha20poly1305 for
// encryption/decryption
package encrypt
import (
"encoding/base64"
"encoding/binary"
"encoding/json"
"errors"
"math"
"github.com/samoslab/galtcoin/src/cipher"
"github.com/samoslab/galtcoin/src/cipher/chacha20poly1305"
"github.com/samoslab/... |
package srpc
import (
"errors"
"fmt"
"go/token"
"log"
"net/http"
"reflect"
)
const (
ErrCodeServiceNotFound = 50001 + iota
ErrCodeMethodNotFound
)
type Server struct {
services map[string]*service
}
func NewServer() *Server {
return &Server{
services: make(map[string]*service),
}
}
type service struct... |
/*
Copyright 2022 kuizhiqing.
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
dis... |
package models
import (
"fmt"
"github.com/astaxie/beego"
"github.com/astaxie/beego/orm"
"strings"
"time"
)
type Relations struct {
Id uint64 `orm:"column(id);pk" description:"id"`
SourceId uint64 `orm:"column(source_id)" description:"如产品id "`
TargetId uint64 `orm:"column(source_id)"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.