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 |
|---|---|---|---|---|---|---|---|
@@ -16,8 +16,12 @@
package io.servicecomb.provider.springmvc.reference;
+import java.net.URI;
+
import org.junit.Assert;
import org.junit.Test;
+import org.springframework.web.client.RestClientException;
+import org.springframework.web.client.RestTemplate;
public class TestRestTemplateBuilder {
| 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 l... | 1 | 6,527 | this test only covers the happy path. what about no acceptable rest template found? | apache-servicecomb-java-chassis | java |
@@ -582,7 +582,7 @@ public class DistributorTest {
);
Session firefoxSession = distributor.newSession(createRequest(firefoxPayload)).getSession();
- LOG.info(String.format("Firefox Session %d assigned to %s", i, chromeSession.getUri()));
+ LOG.finer(String.format("Firefox Session %d as... | 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 m... | 1 | 17,126 | Since this is in a test, I imagine that the choice of `info` level was deliberate. | SeleniumHQ-selenium | java |
@@ -3,9 +3,10 @@ package langserver
import (
"context"
"github.com/stretchr/testify/assert"
- "strings"
"testing"
+ "core"
+ "strings"
"tools/build_langserver/lsp"
)
| 1 | package langserver
import (
"context"
"github.com/stretchr/testify/assert"
"strings"
"testing"
"tools/build_langserver/lsp"
)
var completionURI = lsp.DocumentURI("file://tools/build_langserver/langserver/test_data/completion.build")
var completionPropURI = lsp.DocumentURI("file://tools/build_langserver/langserv... | 1 | 8,545 | this should probably be named somewhere if you want to reuse it. | thought-machine-please | go |
@@ -191,6 +191,14 @@ const (
// path where we mount in the SSH key for connecting to the bare metal libvirt provisioning host.
LibvirtSSHPrivKeyPathEnvVar = "LIBVIRT_SSH_PRIV_KEY_PATH"
+ // BoundServiceAccountSigningKeyEnvVar contains the path to the bound service account signing key and
+ // is set in the instal... | 1 | package constants
import (
apihelpers "github.com/openshift/hive/apis/helpers"
hivev1 "github.com/openshift/hive/apis/hive/v1"
)
const (
PlatformAWS = "aws"
PlatformAzure = "azure"
PlatformBaremetal = "baremetal"
PlatformAgentBaremetal = "agent-baremetal"
PlatformGCP = "gcp"... | 1 | 17,243 | needs a rename to not include AWS | openshift-hive | go |
@@ -15,13 +15,11 @@
*******************************************************************************/
#include "oneapi/dal/algo/rbf_kernel/backend/gpu/compute_kernel.hpp"
-#include "oneapi/dal/backend/interop/common_dpc.hpp"
-#include "oneapi/dal/backend/interop/table_conversion.hpp"
-
+#include "oneapi/dal/backend/... | 1 | /*******************************************************************************
* Copyright 2020-2021 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apa... | 1 | 29,027 | Isn't sigma have `double` type? | oneapi-src-oneDAL | cpp |
@@ -977,6 +977,7 @@ TEST (rpc, wallet_create_seed)
nano::system system (24000, 1);
scoped_io_thread_name_change scoped_thread_name_io;
nano::raw_key seed;
+ seed.data = 1;
auto prv = nano::deterministic_key (seed, 0);
auto pub (nano::pub_key (prv));
auto node = system.nodes.front (); | 1 | #include <nano/core_test/testutil.hpp>
#include <nano/lib/ipc.hpp>
#include <nano/lib/rpcconfig.hpp>
#include <nano/lib/timer.hpp>
#include <nano/node/ipc.hpp>
#include <nano/node/json_handler.hpp>
#include <nano/node/node_rpc_config.hpp>
#include <nano/node/testing.hpp>
#include <nano/rpc/rpc.hpp>
#include <nano/rpc/r... | 1 | 16,017 | May be better use nano::keypair that generates ramdom value? | nanocurrency-nano-node | cpp |
@@ -25,7 +25,11 @@ const isPromiseLike = require('../utils').isPromiseLike;
function addToOperationsList(bulkOperation, docType, document) {
// Get the bsonSize
const bsonSize = bson.calculateObjectSize(document, {
- checkKeys: false
+ checkKeys: false,
+
+ // Since we don't know what the user selected ... | 1 | 'use strict';
const common = require('./common');
const BulkOperationBase = common.BulkOperationBase;
const utils = require('../utils');
const toError = utils.toError;
const handleCallback = utils.handleCallback;
const BulkWriteResult = common.BulkWriteResult;
const Batch = common.Batch;
const mergeBatchResults = comm... | 1 | 15,319 | I think the more complete solution will save off a `ignoreUndefined` in the base class for the bulk operation (with a default of `false`), and use that for calculations. Was there a reason you didn't want to support the option from the operation level? | mongodb-node-mongodb-native | js |
@@ -257,6 +257,10 @@ public class SyncManager {
break;
}
updateSync(sync, SyncState.Status.DONE, 100, callback);
+ } catch (RestClient.RefreshTokenRevokedException re) {
+ logger.e(this, "runSync", re);
+ ... | 1 | /*
* Copyright (c) 2014-present, salesforce.com, inc.
* All rights reserved.
* Redistribution and use of this software 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 copyright noti... | 1 | 15,984 | The catch (Exception e) block that follows does an updateSync, which will get a SmartStore instance (while logging out is taking place) - and then terrible things will happen - a database gets created for the outgoing user that won't be openable by the returning user causing the app to crash at logout. This is a somewh... | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -27,6 +27,11 @@ func TestCodestar_WaitUntilStatusAvailable(t *testing.T) {
connection := &CodeStar{}
connectionARN := "mockConnectionARN"
+ ctrl := gomock.NewController(t)
+ defer ctrl.Finish()
+ m := mocks.NewMockapi(ctrl)
+ m.EXPECT().GetConnection(gomock.Any()).AnyTimes()
+
// WHEN
err := connec... | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package codestar
import (
"context"
"errors"
"testing"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/codestarconnections"
"github.com/aws/copilot-cli/internal/pkg/aws/codes... | 1 | 16,846 | huh does this work without a `Return`? | aws-copilot-cli | go |
@@ -134,11 +134,7 @@ module RSpec
# no-op, required metadata has already been set by the `skip`
# method.
rescue Exception => e
- if pending?
- metadata[:execution_result][:pending_exception] = e
- else
- se... | 1 | module RSpec
module Core
# Wrapper for an instance of a subclass of {ExampleGroup}. An instance of
# `Example` is returned by the {ExampleGroup#example example} method
# exposed to examples, {Hooks#before before} and {Hooks#after after} hooks,
# and yielded to {Hooks#around around} hooks.
#
# ... | 1 | 11,750 | Don't think we want this line, right? (Plus "failing" is spelled wrong). | rspec-rspec-core | rb |
@@ -105,6 +105,10 @@ public class FeedItemMenuHandler {
setItemVisibility(menu, R.id.remove_item, fileDownloaded);
+ if (selectedItem.getFeed().isLocalFeed()) {
+ setItemVisibility(menu, R.id.share_item, false);
+ }
+
return true;
}
| 1 | package de.danoeh.antennapod.menuhandler;
import android.content.Context;
import android.os.Handler;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import com.google.android.material.snackbar.Snackbar;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import... | 1 | 17,035 | I think it would be more clear to have local-feed-hiding all in one place (bottom of this method?). Further up the method, there already is some code that hides the website icon, for example. | AntennaPod-AntennaPod | java |
@@ -199,14 +199,6 @@ class BackendMenuBuilder implements BackendMenuBuilderInterface
],
]);
- $menu->getChild('Maintenance')->addChild('Fixtures', [
- 'uri' => '',
- 'extras' => [
- 'name' => $t->trans('caption.fixtures_dummy_content'),
- ... | 1 | <?php
declare(strict_types=1);
namespace Bolt\Menu;
use Bolt\Configuration\Config;
use Bolt\Content\ContentType;
use Bolt\Repository\ContentRepository;
use Bolt\Twig\ContentExtension;
use Knp\Menu\FactoryInterface;
use Knp\Menu\ItemInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony... | 1 | 11,654 | Why remove this one? It doesn't work yet, but we'll add it sooner or later. | bolt-core | php |
@@ -304,12 +304,12 @@ type docstruct struct {
DocstoreRevision interface{}
Etag interface{}
- I int `docstore:"i"`
- U uint `docstore:"u"`
- F float64 `docstore:"f"`
- St string `docstore:"st"`
- B bool `docstore... | 1 | // Copyright 2019 The Go Cloud Development Kit 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 appli... | 1 | 18,864 | Why did you remove the struct tags? | google-go-cloud | go |
@@ -178,6 +178,11 @@ class FinalStatus(Reporter, AggregatorListener, FunctionalAggregatorListener):
def __dump_xml(self, filename):
self.log.info("Dumping final status as XML: %s", filename)
root = etree.Element("FinalStatus")
+ report_info = get_bza_report_info(self.engine, self.log)
+ ... | 1 | """
Basics of reporting capabilities
Copyright 2015 BlazeMeter 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... | 1 | 14,333 | Let's be neutral with tag names. Let's just have "ReportURL" | Blazemeter-taurus | py |
@@ -265,7 +265,8 @@ func TestEmptySpanData(t *testing.T) {
func TestSpanData(t *testing.T) {
// Full test of span data transform.
- startTime := time.Now()
+ // March 31, 2020 5:01:26 1234nanos (UTC)
+ startTime := time.Unix(1585674086, 1234)
endTime := startTime.Add(10 * time.Second)
spanData := &export.SpanD... | 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 | 11,729 | Use an explicit time to ensure conversion is not copy-paste and wrong. | open-telemetry-opentelemetry-go | go |
@@ -804,7 +804,11 @@ void handle_lookup_account_poll(GUI_RPC_CONN& grc) {
grc.lookup_account_op.error_num
);
} else {
- grc.mfout.printf("%s", grc.lookup_account_op.reply.c_str());
+ const char *p = grc.lookup_account_op.reply.c_str();
+ const char *q = strstr(p, "<accoun... | 1 | // This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC 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 Licens... | 1 | 8,603 | The logic now is to look for `<account_out` if that is present return the string starting from there. If it is not present look for `<error` and return the string from there (which can produce malformed XML because you do not check if the closing tag matches). If this is also not found return an empty `<account_out/>`.... | BOINC-boinc | php |
@@ -0,0 +1,12 @@
+class Api::V1::VideosController < ApiController
+ def index
+ show = find_show
+ render json: { videos: show.videos }
+ end
+
+ private
+
+ def find_show
+ Show.friendly.find(params[:show_id])
+ end
+end | 1 | 1 | 18,394 | Use nested module/class definitions instead of compact style. | thoughtbot-upcase | rb | |
@@ -56,6 +56,7 @@ var individualTestTimeout = 10 * time.Second
func kbfsOpsInit(t *testing.T, changeMd bool) (mockCtrl *gomock.Controller,
config *ConfigMock, ctx context.Context, cancel context.CancelFunc) {
+ t.Log("Init KBFSOps")
ctr := NewSafeTestReporter(t)
mockCtrl = gomock.NewController(ctr)
config = ... | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"bytes"
"fmt"
"math/rand"
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/keybase/client/go/libkb"
"github.com/keybase/cl... | 1 | 14,996 | Do you think we need to keep this in, or is it just leftover personal debugging? Seems like it wouldn't be too useful most of the time, but I don't care too much if you want to keep it. | keybase-kbfs | go |
@@ -95,7 +95,7 @@ public class FreezeTimersOverlay extends Overlay
{
final Player player = playerDespawned.getPlayer();
// All despawns ok: death, teleports, log out, runs away from screen
- if (config.showPlayers() | config.showNpcs() | config.FreezeTimers() | config.Veng() | config.TB())
+ if (config.showPl... | 1 | /*
* Copyright (c) 2019, ganom <https://github.com/Ganom>
* Copyright (c) 2019, kyle <https://github.com/kyleeld>
* Copyright (c) 2019, pklite <https://github.com/pklite/pklite>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted prov... | 1 | 14,967 | showNPCs is not needed | open-osrs-runelite | java |
@@ -0,0 +1,12 @@
+package ssm
+
+import "fmt"
+
+// ErrParameterAlreadyExists occurs when the parameter with name already existed.
+type ErrParameterAlreadyExists struct {
+ name string
+}
+
+func (e *ErrParameterAlreadyExists) Error() string {
+ return fmt.Sprintf("parameter %s already exists", e.name)
+} | 1 | 1 | 17,483 | Docstring for public function pls | aws-copilot-cli | go | |
@@ -1539,3 +1539,16 @@ func TestSSIReApplyDuration(t *testing.T) {
}
}
}
+
+func TestFilterApplyError(t *testing.T) {
+ err1 := "error when creating \"/tmp/apply-475927931\": namespaces \"openshift-am-config\" not found"
+ expectedFilteredErr1 := "namespaces \"openshift-am-config\" not found"
+ if filterApplyErro... | 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 | 9,841 | This should use `t.Errorf` instead. You want the second part of the test to run even when the first part fails. | openshift-hive | go |
@@ -715,7 +715,7 @@ int main(int argc, char **argv)
#endif
}
- if (ctx.http3 != NULL) {
+ if (ctx.protocol_selector.ratio.http3 > 0) {
h2o_quic_close_all_connections(&ctx.http3->h3);
while (h2o_quic_num_connections(&ctx.http3->h3) != 0) {
#if H2O_USE_LIBUV | 1 | /*
* Copyright (c) 2014-2019 DeNA Co., Ltd., Kazuho Oku, Fastly, Frederik
* Deweerdt, Justin Zhu, Ichito Nagata, Grant Zhang,
* Baodong Chen
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentat... | 1 | 14,964 | Should this if block better be changed to `#if H2O_USE_LIBUV \n #else ... #endif`? The reason I wonder is because that's the way the QUIC context is being initilaized at the beginning of this function. Though I would not expect practical difference between the two approaches, because ATM the only case where we create Q... | h2o-h2o | c |
@@ -87,8 +87,11 @@ export function useReducer(reducer, initialState, init) {
init == null ? invokeOrReturn(null, initialState) : init(initialState),
action => {
- hookState._value[0] = reducer(hookState._value[0], action);
- hookState._component.setState({});
+ const nextValue = reducer(hookState._va... | 1 | import { options } from 'preact';
/** @type {number} */
let currentIndex;
/** @type {import('./internal').Component} */
let currentComponent;
/** @type {Array<import('./internal').Component>} */
let afterPaintEffects = [];
let oldBeforeRender = options.render;
options.render = vnode => {
if (oldBeforeRender) oldBe... | 1 | 12,790 | `Object.is` is an ES6 feature of JS so I don't think we can use it here (or we have to change our browser support matrix or specify that an Object.is polyfill is pre-req of `preact/hooks`). Should we just do an `===` check in `preact/hooks` and provide a `Object.is` polyfill and version of `useReducer` in `preact/compa... | preactjs-preact | js |
@@ -22,7 +22,11 @@ class AddUserOperation extends CommandOperation {
const options = this.options;
// Get additional values
- let roles = Array.isArray(options.roles) ? options.roles : [];
+ let roles = Array.isArray(options.roles)
+ ? options.roles
+ : typeof options.roles === 'string'
+ ... | 1 | 'use strict';
const Aspect = require('./operation').Aspect;
const CommandOperation = require('./command');
const defineAspects = require('./operation').defineAspects;
const crypto = require('crypto');
const handleCallback = require('../utils').handleCallback;
const toError = require('../utils').toError;
class AddUser... | 1 | 18,621 | This was a bug I picked up by using the TS interface as a guide, this seems like it was / is the intention, also is a bug in master (needs port) | mongodb-node-mongodb-native | js |
@@ -80,6 +80,17 @@ public interface CollectionAdminParams {
*/
String COLL_CONF = "collection.configName";
+ /**
+ * The name of the collection with which a collection is to be co-located
+ */
+ String WITH_COLLECTION = "withCollection";
+
+ /**
+ * The reverse-link to WITH_COLLECTION flag. It is stor... | 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 | 39,186 | It would be helpful to explicit here what this really means and assumes. | apache-lucene-solr | java |
@@ -46,6 +46,9 @@ type AddressKey struct {
PriKey keypair.PrivateKey
}
+//ExpectedBalances records expectd balances of admins and delegates
+var ExpectedBalances map[string]*big.Int
+
// LoadAddresses loads key pairs from key pair path and construct addresses
func LoadAddresses(keypairsPath string, chainID ... | 1 | // Copyright (c) 2018 IoTeX
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use of the cod... | 1 | 16,222 | `ExpectedBalances` is a global variable (from `gochecknoglobals`) | iotexproject-iotex-core | go |
@@ -1,7 +1,7 @@
module RSpec
module Core
module Formatters
- # This class extracts code snippets by looking at the backtrace of the passed error
+ # Extracts code snippets by looking at the backtrace of the passed error and applies synax highlighting and line numbers using html.
class SnippetE... | 1 | module RSpec
module Core
module Formatters
# This class extracts code snippets by looking at the backtrace of the passed error
class SnippetExtractor
class NullConverter; def convert(code, pre); code; end; end
begin
require 'syntax/convertors/html'
@@converter = Sy... | 1 | 8,377 | This is another place where I'd feel more comfortable with declaring the class private. We can always make it public in the future if someone makes a case for that, but I prefer to err on the side of privateness for things like this that 99% of RSpec users won't have a reason to use. | rspec-rspec-core | rb |
@@ -57,11 +57,14 @@ func addAccountToMemResolver(s *Server, pub, jwtclaim string) {
s.mu.Unlock()
}
-func createClient(t *testing.T, s *Server, akp nkeys.KeyPair) (*client, *bufio.Reader, string) {
+func createClient(t *testing.T, s *Server, akp nkeys.KeyPair, optIssuerAccount string) (*client, *bufio.Reader, stri... | 1 | // Copyright 2018 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wr... | 1 | 8,925 | Feels like this should be left as is and add a new createClientWithIssuers or something like that. Avoid all the "" | nats-io-nats-server | go |
@@ -129,6 +129,9 @@ public class SPRequestHandler {
private void handleError(String error) {
SalesforceSDKLogger.e(TAG, "Error received from IDP app: " + error);
+ if (authCallback != null) {
+ authCallback.receivedErrorResponse(error);
+ }
}
private void handleSucce... | 1 | /*
* Copyright (c) 2017-present, salesforce.com, inc.
* All rights reserved.
* Redistribution and use of this software 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 copyright noti... | 1 | 16,562 | Minor unrelated bug in the IDP flow where the error wasn't getting displayed as a `Toast`. | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -3,6 +3,7 @@ var assert = require('assert');
var Transform = require('stream').Transform;
const MongoError = require('../../lib/core').MongoError;
var MongoNetworkError = require('../../lib/core').MongoNetworkError;
+var mongoErrorContextSymbol = require('../../lib/core').mongoErrorContextSymbol;
var setupDataba... | 1 | 'use strict';
var assert = require('assert');
var Transform = require('stream').Transform;
const MongoError = require('../../lib/core').MongoError;
var MongoNetworkError = require('../../lib/core').MongoNetworkError;
var setupDatabase = require('./shared').setupDatabase;
var delay = require('./shared').delay;
var co = ... | 1 | 17,439 | I thought we got rid of this thing? | mongodb-node-mongodb-native | js |
@@ -83,15 +83,8 @@ class TaintNodeData
public $column_to;
/**
- * @param string $label
- * @param string $entry_path_type
- * @param ?string $entry_path_description
* @param int $line_from
* @param int $line_to
- * @param string $file_name
- * @param string $file_path
- *... | 1 | <?php
namespace Psalm\Internal\Analyzer;
/**
* @psalm-immutable
*/
class TaintNodeData
{
/**
* @var int
*/
public $line_from;
/**
* @var int
*/
public $line_to;
/**
* @var string
*/
public $label;
/**
* @var string
*/
public $entry_path_type... | 1 | 8,976 | Please convert int params as well. | vimeo-psalm | php |
@@ -84,7 +84,7 @@ namespace Microsoft.CodeAnalysis.Sarif.Driver.Sdk
var lastComponent = components.Last();
messageLines.Add(
string.Format(
- CultureInfo.InvariantCulture, "{0}:{1} {2} {3}: {4}",
+ CultureInfo.Invariant... | 1 | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.using System;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
namespace Microsoft.CodeAnalysis... | 1 | 10,123 | Fixed bug in implementation. Now I can run the validator from the VS Tools menu, double-click on an output line, and navigate to the site of the issue. | microsoft-sarif-sdk | .cs |
@@ -230,6 +230,18 @@ namespace Datadog.Trace.Configuration
/// </summary>
public const string DiagnosticSourceEnabled = "DD_DIAGNOSTIC_SOURCE_ENABLED";
+ /// <summary>
+ /// Configuration key for the application's servers http statuses to set spans as errors by.
+ /// </summary>... | 1 | namespace Datadog.Trace.Configuration
{
/// <summary>
/// String constants for standard Datadog configuration keys.
/// </summary>
public static class ConfigurationKeys
{
/// <summary>
/// Configuration key for the path to the configuration file.
/// Can only be set with an e... | 1 | 18,547 | Can we rename this field to `HttpServerErrorCodes` or `HttpServerErrorStatuses`? It will contain a list of status _codes_, not a list of _errors_. (Personally I prefer "codes" over "statuses", but we can't change `DD_HTTP_SERVER_ERROR_CODES`.) | DataDog-dd-trace-dotnet | .cs |
@@ -134,8 +134,17 @@ struct flb_systemd_config *flb_systemd_config_create(struct flb_input_instance *
sd_journal_add_disjunction(ctx->j);
}
- /* Always seek to head */
- sd_journal_seek_head(ctx->j);
+ /* Seek to head by default or tail if specified in configuration */
+ tmp = flb_input_get_... | 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* Fluent Bit
* ==========
* Copyright (C) 2015-2017 Treasure Data 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 cop... | 1 | 8,798 | would you please use: flb_utils_bool(...) here ?, that function wraps the on/off/true/false stuff. | fluent-fluent-bit | c |
@@ -178,7 +178,8 @@ namespace Microsoft.CodeAnalysis.Sarif.Driver.Sdk
analyzeOptions.Verbose,
targets,
analyzeOptions.ComputeTargetsHash,
- Prerelease)),
+ Pre... | 1 | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.IO;
using Microsoft.CodeAnalysis.Sarif.Sdk;
namespace Microsoft.CodeAnalysis.Sarif.Driver.Sdk
{
publ... | 1 | 10,209 | `invocationInfoTokensToRedact: null` (I really like the convention of using a named parameter whenever the value doesn't communicate the meaning, such as for literal values.) | microsoft-sarif-sdk | .cs |
@@ -61,6 +61,10 @@ class BaseDetector(nn.Module):
"""
pass
+ @abstractmethod
+ async def async_test(self, img, img_meta, **kwargs):
+ pass
+
@abstractmethod
def simple_test(self, img, img_meta, **kwargs):
pass | 1 | import logging
from abc import ABCMeta, abstractmethod
import mmcv
import numpy as np
import pycocotools.mask as maskUtils
import torch.nn as nn
from mmdet.core import auto_fp16, get_classes, tensor2imgs
class BaseDetector(nn.Module):
"""Base class for detectors"""
__metaclass__ = ABCMeta
def __init__... | 1 | 18,259 | maybe renamed to `async_simple_test` if we consider supporting aug test later on? | open-mmlab-mmdetection | py |
@@ -113,7 +113,7 @@ module Mongoid #:nodoc:
# @return [ Document ] A new document.
def initialize(attrs = nil)
@new_record = true
- @attributes = default_attributes
+ @attributes = apply_default_attributes
process(attrs) do |document|
yield self if block_given?
identi... | 1 | # encoding: utf-8
module Mongoid #:nodoc:
# This is the base module for all domain objects that need to be persisted to
# the database as documents.
module Document
extend ActiveSupport::Concern
include Mongoid::Components
include Mongoid::MultiDatabase
included do
attr_reader :new_record
... | 1 | 8,696 | So where is default_attributes now? Is it used anywhere else still? If not, can it be removed along with any tests of it? | mongodb-mongoid | rb |
@@ -42,9 +42,9 @@ namespace OpenTelemetry.Metrics.Aggregators
{
return new DoubleSumData
{
- StartTimestamp = new DateTime(this.GetLastStartTimestamp().Ticks),
+ StartTimestamp = new DateTime(this.GetLastStartTimestamp().Ticks, DateTimeKind.Utc),
... | 1 | // <copyright file="DoubleCounterSumAggregator.cs" company="OpenTelemetry Authors">
// 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:/... | 1 | 18,743 | We could move this to the base class and remove all these changes. What do you think? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -13,6 +13,7 @@ feature "subscriber requests access to beta trail" do
click_on "Request Access"
+ expect(page).to have_content(I18n.t("beta.replies.flashes.success"))
expect(page).not_to have_content("Exciting Beta Trail")
end
end | 1 | require "rails_helper"
feature "subscriber requests access to beta trail" do
scenario "gets added to database" do
user = create(:subscriber)
trail = create(:trail)
create(:status, user: user, completeable: trail, state: Status::COMPLETE)
create(:beta_offer, name: "Exciting Beta Trail")
visit pra... | 1 | 16,255 | While we're doing some translation work, could you extract this button text and the other static text from the view? | thoughtbot-upcase | rb |
@@ -181,6 +181,12 @@ public class JobCallbackUtil {
String headersKeyPerSequence =
headersKey.replace(SEQUENCE_TOKEN, sequenceStr);
String headersValue = props.get(headersKeyPerSequence);
+
+ // replace all the tokens in the header
+ if(headersValue != null) {
+ headersValue = repl... | 1 | package azkaban.execapp.event;
import static azkaban.jobcallback.JobCallbackConstants.CONTEXT_EXECUTION_ID_TOKEN;
import static azkaban.jobcallback.JobCallbackConstants.FIRST_JOB_CALLBACK_URL_TEMPLATE;
import static azkaban.jobcallback.JobCallbackConstants.CONTEXT_FLOW_TOKEN;
import static azkaban.jobcallback.JobCallb... | 1 | 10,904 | Nit: Please fix indentation (note: Azkaban uses 2 spaces and not tabs). | azkaban-azkaban | java |
@@ -60,7 +60,7 @@ module.exports = {
TestCase.assertEqual(defaultRealm.schemaVersion, 0);
TestCase.assertThrows(function() {
- new Realm({schemaVersion: 1});
+ new Realm({schemaVersion: 1, schema: []});
}, "Realm already opened at a different schema version");
... | 1 | ////////////////////////////////////////////////////////////////////////////
//
// Copyright 2016 Realm 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/li... | 1 | 15,838 | This change is necessary because the schema version is ignored unless a schema is specified. I think that has always been the intent. | realm-realm-js | js |
@@ -2712,6 +2712,7 @@ dr_get_os_version(dr_os_version_info_t *info)
get_os_version_ex(&ver, &sp_major, &sp_minor);
if (info->size > offsetof(dr_os_version_info_t, version)) {
switch (ver) {
+ case WINDOWS_VERSION_10_1803: info->version = DR_WINDOWS_VERSION_10_1803; break;
case WINDOWS... | 1 | /* ******************************************************************************
* Copyright (c) 2010-2018 Google, Inc. All rights reserved.
* Copyright (c) 2010-2011 Massachusetts Institute of Technology All rights reserved.
* Copyright (c) 2002-2010 VMware, Inc. All rights reserved.
* ************************... | 1 | 13,853 | The api/docs/release.dox changelog message is missing: maybe you planned to add it once NtAllocateVirtualMemoryEx and NtMapViewOfSectionEx support is in? I would say, add it here in the same diff that raises max_supported_os_version. | DynamoRIO-dynamorio | c |
@@ -0,0 +1,6 @@
+var aria = 'aria-hidden';
+if (node && node.hasAttribute(aria)) {
+ return false;
+}
+
+return true; | 1 | 1 | 11,054 | Just do: `return node.hasAttribute('aria-hidden')` | dequelabs-axe-core | js | |
@@ -10,6 +10,18 @@ describe "Saved Searches" do
click_link 'Saved Searches'
expect(page).to have_content 'You have no saved searches'
end
+
+ it 'can be saved and forgotten from a search result' do
+ visit catalog_index_path(q: 'book')
+ within '.search-widgets' do
+ click_button 'save'
+ ... | 1 | require 'spec_helper'
describe "Saved Searches" do
before do
sign_in 'user1'
visit root_path
end
it "should be empty" do
click_link 'Saved Searches'
expect(page).to have_content 'You have no saved searches'
end
describe "with a saved search 'book'" do
before do
fill_in "q", with: ... | 1 | 6,015 | Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. | projectblacklight-blacklight | rb |
@@ -9,7 +9,10 @@ namespace Datadog.Trace.Util
internal static class DomainMetadata
{
private const string UnknownName = "unknown";
- private static Process _currentProcess;
+ private static bool _initialized;
+ private static string _currentProcessName;
+ private static st... | 1 | using System;
using System.Diagnostics;
namespace Datadog.Trace.Util
{
/// <summary>
/// Dedicated helper class for consistently referencing Process and AppDomain information.
/// </summary>
internal static class DomainMetadata
{
private const string UnknownName = "unknown";
private... | 1 | 18,050 | Do we need `_processDataPoisoned`? Can the name or the id of the current process ever change? Or the machine name? | DataDog-dd-trace-dotnet | .cs |
@@ -114,10 +114,17 @@ func run(ctx context.Context, cfg cmds.Agent, proxy proxy.Proxy) error {
return err
}
}
+
+ notifySocket := os.Getenv("NOTIFY_SOCKET")
+ os.Unsetenv("NOTIFY_SOCKET")
+
if err := setupTunnelAndRunAgent(ctx, nodeConfig, cfg, proxy); err != nil {
return err
}
+ os.Setenv("NOTIFY_SOC... | 1 | package agent
import (
"context"
"fmt"
"io/ioutil"
"net/url"
"os"
"path/filepath"
"strings"
"time"
systemd "github.com/coreos/go-systemd/daemon"
"github.com/pkg/errors"
"github.com/rancher/k3s/pkg/agent/config"
"github.com/rancher/k3s/pkg/agent/containerd"
"github.com/rancher/k3s/pkg/agent/flannel"
"git... | 1 | 9,689 | Did it not work out to wait until after containerd and kubelet are started? | k3s-io-k3s | go |
@@ -159,6 +159,10 @@ const std::unordered_map<std::string, ItemParseAttributes_t> ItemParseAttributes
{"elementenergy", ITEM_PARSE_ELEMENTENERGY},
{"elementdeath", ITEM_PARSE_ELEMENTDEATH},
{"elementholy", ITEM_PARSE_ELEMENTHOLY},
+ {"cooldownreduction", ITEM_PARSE_COOLDOWNREDUCTION},
+ {"increasedamage", ITEM_PA... | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2019 Mark Samman <mark.samman@gmail.com>
*
* 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; eithe... | 1 | 19,876 | variable names suggestions from me: - damageboost, ITEM_PARSE_DAMAGEBOOST, "damage boost +x%" - healingboost, ITEM_PARSE_HEALINGBOOST, "healing power +y%" - managainboost, ITEM_PARSE_MANAGAINBOOST, "mana restoration +z%" alternatively the other names can stay, because "increase" convention isn't that bad, just change m... | otland-forgottenserver | cpp |
@@ -24,6 +24,7 @@ CREATE_TABLE = """
`complete_time` datetime DEFAULT NULL,
`status` enum('SUCCESS','RUNNING','FAILURE',
'PARTIAL_SUCCESS','TIMEOUT') DEFAULT NULL,
+ `has_all_data` bool DEFAULT NULL,
`schema_version` varchar(255) DEFAULT NULL,
`cycle_tim... | 1 | # Copyright 2017 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 may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 1 | 27,360 | Why can't this be determined by 'PARTIAL_SUCCESS' in the `status` field? | forseti-security-forseti-security | py |
@@ -35,11 +35,15 @@ final class IdGenerator implements GeneratorInterface
public function generatePath(MediaInterface $media): string
{
- $mediaId = (int) $media->getId();
+ $id = $media->getId();
- $rep_first_level = (int) ($mediaId / $this->firstLevel);
- $rep_second_level = ... | 1 | <?php
declare(strict_types=1);
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\MediaBundle\Generator... | 1 | 12,401 | Does it make sense to generate a Exception here? Maybe yes, because it wouldn't make sense to generate a path without the id of the media right? | sonata-project-SonataMediaBundle | php |
@@ -48,8 +48,16 @@ import javax.net.ssl.SSLSocketFactory;
*/
public class SalesforceTLSSocketFactory extends SSLSocketFactory {
+ private static SalesforceTLSSocketFactory INSTANCE;
private SSLSocketFactory ssLSocketFactory;
+ public static SalesforceTLSSocketFactory getInstance() throws KeyManagement... | 1 | /*
* Copyright (c) 2015, salesforce.com, inc.
* All rights reserved.
* Redistribution and use of this software 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 copyright notice, this... | 1 | 14,946 | This should be made private. | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -267,6 +267,7 @@ func (a *Agent) bootstrap() error {
BaseSVID: a.BaseSVID,
BaseSVIDKey: a.baseSVIDKey,
BaseRegEntries: regEntries,
+ BaseSVIDPath: a.getBaseSVIDPath(),
Logger: a.config.Log,
}
| 1 | package agent
import (
"context"
"crypto/ecdsa"
"crypto/rand"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"fmt"
"io/ioutil"
"net"
"net/url"
"os"
"path"
"syscall"
"time"
"github.com/sirupsen/logrus"
"github.com/spiffe/go-spiffe/uri"
"github.com/spiffe/spire/pkg/agent/auth"
"github.com/spiffe/spire/... | 1 | 8,863 | perhaps this is better modeled as a pkg-level var? | spiffe-spire | go |
@@ -86,6 +86,10 @@
#include "CmpMain.h"
#define MAX_NODE_NAME 9
+#define MAX_PRECISION_ALLOWED 18
+#define HIVE_MAX_PRECISION_ALLOWED 38
+#define MAX_SCALE_ALLOWED 6
+#define MAX_NUM_LEN 16
#include "SqlParserGlobals.h"
| 1 | /**********************************************************************
// @@@ START COPYRIGHT @@@
//
// 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. ... | 1 | 13,115 | I don't think there is a maximum scale, neither for Hive nor for Trafodion. The only condition right now is that the scale can't exceed the precision. Example of a valid scale: DECIMAL(18,18). The maximum of 6 digits applies only to TIMESTAMP columns, where we don't support resolution below microseconds. | apache-trafodion | cpp |
@@ -775,6 +775,14 @@ func (a *FakeWebAPI) GetProject(ctx context.Context, req *webservice.GetProjectR
return nil, status.Error(codes.Unimplemented, "")
}
+func (a *FakeWebAPI) UpdateProjectStaticUser(ctx context.Context, req *webservice.UpdateProjectStaticUserRequest) (*webservice.UpdateProjectStaticUserResponse, ... | 1 | // Copyright 2020 The PipeCD Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... | 1 | 9,135 | `ctx` is unused in UpdateProjectStaticUser | pipe-cd-pipe | go |
@@ -35,4 +35,10 @@ public class JSTypeNameGenerator extends TypeNameGenerator {
public String getStringFormatExample(String format) {
return getStringFormatExample(format, "Date.toISOString()", "Date.toISOString()");
}
+
+ @Override
+ public String getDiscoveryDocUrl(String apiName, String apiVersion) {
+ ... | 1 | /* Copyright 2017 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 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 ... | 1 | 21,889 | Why is this not the default, and why only for JS? | googleapis-gapic-generator | java |
@@ -0,0 +1,7 @@
+class ProjectBadge < ActiveRecord::Base
+ belongs_to :project
+ belongs_to :repository
+
+ validates :url, presence: true
+ validates :repository_id, presence: true, uniqueness: { scope: :project_id }
+end | 1 | 1 | 8,838 | A repository has many badges so we should also add type column in scope. | blackducksoftware-ohloh-ui | rb | |
@@ -82,7 +82,7 @@ namespace Microsoft.CodeAnalysis.Sarif.Converters
});
Assert.AreEqual(1, result.CodeFlows.Count);
- result.CodeFlows[0].Should().Equal(new[]
+ result.CodeFlows.First().Locations.ToArray().Should().Equal(new[]
{
... | 1 | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Xml;
using FluentAssertions;
using Microsoft.Visua... | 1 | 10,594 | Now a hash set, so can't index into it. | microsoft-sarif-sdk | .cs |
@@ -273,6 +273,11 @@ module Bolt
!!File::ALT_SEPARATOR
end
+ # Returns true if running in PowerShell.
+ def powershell?
+ !!ENV['PSModulePath']
+ end
+
# Accept hash and return hash with top level keys of type "String" converted to symbols.
def symbolize_top_level_k... | 1 | # frozen_string_literal: true
module Bolt
module Util
class << self
# Gets input for an argument.
def get_arg_input(value)
if value.start_with?('@')
file = value.sub(/^@/, '')
read_arg_file(file)
elsif value == '-'
$stdin.read
else
value... | 1 | 16,799 | @jpogran Does this seem like a reasonable way to know if we're in powershell vs. CMD or *sh? | puppetlabs-bolt | rb |
@@ -63,7 +63,7 @@ public class BodyProcessorCreator implements ParamValueProcessorCreator {
}
String contentType = request.getContentType();
- if (contentType != null && !contentType.startsWith(MediaType.APPLICATION_JSON)) {
+ if (contentType != null && !contentType.toLowerCase().startsWith(Me... | 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 l... | 1 | 7,441 | 1.toLowerCase(Locale.US)? 2.where is accept bug fix? | apache-servicecomb-java-chassis | java |
@@ -105,16 +105,9 @@ def test_execute_with_invalid_driver(
):
_command_args['driver_name'] = 'ec3'
- with pytest.raises(SystemExit) as e:
+ with pytest.raises(KeyError):
_instance.execute()
- assert 1 == e.value.code
-
- msg = (
- 'The specified template directory ({template_dir})'... | 1 | # Copyright (c) 2015-2018 Cisco Systems, 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 | 10,111 | We should still be providing something to the user in the case of a `KeyError` instead of a stack trace!? | ansible-community-molecule | py |
@@ -90,6 +90,7 @@ namespace Nethermind.DataMarketplace.Core.Services
{
var txData = _abiEncoder.Encode(AbiEncodingStyle.IncludeSignature, ContractData.DepositAbiSig,
deposit.Id.Bytes, deposit.Units, deposit.ExpiryTime);
+ var nonce = await _blockchainBridge.GetNonceAsyn... | 1 | // Copyright (c) 2018 Demerzel Solutions Limited
// This file is part of the Nethermind library.
//
// The Nethermind 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 ... | 1 | 24,372 | check Lukasz's fix with NonceReserving - is that not better? | NethermindEth-nethermind | .cs |
@@ -106,11 +106,8 @@ Blockly.FieldColour.prototype.setValue = function(colour) {
}
this.colour_ = colour;
if (this.sourceBlock_) {
- this.sourceBlock_.setColour(
- colour,
- this.sourceBlock_.getColourSecondary(),
- this.sourceBlock_.getColourTertiary()
- );
+ // Set the primary, second... | 1 | /**
* @license
* Visual Blocks Editor
*
* Copyright 2012 Google Inc.
* https://developers.google.com/blockly/
*
* 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.apach... | 1 | 8,541 | Would you explain why here please? E.g. from the PR description > the renderer expects to be able to use the secondary color as the fill for a shadow. | LLK-scratch-blocks | js |
@@ -643,6 +643,8 @@ func (hd *HeaderDownload) SaveExternalAnnounce(hash common.Hash) {
}
func (hd *HeaderDownload) getLink(linkHash common.Hash) (*Link, bool) {
+ hd.lock.RLock()
+ defer hd.lock.RUnlock()
if link, ok := hd.links[linkHash]; ok {
return link, true
} | 1 | package headerdownload
import (
"bytes"
"compress/gzip"
"container/heap"
"context"
"encoding/base64"
"errors"
"fmt"
"io"
"math/big"
"sort"
"strings"
"time"
"github.com/ledgerwatch/turbo-geth/common"
"github.com/ledgerwatch/turbo-geth/common/dbutils"
"github.com/ledgerwatch/turbo-geth/consensus"
"githu... | 1 | 22,195 | Lock needs to go to `RecoverFromDb` instead. Here it may cause deadlocks. My convention was that un-exported functions do not lock, only exported ones (with name starting with a capital letter) | ledgerwatch-erigon | go |
@@ -63,4 +63,9 @@ public class GermanKeyboard extends BaseKeyboard {
public String getSpaceKeyText(String aComposingText) {
return StringUtils.getStringByLocale(mContext, R.string.settings_language_german, getLocale());
}
+
+ @Override
+ public String[] getDomains(String... domains) {
+ ... | 1 | package org.mozilla.vrbrowser.ui.keyboards;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.mozilla.vrbrowser.R;
import org.mozilla.vrbrowser.input.CustomKeyboard;
import org.mozilla.vrbrowser.ui.widgets.WidgetPlacement;
import org.mozilla.vrbrowser... | 1 | 8,538 | German keyboard would also be used in Austria and Switzerland, so this should have included `.at` and `.ch`. | MozillaReality-FirefoxReality | java |
@@ -38,8 +38,6 @@ final class CompositeIndexer {
CacheBuilder.from(spec).<PartitionKeyToTraceId, Pair<Long>>build().asMap();
Indexer.Factory factory = new Indexer.Factory(session, indexTtl, sharedState);
this.indexers = ImmutableSet.of(
- factory.create(new InsertTraceIdByServiceName(bucketCou... | 1 | /**
* Copyright 2015-2016 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 ... | 1 | 11,412 | since this makes the indexer thing really only used for a single table, now, you can put in a TODO for me to cleanup and simplify this | openzipkin-zipkin | java |
@@ -83,6 +83,10 @@ public class KubernetesContainerizedImpl implements ContainerizedImpl {
"/export/apps/azkaban/azkaban-exec-server/current/plugins/jobtypes";
public static final String IMAGE = "image";
public static final String VERSION = "version";
+ public static final String NSCD_SOCKET_VOLUME_NAME =... | 1 | /*
* Copyright 2020 LinkedIn Corp.
*
* 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... | 1 | 21,045 | Should we have this path passed from the Azkaban properties? If this is the standard path for nscd even outside LinkedIn, then we can keep it. | azkaban-azkaban | java |
@@ -533,7 +533,12 @@ func (a *Account) EnableJetStream(limits *JetStreamAccountLimits) error {
s.Warnf(" Error adding Stream %q to Template %q: %v", cfg.Name, cfg.Template, err)
}
}
- mset, err := a.AddStream(&cfg.StreamConfig)
+ // TODO: We should not rely on the stream name.
+ // However, having a Str... | 1 | // Copyright 2019-2020 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 12,048 | Could be a non-public field. `allowNoSubject` | nats-io-nats-server | go |
@@ -588,12 +588,12 @@ func (c *Client) execute(tid int, target *core.BuildTarget, command *pb.Command,
} else if target.IsTextFile {
return c.buildTextFile(target, command, digest)
}
- return c.reallyExecute(tid, target, command, digest, needStdout, isTest)
+ return c.reallyExecute(tid, target, command, digest, ... | 1 | // Package remote provides our interface to the Google remote execution APIs
// (https://github.com/bazelbuild/remote-apis) which Please can use to distribute
// work to remote servers.
package remote
import (
"context"
"encoding/hex"
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"
"sync"
"time"
"g... | 1 | 9,769 | Don't think this is quite right - think the build one also needs an `IsOriginalTarget` (c.f. code in `src/build`) | thought-machine-please | go |
@@ -62,6 +62,12 @@ class Autocomplete
return array('results' => $this->processResults($paginator->getCurrentPageResults(), $backendConfig['entities'][$entity]));
}
+ /**
+ * @param array $entities
+ * @param array $targetEntityConfig
+ *
+ * @return array
+ */
private functio... | 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 JavierEguiluz\Bundle\EasyAdminBundle\Search;
use JavierEguiluz\Bund... | 1 | 10,862 | what about adding typehints instead? I don't think we need to add docblocks for every private methods. | EasyCorp-EasyAdminBundle | php |
@@ -76,6 +76,7 @@ func createVolumeBuilder(cStorVolumeReplica *apis.CStorVolumeReplica, fullVolNam
openebsTargetIP := "io.openebs:targetip=" + cStorVolumeReplica.Spec.TargetIP
createVolAttr = append(createVolAttr, "create",
+ "-b", "4K", "-s", "-o", "compression=on",
"-V", cStorVolumeReplica.Spec.Capacity, fu... | 1 | /*
Copyright 2018 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, sof... | 1 | 9,160 | Is it fine to pass the "-o compression=on" in the middle instead of at the end ? | openebs-maya | go |
@@ -18,14 +18,18 @@ module Bolt
attr_reader :noop, :transports
attr_accessor :run_as
+ # FIXME: There must be a better way
+ # https://makandracards.com/makandra/36011-ruby-do-not-mix-optional-and-keyword-arguments
def initialize(concurrency = 1,
analytics = Bolt::Analytics::N... | 1 | # frozen_string_literal: true
# Used for $ERROR_INFO. This *must* be capitalized!
require 'English'
require 'json'
require 'concurrent'
require 'logging'
require 'set'
require 'bolt/analytics'
require 'bolt/result'
require 'bolt/config'
require 'bolt/notifier'
require 'bolt/result_set'
require 'bolt/puppetdb'
module ... | 1 | 9,240 | Probably make them all keyword arguments. | puppetlabs-bolt | rb |
@@ -521,11 +521,7 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "cardBuild
renderDetails(page, item, apiClient, context);
renderTrackSelections(page, instance, item);
- if (dom.getWindowSize().innerWidth >= 1000) {
- backdrop.setBackdrops([item]);
- ... | 1 | define(["loading", "appRouter", "layoutManager", "connectionManager", "cardBuilder", "datetime", "mediaInfo", "backdrop", "listView", "itemContextMenu", "itemHelper", "dom", "indicators", "apphost", "imageLoader", "libraryMenu", "globalize", "browser", "events", "scrollHelper", "playbackManager", "libraryBrowser", "scr... | 1 | 12,324 | Why not just check the backdrop setting here as well for the time being? We can combine the code later but at least then it would be configurable if people like the backgrounds. | jellyfin-jellyfin-web | js |
@@ -41,7 +41,7 @@ namespace AutoRest.Swagger.Validation
/// <summary>
/// The severity of this message (ie, debug/info/warning/error/fatal, etc)
/// </summary>
- public override Category Severity => Category.Error;
+ public override Category Severity => Category.Warning;
... | 1 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using AutoRest.Core.Logging;
using Au... | 1 | 24,736 | why are we turning this one into a Warning? | Azure-autorest | java |
@@ -631,7 +631,7 @@ public class GUI implements CPDListener {
int separatorPos = sourceId.lastIndexOf(File.separatorChar);
label = "..." + sourceId.substring(separatorPos);
} else {
- label = '(' + sourceIDs.size() + " separate files)";
+ label = '(' + String.val... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.cpd;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Point;
import java.awt.Toolkit;
import java.awt.datatransfer.StringSelection;
import java.awt.eve... | 1 | 14,400 | Wouldn't it be better to use double quotes for the opening parenthesis ? | pmd-pmd | java |
@@ -716,7 +716,7 @@ bool IOLoginData::savePlayer(Player* player)
if (!player->isOffline()) {
query << "`onlinetime` = `onlinetime` + " << (time(nullptr) - player->lastLoginSaved) << ',';
}
- query << "`blessings` = " << static_cast<uint32_t>(player->blessings);
+ query << "`blessings` = " << static_cast<uint32_t... | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2019 Mark Samman <mark.samman@gmail.com>
*
* 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; eithe... | 1 | 19,083 | Remove the cast | otland-forgottenserver | cpp |
@@ -1,4 +1,4 @@
-// Copyright (c) 2016-2017 Tigera, Inc. All rights reserved.
+// Copyright (c) 2016-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. | 1 | // Copyright (c) 2016-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 ... | 1 | 16,159 | What criteria do we use to bump the copyright years? An update to the module? | projectcalico-felix | c |
@@ -267,6 +267,7 @@ class Resize:
interpolation='nearest',
backend=self.backend)
results['gt_semantic_seg'] = gt_seg
+ results[key] = gt_seg
def __call__(self, results):
"""Call function to resize images, bounding boxes, masks, semantic | 1 | import copy
import inspect
import mmcv
import numpy as np
from numpy import random
from mmdet.core import PolygonMasks
from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps
from ..builder import PIPELINES
try:
from imagecorruptions import corrupt
except ImportError:
corrupt = None
try:
import al... | 1 | 24,706 | should we rm line 269? | open-mmlab-mmdetection | py |
@@ -68,7 +68,9 @@ class NVDASpyLib:
# callbacks for extension points
def _onNvdaStartupComplete(self):
- self._isNvdaStartupComplete = True
+ # Queue the setting of the completion variable,
+ # To ensure that NvDA's core loop has started running, and it has processed initial focus.
+ queueHandler.queueFunctio... | 1 | # A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2018 NV Access Limited
# This file may be used under the terms of the GNU General Public License, version 2 or later.
# For more details see: https://www.gnu.org/licenses/gpl-2.0.html
"""This module provides an NVDA global plugin which creates a and robo... | 1 | 31,910 | Perhaps the code at `source/core.py:564: postNvdaStartup.notify()` should be queued instead? If we are saying the loop must have started before NVDA's startup is complete, then the `postNvdaStartup` action is incorrect. | nvaccess-nvda | py |
@@ -25,6 +25,13 @@ FactoryGirl.define do
cart.save!
end
+ factory :cart_with_all_approvals_approved do
+ after :create do |cart|
+ cart.approvals.each {|a| a.update_attribute :status, 'approved'}
+ cart.update_attribute :status, 'approved'
+ end
+ end
+
... | 1 | FactoryGirl.define do
factory :cart do
flow 'parallel'
name 'Test Cart needing approval'
status 'pending'
factory :cart_with_approval_group do
after :create do |cart|
approval_group = FactoryGirl.create(:approval_group_with_approver_and_requester_approvals)
cart.approval_group ... | 1 | 12,177 | Needed this for testing locally with mail view but not used for any tests. Might be nice to have some seed scripts at some point. | 18F-C2 | rb |
@@ -291,9 +291,13 @@ func (o *Outbound) callWithPeer(
if response.StatusCode >= 200 && response.StatusCode < 300 {
appHeaders := applicationHeaders.FromHTTPHeaders(
response.Header, transport.NewHeaders())
- appError := response.Header.Get(ApplicationStatusHeader) == ApplicationErrorStatus
+ appError := from... | 1 | // Copyright (c) 2017 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 | 15,423 | wait, if we only do this for successful status codes won't we miss a whole slew of responses? We should be checking this for all codes right? | yarpc-yarpc-go | go |
@@ -66,7 +66,9 @@ public class ProtoParserTest {
testDataLocator = TestDataLocator.create(GapicCodeGeneratorAnnotationsTest.class);
testDataLocator.addTestDataSource(CodegenTestUtil.class, "testsrc/common");
- model = CodegenTestUtil.readModel(testDataLocator, tempDir, protoFiles, new String[0]);
+ mo... | 1 | /* Copyright 2018 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
*
* Unless required by applicable law or agreed to in... | 1 | 27,568 | Adding in the service yaml `library.yaml` here. | googleapis-gapic-generator | java |
@@ -63,7 +63,7 @@ func (a BasicAuth) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error
// let upstream middleware (e.g. fastcgi and cgi) know about authenticated
// user; this replaces the request with a wrapped instance
- r = r.WithContext(context.WithValue(r.Context(),
+ *r = *r.WithContext(... | 1 | // Package basicauth implements HTTP Basic Authentication for Caddy.
//
// This is useful for simple protections on a website, like requiring
// a password to access an admin interface. This package assumes a
// fairly small threat model.
package basicauth
import (
"bufio"
"context"
"crypto/sha1"
"crypto/subtle"
... | 1 | 10,408 | Why is this dereference needed? | caddyserver-caddy | go |
@@ -36,7 +36,8 @@ import (
// * `tlfNode` allows auto-creation of subdirectories representing
// valid repository checkouts of the corresponding TLF, e.g.
// `.kbfs_autogit/private/chris/dotfiles`. It wraps child nodes in
-// two ways, as both a `readonlyNode` and a `repoNode`.
+// two ways, as both a `read... | 1 | // Copyright 2018 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libgit
import (
"context"
"path"
"sync"
"time"
"github.com/keybase/kbfs/libkbfs"
"github.com/keybase/kbfs/tlf"
"github.com/pkg/errors"
)
// This file c... | 1 | 19,098 | Might want to add that this only happens if you have write permissions to the folder. | keybase-kbfs | go |
@@ -53,6 +53,12 @@ type Config struct {
// to use based on region.
EndpointResolver endpoints.Resolver
+ // EnforceShouldRetryCheck is used in the AfterRetryHandler to always call
+ // ShouldRetry. If this is set and ShouldRetry is called, then the request's
+ // Retryable field can be either nil or set. Proper h... | 1 | package aws
import (
"net/http"
"time"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/endpoints"
)
// UseServiceDefaultRetries instructs the config to use the service's own
// default number of retries. This will be the default action if
// Config.MaxRetries is nil also.
const UseServ... | 1 | 8,705 | Adding a small blurb about why someone would want to enable this flag would help clarify what it is for. Such as something about when providing a custom retry handler and how`ShouldRetry` will be handled with and without the flag enabled. | aws-aws-sdk-go | go |
@@ -59,6 +59,6 @@ func Register(registry transport.Registry, service Service) {
proto := service.Protocol()
for method, h := range service.Handlers() {
handler := thriftHandler{Handler: h, Protocol: proto}
- registry.Register(procedureName(name, method), handler)
+ registry.Register("", procedureName(name, met... | 1 | // Copyright (c) 2016 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 | 9,465 | assume the user will be able to register for a custom service name in future? | yarpc-yarpc-go | go |
@@ -27,7 +27,9 @@ using System.Threading.Tasks;
using JetBrains.Annotations;
using pwiz.Common.Collections;
using pwiz.Common.SystemUtil;
-using pwiz.Skyline.Util;
+using pwiz.Skyline.Util;
+
+
// ReSharper disable InconsistentlySynchronizedField
namespace pwiz.Skyline.Controls.Graphs | 1 | /*
* Original author: Rita Chupalov <ritach .at. uw.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2020 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Lic... | 1 | 13,590 | The extra two empty lines seem unnecessary. Please review your diffs more carefully. | ProteoWizard-pwiz | .cs |
@@ -28,7 +28,7 @@ type API interface {
LiveToken() TokenAPI
SideToken() TokenAPI
TestToken() TestTokenAPI
- OracleUSD() OracleAPI
+ OracleAPI
}
type ProfileRegistryAPI interface { | 1 | package blockchain
import (
"context"
"crypto/ecdsa"
"fmt"
"math/big"
"strings"
"time"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/noxiouz/zapctx/ctxlog"
"github.com/pkg/e... | 1 | 7,002 | What the reason to embed the Oracle? | sonm-io-core | go |
@@ -53,6 +53,8 @@ Workshops::Application.routes.draw do
resources :purchases, only: :index
end
+ match 'pages/new-topics' => 'pages#show', id: 'new-topics'
+
match '/auth/:provider/callback', to: 'auth_callbacks#create'
match '/watch' => 'high_voltage/pages#show', as: :watch, id: 'watch' | 1 | Workshops::Application.routes.draw do
mount RailsAdmin::Engine => '/new_admin', :as => 'rails_admin'
root to: 'topics#index'
match '/pages/tmux' => redirect("/products/4-humans-present-tmux")
resource :session, controller: 'sessions'
resources :sections, only: [:show] do
resources :registrations, only:... | 1 | 6,423 | Shouldn't this happen automatically with High Voltage? | thoughtbot-upcase | rb |
@@ -505,7 +505,7 @@ public class InitCodeTransformer {
InitValue initValue = initValueConfig.getResourceNameBindingValues().get(entityName);
switch (initValue.getType()) {
case Variable:
- entityValue = context.getNamer().localVarName(Name.from(initValue.getValue()));
+ ... | 1 | /* Copyright 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 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 ... | 1 | 23,957 | This is changed because we need `projectId` to be printed as `$projectId` in PHP. | googleapis-gapic-generator | java |
@@ -1,7 +1,7 @@
<div class="row">
<div class="col-md-12">
<h1>
- <%= _('Template History') %>
+ <%= templates.first.customization_of.present? ? _('Template Customisation History') : _('Template History') %>
<div class="pull-right">
<%= link_to _('View all templates'), referrer, class:... | 1 | <div class="row">
<div class="col-md-12">
<h1>
<%= _('Template History') %>
<div class="pull-right">
<%= link_to _('View all templates'), referrer, class: "btn btn-primary" %>
</div>
</h1>
<p><%= raw _('Here you can view previously published versions of your template. These can ... | 1 | 17,607 | This title change seems more accurate to me however not sure if this will confuse users. | DMPRoadmap-roadmap | rb |
@@ -117,7 +117,8 @@ private
# Some k/v's are wikipedia=http://en.wikipedia.org/wiki/Full%20URL
return nil if value =~ /^https?:\/\//
- if key == "wikipedia"
+ # match wikipedia or xxxxx:wikipedia
+ if key =~ /^(?:.*:)*wikipedia$/
# This regex should match Wikipedia language codes, everything... | 1 | module BrowseHelper
def printable_name(object, version=false)
if object.id.is_a?(Array)
id = object.id[0]
else
id = object.id
end
name = t 'printable_name.with_id', :id => id.to_s
if version
name = t 'printable_name.with_version', :id => name, :version => object.version.to_s
... | 1 | 9,401 | Here (and on line 158 as well), would it be more efficient to use the String end_with() method? Not tested | openstreetmap-openstreetmap-website | rb |
@@ -505,7 +505,13 @@ class RAMHandler(logging.Handler):
if record.levelno >= minlevel:
lines.append(fmt(record))
return '\n'.join(lines)
-
+
+ def change_log_capacity(self, capacity):
+ """
+ change log capacity according to user specifcation
+ """ ... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-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 | 15,572 | Why are you creating a new (second) `RAMHandler` here? Is this just an oversight from deleting the previous code? | qutebrowser-qutebrowser | py |
@@ -25,7 +25,11 @@ void CreateEdgeIndexProcessor::process(const cpp2::CreateEdgeIndexReq& req) {
auto ret = getEdgeIndexID(space, indexName);
if (ret.ok()) {
LOG(ERROR) << "Create Edge Index Failed: " << indexName << " have existed";
- resp_.set_code(cpp2::ErrorCode::E_EXISTED);
+ if (r... | 1 | /* Copyright (c) 2019 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "meta/processors/indexMan/CreateEdgeIndexProcessor.h"
namespace nebula {
namespace meta {
void CreateEdgeInde... | 1 | 26,294 | Move the line 27 to line 31 is better? | vesoft-inc-nebula | cpp |
@@ -4704,6 +4704,11 @@ func (fbo *folderBranchOps) applyMDUpdatesLocked(ctx context.Context,
return err
}
}
+ if rmd.IsRekeySet() {
+ fbo.rekeyFSM.Event(NewRekeyRequestEvent())
+ } else {
+ fbo.rekeyFSM.Event(NewRekeyNotNeededEvent())
+ }
appliedRevs = append(appliedRevs, rmd)
}
if len(applied... | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"fmt"
"os"
"reflect"
"strings"
"sync"
"time"
"github.com/keybase/backoff"
"github.com/keybase/client/go/libkb"
"github.com/keybase/cl... | 1 | 17,092 | In slack I mentioned we should only do this if the update is from some other device, to make sure our own updates don't cause issues. Maybe the revision check above is good enough to prevent this, but I just want to make sure you thought about it. | keybase-kbfs | go |
@@ -66,12 +66,6 @@ RSpec.configure do |config|
# particularly slow.
config.profile_examples = 10
- # Run specs in random order to surface order dependencies. If you find an
- # order dependency and want to debug it, you can fix the order by providing
- # the seed, which is printed after each run.
- # --... | 1 | # This file was generated by the `rspec --init` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require spec_helper` which will cause
# this file to always be loaded, without a need to explicitly require it in any
# file... | 1 | 18,403 | I would instead explain that random is the default, but you can switch back to defined, or another ordering scheme. | rspec-rspec-core | rb |
@@ -156,11 +156,15 @@ function isVisible(el, screenReader, recursed) {
}
// hidden from visual users
+ const elHeight = parseInt(style.getPropertyValue('height'));
if (
!screenReader &&
(isClipped(style) ||
style.getPropertyValue('opacity') === '0' ||
- (getScroll(el) && parseInt(style... | 1 | import getRootNode from './get-root-node';
import isOffscreen from './is-offscreen';
import findUp from './find-up';
import {
getScroll,
getNodeFromTree,
querySelectorAll,
escapeSelector
} from '../../core/utils';
const clipRegex = /rect\s*\(([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px,?\s*([0-9]+)px\s*\)/;
const ... | 1 | 16,618 | Is there a reason you left this at 0? | dequelabs-axe-core | js |
@@ -267,6 +267,11 @@ public final class RememberMeConfigurer<H extends HttpSecurityBuilder<H>>
validateInput();
String key = getKey();
RememberMeServices rememberMeServices = getRememberMeServices(http, key);
+ if (key == null) {
+ if (rememberMeServices instanceof AbstractRememberMeServices) {
+ key = (... | 1 | /*
* Copyright 2002-2015 the original author or 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 ap... | 1 | 10,625 | The value of `key` will never be `null` at this point, because `getKey()` will generate a value if it is `null`. | spring-projects-spring-security | java |
@@ -88,11 +88,18 @@ namespace Datadog.Trace.ClrProfiler
return null;
}
+ var commandType = command.GetType();
+ if (tracer.Settings.AdoNetExcludedTypes.Contains(commandType.FullName))
+ {
+ // AdoNet type disabled, don't create a scope, ski... | 1 | using System;
using System.Data;
using Datadog.Trace.ClrProfiler.Integrations.AdoNet;
using Datadog.Trace.Configuration;
using Datadog.Trace.ExtensionMethods;
using Datadog.Trace.Logging;
using Datadog.Trace.Tagging;
using Datadog.Trace.Util;
namespace Datadog.Trace.ClrProfiler
{
/// <summary>
/// Convenience ... | 1 | 18,543 | NIT: You should first check if AdoNetExcludedTypes.Count is greater than 0 before calling Contains (fast-path) | DataDog-dd-trace-dotnet | .cs |
@@ -18,6 +18,9 @@ package v1alpha1
import (
ndm "github.com/openebs/maya/pkg/apis/openebs.io/ndm/v1alpha1"
+
+ "strings"
+
errors "github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource" | 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 | 18,628 | should rearrange so as to follow import ordering. | openebs-maya | go |
@@ -65,7 +65,7 @@ func (s *validateOperationWorkflowModeStateSuite) TestCreateMode_UpdateCurrent()
stateToError := map[enumsspb.WorkflowExecutionState]bool{
enumsspb.WORKFLOW_EXECUTION_STATE_CREATED: false,
enumsspb.WORKFLOW_EXECUTION_STATE_RUNNING: false,
- enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED: tru... | 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 | 13,516 | what is the use case for create workflow with completed state? | temporalio-temporal | go |
@@ -0,0 +1,5 @@
+package org.openqa.selenium.grid.distributor.remote;
+
+public class RemoteDistributorTest {
+
+} | 1 | 1 | 16,857 | Probably best not to have an empty test.... | SeleniumHQ-selenium | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.