patch stringlengths 17 31.2k | y int64 1 1 | oldf stringlengths 0 2.21M | idx int64 1 1 | id int64 4.29k 68.4k | msg stringlengths 8 843 | proj stringclasses 212
values | lang stringclasses 9
values |
|---|---|---|---|---|---|---|---|
@@ -58,12 +58,13 @@ const (
type LabelSelector string
const (
- MayaAPIServerLabelSelector LabelSelector = "name=maya-apiserver"
- OpenEBSProvisionerLabelSelector LabelSelector = "name=openebs-provisioner"
- OpenEBSSnapshotOperatorLabelSelector LabelSelector = "name=openebs-snapshot-operator"
- OpenE... | 1 | // Copyright © 2019 The OpenEBS 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... | 1 | 15,951 | The latest yaml in openebs/master has changed to name=admission-webhook. cc: @prateekpandey14 | openebs-maya | go |
@@ -3,7 +3,7 @@
# Purpose:
# sns-ruby-example-send-message.rb demonstrates how to send a message using the Amazon Simple Notification Services (SNS) topic using
-# the AWS SDK for JavaScript (v3).
+# the AWS SDK for Ruby.
# Inputs:
# - REGION | 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
# Purpose:
# sns-ruby-example-send-message.rb demonstrates how to send a message using the Amazon Simple Notification Services (SNS) topic using
# the AWS SDK for JavaScript (v3).
# Inputs:
# - REGION
#... | 1 | 20,567 | using **an** Amazon Simple... Simple Notification **Service** (singular) | awsdocs-aws-doc-sdk-examples | rb |
@@ -55,7 +55,7 @@ void CHECK_RGROUP(RGroupRows::const_iterator &it, std::string expected,
}
std::string result = str.str();
- if (expected != result) {
+ if (1 || expected != result) {
std::cerr << "Expected: " << expected << std::endl;
std::cerr << "Got: " << result << std::endl;
} | 1 | // Copyright (c) 2017, Novartis Institutes for BioMedical Research Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above co... | 1 | 19,277 | Probably don't intend for this `1 ||` to still be here | rdkit-rdkit | cpp |
@@ -353,14 +353,6 @@ bool cvdescriptorset::ValidateDescriptorSetLayoutCreateInfo(
VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME);
}
- const bool host_only_pool_set = static_cast<bool>(create_info->flags & VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_VALVE);
- if (push_descriptor_set && host_only... | 1 | /* Copyright (c) 2015-2021 The Khronos Group Inc.
* Copyright (c) 2015-2021 Valve Corporation
* Copyright (c) 2015-2021 LunarG, Inc.
* Copyright (C) 2015-2021 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You m... | 1 | 18,148 | Looks like this is failing to compile on Windows (VS 2015 I think). | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -91,6 +91,15 @@ func (q *Query) Limit(n int) *Query {
return q
}
+// BeforeQuery takes a callback function that will be called before the Query is
+// executed to the underlying provider's query functionality. The callback takes
+// a parameter, asFunc, that converts its argument to provider-specific types.
+//... | 1 | // Copyright 2019 The Go Cloud 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 1 | 17,003 | nit: call the arg something simple like `f` to avoid repeating "beforeQuery". | google-go-cloud | go |
@@ -18,8 +18,15 @@ package auth
import (
"context"
+
+ "github.com/libopenstorage/openstorage/pkg/correlation"
)
+func init() {
+ correlation.RegisterComponent("auth")
+ correlation.RegisterGlobalHook()
+}
+
const (
systemGuestRoleName = "system.guest"
) | 1 | /*
Package auth can be used for authentication and authorization
Copyright 2018 Portworx
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... | 1 | 8,908 | do you think this should be `osd/auth` as a pkg to make it more unique and void conflicts with other `auth` packages? | libopenstorage-openstorage | go |
@@ -36,10 +36,12 @@ namespace Microsoft.DotNet.Build.Tasks
public bool DebugOnly { get; set; }
+ [Output]
+ public string Message { get; set; }
+
public override bool Execute()
{
- bool result = true;
-
+ Message = "";
try
{
... | 1 | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using Syst... | 1 | 5,805 | Why are you passing out the Message? | dotnet-buildtools | .cs |
@@ -135,8 +135,8 @@ func (p *Provider) RegisterSpanProcessor(s SpanProcessor) {
// UnregisterSpanProcessor removes the given SpanProcessor from the list of SpanProcessors
func (p *Provider) UnregisterSpanProcessor(s SpanProcessor) {
- mu.Lock()
- defer mu.Unlock()
+ p.mu.Lock()
+ defer p.mu.Unlock()
new := make(s... | 1 | // Copyright The OpenTelemetry 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 agre... | 1 | 13,185 | Yikes, this was a bug :grimacing: | open-telemetry-opentelemetry-go | go |
@@ -58,7 +58,7 @@ func (h *Handler) FetchX509SVID(_ *workload.X509SVIDRequest, stream workload.Spi
selectors := attestor.New(&config).Attest(pid)
- subscriber := h.Manager.Subscribe(selectors)
+ subscriber := h.Manager.NewSubscriber(selectors)
defer subscriber.Finish()
for { | 1 | package workload
import (
"context"
"crypto/x509"
"errors"
"fmt"
"time"
"github.com/sirupsen/logrus"
"github.com/spiffe/spire/pkg/agent/attestor/workload"
"github.com/spiffe/spire/pkg/agent/auth"
"github.com/spiffe/spire/pkg/agent/catalog"
"github.com/spiffe/spire/pkg/agent/manager"
"github.com/spiffe/spir... | 1 | 9,397 | I am not sure which one of these is considered idiomatic go... maybe @azdagron has an opinion here? /me prefers the verb since it's shorter. I guess I don't care _too_ much, but it would be good to get some general agreement so we are all following the same conventions | spiffe-spire | go |
@@ -62,9 +62,7 @@ var LocalDevSequelproCmd = &cobra.Command{
"root", //dbuser
))
- if scaffold != true {
- exec.Command("open", tmpFilePath).Run()
- }
+ exec.Command("open", tmpFilePath).Run()
color.Cyan("sequelpro command finished successfully!")
| 1 | package cmd
import (
"fmt"
"log"
"os"
"os/exec"
"path"
"strconv"
"strings"
"github.com/drud/ddev/pkg/plugins/platform"
"github.com/drud/drud-go/utils/dockerutil"
"github.com/fatih/color"
"github.com/spf13/cobra"
)
// LocalDevSequelproCmd represents the sequelpro command
var LocalDevSequelproCmd = &cobra.C... | 1 | 10,615 | Please check this for error and emit appropriate debugging information. I know this was pre-existing code, but we just have to fix things like this as we go. | drud-ddev | php |
@@ -140,7 +140,7 @@ func InitialURL(c client.Client, cd *hivev1.ClusterDeployment) (string, error) {
// the ClusterDeployment to determine if the remote cluster is reachable.
func Unreachable(cd *hivev1.ClusterDeployment) (unreachable bool, lastCheck time.Time) {
cond := utils.FindClusterDeploymentCondition(cd.Stat... | 1 | package remoteclient
//go:generate mockgen -source=./remoteclient.go -destination=./mock/remoteclient_generated.go -package=mock
import (
"context"
"time"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/runtime"
corev1 "k8s.io/api/core/v1"
"k8s.io/client-go/dynamic"
kubecli... | 1 | 18,378 | This seems unrelated, should be a separate PR. | openshift-hive | go |
@@ -20,6 +20,7 @@
//--
#include "algorithms/engines/mt2203/mt2203.h"
+#include "../engine_create_dispatcher.h"
#include "mt2203_batch_impl.h"
namespace daal | 1 | /* file: mt2203.cpp */
/*******************************************************************************
* Copyright 2014-2019 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... | 1 | 19,549 | Never use relative includes, prefer full path | oneapi-src-oneDAL | cpp |
@@ -397,6 +397,17 @@ class TestArgument:
assert str(excinfo.value) == "Argument marked as both count/win_id!"
+ def test_zero_count_and_zero_count_arg(self):
+ with pytest.raises(TypeError) as excinfo:
+ @cmdutils.argument('arg', count=False,
+ zero_count=True)
+ ... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2015-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | 1 | 16,575 | This should fit on the line above without going over the 79-char limit, no? | qutebrowser-qutebrowser | py |
@@ -22,7 +22,6 @@ describe VideosController do
user = create(:subscriber)
video = create(:video)
create(:license, user: user, licenseable: video.watchable)
- controller.stubs(:signed_in?).returns(true)
stub_current_user_with(user)
get :show, id: video | 1 | require "rails_helper"
include StubCurrentUserHelper
describe VideosController do
describe "#index" do
it "renders RSS" do
get :index, format: :rss
expect(response).to be_success
end
it "doesn't recognize other formats" do
expect do
get :index, format: :html
end.to rais... | 1 | 13,160 | Is this related to the other contents of this pull request? | thoughtbot-upcase | rb |
@@ -356,6 +356,7 @@ type WorkloadOpts struct {
Aliases []string
Tags map[string]string // Used by App Runner workloads to tag App Runner service resources
NestedStack *WorkloadNestedStackOpts // Outputs from nested stacks such as the addons stack.
+ AddonsE... | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package template
import (
"bytes"
"fmt"
"text/template"
"github.com/dustin/go-humanize/english"
"github.com/google/uuid"
"github.com/aws/aws-sdk-go/aws"
)
// Constants for template paths.
const (
//... | 1 | 19,842 | Should this be `*string`? | aws-copilot-cli | go |
@@ -51,16 +51,7 @@ var _ = Context("etcd connection interruption", func() {
BeforeEach(func() {
felixes, etcd, client = infrastructure.StartNNodeEtcdTopology(2, infrastructure.DefaultTopologyOptions())
-
- // Install a default profile that allows all ingress and egress, in the absence of any Policy.
- defaultP... | 1 | // +build fvtests
// Copyright (c) 2018 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
//
// Unles... | 1 | 16,909 | In the old code here there was no Source Selector, but CreateDefaultProfile will specify a Source Selector of `""`. Is that equivalent? | projectcalico-felix | go |
@@ -8,10 +8,12 @@ module RSpec
# Temporarily support old and new APIs while we transition the other
# rspec libs to use a hash for the 2nd arg and no version arg
data = Hash === replacement_or_hash ? replacement_or_hash : { :replacement => replacement_or_hash }
+ call_site = caller.fin... | 1 | module RSpec
module Core
module Deprecation
# @private
#
# Used internally to print deprecation warnings
def deprecate(deprecated, replacement_or_hash={}, ignore_version=nil)
# Temporarily support old and new APIs while we transition the other
# rspec libs to use a hash for... | 1 | 9,403 | We should pick this across for all our deprecation specs | rspec-rspec-core | rb |
@@ -45,8 +45,8 @@ func init() {
}
var (
- kindBinary = flag.String("kindBinary", "kind", "path to the kind binary")
- managerImageTar = flag.String("managerImageTar", "", "a script to load the manager Docker image into Docker")
+ kindBinary = flag.String("kindBinary", "kind", "path to the kind binary")
+ ku... | 1 | /*
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, ... | 1 | 11,119 | Longer term, I think it could be valuable to move this to cluster-api, and then other repos could take advantage of this as well. | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -1416,7 +1416,7 @@ func describeBPFTests(opts ...bpfTestOpt) bool {
if testOpts.connTimeEnabled {
Skip("FIXME externalClient also does conntime balancing")
}
-
+ externalClient.EnsureBinary("test-connection")
cc.ExpectSome(externalClient, TargetIP(felixes[1].IP), npPort)
... | 1 | // Copyright (c) 2020 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... | 1 | 17,989 | Is this a related change? | projectcalico-felix | c |
@@ -400,6 +400,12 @@ func (a *Actuator) Update(ctx context.Context, cluster *clusterv1.Cluster, machi
return errors.Errorf("failed to ensure tags: %+v", err)
}
+ scope.MachineStatus.InstanceState = &instanceDescription.State
+
+ if err := a.reconcileLBAttachment(scope, machine, instanceDescription); err != nil {... | 1 | /*
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, ... | 1 | 10,077 | Given that this is repeated, can we do it outside here and the Create call, what do you think about moving it outside? | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -44,6 +44,10 @@ function UndoRedo(instance) {
return;
}
+ arrayEach(changes, (change) => {
+ change[1] = instance.propToCol(change[1]);
+ });
+
const selected = changesLen > 1 ? this.getSelected() : [[changes[0][0], changes[0][1]]];
plugin.done(new UndoRedo.ChangeAction(changes, ... | 1 | /**
* Handsontable UndoRedo class
*/
import Hooks from './../../pluginHooks';
import { arrayMap, arrayEach } from './../../helpers/array';
import { rangeEach } from './../../helpers/number';
import { inherit, deepClone } from './../../helpers/object';
import { stopImmediatePropagation, isImmediatePropagationStopped }... | 1 | 15,930 | Changing `prop`=>`col` by reference? I think you can prepare map `prop`=>`col` in L51. | handsontable-handsontable | js |
@@ -106,6 +106,7 @@ std::string FlatCompiler::GetUsageString(const char *program_name) const {
" --grpc Generate GRPC interfaces for the specified languages\n"
" --schema Serialize schemas instead of JSON (use with -b)\n"
" --bfbs-comments Add doc comments to the binary schema... | 1 | /*
* 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 applica... | 1 | 13,411 | I hate to ask, but can we make this flag shorter so it lines up? :( | google-flatbuffers | java |
@@ -19,9 +19,9 @@ import (
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
- "k8s.io/apimachinery/pkg/api/errors"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/... | 1 | package hive
import (
"context"
"crypto/md5"
"encoding/hex"
"fmt"
"os"
"reflect"
"time"
log "github.com/sirupsen/logrus"
hivev1 "github.com/openshift/hive/apis/hive/v1"
"github.com/openshift/hive/pkg/resource"
"github.com/openshift/library-go/pkg/operator/events"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8... | 1 | 20,231 | Note to reviewers: latent, dedup import | openshift-hive | go |
@@ -20,3 +20,18 @@ package agent
func (i *Initializer) setupExternalConnectivity() error {
return nil
}
+
+// prepareHostNetwork returns immediately on Linux.
+func (i *Initializer) prepareHostNetwork() error {
+ return nil
+}
+
+// prepareOVSBridge returns immediately on Linux.
+func (i *Initializer) prepareOVSBri... | 1 | // +build linux
// Copyright 2020 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 ... | 1 | 14,977 | Seems this func is no more needed after your refactoring. | antrea-io-antrea | go |
@@ -67,6 +67,7 @@ public class MemoryUsage {
Tuple.of("^java\\.", "Java mutable @ "),
Tuple.of("^fj\\.", "Functional Java persistent @ "),
Tuple.of("^org\\.pcollections", "PCollections persistent @ "),
+ Tuple.of("^io\\.usethesource", "Steindorfer persistent @ "),
... | 1 | /* __ __ __ __ __ ___
* \ \ / / \ \ / / __/
* \ \/ / /\ \ \/ / /
* \____/__/ \__\____/__/
*
* Copyright 2014-2017 Vavr, http://vavr.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ... | 1 | 12,811 | already added (see several rows below) | vavr-io-vavr | java |
@@ -614,6 +614,8 @@ func (m *bpfEndpointManager) attachDataIfaceProgram(ifaceName string, polDirecti
epType := tc.EpTypeHost
if ifaceName == "tunl0" {
epType = tc.EpTypeTunnel
+ } else if ifaceName == "wireguard.cali" {
+ epType = tc.EpTypeWireguard
}
ap := m.calculateTCAttachPoint(epType, polDirection, ifa... | 1 | // Copyright (c) 2020 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... | 1 | 18,141 | nit: a switch perhaps? | projectcalico-felix | go |
@@ -170,7 +170,7 @@ func (c *workflowSizeChecker) failWorkflowSizeExceedsLimit() (bool, error) {
tag.WorkflowEventCount(historyCount))
attributes := &decisionpb.FailWorkflowExecutionDecisionAttributes{
- Failure: failure.NewServerFailure(common.FailureReasonSizeExceedsLimit, false),
+ Failure: failure.NewS... | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// 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 Soft... | 1 | 9,816 | Great you caught this. Super critical to not retry these errors. | temporalio-temporal | go |
@@ -77,7 +77,7 @@ enum CoreAdminOperation implements CoreAdminOp {
String coreName = params.required().get(CoreAdminParams.NAME);
Map<String, String> coreParams = buildCoreParams(params);
CoreContainer coreContainer = it.handler.coreContainer;
- Path instancePath = coreContainer.getCoreRootDirectory()... | 1 | /*
* 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 ... | 1 | 34,526 | Just a little change to make the var effectively final, which is clearer. | apache-lucene-solr | java |
@@ -30,8 +30,8 @@ def flowdetails(state, flow: http.HTTPFlow):
if sc is not None:
text.append(urwid.Text([("head", "Server Connection:")]))
parts = [
- ["Address", "{}:{}".format(sc.address[0], sc.address[1])],
- ["Resolved Address", "{}:{}".format(sc.ip_address[0], sc.ip_ad... | 1 | import urwid
from mitmproxy import http
from mitmproxy.tools.console import common, searchable
from mitmproxy.utils import human
from mitmproxy.utils import strutils
def maybe_timestamp(base, attr):
if base is not None and getattr(base, attr):
return human.format_timestamp_with_milli(getattr(base, attr))... | 1 | 13,126 | Using `"{}".format(...)` is a bit beside the point... | mitmproxy-mitmproxy | py |
@@ -149,8 +149,8 @@ class JsonFormatterTest(unittest.TestCase):
def test_logger_name(self):
JsonLogFormatter.init_from_settings({"project_name": "kintowe"})
f = JsonLogFormatter()
- record = logging.LogRecord("app.log", logging.DEBUG, "", 0, "coucou", (), None)
- result = f.format(r... | 1 | import json
import logging
import unittest
from unittest import mock
from pyramid import testing
from kinto.core import DEFAULT_SETTINGS, initialization, JsonLogFormatter
from .support import BaseWebTest
class RequestSummaryTest(BaseWebTest, unittest.TestCase):
def setUp(self):
super().setUp()
... | 1 | 12,009 | I think these should remain as they are. | Kinto-kinto | py |
@@ -14,6 +14,8 @@ module Beaker
WINDOWS_PACKAGES = ['curl']
SLES_PACKAGES = ['curl', 'ntp']
DEBIAN_PACKAGES = ['curl', 'ntpdate', 'lsb-release']
+ # Packages added at runtime
+ @@additional_pkgs = []
ETC_HOSTS_PATH = "/etc/hosts"
ETC_HOSTS_PATH_SOLARIS = "/etc/inet/hosts"
ROOT_KEYS_S... | 1 | [ 'command', "dsl/patterns" ].each do |lib|
require "beaker/#{lib}"
end
module Beaker
#Provides convienience methods for commonly run actions on hosts
module HostPrebuiltSteps
include Beaker::DSL::Patterns
NTPSERVER = 'pool.ntp.org'
SLEEPWAIT = 5
TRIES = 5
UNIX_PACKAGES = ['curl', 'ntpdate']... | 1 | 7,208 | Let's just call this PERF_PACKAGES and have them in the same format as WINDOWS/SLES/DEBIAN_PACKAGES constants - since it is only a single package and, as written, you'd have to update the code to add more package names anyway. Might as well be consistent with the rest of the code. | voxpupuli-beaker | rb |
@@ -224,6 +224,18 @@ String getTaskValueName(taskIndex_t TaskIndex, uint8_t TaskValueIndex) {
return ExtraTaskSettings.TaskDeviceValueNames[TaskValueIndex];
}
+/*********************************************************************************************
+ * get the taskPluginID with required checks, INVALID_PLUG... | 1 | #include "../Helpers/Misc.h"
#include "../../ESPEasy-Globals.h"
#include "../../ESPEasy_common.h"
#include "../../_Plugin_Helper.h"
#include "../ESPEasyCore/ESPEasy_backgroundtasks.h"
#include "../ESPEasyCore/Serial.h"
#include "../Globals/ESPEasy_time.h"
#include "../Globals/Statistics.h"
#include "../Helpers/ESPEasy... | 1 | 22,431 | We don't have a `getPluginIDfromTaskIndex` function? I think it should be implemented in Globals/Plugins.h / .cpp | letscontrolit-ESPEasy | cpp |
@@ -910,8 +910,12 @@ public class QueryComponent extends SearchComponent
additionalAdded = addFL(additionalFL, "score", additionalAdded);
}
} else {
- // reset so that only unique key is requested in shard requests
- sreq.params.set(CommonParams.FL, rb.req.getSchema().getUniqueKeyField().... | 1 | /*
* 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 ... | 1 | 26,054 | @shalinmangar If lazy field loading isn't enabled, I don't think this actually changes the behavior of `SolrIndexSearcher`, since it was previously ignoring the fields list anyway. What it _should_ do is allow certain distributed queries, like the ones in `DistribJoinFromCollectionTest`, to co-exist with `SolrIndexSear... | apache-lucene-solr | java |
@@ -5,7 +5,7 @@ package ddevapp
const DDevComposeTemplate = `version: '2'
services:
- {{ .plugin }}-{{.name }}-db:
+ db:
container_name: {{ .plugin }}-${DDEV_SITENAME}-db
image: $DDEV_DBIMAGE
volumes: | 1 | package ddevapp
// DDevComposeTemplate is used to create the docker-compose.yaml for
// legacy sites in the ddev env
const DDevComposeTemplate = `version: '2'
services:
{{ .plugin }}-{{.name }}-db:
container_name: {{ .plugin }}-${DDEV_SITENAME}-db
image: $DDEV_DBIMAGE
volumes:
- "./data:/db"
r... | 1 | 11,103 | Should we be using version 3 now? | drud-ddev | go |
@@ -24,7 +24,11 @@ class PluginListFactory
public function __invoke(string $current_dir, ?string $config_file_path = null): PluginList
{
- $config_file = new ConfigFile($current_dir, $config_file_path);
+ try {
+ $config_file = new ConfigFile($current_dir, $config_file_path);
+ ... | 1 | <?php
namespace Psalm\Internal\PluginManager;
use Psalm\Internal\Composer;
use function array_filter;
use const DIRECTORY_SEPARATOR;
use function json_encode;
use function rtrim;
use function urlencode;
class PluginListFactory
{
/** @var string */
private $project_root;
/** @var string */
private $ps... | 1 | 9,376 | Would be better to throw a more specific exception, but for now it will do. | vimeo-psalm | php |
@@ -17,8 +17,6 @@ package org.hyperledger.besu.tests.acceptance.dsl.blockchain;
import static org.web3j.utils.Convert.Unit.ETHER;
import static org.web3j.utils.Convert.Unit.WEI;
-import org.hyperledger.besu.ethereum.core.Wei;
-
import java.math.BigDecimal;
import java.math.BigInteger;
| 1 | /*
* Copyright ConsenSys AG.
*
* 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... | 1 | 20,673 | We should not replace Wei with a type that is shared across multiple units. We need this as `Wei` for type and unit safety. | hyperledger-besu | java |
@@ -653,8 +653,7 @@ func drupalEnsureWritePerms(app *DdevApp) error {
for _, o := range makeWritable {
stat, err := os.Stat(o)
- // If the file doesn't exist, don't try to set the permissions.
- if os.IsNotExist(err) {
+ if err != nil {
continue
}
| 1 | package ddevapp
import (
"fmt"
"github.com/drud/ddev/pkg/appports"
"github.com/drud/ddev/pkg/output"
"github.com/drud/ddev/pkg/util"
"io/ioutil"
"os"
"path"
"path/filepath"
"text/template"
"github.com/drud/ddev/pkg/dockerutil"
"github.com/drud/ddev/pkg/fileutil"
"github.com/drud/ddev/pkg/archive"
)
//... | 1 | 13,138 | I'm pretty sure this should emit a util.Warning*(), since we're skipping by here and never hitting anything that will give them a warning about what's happened. | drud-ddev | go |
@@ -23,6 +23,12 @@ type aspParser struct {
// newAspParser creates and returns a new asp.Parser.
func newAspParser(state *core.BuildState) *asp.Parser {
+ p := GetParserWithBuiltins(state)
+ return p
+}
+
+// GetParserWithBuiltins returns a asp.Parser object with all the builtins loaded
+func GetParserWithBuiltins(... | 1 | package parse
import (
"fmt"
"io"
"sort"
"strings"
"core"
"parse/asp"
"parse/rules"
)
// InitParser initialises the parser engine. This is guaranteed to be called exactly once before any calls to Parse().
func InitParser(state *core.BuildState) {
state.Parser = &aspParser{asp: newAspParser(state)}
}
// An a... | 1 | 8,435 | This function isn't useful? it's just a clone of GetParserWithBuiltins? | thought-machine-please | go |
@@ -229,9 +229,13 @@ public class SolrConfig extends XmlConfigFile implements MapSerializable {
enableLazyFieldLoading = getBool("query/enableLazyFieldLoading", false);
useCircuitBreakers = getBool("circuitBreaker/useCircuitBreakers", false);
+ isCpuCircuitBreakerEnabled = getBool("circuitBreaker/isCpuCi... | 1 | /*
* 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 ... | 1 | 36,274 | I'm not sure if the boolean flags should always contain `is`, also I generally hate too long names... ;) we already know this is a section for circuit breakers, so the name doesn't have to repeat all of it. How about `cpuBreakerEnabled`, `memoryBreakerEnabled` etc? | apache-lucene-solr | java |
@@ -42,4 +42,13 @@ public interface RewriteFiles extends SnapshotUpdate<RewriteFiles> {
* @return this for method chaining
*/
RewriteFiles rewriteFiles(Set<DataFile> filesToDelete, Set<DataFile> filesToAdd);
+
+ /**
+ * Add a rewrite that replaces one set of deletes with another that contains the same del... | 1 | /*
* 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 ... | 1 | 33,317 | Before we start the replacing equality deletes with position deletes, I think we need to refactor the RewriteFiles API to adjust more cases: 1. Rewrite data files and remove all the delete rows. The files to delete will be a set of data files and a set of delete files, and the files to add will be a set of data files. ... | apache-iceberg | java |
@@ -9,10 +9,16 @@ module Blacklight::BlacklightHelperBehavior
##
# Get the name of this application from an i18n string
# key: blacklight.application_name
+ # Try first in the current locale, then the default locale
#
# @return [String] the application name
def application_name
- t('blacklight.app... | 1 | # frozen_string_literal: true
# Methods added to this helper will be available to all templates in the hosting application
module Blacklight::BlacklightHelperBehavior
include UrlHelperBehavior
include HashAsHiddenFieldsHelperBehavior
include LayoutHelperBehavior
include IconHelperBehavior
##
# Get the name... | 1 | 7,458 | Layout/TrailingWhitespace: Trailing whitespace detected. | projectblacklight-blacklight | rb |
@@ -80,8 +80,12 @@ public class LibraryManager {
List<ShortcutCategoryDTO> shortcuts = new ArrayList<>();
for (Map.Entry<String, List<ShortcutDTO>> entry : categoryMap.entrySet()) {
entry.getValue().sort(ShortcutDTO.nameComparator());
- ShortcutCategoryDTO category = new Shortc... | 1 | /*
* Copyright (C) 2015-2017 PÂRIS Quentin
*
* 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.
*
* This program is... | 1 | 14,264 | Is it possible that the shortcuts list is empty? | PhoenicisOrg-phoenicis | java |
@@ -692,6 +692,10 @@ func runBackup(opts BackupOptions, gopts GlobalOptions, term *termstatus.Termina
p.V("start backup on %v", targets)
}
_, id, err := arch.Snapshot(gopts.ctx, targets, snapshotOpts)
+ if errors.Cause(err) == context.Canceled {
+ return errors.Fatal("canceled")
+ }
+
if err != nil {
retur... | 1 | package main
import (
"bufio"
"bytes"
"context"
"fmt"
"io"
"io/ioutil"
"os"
"path"
"path/filepath"
"runtime"
"strconv"
"strings"
"time"
"github.com/spf13/cobra"
tomb "gopkg.in/tomb.v2"
"github.com/restic/restic/internal/archiver"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/i... | 1 | 14,674 | This just changes the error message from `unable to save snapshot: [...] context canceled` to `canceled`. | restic-restic | go |
@@ -141,7 +141,9 @@ public abstract class AbstractRestInvocation {
if (response.getHeaders().getHeaderMap() != null) {
for (Entry<String, List<Object>> entry : response.getHeaders().getHeaderMap().entrySet()) {
for (Object value : entry.getValue()) {
- responseEx.addHeader(entry.getKey(), ... | 1 | /*
* Copyright 2017 Huawei Technologies Co., Ltd
*
* 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 ... | 1 | 7,121 | maybe it's better to remove HttpHeaders.CONTENT_LENGTH after the loop | apache-servicecomb-java-chassis | java |
@@ -679,6 +679,12 @@ public interface List<T> extends LinearSeq<T>, Stack<T> {
@Override
default List<T> dropRight(int n) {
+ if (n <= 0) {
+ return this;
+ }
+ if (n >= length()) {
+ return empty();
+ }
return reverse().drop(n).reverse();
}
| 1 | /* / \____ _ ______ _____ / \____ ____ _____
* / \__ \/ \ / \__ \ / __// \__ \ / \/ __ \ Javaslang
* _/ // _\ \ \/ / _\ \\_ \/ // _\ \ /\ \__/ / Copyright 2014-2015 Daniel Dietrich
* /___/ \_____/\____/\_____/____/\___\_____/_/ \_/____/ Licensed under the Apache License... | 1 | 6,176 | Very cool. We are now collecting the fruits after your length implementation! | vavr-io-vavr | java |
@@ -0,0 +1,8 @@
+rules:
+ - name: all pubs are in whitelist
+ project: '*'
+ network: '*'
+ is_external_network: True
+ whitelist:
+ - xpn-master:xpn-network
+ - content-insights:default | 1 | 1 | 26,493 | Is this the same copy of the rules file from above? If so, can just use the copy from above, and this can be dropped. | forseti-security-forseti-security | py | |
@@ -264,6 +264,13 @@ func (acsSession *session) startACSSession(client wsclient.ClientServer, timer t
client.AddRequestHandler(refreshCredsHandler.handlerFunc())
+ // Add handler to ack ENI attach message
+ eniAttachHandler := newAttachENIHandler(acsSession.ctx, cfg.Cluster, acsSession.containerInstanceARN, clien... | 1 | // Copyright 2014-2017 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... | 1 | 15,297 | Please break this into multiple lines. | aws-amazon-ecs-agent | go |
@@ -120,7 +120,7 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.AspNet
{
scope.Span.SetHeaderTags<IHeadersCollection>(httpContext.Response.Headers.Wrap(), Tracer.Instance.Settings.HeaderTags, defaultTagPrefix: SpanContextPropagator.HttpResponseHeadersTagPrefix);
... | 1 | // <copyright file="ApiController_ExecuteAsync_Integration.cs" company="Datadog">
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
// </copyright>
... | 1 | 21,530 | Shouldn't this new line replace the few lines above? | DataDog-dd-trace-dotnet | .cs |
@@ -2,9 +2,9 @@ package options
import (
"github.com/influxdata/flux"
- "github.com/influxdata/flux/functions/transformations"
+ "github.com/influxdata/flux/stdlib/universe"
)
func init() {
- flux.RegisterBuiltInOption("now", transformations.SystemTime())
+ flux.RegisterBuiltInOption("now", universe.SystemTime... | 1 | package options
import (
"github.com/influxdata/flux"
"github.com/influxdata/flux/functions/transformations"
)
func init() {
flux.RegisterBuiltInOption("now", transformations.SystemTime())
}
| 1 | 9,542 | Perhaps this belongs in universe? | influxdata-flux | go |
@@ -25,8 +25,11 @@ std::chrono::duration<double, std::milli> hist_time;
std::chrono::duration<double, std::milli> find_split_time;
std::chrono::duration<double, std::milli> split_time;
std::chrono::duration<double, std::milli> ordered_bin_time;
+std::chrono::duration<double, std::milli> refit_leaves_time;
#endif /... | 1 | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#include "serial_tree_learner.h"
#include <LightGBM/network.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/utils/array_args.h>
#incl... | 1 | 20,770 | there is a `kEpsilon` you can use directly. | microsoft-LightGBM | cpp |
@@ -17,9 +17,10 @@ limitations under the License.
package ec2
import (
- "sigs.k8s.io/cluster-api/util/conditions"
"strings"
+ "sigs.k8s.io/cluster-api/util/conditions"
+
"sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/awserrors"
"sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/services/wait"
"sigs.k8s.io/... | 1 | /*
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, ... | 1 | 15,501 | This should be grouped with the below imports, and the two separate groups of imports below should likely also be grouped together | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -888,11 +888,11 @@ void cvdescriptorset::DescriptorSet::PerformWriteUpdate(const VkWriteDescriptorS
}
// Validate Copy update
bool cvdescriptorset::DescriptorSet::ValidateCopyUpdate(const debug_report_data *report_data, const VkCopyDescriptorSet *update,
- co... | 1 | /* Copyright (c) 2015-2016 The Khronos Group Inc.
* Copyright (c) 2015-2016 Valve Corporation
* Copyright (c) 2015-2016 LunarG, Inc.
* Copyright (C) 2015-2016 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You m... | 1 | 8,161 | It looks like this error_code field is used to return a string to the caller, not just a const input string to be consumed as in the rest of this PR? If so, my personal preference would be to leave it as a std::string* instead of a reference; I don't know offhand what the VL coding style dictates. | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -66,6 +66,11 @@ std::string MetaUtils::partVal(const std::vector<nebula::cpp2::HostAddr>& hosts)
return val;
}
+std::string MetaUtils::partPrefix() {
+ static const std::string prefix = kPartsTable;
+ return prefix;
+}
+
std::string MetaUtils::partPrefix(GraphSpaceID spaceId) {
std::string prefix... | 1 | /* Copyright (c) 2018 - present, VE Software Inc. All rights reserved
*
* This source code is licensed under Apache 2.0 License
* (found in the LICENSE.Apache file in the root directory)
*/
#include "meta/MetaUtils.h"
#include <string.h>
namespace nebula {
namespace meta {
const char kSpacesTable[] = "__spaces_... | 1 | 15,632 | If return by value, then why bother to make it `static`? | vesoft-inc-nebula | cpp |
@@ -369,8 +369,11 @@ def nop():
@cmdutils.register()
@cmdutils.argument('win_id', win_id=True)
-def version(win_id):
+def version(win_id, paste=False):
"""Show version information."""
tabbed_browser = objreg.get('tabbed-browser', scope='window',
window=win_id)
tabbed_... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | 1 | 20,442 | You'll need to add docs for the argument, see e.g. the `debug_log_filter` docstring above. | qutebrowser-qutebrowser | py |
@@ -30,6 +30,7 @@ import (
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/sdk/instrumentation"
"go.opentelemetry.io/otel/sdk/resource"
+ sdktrace "go.opentelemetry.io/otel/sdk/trace"
tracesdk "go.opentelemetry.io/otel/sdk/trace"
"go.opentelemetry.io/otel/semconv"
"go.opentelemetry.io/otel/trace" | 1 | // Copyright The OpenTelemetry 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 agre... | 1 | 15,224 | `sdktrace` or `tracesdk`, pick one. | open-telemetry-opentelemetry-go | go |
@@ -200,11 +200,7 @@ trait ContentMagicTrait
}
}
- return [
- 'filename' => '',
- 'alt' => '',
- 'path' => '',
- ];
+ return [];
}
/** | 1 | <?php
declare(strict_types=1);
namespace Bolt\Entity;
use Bolt\Entity\Field\Excerptable;
use Bolt\Helpers\Excerpt;
use Bolt\Repository\ContentRepository;
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface... | 1 | 10,874 | can we return null instead? | bolt-core | php |
@@ -179,6 +179,12 @@ void exit_event(void)
bool success = dr_raw_tls_cfree(tls_offs, NUM_TLS_SLOTS);
ASSERT(success);
ASSERT(num_lea > 0);
+#ifdef UNIX
+ /* i#2346: delay client threads termination on Windows. */
+ dr_fprintf(STDERR, "process is exiting\n");
+ dr_event_signal(child_continue);
+ ... | 1 | /* **********************************************************
* Copyright (c) 2011-2017 Google, Inc. All rights reserved.
* Copyright (c) 2007-2010 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or witho... | 1 | 11,378 | You mean XXX and "we should" or "NYI" or sthg. Maybe put it on the ifdef line. | DynamoRIO-dynamorio | c |
@@ -25,3 +25,17 @@ func (w literalLoggable) GetValue(key string) string { return w.strings[key] }
func (w literalLoggable) GetValueAsInt64Slice(key string) []int64 { return w.int64s[key] }
func (w literalLoggable) ReadSerialPortLogs() []string { return w.serials }
+
+// SingleImageImportLoggable returns a Loggable ... | 1 | // Copyright 2020 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 appl... | 1 | 10,980 | minor: can be in-lined in return | GoogleCloudPlatform-compute-image-tools | go |
@@ -14,7 +14,7 @@ module RSpec::Core::Formatters
it "prints a message if provided, ignoring other data" do
formatter.deprecation(:message => "this message", :deprecated => "x", :replacement => "y", :call_site => "z")
deprecation_stream.rewind
- expect(deprecation_stream.read).to ... | 1 | require 'spec_helper'
require 'rspec/core/formatters/deprecation_formatter'
require 'tempfile'
module RSpec::Core::Formatters
describe DeprecationFormatter do
describe "#deprecation" do
let(:formatter) { DeprecationFormatter.new(deprecation_stream, summary_stream) }
let(:summary_stream) { StringI... | 1 | 10,728 | why the additional "\n"? | rspec-rspec-core | rb |
@@ -183,7 +183,7 @@ func (s *streamTable) Do(f func(flux.ColReader) error) error {
if err := f(s.first); err != nil {
s.first.Release()
s.first = nil
- return nil
+ return err
}
s.first.Release()
s.first = nil | 1 | package table
import (
"context"
"sync/atomic"
"github.com/apache/arrow/go/arrow/array"
"github.com/influxdata/flux"
"github.com/influxdata/flux/arrow"
"github.com/influxdata/flux/codes"
"github.com/influxdata/flux/internal/errors"
)
// SendFunc is used to send a flux.ColReader to a table stream so
// it can ... | 1 | 14,558 | This seems to be a big omission. If the first buffer reports an error, stream seems to just discard it. | influxdata-flux | go |
@@ -180,9 +180,7 @@ func MakeFull(log logging.Logger, rootDir string, cfg config.Local, phonebookDir
return nil, err
}
- blockListeners := []ledger.BlockListener{
- node,
- }
+ blockListeners := []ledger.BlockListener{}
if node.config.EnableTopAccountsReporting {
blockListeners = append(blockListeners, &... | 1 | // Copyright (C) 2019 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any l... | 1 | 36,643 | Maybe move this one down too? | algorand-go-algorand | go |
@@ -1,12 +1,12 @@
-using Datadog.Trace.Logging;
+using Datadog.Trace.Logging;
namespace Datadog.Trace
{
internal class AsyncLocalScopeManager
{
- private static ILog _log = LogProvider.For<AsyncLocalScopeManager>();
+ private static readonly ILog _log = LogProvider.For<AsyncLocalScopeManage... | 1 | using Datadog.Trace.Logging;
namespace Datadog.Trace
{
internal class AsyncLocalScopeManager
{
private static ILog _log = LogProvider.For<AsyncLocalScopeManager>();
private AsyncLocalCompat<Scope> _currentSpan = new AsyncLocalCompat<Scope>();
public Scope Active => _currentSpan.Get()... | 1 | 14,604 | We do this in lots of places I'm starting to notice...typically you'd avoid taking concrete dependencies, but we also avoid package dependencies as well which makes sense (i.e. not using an IoC, etc.). Any reason we don't implement some form of poor-man's DI and/or a simple factory instead of new-ing things up everywhe... | DataDog-dd-trace-dotnet | .cs |
@@ -77,8 +77,13 @@ func Errf(format string, a ...interface{}) DError {
}
// wrapErrf returns a DError by keeping errors type and replacing original error message.
-func wrapErrf(e DError, format string, a ...interface{}) DError {
- return &dErrImpl{errs: []error{fmt.Errorf(format, a...)}, errsType: e.errorsType(), ... | 1 | // Copyright 2017 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 appl... | 1 | 10,134 | What if formatPrefix doesn't include a space? Will the resulting error have e.Error() stuck at the end without any space? | GoogleCloudPlatform-compute-image-tools | go |
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Package pushsync provides the pushsync protocol
+// implementation.
package pushsync
import ( | 1 | // Copyright 2020 The Swarm 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 pushsync
import (
"context"
"errors"
"fmt"
"time"
"github.com/ethersphere/bee/pkg/accounting"
"github.com/ethersphere/bee/pkg/content"
"gith... | 1 | 13,698 | that doesn't say a lot to me. Can you please be more specific on the function of pushsync? | ethersphere-bee | go |
@@ -1602,6 +1602,15 @@ bool CoreChecks::ValidatePipelineUnlocked(const PIPELINE_STATE *pPipeline, uint3
}
}
}
+ if (subpass_desc->pDepthStencilAttachment->layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL) {
+ if (p... | 1 | /* Copyright (c) 2015-2021 The Khronos Group Inc.
* Copyright (c) 2015-2021 Valve Corporation
* Copyright (c) 2015-2021 LunarG, Inc.
* Copyright (C) 2015-2021 Google Inc.
* Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (t... | 1 | 18,845 | > subpass uses a depth/stencil attachment in renderPass with a read-only layout for the depth aspect Assume - VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL - VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL count as well seems there is a `NormalizeDepthImageLayout` for this | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -49,14 +49,14 @@ export function registerDefaults( widgetsAPI ) {
widgetsAPI.registerWidgetArea( AREA_DASHBOARD_ALL_TRAFFIC, {
title: __( 'All Traffic', 'google-site-kit' ),
subtitle: __( 'How people found your site.', 'google-site-kit' ),
- style: WIDGET_AREA_STYLES.COMPOSITE,
+ style: WIDGET_AREA_STYLES.... | 1 | /**
* Widgets API defaults
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
*... | 1 | 31,614 | This shouldn't be altered, you probably meant to update `AREA_PAGE_DASHBOARD_ALL_TRAFFIC` further below :) | google-site-kit-wp | js |
@@ -882,7 +882,7 @@ class CmdDockerClient(ContainerClient):
if mount_volumes:
cmd += [
volume
- for host_path, docker_path in mount_volumes
+ for host_path, docker_path in dict(mount_volumes).items()
for volume in ["-v", f"{host_path}... | 1 | import dataclasses
import io
import json
import logging
import os
import queue
import re
import shlex
import socket
import subprocess
import tarfile
import tempfile
import threading
from abc import ABCMeta, abstractmethod
from enum import Enum, unique
from pathlib import Path
from typing import Dict, List, Optional, Tu... | 1 | 13,993 | what does this change do exactly? | localstack-localstack | py |
@@ -48,7 +48,8 @@ type networkImpl struct {
proposalCh chan agreement.Message
bundleCh chan agreement.Message
- net network.GossipNode
+ net network.GossipNode
+ backgroundCtx context.Context
}
// WrapNetwork adapts a network.GossipNode into an agreement.Network. | 1 | // Copyright (C) 2019 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any l... | 1 | 35,533 | What's the purpose of this `backgroundCtx` field? | algorand-go-algorand | go |
@@ -42,7 +42,11 @@ import (
// Trie cache generation limit after which to evict trie nodes from memory.
var MaxTrieCacheGen = uint32(1024 * 1024)
-const IncarnationLength = 8
+const (
+ IncarnationLength = 8
+ FirstContractIncarnation = 1
+ AccountIncarnation = 0
+)
type StateReader interface {
Re... | 1 | // Copyright 2019 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... | 1 | 21,300 | non contract incarnation | ledgerwatch-erigon | go |
@@ -108,10 +108,7 @@ class ErrorHandler(object):
message = value["value"]
if not isinstance(message, basestring):
value = message
- try:
- message = message['message']
- ... | 1 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 1 | 14,481 | I would recommend to leave out `None` because None is already the default. | SeleniumHQ-selenium | java |
@@ -90,11 +90,11 @@ func (h *Handler) handleNewStream(s net.Stream) {
switch err := h.processHelloMessage(from, &hello); err {
case ErrBadGenesis:
- log.Warningf("genesis cid: %s does not match: %s, disconnecting from peer: %s", &hello.GenesisHash, h.genesis, from)
+ log.Debugf("genesis cid: %s does not match: ... | 1 | package hello
import (
"context"
"fmt"
"time"
cid "github.com/ipfs/go-cid"
cbor "github.com/ipfs/go-ipld-cbor"
logging "github.com/ipfs/go-log"
host "github.com/libp2p/go-libp2p-host"
net "github.com/libp2p/go-libp2p-net"
peer "github.com/libp2p/go-libp2p-peer"
ma "github.com/multiformats/go-multiaddr"
cb... | 1 | 18,915 | Should the "bad hello message" case above also disconnect? | filecoin-project-venus | go |
@@ -18,6 +18,9 @@ public abstract class InsulinOrefBasePlugin implements PluginBase, InsulinInterf
public static double MIN_DIA = 5;
+ protected static boolean fragmentEnabled = false;
+ protected static boolean fragmentVisible = false;
+
long lastWarned = 0;
@Override | 1 | package info.nightscout.androidaps.plugins.InsulinOrefCurves;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.data.Iob;
import info.nightscout.androidaps.db.Treatment;
import info.nightscout.androidaps.interf... | 1 | 29,535 | Shouldn't this be in the child and not in the base plugin? Wouldn't having it here enable all derived plugins at once? | MilosKozak-AndroidAPS | java |
@@ -226,6 +226,11 @@ FILTERING
(options[:full_description] ||= []) << Regexp.compile(Regexp.escape(o))
end
+ parser.on('-E', '--example-matches STRING', "Run examples whose full nested names match REGEX (may be",
+ " used more than once)") do |o|
+ (options[:full_... | 1 | # http://www.ruby-doc.org/stdlib/libdoc/optparse/rdoc/classes/OptionParser.html
require 'optparse'
module RSpec::Core
# @private
class Parser
def self.parse(args, source=nil)
new(args).parse(source)
end
attr_reader :original_args
def initialize(original_args)
@original_args = original... | 1 | 17,155 | Should probably say REGEX or PATTERN rather than string. | rspec-rspec-core | rb |
@@ -179,14 +179,14 @@ func TestHandler(t *testing.T) {
name: "an event with a very large payload",
method: "POST",
path: "/ns1/broker1",
- event: createTestEventWithPayloadSize("test-event", 110000000),
+ event: createTestEventWithPayloadSize("test-event", 10000001), // 10Mb + extra byte... | 1 | /*
Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dist... | 1 | 18,310 | I felt we don't need to set it that strict, like if somehow pubsub happens to allow extra 20 bytes for metadata, this test won't work. We would suggest to use 11MB instead. | google-knative-gcp | go |
@@ -34,7 +34,7 @@ class AutocompleteTypeConfigurator implements TypeConfiguratorInterface
}
// by default, allow to autocomplete multiple values for OneToMany and ManyToMany associations
- if (!isset($options['multiple']) && $metadata['associationType'] & ClassMetadata::TO_MANY) {
+ if... | 1 | <?php
/*
* This file is part of the EasyAdminBundle.
*
* (c) Javier Eguiluz <javier.eguiluz@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace EasyCorp\Bundle\EasyAdminBundle\Form\Type\Configurator;
use Doctrin... | 1 | 11,141 | In theory `isset($metadata['associationType'])` is `false` if the linked field is not an association field, isn't? | EasyCorp-EasyAdminBundle | php |
@@ -84,7 +84,7 @@ Doorkeeper.configure do
#
# If not specified, Doorkeeper enables all the four grant flows.
#
- # grant_flows %w(authorization_code implicit password client_credentials)
+ grant_flows %w(authorization_code implicit password client_credentials)
# Under some circumstances you might want t... | 1 | Doorkeeper.configure do
# Change the ORM that doorkeeper will use.
# Currently supported options are :active_record, :mongoid2, :mongoid3,
# :mongoid4, :mongo_mapper
orm :active_record
# This block will be called to check whether the resource owner is authenticated or not.
resource_owner_authenticator do
... | 1 | 16,074 | @tute the only thing I needed to enable this like as `password` is not in default flow anymore I think. | thoughtbot-upcase | rb |
@@ -52,7 +52,8 @@ class IamPolicyTest(ForsetiTestCase):
'serviceAccount:abc@def.gserviceaccount.com',
'user:someone@somewhere.tld',
'allUsers',
- 'user:anything'
+ 'user:anything',
+ 'allAuthenticatedUsers'
]
# Test IamPolicyMember | 1 | # Copyright 2017 The Forseti Security 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 ap... | 1 | 31,650 | nit: to be consistent with `self.members`, please move this up one line, so that it's closer to `allUsers`? You will need to update your test reference. | forseti-security-forseti-security | py |
@@ -4,6 +4,7 @@ const config = require('./config')
const fs = require('fs-extra')
const runGClient = (args, options = {}) => {
+ if (options.verbose) args.push('--verbose')
options.cwd = options.cwd || config.rootDir
options = mergeWithDefault(options)
options.env.GCLIENT_FILE = config.gClientFile | 1 | const path = require('path')
const spawnSync = require('child_process').spawnSync
const config = require('./config')
const fs = require('fs-extra')
const runGClient = (args, options = {}) => {
options.cwd = options.cwd || config.rootDir
options = mergeWithDefault(options)
options.env.GCLIENT_FILE = config.gClien... | 1 | 5,297 | we might as well just access `config.gClientVerbose` directly here. If any other options are passed to `gclientSync` or `gclientRunhooks` then the verbose option will be lost the way it's used now | brave-brave-browser | js |
@@ -353,6 +353,7 @@ return [
'log' => [
'menu_label' => 'Log settings',
'menu_description' => 'Specify which areas should use logging.',
+ 'logging' => 'Logging',
'log_events' => 'Log system events',
'log_events_comment' => 'Browser requests that may require attention, su... | 1 | <?php
return [
'app' => [
'name' => 'OctoberCMS',
'tagline' => 'Getting back to basics'
],
'locale' => [
'be' => 'Беларуская',
'bg' => 'Български',
'cs' => 'Čeština',
'da' => 'Dansk',
'en' => 'English (United States)',
'en-au' => 'English (Aus... | 1 | 11,923 | Change the key to `default_tab` instead and I'll merge this | octobercms-october | php |
@@ -387,8 +387,11 @@ module OrgAdmin
end
end
end
- else
- # If no funder was selected retrieve the Org's templates
+ end
+
+ # If the no funder was specified OR the funder matches the org
+ if funder_id.blank? || funder_id == org_id
+ ... | 1 | module OrgAdmin
class TemplatesController < ApplicationController
include Paginable
include TemplateFilter
after_action :verify_authorized
# GET /org_admin/templates
# -----------------------------------------------------
def index
authorize Template
# Apply scoping
a... | 1 | 17,393 | we still can end up passing a blank org_id to the scope method if for any reason the params is not present... | DMPRoadmap-roadmap | rb |
@@ -236,7 +236,9 @@ public class SaxonXPathRuleQuery extends AbstractXPathRuleQuery {
*/
if (value == null) {
return UntypedAtomicValue.ZERO_LENGTH_UNTYPED;
-
+ } else if (value instanceof Enum) {
+ // enums use their toString
+ return new StringValue(value.to... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.rule.xpath;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import net.sourceforge.pmd.RuleContext;
import ... | 1 | 15,237 | I think yes, this makes sense to expose this. +1 | pmd-pmd | java |
@@ -33,7 +33,7 @@ metadata:
- name: StorageType
value: "hostpath"
- name: BasePath
- value: "/var/openebs/local"
+ value: {{env "OPENEBS_IO_LOCALPV_HOSTPATH_DIR" | default "/var/openebs/local"}}
provisioner: openebs.io/local
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy:... | 1 | /*
Copyright 2019 The OpenEBS 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... | 1 | 17,335 | let us put the sample yaml snippet i.e. maya api server deployment that makes use of this env & value | openebs-maya | go |
@@ -117,12 +117,12 @@ public class ITRabbitMQCollector {
/** Guards against errors that leak from storage, such as InvalidQueryException */
@Test
- public void skipsOnSpanConsumerException() throws Exception {
+ public void skipsOnSpanConsumerException() {
// TODO: reimplement
}
@Test
- public v... | 1 | /*
* Copyright 2015-2018 The OpenZipkin 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... | 1 | 13,530 | What changed to cause this? | openzipkin-zipkin | java |
@@ -81,6 +81,8 @@ func waitForBalanceState(t *testing.T, processor *PromiseProcessor, expectedStat
type fakeStorage struct{}
-func (fs fakeStorage) Store(issuer string, data interface{}) error { return nil }
-func (fs fakeStorage) Delete(issuer string, data interface{}) error { return nil }
-func (fs fakeStorage)... | 1 | /*
* Copyright (C) 2018 The "MysteriumNetwork/node" Authors.
*
* 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 3 of the License, or
* (at your option) any later version.
*
... | 1 | 12,437 | Repeating big interface in many places shows smtg is wrong with design | mysteriumnetwork-node | go |
@@ -0,0 +1,15 @@
+class Accounts::ChartsController < AccountsController
+ include SetAccountByAccountId
+
+ before_action :redirect_if_disabled
+
+ # NOTE: Replaces accounts#commits_history
+ def commits_by_project
+ render json: Chart.new(@account).commits_by_project
+ end
+
+ # NOTE: Replaces accounts#langua... | 1 | 1 | 7,082 | Inheriting from `AccountsController` to get access to the `redirect_if_disabled` filter. | blackducksoftware-ohloh-ui | rb | |
@@ -1,14 +1,15 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
-# SPDX - License - Identifier: Apache - 2.0
+# SPDX-License-Identifier: Apache-2.0
+
+# Purpose
+# This code demonstrates how to copy an object from one Amazon Simple Storage Solution (Amazon S3) bucket to another.
# snippet-sta... | 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX - License - Identifier: Apache - 2.0
# snippet-start:[s3.ruby.copy_object_between_buckets.rb]
require 'aws-sdk-s3'
# Copies an object from one Amazon S3 bucket to another.
#
# Prerequisites:
#
# - Two S3 buckets (a source bucket and a target ... | 1 | 20,517 | Simple Storage **Service** | awsdocs-aws-doc-sdk-examples | rb |
@@ -0,0 +1 @@
+public class A { public int FUNC() { Class<?> cls = null; if(cls == null) return 0; else { B.FUNC3(cls); return 1;} } public void FUNC2(Class<?> arg) { return; }}class B {public static void FUNC3(Class<?> arg) { return; }} | 1 | 1 | 12,604 | Enter at the end of the file! :-D (and at the end of lines ;-) ) | javaparser-javaparser | java | |
@@ -0,0 +1,9 @@
+class RenameScheduledForCancellation < ActiveRecord::Migration
+ def change
+ rename_column(
+ :subscriptions,
+ :scheduled_for_cancellation_on,
+ :scheduled_for_deactivation_on,
+ )
+ end
+end | 1 | 1 | 15,524 | Put a comma after the last parameter of a multiline method call. | thoughtbot-upcase | rb | |
@@ -88,7 +88,17 @@ func removeYields(plan *PlanSpec) (*PlanSpec, error) {
}
newRoot := root.Predecessors()[0]
- newRoot.RemoveSuccessor(root)
+ newSucc := make([]PlanNode, 0, len(newRoot.Successors()))
+
+ for _, succ := range newRoot.Successors() {
+ newSucc = append(newSucc, succ)
+ if succ == r... | 1 | package plan
import (
"errors"
"fmt"
"math"
)
// PhysicalPlanner performs transforms a logical plan to a physical plan,
// by applying any registered physical rules.
type PhysicalPlanner interface {
Plan(lplan *PlanSpec) (*PlanSpec, error)
}
// NewPhysicalPlanner creates a new physical plan with the specified op... | 1 | 8,648 | Don't you want to place this check before you add `succ` to `newSucc`? | influxdata-flux | go |
@@ -1,18 +1,6 @@
package com.fsck.k9.fragment;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.EnumMap;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set... | 1 | package com.fsck.k9.fragment;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.... | 1 | 17,705 | Commit 676eeeab10884456a5f70ce708a8aa5116ecbaf7 contains a lot of unrelated code style changes. Please get rid of these. | k9mail-k-9 | java |
@@ -82,7 +82,10 @@ class BokehRenderer(Renderer):
if bokeh_version < '0.12.6':
raise RuntimeError('Bokeh png export only supported by versions >=0.12.6.')
from bokeh.io import _get_screenshot_as_png
- img = _get_screenshot_as_png(plot.state)
+ if bokeh_ve... | 1 | from io import BytesIO
import logging
import numpy as np
import param
from param.parameterized import bothmethod
import bokeh.core
from bokeh.application.handlers import FunctionHandler
from bokeh.application import Application
from bokeh.document import Document
from bokeh.embed import notebook_div, autoload_server
... | 1 | 18,193 | Well this sucks, I wish you'd mentioned you were using a private API, perhaps we could have made a public one with better guarantees before `0.12.6` was released. | holoviz-holoviews | py |
@@ -69,17 +69,10 @@ func New(transport peer.Transport, opts ...ListOption) *List {
&pendingHeap{},
plOpts...,
),
- capacity: cfg.capacity,
}
}
// List is a PeerList which rotates which peers are to be selected in a circle
type List struct {
*peerlist.List
- capacity int
-}
-
-// Capacity is the max... | 1 | // Copyright (c) 2018 Uber Technologies, Inc.
//
// 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... | 1 | 16,979 | Consider instead moving this into an _test file so it's public but only usable in tests. | yarpc-yarpc-go | go |
@@ -146,10 +146,10 @@ func (s *ec2Ops) waitAttachmentStatus(
request := &ec2.DescribeVolumesInput{VolumeIds: []*string{&id}}
actual := ""
interval := 2 * time.Second
- fmt.Printf("Waiting for state transition to %q", desired)
+ logrus.Infof("Waiting for state transition to %q", desired)
var outVol *ec2.Volume... | 1 | package aws
import (
"fmt"
"os"
"strings"
"sync"
"time"
"github.com/Sirupsen/logrus"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/opsworks"
"github.com/libopens... | 1 | 6,545 | Any reason why we want to remove this code ? It helps debugging AWS ebs attach issues. Ideally yes a library should have minimal logging, but there is no way we can track long running AWS attach calls. | libopenstorage-openstorage | go |
@@ -87,9 +87,10 @@ func (fs *experimentStore) CreateExperiment(ctx context.Context, config *any.Any
INSERT INTO experiment_run (
id,
experiment_config_id,
- execution_time,
+ execution_time,
+ scheduled_end_time,
creation_time)
- VALUES ($1, $2, ... | 1 | package experimentstore
import (
"bytes"
"context"
"database/sql"
"errors"
"strings"
"time"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/any"
"github.com/golang/protobuf/ptypes/timestamp"
"github.com/uber-go/tally"
"go.uber.org/zap"
experimen... | 1 | 8,640 | nit: indentation doesn't match (unfortunately i don't know of a way to automatically lint these sql statements with how we're using them currently) | lyft-clutch | go |
@@ -231,6 +231,7 @@ module RSpec::Core
return if @setup
@setup_default.call
+ setup_profiler
@setup = true
end
| 1 | module RSpec::Core
# A reporter will send notifications to listeners, usually formatters for the
# spec suite run.
class Reporter
# @private
RSPEC_NOTIFICATIONS = Set.new(
[
:close, :deprecation, :deprecation_summary, :dump_failures, :dump_pending,
:dump_profile, :dump_summary, :exam... | 1 | 16,891 | Should we remove the other `setup_profiler` call site and just let this be the one call site for it, since, AFAIK, the other one is no longer necessary with this? Also, can we make `setup_profiler` private? | rspec-rspec-core | rb |
@@ -151,7 +151,6 @@ func BuildEnvShowCmd() *cobra.Command {
GlobalOpts: NewGlobalOpts(),
}
cmd := &cobra.Command{
- Hidden: true, //TODO remove when ready for production!
Use: "show",
Short: "Shows info about a deployed environment.",
Long: "Shows info about a deployed environment, including regi... | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"fmt"
"io"
"github.com/aws/copilot-cli/internal/pkg/config"
"github.com/aws/copilot-cli/internal/pkg/deploy"
"github.com/aws/copilot-cli/internal/pkg/describe"
"github.com/aws/copil... | 1 | 14,212 | Are there any other templates where this command needs to be added, or were those issues specific to storage requiring us to enable a new command group? | aws-copilot-cli | go |
@@ -1,18 +1,3 @@
// +build !linux !cgo !seccomp
package patchbpf
-
-import (
- "errors"
-
- "github.com/opencontainers/runc/libcontainer/configs"
-
- libseccomp "github.com/seccomp/libseccomp-golang"
-)
-
-func PatchAndLoad(config *configs.Seccomp, filter *libseccomp.ScmpFilter) error {
- if config != nil {
- retu... | 1 | // +build !linux !cgo !seccomp
package patchbpf
import (
"errors"
"github.com/opencontainers/runc/libcontainer/configs"
libseccomp "github.com/seccomp/libseccomp-golang"
)
func PatchAndLoad(config *configs.Seccomp, filter *libseccomp.ScmpFilter) error {
if config != nil {
return errors.New("cannot patch and ... | 1 | 22,359 | perhaps file can be removed altogether (trying to avoid an empty package for these build tags) | opencontainers-runc | go |
@@ -980,7 +980,7 @@ get_module_handle_64(const wchar_t *name)
{
/* Be careful: we can't directly de-ref any ptrs b/c they can be >4GB */
LDR_MODULE_64 mod;
- if (!get_ldr_module_64(name, NULL, &mod))
+ if (!get_ldr_module_64(name, 0, &mod))
return NULL;
return mod.BaseAddress;
} | 1 | /* **********************************************************
* Copyright (c) 2010-2017 Google, Inc. All rights reserved.
* Copyright (c) 2008 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
*... | 1 | 12,673 | NULL change, could you move that out too? | DynamoRIO-dynamorio | c |
@@ -25,6 +25,10 @@ func formatKV(in []string) string {
return columnize.Format(in, columnConf)
}
+func FormatList(in []string) string {
+ return formatList(in)
+}
+
// formatList takes a set of strings and formats them into properly
// aligned output, replacing any blank fields with a placeholder
// for awk-abi... | 1 | package command
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"os"
"strconv"
"time"
gg "github.com/hashicorp/go-getter"
"github.com/hashicorp/nomad/api"
"github.com/hashicorp/nomad/jobspec"
"github.com/ryanuber/columnize"
)
// formatKV takes a set of strings and formats them into properly
// aligned k = v pair... | 1 | 6,729 | A brief explanation about this func is required. | openebs-maya | go |
@@ -32,6 +32,11 @@ class MergedCellsCollection {
this.hot = plugin.hot;
}
+ static IS_OVERLAPPING_WARNING(newMergedCell) {
+ return `The merged cell declared at [${newMergedCell.row}, ${newMergedCell.col}] overlaps with the other ` +
+ 'declared merged cell. The overlapping merged cell was not added ... | 1 | import MergedCellCoords from './cellCoords';
import {CellCoords, CellRange} from '../../3rdparty/walkontable/src/index';
import {rangeEach} from '../../helpers/number';
import {arrayEach} from '../../helpers/array';
import {applySpanProperties} from './utils';
/**
* Defines a container object for the merged cells.
*... | 1 | 14,623 | Could you add description for below static function? | handsontable-handsontable | js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.