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 |
|---|---|---|---|---|---|---|---|
@@ -109,9 +109,8 @@ function TransactionBuilder(opts) {
this.lockTime = opts.lockTime || 0;
this.spendUnconfirmed = opts.spendUnconfirmed || false;
- if (opts.fee || opts.feeSat) {
- this.givenFeeSat = opts.fee ? opts.fee * util.COIN : opts.feeSat;
- }
+ this.givenFeeSat = typeof(opts.fee) !== 'undefined'... | 1 | // TransactionBuilder
// ==================
//
// Creates a bitcore Transaction object
//
//
// Synopsis
// --------
// ```
// var tx = (new TransactionBuilder(opts))
// .setUnspent(utxos)
// .setOutputs(outs)
// .sign(keys)
// .build();
//
//
// var builder = (new TransactionBuilder(opt... | 1 | 13,000 | `typeof` is not a function - its an operator, and the standard way to use it is as `typeof foo !== ...` (i.e. no parenthesis). Also, I would personally use `opts.fee != null` instead (with a non-strict comparison, which also identifies `undefined` values because `null == undefined`). | bitpay-bitcore | js |
@@ -855,6 +855,7 @@ class ReaderTest < Minitest::Test
end
test 'unreadable file referenced by include directive is replaced by warning' do
+ next if windows? # JRuby on Windows runs this even with the conditional on the block
include_file = File.join DIRNAME, 'fixtures', 'chapter-a.adoc'... | 1 | # frozen_string_literal: true
require_relative 'test_helper'
class ReaderTest < Minitest::Test
DIRNAME = ASCIIDOCTOR_TEST_DIR
SAMPLE_DATA = ['first line', 'second line', 'third line']
context 'Reader' do
context 'Prepare lines' do
test 'should prepare lines from Array data' do
reader = Asciid... | 1 | 6,840 | Is there a reason why you're not using Rspec `skip`? It allows to specify message and makes it clearly visible in test results which tests were skipped. | asciidoctor-asciidoctor | rb |
@@ -36,6 +36,10 @@ type ClusterSyncStatus struct {
// Conditions is a list of conditions associated with syncing to the cluster.
// +optional
Conditions []ClusterSyncCondition `json:"conditions,omitempty"`
+
+ // FirstSyncSetsSuccessTime is the time we first successfully applied all (selector)syncsets to a cluste... | 1 | package v1alpha1
import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ClusterSync is the status of all of the SelectorSyncSets and SyncSets that apply to a ClusterDeployment.
// +k8s:openapi-gen=... | 1 | 14,635 | how about "all matching SyncSets and SelectorSyncSets" | openshift-hive | go |
@@ -331,7 +331,7 @@ void Storage::PopulateLayout(DataLayout &layout)
// load geometries sizes
{
- io::FileReader reader(config.geometries_path, io::FileReader::HasNoFingerprint);
+ io::FileReader reader(config.geometries_path, io::FileReader::VerifyFingerprint);
const auto number_of... | 1 | #include "storage/storage.hpp"
#include "storage/io.hpp"
#include "storage/shared_datatype.hpp"
#include "storage/shared_memory.hpp"
#include "storage/shared_memory_ownership.hpp"
#include "storage/shared_monitor.hpp"
#include "contractor/files.hpp"
#include "contractor/query_graph.hpp"
#include "customizer/edge_bas... | 1 | 21,183 | What is the logic behind `ReadVectorSize` reading `CountElement64`, then skipping `T` (in this case `unsigned`)? Naming doesn't cover what's actually happening here. Ideally I'd also take this through a `files` layer, any input as to how? | Project-OSRM-osrm-backend | cpp |
@@ -24,6 +24,7 @@ import org.apache.solr.common.params.CommonParams;
import org.apache.solr.core.CoreContainer;
import org.apache.solr.core.SolrCore;
+import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
| 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 | 33,527 | This looks like an unused import to me? | apache-lucene-solr | java |
@@ -231,13 +231,13 @@ func taskListInfoFromBlob(b []byte, proto string) (*sqlblobs.TaskListInfo, error
return result, thriftRWDecode(b, proto, result)
}
-func transferTaskInfoToBlob(info *sqlblobs.TransferTaskInfo) (p.DataBlob, error) {
- return thriftRWEncode(info)
+func TransferTaskInfoToBlob(info *persistencebl... | 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 | 9,295 | `RW` means read/write. Why do we have it here, as part of a func name? | temporalio-temporal | go |
@@ -61,7 +61,7 @@ class UnboundZmqEventBus implements EventBus {
return thread;
});
- LOG.info(String.format("Connecting to %s and %s", publishConnection, subscribeConnection));
+ LOG.finest(String.format("Connecting to %s and %s", publishConnection, subscribeConnection));
sub = context.creat... | 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 | 16,464 | I'd keep this at `info` level... | SeleniumHQ-selenium | java |
@@ -1051,7 +1051,11 @@ static ssize_t expect_preface(h2o_http2_conn_t *conn, const uint8_t *src, size_t
}
{ /* send SETTINGS and connection-level WINDOW_UPDATE */
- h2o_iovec_t vec = h2o_buffer_reserve(&conn->_write.buf, SERVER_PREFACE.len);
+ h2o_iovec_t vec = h2o_buffer_try_reserve(&conn->_w... | 1 | /*
* Copyright (c) 2014-2016 DeNA Co., Ltd., Kazuho Oku, Fastly, 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... | 1 | 13,657 | I think you missed this. | h2o-h2o | c |
@@ -145,6 +145,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
return _requestStream.ReadAsync(buffer, offset, count, cancellationToken);
}
+#if NETCOREAPP2_1
+ public override ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken cancellationToken = ... | 1 | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
{... | 1 | 15,853 | List all of the current TFMs so we know if this gets outdated. E.g. this breaks if we add 2.2. | aspnet-KestrelHttpServer | .cs |
@@ -811,6 +811,12 @@ func (s *VolumeServer) mergeVolumeSpecs(vol *api.VolumeSpec, req *api.VolumeSpec
spec.ExportSpec = vol.GetExportSpec()
}
+ // Xattr
+ if req.GetXattr() >= 0 {
+ spec.Xattr = req.GetXattr()
+ } else {
+ spec.Xattr = vol.GetXattr()
+ }
return spec
}
| 1 | /*
Package sdk is the gRPC implementation of the SDK gRPC server
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,601 | here, you want to use req.GetXattrOpt() referring to the in line 514 of api.proto. This will be nil if not provided. See the example above on line 801 on this file | libopenstorage-openstorage | go |
@@ -952,7 +952,14 @@ public class LocalPSMP extends PlaybackServiceMediaPlayer {
// Load next episode if previous episode was in the queue and if there
// is an episode in the queue left.
// Start playback immediately if continuous playback is enabled
- ... | 1 | package de.danoeh.antennapod.core.service.playback;
import android.app.UiModeManager;
import android.content.Context;
import android.content.res.Configuration;
import android.media.AudioManager;
import android.os.PowerManager;
import androidx.annotation.NonNull;
import android.telephony.TelephonyManager;
import androi... | 1 | 20,661 | I think this should be done outside LocalPSMP, but in `getNextInQueue`. The reason is that I want to reduce the dependence of the media players on the preferences and database. Also, it will then probably work on Chromecast. | AntennaPod-AntennaPod | java |
@@ -143,7 +143,9 @@ struct _hiprtcProgram {
{
using namespace std;
- name = hip_impl::demangle(name.c_str());
+ char* demangled = hip_impl::demangle(name.c_str());
+ name.assign(demangled == nullptr ? "" : demangled);
+ free(demangled);
if (name.empty()) return nam... | 1 | /*
Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to us... | 1 | 8,690 | Please remove it or remove all `std::` namespace prefixes. | ROCm-Developer-Tools-HIP | cpp |
@@ -0,0 +1,17 @@
+// Copyright (C) 2019-2020 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
+// Licen... | 1 | 1 | 40,520 | wait! I'm confused - is that an empty file ?! | algorand-go-algorand | go | |
@@ -19,14 +19,14 @@ var phrasingElements = ['A', 'EM', 'STRONG', 'SMALL', 'MARK', 'ABBR', 'DFN', 'I'
* @param {HTMLElement} element The HTMLElement
* @return {HTMLElement} The label element, or null if none is found
*/
-function findLabel({ actualNode }) {
+function findLabel(virtualNode) {
let label;
- if (act... | 1 | /* global text, dom, aria, axe */
/* jshint maxstatements: 27, maxcomplexity: 19 */
var defaultButtonValues = {
submit: 'Submit',
reset: 'Reset'
};
var inputTypes = ['text', 'search', 'tel', 'url', 'email', 'date', 'time', 'number', 'range', 'color'];
var phrasingElements = ['A', 'EM', 'STRONG', 'SMALL', 'MARK', 'A... | 1 | 12,041 | These should all call `findUpVirtual`. | dequelabs-axe-core | js |
@@ -105,7 +105,7 @@ class HierarchicHTTPRequest(HTTPRequest):
file_dict["path"] = path
mime = mimetypes.guess_type(file_dict["path"])[0] or "application/octet-stream"
- file_dict.get('mime-type', mime)
+ file_dict["mime-type"] = mime
self.content_encoding = sel... | 1 | """
Copyright 2017 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 or agreed to in writing, software... | 1 | 14,724 | This changes the behavior. Original behavior was "set if not set", while new is "just set". | Blazemeter-taurus | py |
@@ -110,7 +110,7 @@ public final class DefaultBearerTokenResolver implements BearerTokenResolver {
throw new OAuth2AuthenticationException(error);
}
- return matcher.group("token");
+ return authorization.substring(7);
}
return null;
} | 1 | /*
* Copyright 2002-2020 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 1 | 15,575 | Let's keep using the regular expression to make sure that the token is well-formed. I think the regular expression should be altered instead of doing a substring. | spring-projects-spring-security | java |
@@ -26,10 +26,10 @@ public final class Array<T> implements Kind1<Array<?>, T>, IndexedSeq<T>, Serial
private static final Array<?> EMPTY = new Array<>(new Object[0]);
- private final Object[] back;
+ private final Object[] delegate;
- private Array(Object[] back) {
- this.back = back;
+ pr... | 1 | /* / \____ _ _ ____ ______ / \ ____ __ _______
* / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG
* _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2016 Javaslang, http://javaslang.io
* /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ ... | 1 | 8,976 | All the operations are delegated to this entity, hence the rename. `back` can have too many meanings. | vavr-io-vavr | java |
@@ -561,16 +561,9 @@ module Beaker
block_on host do |host|
skip_msg = host.skip_set_env?
- if skip_msg.nil?
- env = construct_env(host, opts)
- logger.debug("setting local environment on #{host.name}")
- if host['platform'] =~ /windows/ and host.is_cygwin?
- ... | 1 | require 'pathname'
[ 'command', "dsl" ].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',... | 1 | 15,799 | @trevor-vaughan it looks like the spec failures are caused by the fact that although it was a great idea to put the guard clause here first & get the error case out of the way, the main code path has been erased when I assume it should be just below the guard clause. | voxpupuli-beaker | rb |
@@ -22,6 +22,7 @@ import (
"github.com/algorand/go-algorand/config"
"github.com/algorand/go-algorand/data/basics"
"github.com/algorand/go-algorand/logging"
+ "github.com/algorand/go-algorand/protocol"
)
var filterTimeout = 2 * config.Protocol.SmallLambda | 1 | // Copyright (C) 2019-2020 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) ... | 1 | 39,895 | Could you delete this constant? | algorand-go-algorand | go |
@@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
+using BenchmarkDotNet.Disassemblers;
using BenchmarkDotNet.Exporters;
using BenchmarkDotNet.Loggers;
using BenchmarkDotNet.Parameters; | 1 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using BenchmarkDotNet.Exporters;
using BenchmarkDotNet.Loggers;
using BenchmarkDotNet.Parameters;
using BenchmarkDo... | 1 | 11,599 | looks like this snuck in from your other change? | dotnet-performance | .cs |
@@ -10,11 +10,6 @@ module Ncr
BUILDING_NUMBERS = YAML.load_file("#{Rails.root}/config/data/ncr/building_numbers.yml")
class WorkOrder < ActiveRecord::Base
- NCR_BA61_TIER1_BUDGET_APPROVER_MAILBOX = ENV['NCR_BA61_TIER1_BUDGET_MAILBOX'] || 'communicart.budget.approver+ba61@gmail.com'
- NCR_BA61_TIER2_BU... | 1 | require 'csv'
module Ncr
# Make sure all table names use 'ncr_XXX'
def self.table_name_prefix
'ncr_'
end
EXPENSE_TYPES = %w(BA60 BA61 BA80)
BUILDING_NUMBERS = YAML.load_file("#{Rails.root}/config/data/ncr/building_numbers.yml")
class WorkOrder < ActiveRecord::Base
NCR_BA61_TIER1_BUDGET_APPROVER... | 1 | 15,241 | These env vars are not set in any CF environment, on purpose, because we are moving away from using env vars to store role-based information and instead using the database. So in a CF environment, the wrong emails get used (the defaults, rather than what is in the db). | 18F-C2 | rb |
@@ -1,4 +1,4 @@
-<%# locals: { question, answer, readonly, locking } %>
+<%# locals: { template, question, answer, readonly, locking } %>
<!--
This partial creates a form for each type of question. The local variables are: plan, answer, question, readonly
--> | 1 | <%# locals: { question, answer, readonly, locking } %>
<!--
This partial creates a form for each type of question. The local variables are: plan, answer, question, readonly
-->
<!-- Question text -->
<% q_format = question.question_format %>
<% if q_format.rda_metadata? %>
<p>
<strong><%= raw question.text %></... | 1 | 17,505 | this partial is used also for previewing a template, did you test if still works? | DMPRoadmap-roadmap | rb |
@@ -22,6 +22,19 @@ import (
"github.com/spf13/cobra"
)
+var (
+ appInitAppTypePrompt = "Which type of " + color.Emphasize("infrastructure pattern") + " best represents your application?"
+ appInitAppTypeHelpPrompt = `Your application's architecture. Most applications need additional AWS resources to run.
+To h... | 1 | // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"errors"
"fmt"
"os"
"path/filepath"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/archer"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/aws/session"
"github.com/aws/amazon-e... | 1 | 11,530 | Would it be better to put like `Which Dockerfile would you like to use for %s?` | aws-copilot-cli | go |
@@ -3636,8 +3636,8 @@ Model.hydrate = function(obj) {
* @see response http://docs.mongodb.org/v2.6/reference/command/update/#output
* @param {Object} filter
* @param {Object} doc
- * @param {Object} [options] optional see [`Query.prototype.setOptions()`](http://mongoosejs.com/docs/api.html#query_Query-setOptions)... | 1 | 'use strict';
/*!
* Module dependencies.
*/
const Aggregate = require('./aggregate');
const ChangeStream = require('./cursor/ChangeStream');
const Document = require('./document');
const DocumentNotFoundError = require('./error/notFound');
const DivergentArrayError = require('./error/divergentArray');
const EventEm... | 1 | 14,260 | You mistakenly removed `/docs` here, please add it | Automattic-mongoose | js |
@@ -48,8 +48,9 @@ public interface FileAppender<D> extends Closeable {
long length();
/**
- * @return a list of offsets for file blocks if applicable, null otherwise. When available, this
+ * @return a list of offsets for file blocks, if applicable, null otherwise. When available, this
* information is ... | 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 | 13,464 | I missed this earlier, but why does this say "file blocks"? This should probably be "recommended split locations". | apache-iceberg | java |
@@ -33,10 +33,10 @@ import (
// AlertsServer implements api.OpenStorageAlertsServer.
// In order to use this server implementation just have
// AlertsServer pointer properly instantiated with a valid
-// alerts.Reader.
+// alerts.FilterDeleter.
type AlertsServer struct {
- // Reader holds pointer to alerts Reader
-... | 1 | /*
Package sdk is the gRPC implementation of the SDK gRPC server
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 | 7,387 | Please change this to non-exported. | libopenstorage-openstorage | go |
@@ -4649,10 +4649,7 @@ stats_get_snapshot(dr_stats_t *drstats)
if (!GLOBAL_STATS_ON())
return false;
CLIENT_ASSERT(drstats != NULL, "Expected non-null value for parameter drstats.");
- /* We are at V1 of the structure, and we can't return less than the one
- * field. We need to remove this ass... | 1 | /* **********************************************************
* Copyright (c) 2017 ARM Limited. All rights reserved.
* Copyright (c) 2010-2017 Google, Inc. All rights reserved.
* Copyright (c) 2000-2010 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistri... | 1 | 13,406 | This is ignoring compatibility: it needs to check the size to ensure this field exists in the client. | DynamoRIO-dynamorio | c |
@@ -96,10 +96,11 @@ public class RoundChangePayloadValidator {
return false;
}
- if (certificate.getPreparePayloads().size() < minimumPrepareMessages) {
+ if (certificate.getPreparePayloads().stream().map(SignedData::getAuthor).distinct().count()
+ < minimumPrepareMessages) {
LOG.info(... | 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 | 24,044 | Do all the prepare authors also need to be unique? Or is it enough the we have minimumPrepareMessages. I guess I'm wondering if need a hasDuplicateAuthors check like in the RoundChangeCertificateValidator. | hyperledger-besu | java |
@@ -4,12 +4,17 @@ package stdlib
import (
_ "github.com/influxdata/flux/stdlib/csv"
+ _ "github.com/influxdata/flux/stdlib/date"
_ "github.com/influxdata/flux/stdlib/generate"
_ "github.com/influxdata/flux/stdlib/http"
_ "github.com/influxdata/flux/stdlib/influxdata/influxdb"
_ "github.com/influxdata/flux/... | 1 | // DO NOT EDIT: This file is autogenerated via the builtin command.
package stdlib
import (
_ "github.com/influxdata/flux/stdlib/csv"
_ "github.com/influxdata/flux/stdlib/generate"
_ "github.com/influxdata/flux/stdlib/http"
_ "github.com/influxdata/flux/stdlib/influxdata/influxdb"
_ "github.com/influxdata/flux/s... | 1 | 11,271 | we had some situations where we merged some promql bits then took them out. i'm not sure what's going on here, but unless your code actually needs promql (probably not?) let's remove this line. | influxdata-flux | go |
@@ -32,9 +32,9 @@ class SettingValueDataFixture extends AbstractReferenceFixture implements Depend
{
$termsAndConditions = $this->getReference(ArticleDataFixture::ARTICLE_TERMS_AND_CONDITIONS_1);
$privacyPolicy = $this->getReference(ArticleDataFixture::ARTICLE_PRIVACY_POLICY_1);
- /* @var ... | 1 | <?php
declare(strict_types=1);
namespace Shopsys\ShopBundle\DataFixtures\Demo;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Shopsys\FrameworkBundle\Component\DataFixture\AbstractReferenceFixture;
use Shopsys\FrameworkBundle\Component\Domain\Domain;
us... | 1 | 18,623 | Annotations in this hunk should follow PhpDoc style (above the occurrence, type first) | shopsys-shopsys | php |
@@ -100,7 +100,7 @@ public class Wildcard implements Type {
} else if (type == BoundType.EXTENDS) {
return "? extends " + boundedType.describe();
} else {
- throw new UnsupportedOperationException();
+ throw new UnsupportedOperationException(String.format("%s is not ... | 1 | /*
* Copyright 2016 Federico Tomassetti
*
* 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... | 1 | 14,157 | This is an improvement - thanks! Could we rephrase slightly to not use the phrase "is not supported" -- instead stating _WHAT_ isn't valid please? e.g. maybe `String.format("Unsupported BoundType provided: %s" type)` or something like that. | javaparser-javaparser | java |
@@ -30,7 +30,7 @@ type linuxWatcher struct {
gid uint32
pid int32
mtx sync.Mutex
- procfh *os.File
+ procfh int
starttime string
uid uint32
} | 1 | // +build linux
package peertracker
import (
"errors"
"fmt"
"io/ioutil"
"os"
"strings"
"sync"
"syscall"
)
type linuxTracker struct{}
func newTracker() (linuxTracker, error) {
return linuxTracker{}, nil
}
func (linuxTracker) NewWatcher(info CallerInfo) (Watcher, error) {
return newLinuxWatcher(info)
}
fun... | 1 | 11,900 | nit: `procfd` seems more appropriate now? | spiffe-spire | go |
@@ -1045,6 +1045,10 @@ def access_put(owner, package_name, user):
"Only the package owner can grant access"
)
+ django_headers = {
+ AUTHORIZATION_HEADER: g.auth_header
+ }
+
package = (
Package.query
.with_for_update() | 1 | # Copyright (c) 2017 Quilt Data, Inc. All rights reserved.
"""
API routes.
"""
from datetime import timedelta, timezone
from functools import wraps
import json
import time
from urllib.parse import urlencode
import boto3
from flask import abort, g, redirect, render_template, request, Response
from flask_cors import C... | 1 | 15,649 | Let's not call it django. Maybe `auth_provider_headers`? `auth_headers`? | quiltdata-quilt | py |
@@ -252,7 +252,8 @@ func (s *Server) isClientAuthorized(c *client) bool {
tlsMap := s.opts.TLSMap
s.optsMu.RUnlock()
- // Check custom auth first, then jwts, then nkeys, then multiple users, then token, then single user/pass.
+ // Check custom auth first, then jwts, then nkeys, then
+ // multiple users, then toke... | 1 | // Copyright 2012-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 ... | 1 | 8,699 | Should we mention TLS map here? | nats-io-nats-server | go |
@@ -25,9 +25,12 @@
package net.runelite.client.plugins.playerindicators;
import java.awt.Color;
+
+import net.runelite.api.ClanMemberRank;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigItem;
+import net.runelite.client.config.Rang... | 1 | /*
* Copyright (c) 2018, Tomas Slusny <slusnucky@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, thi... | 1 | 14,800 | remove this empty line pl0x | open-osrs-runelite | java |
@@ -34,4 +34,10 @@ class NcrDispatcher < LinearDispatcher
end
}
end
+
+ def on_approver_removal(proposal, approvers)
+ approvers.each{|approver|
+ CommunicartMailer.notification_for_subscriber(approver.email_address,proposal,"removed").deliver_now
+ }
+ end
end | 1 | # This is a temporary way to handle a notification preference
# that will eventually be managed at the user level
# https://www.pivotaltracker.com/story/show/87656734
class NcrDispatcher < LinearDispatcher
def requires_approval_notice?(approval)
final_approval(approval.proposal) == approval
end
def final_a... | 1 | 13,663 | Why not have this in the `Dispatcher`? Doesn't seem like NCR-specific functionality. | 18F-C2 | rb |
@@ -26,6 +26,11 @@ import (
)
func CreateTestKV(t *testing.T) kv.RwDB {
+ s, _, _ := CreateTestSentry(t)
+ return s.DB
+}
+
+func CreateTestSentry(t *testing.T) (*stages.MockSentry, *core.ChainPack, []*core.ChainPack) {
// Configure and generate a sample block chain
var (
key, _ = crypto.HexToECDSA("b71c71... | 1 | package rpcdaemontest
import (
"context"
"encoding/binary"
"math/big"
"net"
"testing"
"github.com/holiman/uint256"
"github.com/ledgerwatch/erigon-lib/gointerfaces/txpool"
"github.com/ledgerwatch/erigon-lib/kv"
"github.com/ledgerwatch/erigon/accounts/abi/bind"
"github.com/ledgerwatch/erigon/accounts/abi/bind... | 1 | 22,569 | If you need only test db, use `memdb.NewTestDB(t)` | ledgerwatch-erigon | go |
@@ -533,7 +533,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
await ProduceEnd();
// ForZeroContentLength does not complete the reader nor the writer
- if (!messageBody.IsEmpty && _keepAlive)
+ ... | 1 | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Buffers;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Pipelines;
using System... | 1 | 14,772 | I'm not sure I like setting the IsEmpty property true for upgraded connections since it feels a middle misleading. Maybe we can leave the ForUpgrade class as is and change this condition to `if (!messageBody.IsEmpty && !messageBody.RequestUpgrade)` to make things more explicit. | aspnet-KestrelHttpServer | .cs |
@@ -141,7 +141,7 @@ ActiveRecord::Schema.define(version: 20151123235600) do
t.integer "client_data_id"
t.string "client_data_type", limit: 255
t.integer "requester_id"
- t.string "public_id"
+ t.string "public_id", limit: 255
end
add_index "proposals", ["client_data_id", "cli... | 1 | # encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative sou... | 1 | 15,754 | git checkout since this is unrelated to this PR? (running migrations also changes this for me -- not sure why it keeps going back and forth | 18F-C2 | rb |
@@ -154,7 +154,7 @@ class _TLSSignature(_GenericTLSSessionInheritance):
#XXX 'sig_alg' should be set in __init__ depending on the context.
"""
name = "TLS Digital Signature"
- fields_desc = [SigAndHashAlgField("sig_alg", 0x0401, _tls_hash_sig),
+ fields_desc = [SigAndHashAlgField("sig_alg", 0x0804,... | 1 | # This file is part of Scapy
# Copyright (C) 2007, 2008, 2009 Arnaud Ebalard
# 2015, 2016, 2017 Maxence Tury
# This program is published under a GPLv2 license
"""
TLS key exchange logic.
"""
from __future__ import absolute_import
import math
import struct
from scapy.config import conf, crypto_validator... | 1 | 17,446 | Is this change needed? | secdev-scapy | py |
@@ -1321,7 +1321,7 @@ void MolPickler::_pickleAtom(std::ostream &ss, const Atom *atom) {
streamWrite(ss, ENDQUERY);
}
if (getAtomMapNumber(atom, tmpInt)) {
- if (tmpInt < 128) {
+ if (tmpInt >= 0 && tmpInt < 128) {
tmpChar = static_cast<char>(tmpInt % 128);
streamWrite(ss, ATOM_MAPNUMBER,... | 1 | //
// Copyright (C) 2001-2018 Greg Landrum and Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <GraphMol/R... | 1 | 17,011 | Isn't the % 128 redundant here? | rdkit-rdkit | cpp |
@@ -34,7 +34,9 @@ func TestCmdMarshalProto(t *testing.T) {
"sticky": false,
"group_enforced": false,
"compressed": false,
- "cascaded": false
+ "cascaded": false,
+ "loopdev": false,
+ "ramdisk": false
}`,
data,
) | 1 | package cli
import (
"testing"
"github.com/libopenstorage/openstorage/api"
"github.com/stretchr/testify/require"
)
func TestCmdMarshalProto(t *testing.T) {
volumeSpec := &api.VolumeSpec{
Size: 64,
Format: api.FSType_FS_TYPE_EXT4,
}
data := cmdMarshalProto(volumeSpec, false)
require.Equal(
t,
`{
"ep... | 1 | 6,239 | Are you testing that the values are always false? I think you should test for setting values to true or false, right? Who is going to take action with these values? | libopenstorage-openstorage | go |
@@ -35,6 +35,9 @@ extern const struct batch_queue_module batch_queue_wq;
extern const struct batch_queue_module batch_queue_mesos;
extern const struct batch_queue_module batch_queue_k8s;
extern const struct batch_queue_module batch_queue_dryrun;
+#ifdef MPI
+extern const struct batch_queue_module batch_queue_mpi;
+#... | 1 | /*
Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
Copyright (C) 2005- The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "batch_job.h"
#include "batch_job_internal.h"
#include "debug.h"
#include "itable.h... | 1 | 14,413 | Please change MPI to CCTOOLS_WITH_MPI | cooperative-computing-lab-cctools | c |
@@ -16,6 +16,11 @@
#include "oneapi/dal/algo/decision_forest/common.hpp"
#include "oneapi/dal/algo/decision_forest/detail/model_impl.hpp"
+#include "oneapi/dal/exceptions.hpp"
+
+#define DAL_CHECK_DOMAIN_COND(cond, description) \
+ if (!(cond)) \
+ throw domain_error(descri... | 1 | /*******************************************************************************
* Copyright 2020 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.o... | 1 | 24,060 | Why you can't use function here? | oneapi-src-oneDAL | cpp |
@@ -0,0 +1,16 @@
+// Copyright 2018 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/
+//
+... | 1 | 1 | 21,017 | We should scope this down to only the methods we use. | aws-amazon-ecs-agent | go | |
@@ -800,7 +800,7 @@ public final class HashSet<T> implements Set<T>, Serializable {
@Override
public String toString() {
- return mkString(", ", "HashSet(", ")");
+ return mkString("HashSet(", ", ", ")");
}
private static <T> HashArrayMappedTrie<T, T> addAll(HashArrayMappedTrie<T, ... | 1 | /* / \____ _ _ ____ ______ / \ ____ __ _ _____
* / / \/ \ / \/ \ / /\__\/ // \/ \ / / _ \ Javaslang
* _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \__/ / Copyright 2014-now Daniel Dietrich
* /___/\_/ \_/\____/\_/ \_/\__\/__/___\_/ \_// \__/_____/ Licensed under... | 1 | 6,689 | Oh, thanks for catching - I thought I've catched all after changing `mkString(infix, prefix, suffix)` to `mkString(prefix, infix, suffix)`. | vavr-io-vavr | java |
@@ -33,6 +33,14 @@ const (
// Issued indicates that a CertificateRequest has been completed, and that
// the `status.certificate` field is set.
CertificateRequestReasonIssued = "Issued"
+
+ // Approved indicates that a CertificateRequest has been approved by the
+ // approver, and the CertificateRequest is ready ... | 1 | /*
Copyright 2020 The cert-manager 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 | 25,467 | Suggestion: `.. the CertificateRequest is ready for signing` - could we perhaps word this differently? I understand that in this case it will be the associated X.509 certificate that can now be signed, so maybe `the certificate is ready for signing` ? (Same with `CertificateRequestReasonDenied`). | jetstack-cert-manager | go |
@@ -54,6 +54,10 @@ export default function PropertySelect() {
}
}, [ propertyID, selectProperty ] );
+ if ( ! accountID ) {
+ return null;
+ }
+
if ( isLoading ) {
return <ProgressBar small />;
} | 1 | /**
* GA4 Property Select component.
*
* Site Kit by Google, Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE... | 1 | 38,334 | We should use `! isValidAccountID( accountID )` for the `accountID` checks. | google-site-kit-wp | js |
@@ -6,7 +6,9 @@ require 'bolt/error'
module Bolt
class Target
attr_reader :uri, :options
- attr_writer :inventory
+ # CODEREVIEW: this feels wrong. The altertative is threading inventory through the
+ # executor to the RemoteTransport
+ attr_accessor :inventory
PRINT_OPTS ||= %w[host user po... | 1 | # frozen_string_literal: true
require 'addressable/uri'
require 'bolt/error'
module Bolt
class Target
attr_reader :uri, :options
attr_writer :inventory
PRINT_OPTS ||= %w[host user port protocol].freeze
# Satisfies the Puppet datatypes API
def self.from_asserted_hash(hash)
new(hash['uri']... | 1 | 10,096 | That alternative does seem better. Did you want to try to do it in this PR? It makes sense to me that the inventory would always be available before creating the executor. | puppetlabs-bolt | rb |
@@ -545,8 +545,12 @@ module Beaker
on host, "apt-get install -y hiera=#{opts[:hiera_version]}-1puppetlabs1"
end
- puppet_pkg = opts[:version] ? "puppet=#{opts[:version]}-1puppetlabs1" : 'puppet'
- on host, "apt-get install -y #{puppet_pkg}"
+ if opts[:version]
+ on ho... | 1 | require 'pathname'
module Beaker
module DSL
#
# This module contains methods to help cloning, extracting git info,
# ordering of Puppet packages, and installing ruby projects that
# contain an `install.rb` script.
#
# To mix this is into a class you need the following:
# * a method *hosts... | 1 | 6,383 | Missing the `-y` argument which all other `apt-get install` commands have. | voxpupuli-beaker | rb |
@@ -1295,7 +1295,8 @@ bool CoreChecks::ValidatePipelineUnlocked(const PIPELINE_STATE *pPipeline, uint3
auto subpass_desc = &pPipeline->rp_state->createInfo.pSubpasses[pPipeline->graphicsPipelineCI.subpass];
if (pPipeline->graphicsPipelineCI.subpass >= pPipeline->rp_state->createInfo.subpassCount) {
s... | 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 | 19,009 | So I think we are going to settle on the "concise and elegant" `PRI` macros as they are the safest option for now. Even though they make my eyes bleed a little... | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -112,7 +112,7 @@ func (r *Replacer) ReplaceFunc(input string, f ReplacementFunc) (string, error)
func (r *Replacer) replace(input, empty string,
treatUnknownAsEmpty, errOnEmpty, errOnUnknown bool,
f ReplacementFunc) (string, error) {
- if !strings.Contains(input, string(phOpen)) {
+ if !strings.Contains(input, ... | 1 | // Copyright 2015 Matthew Holt and The Caddy 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 applicab... | 1 | 14,291 | Interesting, was this needed for a test case to pass? I figured if there is no opening brace, there is definitely no placeholder -- we don't even have to check for a closing one. | caddyserver-caddy | go |
@@ -122,8 +122,10 @@ ChainLoop:
return []explorer.Transfer{}, err
}
- for i := len(blk.Transfers) - 1; i >= 0; i-- {
- if showCoinBase || !blk.Transfers[i].IsCoinbase() {
+ transfers, _, _ := action.ClassifyActions(blk.Actions)
+
+ for i := len(transfers) - 1; i >= 0; i-- {
+ if showCoinBase || !transfe... | 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 | 12,880 | I think we want to provide getAction API instead | iotexproject-iotex-core | go |
@@ -117,12 +117,7 @@ class SynthDriver(SynthDriver):
@classmethod
def check(cls):
- if not hasattr(sys, "frozen"):
- # #3793: Source copies don't report the correct version on Windows 10 because Python isn't manifested for higher versions.
- # We want this driver to work for source copies on Windows 10, so j... | 1 | #synthDrivers/oneCore.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2016-2019 Tyler Spivey, NV Access Limited, James Teh, Leonard de Ruijter
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
"""Synth driver for Windows OneCore voices.
"""
import o... | 1 | 26,162 | There is also `winVersion.isWin10`. I think this should be converted to use the helper function. The helper has a note that it doesn't work in source copies, but looking at the implementation it looks equivalent to what you have here. | nvaccess-nvda | py |
@@ -37,6 +37,7 @@ RSpec.configure do |config|
config.use_transactional_fixtures = false
config.use_instantiated_fixtures = false
config.fixture_path = "#{::Rails.root}/spec/fixtures"
+ config.fail_fast = true
config.include Paperclip::Shoulda::Matchers
config.include EmailSpec::Helpers | 1 | require 'codeclimate-test-reporter'
CodeClimate::TestReporter.configure do |config|
config.logger.level = Logger::WARN
end
CodeClimate::TestReporter.start
if ENV["COVERAGE"]
require 'simplecov'
SimpleCov.start 'rails'
end
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)... | 1 | 9,113 | This doesn't seem like it should be part of this pull request. | thoughtbot-upcase | rb |
@@ -4,6 +4,7 @@ class ProductsController < ApplicationController
def show
@product = Product.find(params[:id])
+ @offering = @product
@viewable_subscription = ViewableSubscription.new(current_user, subscription_product)
if signed_in? && @product.purchase_for(current_user) | 1 | class ProductsController < ApplicationController
def index
end
def show
@product = Product.find(params[:id])
@viewable_subscription = ViewableSubscription.new(current_user, subscription_product)
if signed_in? && @product.purchase_for(current_user)
redirect_to @product.purchase_for(current_user... | 1 | 7,128 | Is the idea that `@product` (and `@workshop` for `workshops_controller`) would eventually go away here? | thoughtbot-upcase | rb |
@@ -0,0 +1,8 @@
+package headerdownload
+
+var bscMainnetPreverifiedHashes = []string{
+ "0d21840abff46b96c84b2ac9e10e4f5cdaeb5693cb665db62a2f3b02d2d57b5b",
+ "04055304e432294a65ff31069c4d3092ff8b58f009cdb50eba5351e0332ad0f6",
+}
+
+const bscMainnetPreverifiedHeight uint64 = 1 | 1 | 1 | 22,958 | We should add those only once we have successfully synced to the BSC main net, we have a utility to generate those. Please remove for now | ledgerwatch-erigon | go | |
@@ -376,7 +376,7 @@ def test_set_env_from_file(config_instance):
def test_set_env_from_file_returns_original_env_when_env_file_not_found(
- config_instance
+ config_instance,
):
env = config.set_env_from_file({}, 'file-not-found')
| 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,305 | And how is that related? | ansible-community-molecule | py |
@@ -55,7 +55,8 @@ func AdminAddOrUpdateRemoteCluster(c *cli.Context) {
defer cancel()
_, err := adminClient.AddOrUpdateRemoteCluster(ctx, &adminservice.AddOrUpdateRemoteClusterRequest{
- FrontendAddress: getRequiredOption(c, FlagFrontendAddressWithAlias),
+ FrontendAddress: c.String(FlagFrontendAd... | 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,420 | this should be required | temporalio-temporal | go |
@@ -18,6 +18,7 @@ import com.google.api.codegen.SnippetSetRunner;
import com.google.auto.value.AutoValue;
import java.util.List;
import javax.annotation.Nullable;
+import javax.validation.constraints.Null;
@AutoValue
public abstract class DynamicLangXApiView implements ViewModel { | 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,586 | This appears to be unused | googleapis-gapic-generator | java |
@@ -63,6 +63,19 @@ public class SnapshotUtil {
return ancestorIds(table.currentSnapshot(), table::snapshot);
}
+ /**
+ * Traverses the history of the table's state and finds the oldest Snapshot.
+ * @return null if the table is empty, else the oldest Snapshot.
+ */
+ public static Snapshot oldestSnaps... | 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 | 38,183 | I think that "table's state" isn't clear enough. How about "history of the table's current snapshot" like the one below? | apache-iceberg | java |
@@ -457,3 +457,17 @@ instr_is_exclusive_store(instr_t *instr)
}
return false;
}
+
+DR_API
+bool
+instr_is_scatter(instr_t *instr)
+{
+ return false;
+}
+
+DR_API
+bool
+instr_is_gather(instr_t *instr)
+{
+ return false;
+} | 1 | /* **********************************************************
* Copyright (c) 2017 Google, Inc. All rights reserved.
* Copyright (c) 2016 ARM Limited. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
* modif... | 1 | 18,983 | This looks like a bug: pretty sure there are scatter-gather instructions on AArch64. Ditto below. | DynamoRIO-dynamorio | c |
@@ -55,9 +55,10 @@ func Mux(pattern string, mux *http.ServeMux) InboundOption {
// sharing this transport.
func (t *Transport) NewInbound(addr string, opts ...InboundOption) *Inbound {
i := &Inbound{
- once: sync.Once(),
- addr: addr,
- tracer: t.tracer,
+ once: sync.Once(),
+ addr: addr,
+ trac... | 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 | 13,177 | No need to change this: id love if we changed as a team to unkeyed fields, it ends up catching a lot more at compile time, at minimal cost | yarpc-yarpc-go | go |
@@ -105,6 +105,11 @@ func (m LBFargateManifest) DockerfilePath() string {
return m.Image.Build
}
+// AppName returns the name of the application
+func (m LBFargateManifest) AppName() string {
+ return m.Name
+}
+
// EnvConf returns the application configuration with environment overrides.
// If the environment p... | 1 | // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package manifest
import (
"bytes"
"text/template"
"github.com/aws/amazon-ecs-cli-v2/templates"
)
// LBFargateManifest holds the configuration to build a container image with an exposed port that rece... | 1 | 11,284 | Should this be in the parent struct? `AppManifest` since it's embedded to `LBFargateManifest` it'll get the method as well. | aws-copilot-cli | go |
@@ -18,7 +18,12 @@
package openvpn
import (
+ "bufio"
+ "bytes"
"errors"
+ log "github.com/cihub/seelog"
+ "io"
+ "net/textproto"
"os/exec"
"strconv"
"syscall" | 1 | /*
* Copyright (C) 2017 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 | 11,305 | "Openvpn check" we could move this to separate prefix. | mysteriumnetwork-node | go |
@@ -380,8 +380,15 @@ class RemoteConnection(object):
# Authorization header
headers["Authorization"] = "Basic %s" % auth
- self._conn.request(method, parsed_url.path, data, headers)
- resp = self._conn.getresponse()
+ if body and method != 'POST' and method != 'PUT':
+ ... | 1 | # Copyright 2008-2009 WebDriver committers
# Copyright 2008-2009 Google Inc.
# Copyright 2013 BrowserStack
#
# 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/licens... | 1 | 10,707 | body is being used here for the first time without every being populated. This will error. To run tests do `./go clean test_py` and that will run the Firefox tests | SeleniumHQ-selenium | rb |
@@ -42,8 +42,6 @@ void LookUpEdgeIndexProcessor::process(const cpp2::LookUpIndexRequest& req) {
} else {
this->pushResultCode(this->to(code), partId);
}
- this->onFinished();
- return;
}
});
| 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 "LookUpEdgeIndexProcessor.h"
namespace nebula {
namespace storage {
void LookUpEdgeIndexProcessor::process(co... | 1 | 28,317 | We don't return now? | vesoft-inc-nebula | cpp |
@@ -18,7 +18,7 @@ module Travis
end
def install
- uses_make? then: 'true', else: 'go get -d -v ./... && go build -v ./...', fold: 'install'
+ uses_make? then: 'true', else: 'go get -d -v ./... && go build -v ./...', fold: 'install', retry: true
end
def script | 1 | module Travis
module Build
class Script
class Go < Script
DEFAULTS = {}
def export
super
set 'GOPATH', "#{HOME_DIR}/gopath"
end
def setup
super
cmd "mkdir -p $GOPATH/src/github.com/#{data.slug}"
cmd "cp -r $TRAVIS_BUILD_DIR/... | 1 | 10,634 | This might end up not doing exactly what we want (the retry only picks up the `go get`, not the `go build`, due to the `&&`). | travis-ci-travis-build | rb |
@@ -1,4 +1,4 @@
-// <copyright file="ConsoleExporterOptions.cs" company="OpenTelemetry Authors">
+// <copyright file="ConsoleExporterOptions.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License"); | 1 | // <copyright file="ConsoleExporterOptions.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://www... | 1 | 14,549 | Is there a BOM change? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -142,8 +142,6 @@ public final class Const {
public static final String REGISTRY_SERVICE_NAME = "SERVICECENTER";
- public static final String REGISTRY_VERSION = "3.0.0";
-
public static final String APP_SERVICE_SEPARATOR = ":";
public static final String PATH_CHECKSESSION = "checksession"; | 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,235 | It's not a good practise to delete the public static constant. | apache-servicecomb-java-chassis | java |
@@ -467,13 +467,7 @@ func (eval *BlockEvaluator) transaction(txn transactions.SignedTxn, ad transacti
return TransactionInLedgerError{txn.ID()}
}
- // Well-formed on its own?
- err = txn.Txn.WellFormed(spec, eval.proto)
- if err != nil {
- return fmt.Errorf("transaction %v: malformed: %v", txn.ID(), err)
... | 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,476 | I deleted this because `WellFormed` is immediately called by `verify.TxnPool` below. Can someone please double check this for me since it's... pretty important | algorand-go-algorand | go |
@@ -70,6 +70,7 @@ setup(
"kaitaistruct>=0.7,<0.9",
"ldap3>=2.5,<2.6",
"passlib>=1.6.5, <1.8",
+ "ply>=3.4, <3.12",
"pyasn1>=0.3.1,<0.5",
"pyOpenSSL>=17.5,<18.1",
"pyparsing>=2.1.3, <2.3", | 1 | import os
from codecs import open
import re
from setuptools import setup, find_packages
# Based on https://github.com/pypa/sampleproject/blob/master/setup.py
# and https://python-packaging-user-guide.readthedocs.org/
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.rst'), encod... | 1 | 14,145 | Did you actually test this with ply 3.4? That release is pretty old (2011), so I think we can bump this to at least 3.6 (2015) or even 3.10 (2017)... | mitmproxy-mitmproxy | py |
@@ -130,6 +130,12 @@ func (r *ReconcileHiveConfig) deployHive(hLog log.FieldLogger, h *resource.Helpe
r.includeGlobalPullSecret(hLog, h, instance, hiveDeployment)
+ if instance.Spec.MaintenanceMode != nil && *instance.Spec.MaintenanceMode {
+ hLog.Warn("maintenanceMode enabled in HiveConfig, setting hive-control... | 1 | package hive
import (
"bytes"
"context"
"crypto/md5"
"fmt"
"os"
"strconv"
log "github.com/sirupsen/logrus"
hivev1 "github.com/openshift/hive/pkg/apis/hive/v1alpha1"
"github.com/openshift/hive/pkg/constants"
hiveconstants "github.com/openshift/hive/pkg/constants"
"github.com/openshift/hive/pkg/controller/i... | 1 | 10,385 | This can be simplified somewhat to `pointer.Int32Ptr(0)`. But it is not necessary. | openshift-hive | go |
@@ -226,9 +226,7 @@ static bool checkBondStereo(const MCSBondCompareParameters& p,
Bond::BondStereo bs1 = b1->getStereo();
Bond::BondStereo bs2 = b2->getStereo();
if (b1->getBondType() == Bond::DOUBLE && b2->getBondType() == Bond::DOUBLE) {
- if ((bs1 == Bond::STEREOZ || bs1 == Bond::STEREOE) &&
- !(... | 1 | //
// Copyright (C) 2014 Novartis Institutes for BioMedical Research
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <list>
#incl... | 1 | 16,619 | Clever but perhaps confusing. | rdkit-rdkit | cpp |
@@ -360,10 +360,14 @@ func (r *ReconcileSyncSetInstance) syncDeletedSyncSetInstance(ssi *hivev1.SyncSe
ssiLog.Info("deleting syncset resources on target cluster")
err = r.deleteSyncSetResources(ssi, dynamicClient, ssiLog)
- if err == nil {
- return reconcile.Result{}, r.removeSyncSetInstanceFinalizer(ssi, ssiLog... | 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 | 8,536 | @abutcher Is it a safe assumption that secrets are the only objects that need to get attached to syncsets? | openshift-hive | go |
@@ -1605,7 +1605,8 @@ func (o *consumer) needAck(sseq uint64) bool {
state, err := o.store.State()
if err != nil || state == nil {
o.mu.RUnlock()
- return false
+ // Fall back to what we track internally for now.
+ return sseq > o.asflr
}
asflr, osseq = state.AckFloor.Stream, o.sseq
pending = s... | 1 | // Copyright 2019-2021 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 | 13,245 | Should you capture o.asflr before releasing consumer's lock? | nats-io-nats-server | go |
@@ -51,6 +51,10 @@ public class WinePrefixContainerWineToolsTab extends Tab {
final VBox toolsPane = new VBox();
final Text title = new TextWithStyle(tr("Wine tools"), TITLE_CSS_CLASS);
+ if (engineTools == null) {
+ return;
+ }
+
toolsPane.getStyleClass().add(CONFI... | 1 | package org.phoenicis.javafx.views.mainwindow.containers;
import javafx.application.Platform;
import javafx.scene.Node;
import javafx.scene.control.Button;
import javafx.scene.control.Tab;
import javafx.scene.layout.TilePane;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import org.phoenicis.containe... | 1 | 11,494 | Just asking: Should this happen, that null is passed? If this is the case I think we should think about passing an `Optional` object to the method. | PhoenicisOrg-phoenicis | java |
@@ -10,6 +10,17 @@ class HomeController < ApplicationController
def me
end
+ def edit_me
+ first_name = params[:first_name]
+ last_name = params[:last_name]
+ user = current_user
+ user.first_name = first_name
+ user.last_name = last_name
+ user.save!
+ flash[:success] = "Your profile is u... | 1 | class HomeController < ApplicationController
# just to cut down on exception spam
before_action :authenticate_user!, only: :error
def index
render(layout: false)
end
def me
end
def error
raise "test exception"
end
end
| 1 | 15,450 | what about making a `ProfilesController` or `UserProfilesController` and having this be a `show` action instead? That would be more Railsy (although that can be considered a compliment or a dis, depending on who you are :hamburger: ) | 18F-C2 | rb |
@@ -2378,7 +2378,11 @@ void PostCallRecordCreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo *
}
layer_data *device_data = GetLayerDataPtr(get_dispatch_key(*pDevice), layer_data_map);
- device_data->enabled_features.core = *enabled_features_found;
+ if (nullptr == enabled_features_found) {
+ ... | 1 | /* Copyright (c) 2015-2019 The Khronos Group Inc.
* Copyright (c) 2015-2019 Valve Corporation
* Copyright (c) 2015-2019 LunarG, Inc.
* Copyright (C) 2015-2019 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 | 9,931 | I'd move the empty assignment and non-null case into the if check directly above (adding an else clause as needed) | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -215,6 +215,8 @@ class Preference extends Model
'zh-tw' => [Lang::get('system::lang.locale.zh-tw'), 'flag-tw'],
'nb-no' => [Lang::get('system::lang.locale.nb-no'), 'flag-no'],
'el' => [Lang::get('system::lang.locale.el'), 'flag-gr'],
+ 'ar' => [Lang::get('system::lan... | 1 | <?php namespace Backend\Models;
use App;
use Lang;
use Model;
use Config;
use Session;
use BackendAuth;
use DirectoryIterator;
use DateTime;
use DateTimeZone;
use Carbon\Carbon;
/**
* Backend preferences for the backend user
*
* @package october\backend
* @author Alexey Bobkov, Samuel Georges
*/
class Preference... | 1 | 12,885 | Please remove this extra line of whitespace | octobercms-october | php |
@@ -83,14 +83,15 @@ class ProductSearchExportWithFilterRepository
/**
* @param int $domainId
* @param string $locale
- * @param int $startFrom
+ * @param int $lastProcessedId
* @param int $batchSize
* @return array
*/
- public function getProductsData(int $domainId, string ... | 1 | <?php
namespace Shopsys\FrameworkBundle\Model\Product\Search\Export;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Query\Expr\Join;
use Doctrine\ORM\QueryBuilder;
use Shopsys\FrameworkBundle\Component\Domain\Domain;
use Shopsys\FrameworkBundle\Component\Paginator\QueryPaginator;
use Shopsys\FrameworkBundl... | 1 | 21,096 | maybe it's time to rename `ProductSearchExportWithFilter` to something better, what do you think? | shopsys-shopsys | php |
@@ -49,11 +49,11 @@ func (agent *ecsAgent) appendTaskEIACapabilities(capabilities []*ecs.Attribute)
}
func (agent *ecsAgent) appendFirelensFluentdCapabilities(capabilities []*ecs.Attribute) []*ecs.Attribute {
- return capabilities
+ return appendNameOnlyAttribute(capabilities, attributePrefix+capabilityFirelensFlue... | 1 | // +build windows
// Copyright 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 ... | 1 | 26,271 | Instead of adding new code here - can you move these methods to agent_capability.go, so the same is used for unix and windows as well. this will need removal of these methods from agent_capability_unix.go as well. | aws-amazon-ecs-agent | go |
@@ -648,7 +648,7 @@ def log(package):
str(entry.get('tags', [])), str(entry.get('versions', []))))
_print_table(table)
-def push(package, is_public=False, is_team=False, reupload=False):
+def push(package, hash=None, is_public=False, is_team=False, reupload=False):
"""
Push a Quilt data pa... | 1 | # -*- coding: utf-8 -*-
"""
Command line parsing and command dispatch
"""
from __future__ import print_function
from builtins import input # pylint:disable=W0622
from datetime import datetime
from functools import partial
import hashlib
import json
import os
import platform
import re
from shutil import rmtree, co... | 1 | 17,022 | Make it the last parameter, just in case someone uses the API with non-keyword args. | quiltdata-quilt | py |
@@ -1,15 +1,15 @@
-class GithubRemovalJob < Struct.new(:github_team, :username)
+class GithubRemovalJob < Struct.new(:repository, :username)
include ErrorReporting
PRIORITY = 1
- def self.enqueue(github_team, username)
- Delayed::Job.enqueue(new(github_team, username))
+ def self.enqueue(repository, user... | 1 | class GithubRemovalJob < Struct.new(:github_team, :username)
include ErrorReporting
PRIORITY = 1
def self.enqueue(github_team, username)
Delayed::Job.enqueue(new(github_team, username))
end
def perform
begin
github_client.remove_team_member(github_team, username)
rescue Octokit::NotFound,... | 1 | 14,298 | Don't extend an instance initialized by `Struct.new`. | thoughtbot-upcase | rb |
@@ -4771,6 +4771,11 @@ static void tdes(pmix_server_trkr_t *t)
if (NULL != t->info) {
PMIX_INFO_FREE(t->info, t->ninfo);
}
+ pmix_nspace_caddy_t *nm, *nm_next;
+ PMIX_LIST_FOREACH_SAFE(nm, nm_next, &t->nslist, pmix_nspace_caddy_t) {
+ pmix_list_remove_item (&t->nslist, &nm->super);
+ ... | 1 | /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2014-2020 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2019 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2014-2015 Artem Y. Polyakov <ar... | 1 | 9,966 | Just wondering - would it make more sense to simply replace `PMIX_DESTRUCT(&t->nslist)` with `PMIX_LIST_DESTRUCT(&t->nslist)` here, and then add `PMIX_RELEASE(p->jobbkt)` to the `pmix_nspace_caddy_t` destructor on line 154 of src/include/pmix_globals.c? Seems to me like we always want to have these things removed/destr... | openpmix-openpmix | c |
@@ -5,7 +5,13 @@
package net.sourceforge.pmd.lang.vf;
import net.sourceforge.pmd.AbstractRuleSetFactoryTest;
+import net.sourceforge.pmd.lang.apex.rule.ApexXPathRule;
public class RuleSetFactoryTest extends AbstractRuleSetFactoryTest {
- // no additional tests
+ public RuleSetFactoryTest() {
+ super... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.vf;
import net.sourceforge.pmd.AbstractRuleSetFactoryTest;
public class RuleSetFactoryTest extends AbstractRuleSetFactoryTest {
// no additional tests
}
| 1 | 18,045 | I think, we should fix/improve AbstractRuleSetFactoryTest. I guess, both apex and visualforce rules are now tested, which is unnecessary. | pmd-pmd | java |
@@ -111,6 +111,14 @@ class BackendController extends ControllerBase
self::extendableExtendCallback($callback);
}
+ /**
+ * @inheritDoc
+ */
+ public function callAction($method, $parameters)
+ {
+ return parent::callAction($method, array_values($parameters));
+ }
+
/**
... | 1 | <?php namespace Backend\Classes;
use Str;
use App;
use File;
use View;
use Event;
use Config;
use Request;
use Response;
use Illuminate\Routing\Controller as ControllerBase;
use October\Rain\Router\Helper as RouterHelper;
use System\Classes\PluginManager;
use Closure;
/**
* This is the master controller for all back... | 1 | 19,342 | In php8 named parameters were introduced and now it is required to match called method parameter name when setting parameters by array destructing or `call_user_func_array()` etc. | octobercms-october | php |
@@ -7,8 +7,10 @@ package javaslang.collection;
import javaslang.Function2;
import javaslang.Tuple2;
+import javaslang.control.Try;
import org.junit.Test;
+import java.lang.reflect.Field;
import java.util.List;
import java.util.Random;
import java.util.concurrent.ThreadLocalRandom; | 1 | /* / \____ _ _ ____ ______ / \ ____ __ _______
* / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG
* _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2016 Javaslang, http://javaslang.io
* /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ ... | 1 | 11,472 | easily possible to get that information without exposing internal information | vavr-io-vavr | java |
@@ -65,7 +65,13 @@ module Beaker
found_env_vars[:answers][key] = value if key.to_s =~ /q_/
end
found_env_vars[:consoleport] &&= found_env_vars[:consoleport].to_i
- found_env_vars[:type] = found_env_vars[:is_pe] == 'true' || found_env_vars[:is_pe] == 'yes' ? 'pe' : nil
+ if fou... | 1 | module Beaker
module Options
#A set of functions representing the environment variables and preset argument values to be incorporated
#into the Beaker options Object.
module Presets
# This is a constant that describes the variables we want to collect
# from the environment. The keys correspon... | 1 | 7,140 | Why do we need tristate logic (pe, foss, nil)? | voxpupuli-beaker | rb |
@@ -19,13 +19,13 @@ import (
func TestBlocksAfterFlagTimeout(t *testing.T) {
- mu := sync.Mutex{}
+ mux := sync.Mutex{}
blocked := make(map[string]time.Duration)
mock := mockBlockLister(func(a swarm.Address, d time.Duration, r string) error {
- mu.Lock()
+ mux.Lock()
blocked[a.ByteString()] = d
- mu.Un... | 1 | // Copyright 2021 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 blocker_test
import (
"io/ioutil"
"sync"
"testing"
"time"
"github.com/ethersphere/bee/pkg/logging"
"github.com/ethersphere/bee/pkg/swarm"
"g... | 1 | 15,687 | this change needs to be reverted to what is on `master` | ethersphere-bee | go |
@@ -1076,9 +1076,14 @@ Blockly.WorkspaceSvg.prototype.deleteVariableById = function(id) {
* @package
*/
Blockly.WorkspaceSvg.prototype.createVariable = function(name, opt_type, opt_id) {
+ var variableInMap = (this.getVariable(name) != null);
var newVar = Blockly.WorkspaceSvg.superClass_.createVariable.call(th... | 1 | /**
* @license
* Visual Blocks Editor
*
* Copyright 2014 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,812 | Do you still need to call the superclass `createVariable` if you've already determined that the variable exists? | LLK-scratch-blocks | js |
@@ -281,7 +281,10 @@ type EachByPackResult struct {
}
// EachByPack returns a channel that yields all blobs known to the index
-// grouped by packID but ignoring blobs with a packID in packPlacklist.
+// grouped by packID but ignoring blobs with a packID in packPlacklist for
+// finalized indexes.
+// This filterin... | 1 | package repository
import (
"context"
"encoding/json"
"io"
"sync"
"time"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/restic"
"github.com/restic/restic/internal/debug"
)
// In large repositories, millions of blobs are stored in the repository
// and restic needs to store an ... | 1 | 14,103 | Ignoring the pack entry from an existing entry but using the new entry from a non-finalized index, is subtle enough that it needs explaining. | restic-restic | go |
@@ -236,9 +236,12 @@ uint32_t Spells::getInstantSpellCount(const Player* player) const
InstantSpell* Spells::getInstantSpellById(uint32_t spellId)
{
- auto it = std::next(instants.begin(), std::min<uint32_t>(spellId, instants.size()));
- if (it != instants.end()) {
- return it->second;
+ uint32_t count = 0;
+ for ... | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2017 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 | 14,061 | This is a revert, is it really an issue? | otland-forgottenserver | cpp |
@@ -26,8 +26,7 @@ namespace OpenTelemetry.Trace
using OpenTelemetry.Trace.Export;
using OpenTelemetry.Trace.Internal;
- /// <inheritdoc/>
- public class SpanBuilder : ISpanBuilder
+ /*public class SpanBuilder
{
private readonly SpanProcessor spanProcessor;
private readonly T... | 1 | // <copyright file="SpanBuilder.cs" company="OpenTelemetry Authors">
// Copyright 2018, 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.... | 1 | 12,365 | can we delete this file altogether? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -59,7 +59,9 @@ func InitCoverage(name string) {
}
// Set up the unit test framework with the required arguments to activate test coverage.
- flag.CommandLine.Parse([]string{"-test.coverprofile", tempCoveragePath()})
+ if err := flag.CommandLine.Parse([]string{"-test.coverprofile", tempCoveragePath()}); err != ... | 1 | /*
Copyright 2020 The cert-manager 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 | 26,677 | Suggestion: log some additional info here so we know where we are i.e 'Failed to prepare coverage framework..' | jetstack-cert-manager | go |
@@ -0,0 +1,7 @@
+namespace Datadog.Trace
+{
+ internal static class TracerConstants
+ {
+ public const string Language = "dotnet";
+ }
+} | 1 | 1 | 15,843 | There didn't seem to be any good place to put constants that are .NET Tracer-specific, so I created this internal static class. If there's a better place, let me know. | DataDog-dd-trace-dotnet | .cs | |
@@ -0,0 +1,19 @@
+package config
+
+import (
+ "github.com/kubeedge/beehive/pkg/common/config"
+ "github.com/kubeedge/beehive/pkg/common/log"
+ "github.com/kubeedge/kubeedge/cloud/edgecontroller/pkg/devicecontroller/constants"
+)
+
+// UpdateDeviceStatusBuffer is the size of channel which save update device status mess... | 1 | 1 | 9,879 | Log message should be started with upper-case word. | kubeedge-kubeedge | go | |
@@ -126,7 +126,7 @@ namespace NLog.Targets
/// Gets or sets the layout that renders event ID.
/// </summary>
/// <docgen category='Event Log Options' order='10' />
- public Layout EventId { get; set; }
+ public Layout<int> EventId { get; set; }
/// <summary>
... | 1 | //
// Copyright (c) 2004-2020 Jaroslaw Kowalski <jaak@jkowalski.net>, Kim Christensen, Julian Verdurmen
//
// 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 s... | 1 | 20,125 | changes for example usage in this class | NLog-NLog | .cs |
@@ -1,4 +1,4 @@
-define(['browser', 'css!./emby-collapse', 'registerElement', 'emby-button'], function (browser) {
+define(['browser', 'css!elements/emby-collapse/emby-collapse', 'registerElement', 'emby-button'], function (browser) {
'use strict';
var EmbyButtonPrototype = Object.create(HTMLDivElement.prot... | 1 | define(['browser', 'css!./emby-collapse', 'registerElement', 'emby-button'], function (browser) {
'use strict';
var EmbyButtonPrototype = Object.create(HTMLDivElement.prototype);
function slideDownToShow(button, elem) {
elem.classList.remove('hide');
elem.classList.add('expanded');
... | 1 | 12,939 | I know frameworks that support current directory when loading dependencies, is this a limitation of the requirejs loader or can we fix it somehow? | jellyfin-jellyfin-web | js |
@@ -164,6 +164,10 @@ func (a *FakeWebAPI) AddApplication(ctx context.Context, req *webservice.AddAppl
return &webservice.AddApplicationResponse{}, nil
}
+func (a *FakeWebAPI) EnableApplication(ctx context.Context, req *webservice.EnableApplicationRequest) (*webservice.EnableApplicationResponse, error) {
+ return &... | 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 | 8,245 | `ctx` is unused in EnableApplication | pipe-cd-pipe | go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.