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 |
|---|---|---|---|---|---|---|---|
@@ -87,7 +87,7 @@ public class ProtoCodecBenchmarks {
@Benchmark
public List<Span> bytebuffer_zipkinDecoder() {
- return SpanBytesDecoder.PROTO3.decodeList(ByteBufUtil.getBytes(encodedBuf));
+ return SpanBytesDecoder.PROTO3.decodeList(encodedBuf.nioBuffer());
}
@Benchmark | 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 | 14,921 | here is us decoding directly the bytebuffer in benchmarks | openzipkin-zipkin | java |
@@ -39,7 +39,16 @@ namespace Datadog.Trace.Logging
}
else
{
- SetDefaultValues();
+ // Do not set default values because the Tracer (and this event
+ // subscriber) may be initialized at a time when it is not safe
+ // to... | 1 | using System;
using System.Collections.Concurrent;
using System.Diagnostics;
using Datadog.Trace.Logging.LogProviders;
namespace Datadog.Trace.Logging
{
/// <summary>
/// Subscriber to ScopeManager events that sets/unsets correlation identifier
/// properties in the application's logging context.
/// <... | 1 | 16,093 | When the Tracer is first created AND `DD_LOGS_INJECTION=true`, this is invoked and causes the issues described. | DataDog-dd-trace-dotnet | .cs |
@@ -44,7 +44,7 @@ public class JsonRpcErrorConverter {
case GAS_PRICE_TOO_LOW:
return JsonRpcError.GAS_PRICE_TOO_LOW;
case PRIVACY_GROUP_DOES_NOT_EXIST:
- return JsonRpcError.PRIVACY_GROUP_DOES_NOT_EXIST;
+ return JsonRpcError.OFFCHAIN_PRIVACY_GROUP_DOES_NOT_EXIST;
default:... | 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 | 21,927 | NIT: If we are renaming the JsonRpcError, should we also rename this enum value to be consistent? | hyperledger-besu | java |
@@ -572,7 +572,8 @@ type FunctionExpression struct {
Defaults *ObjectExpression
Block *Block
- typ MonoType
+ typ MonoType
+ Vectorized Expression
}
func (*FunctionExpression) NodeType() string { return "FunctionExpression" } | 1 | package semantic
import (
"regexp"
"time"
"github.com/influxdata/flux/ast"
)
type Node interface {
node()
NodeType() string
Copy() Node
Location() ast.SourceLocation
}
type Loc ast.SourceLocation
func (l Loc) Location() ast.SourceLocation {
return ast.SourceLocation(l)
}
func (*Package) node() ... | 1 | 17,287 | This could be made into a function expression, yes? | influxdata-flux | go |
@@ -9,5 +9,5 @@ void release_assert_internal (bool check, const char * check_expr, const char *
}
std::cerr << "Assertion (" << check_expr << ") failed " << file << ":" << line << std::endl;
- abort();
+ abort ();
} | 1 | #include <iostream>
#include <rai/lib/utility.hpp>
void release_assert_internal (bool check, const char * check_expr, const char * file, unsigned int line)
{
if (check)
{
return;
}
std::cerr << "Assertion (" << check_expr << ") failed " << file << ":" << line << std::endl;
abort();
}
| 1 | 14,081 | Oops, I missed this initially. | nanocurrency-nano-node | cpp |
@@ -243,6 +243,12 @@ class TestLambdaBaseFeatures(unittest.TestCase):
lambda_client.delete_function(FunctionName=lambda_name)
def test_add_lambda_permission(self):
+ function_name = 'lambda_func-{}'.format(short_uid())
+ testutil.create_lambda_function(
+ handler_file=TEST_LAMBD... | 1 | import re
import os
import json
import shutil
import time
import unittest
import six
import base64
from botocore.exceptions import ClientError
from io import BytesIO
from localstack import config
from localstack.constants import LOCALSTACK_MAVEN_VERSION, LOCALSTACK_ROOT_FOLDER, LAMBDA_TEST_ROLE
from localstack.services... | 1 | 11,644 | Can we add an assertion here the policy actually contains both statements created above? | localstack-localstack | py |
@@ -59,7 +59,13 @@ DEFINE_bool(enable_partitioned_index_filter, false, "True for partitioned index
DEFINE_string(rocksdb_compression,
"snappy",
"Compression algorithm used by RocksDB, "
- "options: no,snappy,lz4,lz4hc,zstd,zlib,bzip2");
+ "options: no,snappy,lz4,... | 1 | /* Copyright (c) 2018 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License.
*/
#include "kvstore/RocksEngineConfig.h"
#include <rocksdb/cache.h>
#include <rocksdb/concurrent_task_limiter.h>
#include <rocksdb/convenience.h>
#include <rocksdb/db.h>
#include <rocksdb/filter_polic... | 1 | 33,139 | a space after comma? | vesoft-inc-nebula | cpp |
@@ -70,6 +70,11 @@ public final class CorrectForClockSkew {
if (skew != null) {
// the current span's skew may be a different endpoint than skewFromParent, adjust again.
node.value(adjustTimestamps(node.value(), skew));
+ } else {
+ if (skewFromParent != null && isLocalSpan(node.value())) {
+... | 1 | /**
* Copyright 2015-2017 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 | 12,135 | nit formatting here and below | openzipkin-zipkin | java |
@@ -5,9 +5,9 @@ import (
"github.com/golang/mock/gomock"
"github.com/spiffe/spire/pkg/common/util"
- "github.com/spiffe/spire/proto/spire/api/registration"
- "github.com/spiffe/spire/proto/spire/common"
- mock_registration "github.com/spiffe/spire/test/mock/proto/api/registration"
+ "github.com/spiffe/spire/proto... | 1 | package entry
import (
"testing"
"github.com/golang/mock/gomock"
"github.com/spiffe/spire/pkg/common/util"
"github.com/spiffe/spire/proto/spire/api/registration"
"github.com/spiffe/spire/proto/spire/common"
mock_registration "github.com/spiffe/spire/test/mock/proto/api/registration"
"github.com/stretchr/testif... | 1 | 14,988 | I think that there is a general consensus of trying to avoid this kind of mocks in the new tests that we write. I would suggest to have tests using fake service implementations. In this case, we can have a fake entry service. Examples of how tests have been written this way are the tests for the `spire-server agent` an... | spiffe-spire | go |
@@ -38,6 +38,6 @@ func (p *Provider) Type() string {
return ProviderType
}
-func (p *Provider) RunQuery(ctx context.Context, query string) (bool, error) {
- return false, nil
+func (p *Provider) RunQuery(ctx context.Context, query string) (bool, string, error) {
+ return false, "", nil
} | 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 | 15,353 | `ctx` is unused in RunQuery | pipe-cd-pipe | go |
@@ -276,12 +276,14 @@ def get_report_path_hash(report):
""" Returns path hash for the given bug path.
This can be used to filter deduplications of multiple reports.
+
+ report type should be codechecker_common.Report
"""
report_path_hash = ''
events = [i for i in report.bug_path if i.get('... | 1 | # -------------------------------------------------------------------------
#
# Part of the CodeChecker project, under the Apache License v2.0 with
# LLVM Exceptions. See LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# ---------------------------------------------------... | 1 | 12,584 | Couldn't we use type hints to express this? | Ericsson-codechecker | c |
@@ -57,12 +57,12 @@ define(['connectionManager', 'serverNotifications', 'events', 'globalize', 'emby
function setState(button, likes, isFavorite, updateAttribute) {
- var icon = button.querySelector('i');
+ var icon = button.querySelector('.material-icons');
if (isFavorite) {
... | 1 | define(['connectionManager', 'serverNotifications', 'events', 'globalize', 'emby-button'], function (connectionManager, serverNotifications, events, globalize, EmbyButtonPrototype) {
'use strict';
function addNotificationEvent(instance, name, handler) {
var localHandler = handler.bind(instance);
... | 1 | 15,129 | why you do `.classList.add()` here but `.replace()` in other places? | jellyfin-jellyfin-web | js |
@@ -98,9 +98,14 @@ Then 'I see the section price is "$price"' do |price|
end
Then 'I see that one of the teachers is "$teacher_name"' do |teacher_name|
+ sleep 10
page.should have_css(".teachers", text: teacher_name)
end
+Then 'I should see that "$teacher_name" is teaching both sections' do |teacher_name|
+ ... | 1 | Then 'I see the empty section description' do
page.should have_content('No courses are running at this time')
end
When 'I follow the external registration link' do
url = find("*[@id='register-button']")[:href]
url.should_not be_nil, "cannot find the external registration link"
Misc.rails_app = Capybara.app
... | 1 | 6,404 | What is this sleep here for? | thoughtbot-upcase | rb |
@@ -478,4 +478,19 @@ describe('AutoRowSize', () => {
expect(rowHeight(spec().$container, -1)).toBe(75);
});
+
+ it('should properly count height', () => {
+ const hot = handsontable({
+ data: [['Tomek', 'Tomek\nTomek', 'Romek\nRomek']],
+ rowHeaders: true,
+ colHeaders: true,
+ autoRow... | 1 | describe('AutoRowSize', () => {
const id = 'testContainer';
beforeEach(function() {
this.$container = $(`<div id="${id}"></div>`).appendTo('body');
});
afterEach(function() {
if (this.$container) {
destroy();
this.$container.remove();
}
});
function arrayOfObjects() {
return [... | 1 | 15,000 | I think that this test doesn't cover this bug correctly. When I attached the older version of the handsontable to this test it passes, should fail. Can you check that? | handsontable-handsontable | js |
@@ -186,6 +186,16 @@ type tlfJournal struct {
mdJournal *mdJournal
disabled bool
lastFlushErr error
+ // The cache of unflushed paths. If `unflushedReady` is not nil,
+ // then any callers must wait for it to be closed before accessing
+ // `unflushedPaths`. `unflushedReady` only transitions
+ // nil->no... | 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 (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"sync"
"time"
"github.com/keybase/backoff"
"github.com/keybase/clien... | 1 | 13,832 | Maybe this should just be passed in on construction time | keybase-kbfs | go |
@@ -367,6 +367,11 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display) {
struct wlr_backend *primary_drm =
attempt_drm_backend(display, backend, multi->session);
+
+ // discard the returned pointer - the monitor should destroy itself
+ // when the multi-backend is destroyed
+ wlr_drm_backend... | 1 | #define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <errno.h>
#include <libinput.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <wayland-server-core.h>
#include <wlr/backend/drm.h>
#include <wlr/backend/headless.h>
#include <wlr/backend/interface.h>
#include <wlr/backend/libinput.h>
#i... | 1 | 16,652 | We should create the monitor after the `if (!primary_drm)` check. | swaywm-wlroots | c |
@@ -85,6 +85,7 @@ def whitelist_generator():
yield 'qutebrowser.utils.log.QtWarningFilter.filter'
yield 'logging.LogRecord.log_color'
yield 'qutebrowser.browser.pdfjs.is_available'
+ yield 'qutebrowser.browser.tab.TabData._initializing'
# vulture doesn't notice the hasattr() and thus thinks netrc... | 1 | #!/usr/bin/env python
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2015-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publ... | 1 | 15,152 | Can be removed now that slots are used | qutebrowser-qutebrowser | py |
@@ -216,7 +216,7 @@ describe 'AccountsController' do
describe 'edit' do
it 'must respond with not_found when account does not exist' do
get :edit, id: :anything
- must_respond_with :not_found
+ must_respond_with :unauthorized
end
it 'must respond with success' do | 1 | require 'test_helper'
describe 'AccountsController' do
let(:user) { accounts(:user) }
let(:start_date) do
(Date.today - 6.years).beginning_of_month
end
let(:cbp) do
[{ month: Time.parse('2010-04-30 20:00:00 -0400'), commits: 1, position_id: 3 },
{ month: Time.parse('2010-04-30 20:00:00 -0400'), c... | 1 | 7,530 | The description should match the test | blackducksoftware-ohloh-ui | rb |
@@ -165,12 +165,9 @@ static void xwayland_finish_display(struct wlr_xwayland *wlr_xwayland) {
unlink_display_sockets(wlr_xwayland->display);
wlr_xwayland->display = -1;
- unsetenv("DISPLAY");
+ wlr_xwayland->display_name[0] = '\0';
}
-static bool xwayland_start_display(struct wlr_xwayland *wlr_xwayland,
- stru... | 1 | #define _POSIX_C_SOURCE 200112L
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
#include <wayland-server.h>
#include <wlr/util/log.h>
#include <... | 1 | 13,599 | rootston needs to unset this now | swaywm-wlroots | c |
@@ -35,7 +35,7 @@ func newBlockBuffer(bufferSize, intervalSize uint64) *blockBuffer {
}
}
-func (b *blockBuffer) Delete(height uint64) []*peerBlock {
+func (b *blockBuffer) Pop(height uint64) []*peerBlock {
b.mu.Lock()
defer b.mu.Unlock()
queue, ok := b.blockQueues[height] | 1 | // Copyright (c) 2019 IoTeX Foundation
// 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... | 1 | 24,709 | why do you rename this function? | iotexproject-iotex-core | go |
@@ -30,12 +30,10 @@ module MailerHelper
end
def step_status_icon(step)
- if step.status == "actionable"
- "emails/numbers/icon-number-" + (step.position - 1).to_s + ".png"
- elsif step.status == "pending"
- "emails/numbers/icon-number-" + (step.position - 1).to_s + "-pending.png"
- elsif step... | 1 | module MailerHelper
def property_display_value(field)
if field.present?
property_to_s(field)
else
"-"
end
end
def time_and_date(date)
"#{date.strftime('%m/%d/%Y')} at #{date.strftime('%I:%M %P')}"
end
def generate_approve_url(approval)
proposal = approval.proposal
opts = ... | 1 | 17,016 | since we are no longer using these numbered icons can we remove them from source control? | 18F-C2 | rb |
@@ -182,6 +182,8 @@ public class VertxRestDispatcher extends AbstractVertxHttpDispatcher {
RestProducerInvocation restProducerInvocation = new RestProducerInvocation();
context.put(RestConst.REST_PRODUCER_INVOCATION, restProducerInvocation);
+ restProducerInvocation.setAfterCreateInvocationHandler(
+ ... | 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 | 9,644 | both edge and normal need to set this, so set it to be default action? | apache-servicecomb-java-chassis | java |
@@ -391,9 +391,13 @@ namespace Microsoft.DotNet.Build.Tasks
private static void WriteProject(JObject projectRoot, string projectJsonPath)
{
- string projectJson = JsonConvert.SerializeObject(projectRoot, Formatting.Indented);
- Directory.CreateDirectory(Path.GetDirectoryName(pr... | 1 | using Microsoft.Build.Utilities;
using Microsoft.Build.Framework;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using NuGet.Packaging;
using NuGet.Packaging.Core;
using NuGet.Versioning;
name... | 1 | 11,007 | Is doing a straight string compare of the files the right way to determine this? I guess if you expect to be the only one writing this file it could work but it does seem like it might be a large string compare and if we are doing this hundreds of times that might cause some memory issues. | dotnet-buildtools | .cs |
@@ -431,7 +431,7 @@ static void set_client_priority() {
#ifdef __linux__
char buf[1024];
snprintf(buf, sizeof(buf), "ionice -c 3 -p %d", getpid());
- system(buf);
+ if (!system(buf)) {}
#endif
}
| 1 | // This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2018 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 | 14,361 | What's the purpose of this change? It basically changes nothing until we want to put smth between curly braces | BOINC-boinc | php |
@@ -186,6 +186,9 @@ static void handle_device_removed(struct wlr_libinput_backend *backend,
}
struct wlr_input_device *dev, *tmp_dev;
wl_list_for_each_safe(dev, tmp_dev, wlr_devices, link) {
+ if (dev->type == WLR_INPUT_DEVICE_TABLET_TOOL) {
+ wlr_libinput_tablet_tool_destroy(dev);
+ }
wlr_input_device_des... | 1 | #define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <libinput.h>
#include <stdlib.h>
#include <wayland-util.h>
#include <wlr/backend/session.h>
#include <wlr/interfaces/wlr_input_device.h>
#include <wlr/util/log.h>
#include "backend/libinput.h"
#include "util/signal.h"
struct wlr_input_device *get_appropriate... | 1 | 11,290 | Hmm, why is this needed? `wlr_input_device_destroy` should destroy the tablet tool. | swaywm-wlroots | c |
@@ -62,6 +62,12 @@ public class DiscoApiModel implements ApiModel {
return interfaceModels;
}
+ @Override
+ public Iterable<? extends TypeModel> getAdditionalTypes() {
+ // TODO: is this supported?
+ return ImmutableList.of();
+ }
+
@Override
public InterfaceModel getInterface(String interfaceN... | 1 | /* Copyright 2017 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 | 24,641 | I think it's better to throw `UnsupportedOperationException` | googleapis-gapic-generator | java |
@@ -124,6 +124,14 @@ function createElement(...args) {
delete props.defaultValue;
}
+ if (Array.isArray(props.value) && props.multiple && type==='select') {
+ props.children.forEach((child) => {
+ if (props.value.includes(child.props.value)) {
+ child.props.selected = true;
+ }
+ });
+ delete ... | 1 | import { render as preactRender, cloneElement as preactCloneElement, createRef, h, Component, options, toChildArray, createContext, Fragment } from 'preact';
import * as hooks from 'preact/hooks';
export * from 'preact/hooks';
const version = '16.8.0'; // trick libraries to think we are react
/* istanbul ignore next ... | 1 | 12,664 | `props.children` is not always guaranteed to be an array. When only one child is passed this will break. We can use `toChildArray()` to turn it into an array :tada: | preactjs-preact | js |
@@ -26,7 +26,8 @@ buildStyle = os.environ['BUILD_STYLE']
# Build the configure command.
configureCmd = os.path.join(buildSystemDir, 'contrib', 'configure.py')
-configureCmd += ' --mode=%s' % buildStyle
+# configureCmd += ' --mode=%s' % buildStyle
+configureCmd += ' --mode=release'
configureCmd += ' --builddir=%s' ... | 1 | #!/usr/bin/env python
import os
import sys
import string
doClean = ('clean' in sys.argv) or ('uninstall' in sys.argv)
rootDir = os.getcwd()
buildSystemDir = os.path.join(rootDir, 'build_system')
# Generate the configure input files.
setupCmd = 'python ' + os.path.join(buildSystemDir, 'setup.py') + ' --autogen' \
... | 1 | 12,435 | Please just remove this line. We have the git history if we want the old version. | numenta-nupic | py |
@@ -49,9 +49,11 @@ public class ScriptTaskGraalJsTest extends AbstractScriptTaskTest {
private static final String GRAALJS = "graal.js";
protected ScriptEngineResolver defaultScriptEngineResolver;
+ protected boolean spinEnabled = false;
@Before
public void setup() {
+ spinEnabled = processEngineCon... | 1 | /*
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
* under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. Camunda licenses this file to you under the Apache License,
* Version 2.0; y... | 1 | 11,999 | Can we put some of the code on a new line to make it more readable. The max line length was 120 now, right? | camunda-camunda-bpm-platform | java |
@@ -56,3 +56,19 @@ func Example() {
cfg := snapshot.Value.(MyConfig)
_ = cfg
}
+
+func Example_openVariable() {
+ // OpenVariable creates a *runtimevar.Variable from a URL.
+ // This example watches a variable based on a file-based blob.Bucket with JSON.
+ ctx := context.Background()
+ v, err := runtimevar.OpenVar... | 1 | // Copyright 2018 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 | 15,227 | Remove the handling here as well. | google-go-cloud | go |
@@ -113,7 +113,7 @@ namespace OpenTelemetry.Trace
/// <inheritdoc/>
public override void OnEnd(Activity activity)
{
- if (this.queue.TryAdd(activity))
+ if (this.queue.TryAdd(activity, maxSpinCount: 50000))
{
if (this.queue.Count >= this.max... | 1 | // <copyright file="BatchExportActivityProcessor.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
//
// htt... | 1 | 16,290 | Do we want to make this configurable? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -159,6 +159,17 @@ public final class Require {
return number;
}
+ public static double positive(String argName, double number, String message) {
+ if (number <= 0) {
+ if (message == null) {
+ throw new IllegalArgumentException(argName + " must be greater than 0");
+ } else {
+ ... | 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 | 18,469 | Prefer adding a second `positive(String, double)` that delegates down to this three-param version. Using `null` in code is generally Not A Great Idea, and it looks ugly. | SeleniumHQ-selenium | py |
@@ -71,4 +71,17 @@ ActiveAdmin.register Proposal do
flash[:alert] = "Completed!"
redirect_to admin_proposal_path(resource)
end
+
+ csv do
+ proposal_attributes = %w(id status created_at updated_at client_data_type public_id visit_id)
+ proposal_attributes.each do |proposal_attr|
+ column(propos... | 1 | ActiveAdmin.register Proposal do
actions :index, :show
permit_params :status
filter :client_data_type
filter :status
filter :created_at
filter :updated_at
index do
column :id
column :status
column :name
column :public_id
column :requester
actions
end
# /:id page
show do
... | 1 | 18,023 | Is this going to break things for 18F proposals, or will these fields just be ignored? | 18F-C2 | rb |
@@ -76,8 +76,9 @@ public class Actions {
* Note that the modifier key is <b>never</b> released implicitly - either
* <i>keyUp(theKey)</i> or <i>sendKeys(Keys.NULL)</i>
* must be called to release the modifier.
- * @param theKey Either {@link Keys#SHIFT}, {@link Keys#ALT} or {@link Keys#CONTROL}. If the
- ... | 1 | /*
Copyright 2007-2011 Selenium committers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing... | 1 | 10,429 | Keys.COMMAND seems to be an alias to Keys.META. That isn't mentioned? | SeleniumHQ-selenium | js |
@@ -35,6 +35,12 @@ type AWSClusterProviderConfig struct {
// SSHKeyName is the name of the ssh key to attach to the bastion host.
SSHKeyName string `json:"sshKeyName,omitempty"`
+
+ // CACertificate is a PEM encoded CA Certificate for the control plane nodes.
+ CACertificate []byte `json:"caCertificate,omitempty"... | 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 | 7,110 | What's the reason for moving this to config from status? | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -48,7 +48,7 @@ class GenericSuppressHandler(suppress_handler.SuppressHandler):
def store_suppress_bug_id(self, bug_id, file_name, comment):
if self.suppress_file is None:
- return False
+ return True
ret = suppress_file_handler.write_to_suppress_file(self.suppress_fil... | 1 | # -------------------------------------------------------------------------
# The CodeChecker Infrastructure
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
# -------------------------------------------------------------------------... | 1 | 6,404 | Shouldn't we re validate/update the in memory suppress data here? | Ericsson-codechecker | c |
@@ -68,7 +68,7 @@ func TestPaymentChannelLs(t *testing.T) {
t.Run("Works with default payer", func(t *testing.T) {
t.Parallel()
- payer, err := address.NewFromString(fixtures.TestAddresses[0])
+ payer, err := address.NewFromString(fixtures.TestAddresses[2])
require.NoError(err)
target, err := address.New... | 1 | package commands
import (
"fmt"
"strings"
"sync"
"testing"
"gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid"
cbor "gx/ipfs/QmcZLyosDwMKdB6NLRsiss9HXzDPhVhhRtPy67JFKTDQDX/go-ipld-cbor"
"gx/ipfs/QmPVkJMTeRC6iBByPWdrRkD3BE5UXsj5HPzb4kPqL186mS/testify/assert"
"gx/ipfs/QmPVkJMTeRC6iBByPWdrRkD3BE5UXs... | 1 | 17,304 | curious why the renumbering is required here and elsewhere? | filecoin-project-venus | go |
@@ -426,9 +426,12 @@ func validateClusterPlatform(path *field.Path, platform hivev1.Platform) field.E
if aws := platform.AWS; aws != nil {
numberOfPlatforms++
awsPath := path.Child("aws")
- if aws.CredentialsSecretRef.Name == "" {
+ if aws.CredentialsSecretRef.Name == "" && aws.CredentialsAssumeRole == nil {
... | 1 | package v1
import (
"fmt"
"net/http"
"reflect"
"regexp"
"strconv"
"strings"
log "github.com/sirupsen/logrus"
admissionv1beta1 "k8s.io/api/admission/v1beta1"
"k8s.io/apimachinery/pkg/api/errors"
apivalidation "k8s.io/apimachinery/pkg/api/validation"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/ap... | 1 | 17,188 | s/must specify secrets/must specify secrets or Role info/ | openshift-hive | go |
@@ -63,8 +63,8 @@ C2::Application.routes.draw do
end
mount Peek::Railtie => "/peek"
+ mount Blazer::Engine, at: "blazer"
if Rails.env.development?
mount LetterOpenerWeb::Engine => "letter_opener"
- mount Blazer::Engine, at: "blazer"
end
end | 1 | C2::Application.routes.draw do
ActiveAdmin.routes(self)
root to: "home#index"
get "/error" => "home#error"
get "/profile" => "profile#show"
post "/profile" => "profile#update"
get "/summary" => "summary#index"
get "/summary/:fiscal_year" => "summary#index"
get "/feedback" => "feedback#index"
get "/fe... | 1 | 16,874 | let's leave this as a dev-only feature, and copy prod db to local env when needed. that keeps blazer security issues to a minimum. | 18F-C2 | rb |
@@ -22,7 +22,7 @@ namespace OpenTelemetry.Trace.Samplers
public sealed class AlwaysOffActivitySampler : ActivitySampler
{
/// <inheritdoc />
- public override string Description { get; } = nameof(AlwaysOffActivitySampler);
+ public override string Description { get; } = "AlwaysOffSample... | 1 | // <copyright file="AlwaysOffActivitySampler.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 | 15,016 | We'll be renaming ActivitySampler to Sampler anyway, so this change will be non-required. Prefer to avoid changes here to avoid merge conflict with my PR doing the rename. | open-telemetry-opentelemetry-dotnet | .cs |
@@ -278,7 +278,10 @@ func mutateHeadersByRules(headers, rules http.Header, repl httpserver.Replacer)
} else if strings.HasPrefix(ruleField, "-") {
headers.Del(strings.TrimPrefix(ruleField, "-"))
} else if len(ruleValues) > 0 {
- headers.Set(ruleField, repl.Replace(ruleValues[len(ruleValues)-1]))
+ var rep... | 1 | // Package proxy is middleware that proxies HTTP requests.
package proxy
import (
"errors"
"net"
"net/http"
"net/url"
"strings"
"sync/atomic"
"time"
"github.com/mholt/caddy/caddyhttp/httpserver"
)
// Proxy represents a middleware instance that can proxy requests.
type Proxy struct {
Next httpserver.Han... | 1 | 9,482 | This applies only in the "set" headers case, but what about "adding" a header (field prefixed with `+`)? | caddyserver-caddy | go |
@@ -13,6 +13,7 @@ package net.sourceforge.pmd;
* @version $Revision$, $Date$
* @since August 30, 2002
*/
+@Deprecated
public class PMDException extends Exception {
private static final long serialVersionUID = 6938647389367956874L;
| 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd;
/**
* A convenience exception wrapper. Contains the original exception, if any.
* Also, contains a severity number (int). Zero implies no severity. The higher
* the number the greater the severity.
... | 1 | 17,576 | I'm not sure we should deprecate this. I kinda like the idea, that we would provide all exceptions (if we throw any) with a common super type. Of course, the exception should be not a checked exception like this one, but rather a runtime exception. We maybe need additionally an internal exception that we would convert ... | pmd-pmd | java |
@@ -41,6 +41,11 @@ class TabDeletedError(Exception):
"""Exception raised when _tab_index is called for a deleted tab."""
+class MarkNotSetError(Exception):
+
+ """Exception raised when _tab_index is called for a deleted tab."""
+
+
class TabbedBrowser(tabwidget.TabWidget):
"""A TabWidget with QWebVi... | 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 | 14,524 | You'll need to adjust the docstring :wink: | qutebrowser-qutebrowser | py |
@@ -81,7 +81,8 @@ void ReaderProxy::start(const ReaderProxyData& reader_attributes)
reader_attributes.guid(),
reader_attributes.remote_locators().unicast,
reader_attributes.remote_locators().multicast,
- reader_attributes.m_expectsInlineQos);
+ reader_attributes.m_expectsInlineQ... | 1 | // Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... | 1 | 16,804 | Add a TODO explaining why this is being done | eProsima-Fast-DDS | cpp |
@@ -26,7 +26,8 @@
goog.provide('Blockly.VariableMap');
-goog.require('Blockly.VariableModel');
+goog.require('Blockly.Events.VarDelete');
+goog.require('Blockly.Events.VarRename');
/**
* Class for a variable map. This contains a dictionary data structure with | 1 | /**
* @license
* Visual Blocks Editor
*
* Copyright 2017 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 | 9,307 | This file still uses Blockly.VariableModel... | LLK-scratch-blocks | js |
@@ -129,8 +129,10 @@ type ManagedRemoteAccess struct {
SSHKeyName *string `json:"sshKeyName,omitempty"`
// SourceSecurityGroups specifies which security groups are allowed access
- // An empty array opens port 22 to the public internet
SourceSecurityGroups []string `json:"sourceSecurityGroups,omitempty"`
+
+ //... | 1 | /*
Copyright 2020 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 | 17,910 | Small nit, in the PR description its `publicAccess` but here its `public`. Guessing the preferred naming is public? | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -106,10 +106,11 @@ func (c *Variable) Close() error {
// Decode is a function type for unmarshaling/decoding bytes into given object.
type Decode func([]byte, interface{}) error
-// Decoder is a helper for decoding bytes into a particular Go type object. The Variable objects
-// produced by a particular driver.... | 1 | // Copyright 2018 The Go Cloud Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 1 | 11,500 | Maybe `driver.Watcher` -> provider (2x)? This is the concrete type, this user doesn't really know anything about the driver. | google-go-cloud | go |
@@ -21,12 +21,10 @@ import java.io.IOException;
import org.apache.lucene.codecs.DocValuesConsumer;
import org.apache.lucene.search.DocIdSetIterator;
-import org.apache.lucene.search.SortField;
-abstract class DocValuesWriter {
- abstract void finish(int numDoc);
+abstract class DocValuesWriter<T> {
abstract v... | 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,857 | can we remove this since `getDocValues` already returns an iterator? (we might need to do `T extends DocIdSetIterator` above) | apache-lucene-solr | java |
@@ -0,0 +1,8 @@
+class String
+ def fix_encoding_if_invalid!
+ unless self.valid_encoding?
+ self.encode!('utf-8', 'binary', invalid: :replace, undef: :replace)
+ end
+ self
+ end
+end | 1 | 1 | 6,783 | Don't check this in. This is already implemented in core_extensions/ruby/string.rb | blackducksoftware-ohloh-ui | rb | |
@@ -277,7 +277,7 @@ Block.prototype._getHash = function() {
var idProperty = {
configurable: false,
- writeable: false,
+ enumerable: true,
/**
* @returns {string} - The big endian hash buffer of the header
*/ | 1 | 'use strict';
var _ = require('lodash');
var BlockHeader = require('./blockheader');
var BN = require('../crypto/bn');
var BufferUtil = require('../util/buffer');
var BufferReader = require('../encoding/bufferreader');
var BufferWriter = require('../encoding/bufferwriter');
var Hash = require('../crypto/hash');
var JS... | 1 | 14,268 | This is used for both `id`, and `hash` we may not want these both to be enumerable. | bitpay-bitcore | js |
@@ -641,9 +641,16 @@ module RSpec
formatter_loader.default_formatter = value
end
- # @private
+ # @api public
+ #
+ # Returns a duplicate of the formatters currently loaded in
+ # the `FormatterLoader` for introspection.
+ #
+ # Note as this is a duplicate, any mutat... | 1 | require 'fileutils'
RSpec::Support.require_rspec_core "backtrace_formatter"
RSpec::Support.require_rspec_core "ruby_project"
RSpec::Support.require_rspec_core "formatters/deprecation_formatter"
module RSpec
module Core
# Stores runtime configuration information.
#
# Configuration options are loaded from... | 1 | 12,696 | Is this necessary? I would expect YARD to treat it as public anyway... (Don't hold off merging on this...I'm mostly just curious). | rspec-rspec-core | rb |
@@ -578,6 +578,7 @@ func (e *MutableStateImpl) GetActivityScheduledEvent(
e.executionState.RunId,
ai.ScheduledEventBatchId,
ai.ScheduleId,
+ ai.Version,
currentBranchToken,
)
if err != nil { | 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 | 12,434 | @wxing1292 to double check this is the right version to use? | temporalio-temporal | go |
@@ -70,4 +70,12 @@ class TIntRange extends TInt
{
return $this->min_bound !== null && $this->min_bound > 0;
}
+
+ public function contains(int $i): bool
+ {
+ return
+ ($this->min_bound === null && $this->max_bound === null) ||
+ ($this->min_bound === null && $this-... | 1 | <?php
namespace Psalm\Type\Atomic;
/**
* Denotes an interval of integers between two bounds
*/
class TIntRange extends TInt
{
const BOUND_MIN = 'min';
const BOUND_MAX = 'max';
/**
* @var int|null
*/
public $min_bound;
/**
* @var int|null
*/
public $max_bound;
public ... | 1 | 10,917 | Shouldn't there be another case for when both min and max are specified? | vimeo-psalm | php |
@@ -1,5 +1,5 @@
## This file is part of Invenio.
-## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 CERN.
+## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of ... | 1 | ## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## Lic... | 1 | 12,295 | Don't miss this one `2: I102 copyright year is outdated, expected 2014 but got 2013`. Thanks | inveniosoftware-invenio | py |
@@ -112,8 +112,9 @@ size_t Cord::appendTo(std::string& str) const {
}
// Last block
- str.append(tail_, blockPt_);
-
+ if (tail_) {
+ str.append(tail_, blockPt_);
+ }
return len_;
}
| 1 | /* Copyright (c) 2018 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 "base/Cord.h"
#include "base/Logging.h"
namespace nebula {
Cord::Cord(int32_t blockSize)
: blockSize_... | 1 | 27,284 | the tail_ maybe nullptr? | vesoft-inc-nebula | cpp |
@@ -92,7 +92,7 @@ func (c *Controller) reviewAdmission(ctx context.Context, req *admv1beta1.Admiss
if err := json.Unmarshal(req.Object.Raw, pod); err != nil {
return errs.New("unable to unmarshal %s/%s object: %v", req.Kind.Version, req.Kind.Kind, err)
}
- return c.createPodEntry(ctx, pod)
+ return c.syncPo... | 1 | package main
import (
"bytes"
"context"
"encoding/json"
"fmt"
"net/url"
"path"
"github.com/sirupsen/logrus"
"github.com/spiffe/spire/pkg/common/idutil"
"github.com/spiffe/spire/proto/spire/api/registration"
"github.com/spiffe/spire/proto/spire/common"
"github.com/zeebo/errs"
"google.golang.org/grpc/codes"... | 1 | 12,893 | The PR description mentions that `The controller code is extended to react to "add" events`, but I don't see any additional cases added here beyond the existing Create and Delete... is there something I'm missing? | spiffe-spire | go |
@@ -26,7 +26,7 @@ module Blacklight
##
# An OpenStruct that responds to common Hash methods
class OpenStructWithHashAccess < OpenStruct
- delegate :keys, :each, :map, :has_key?, :empty?, :delete, :length, :reject!, :select!, :include, :fetch, :to_json, :as_json, :to => :to_h
+ delegate :keys, :each, :map... | 1 | require 'ostruct'
module Blacklight
module Utils
def self.needs_attr_accessible?
if rails_3?
!strong_parameters_enabled?
else
protected_attributes_enabled?
end
end
def self.rails_3?
Rails::VERSION::MAJOR == 3
end
def self.strong_parameters_enabled?
... | 1 | 5,918 | Does it matter that #include changed to #include? ? I think the change makes sense since it aligns with the method name on Hash but unsure if anything called #include that would break with the change. | projectblacklight-blacklight | rb |
@@ -92,7 +92,7 @@ const (
// minimumTaskCleanupWaitDuration specifies the minimum duration to wait before cleaning up
// a task's container. This is used to enforce sane values for the config.TaskCleanupWaitDuration field.
- minimumTaskCleanupWaitDuration = 1 * time.Minute
+ minimumTaskCleanupWaitDuration = time.... | 1 | // 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 "license" file acco... | 1 | 26,658 | LGTM, curious though why exactly this is in place, and are there any possible issues from not waiting long enough? | aws-amazon-ecs-agent | go |
@@ -104,7 +104,7 @@ module Beaker
#cleanup phase
rescue => e
#cleanup on error
- if @options[:preserve_hosts].to_s =~ /(never)/
+ if @options[:preserve_hosts].to_s =~ /(?:never)|(?:onpass)/
@logger.notify "Cleanup: cleaning up after failed run"
if @network_mana... | 1 | module Beaker
class CLI
VERSION_STRING =
" wWWWw
|o o|
| O | %s!
|(\")|
/ \\X/ \\
| V |
| | | "
def initialize
@timestamp = Time.now
@options_parser = Beaker::Options::Parser.new
@options = @options_parser.parse_args
@logger = Beaker::Logge... | 1 | 7,410 | ?: is unnecessary because we already force preserve_hosts to be a string with to_s. | voxpupuli-beaker | rb |
@@ -76,6 +76,8 @@ public abstract class NewSessionQueuer implements HasReadyState, Routable {
.with(requiresSecret),
get("/se/grid/newsessionqueuer/queue/size")
.to(() -> new GetNewSessionQueueSize(tracer, this)),
+ get("/se/grid/newsessionqueue")
+ .to(() -> new GetSessionQueue(tra... | 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 | 18,614 | should it be `newsessionqueue` or `newsessionqueuer`? In case we'd like to be consistent | SeleniumHQ-selenium | rb |
@@ -106,8 +106,8 @@ describe('debug with suspense', () => {
return loader.then(() => {
rerender();
- expect(console.warn).to.be.calledTwice;
- expect(warnings[1].includes('MyLazyLoaded')).to.equal(true);
+ expect(console.warn).to.be.calledThrice;
+ expect(warnings[2].includes('MyLazyLoaded'... | 1 | import { createElement, render, lazy, Suspense } from 'preact/compat';
import 'preact/debug';
import { setupRerender } from 'preact/test-utils';
import {
setupScratch,
teardown,
serializeHtml
} from '../../../test/_util/helpers';
/** @jsx createElement */
describe('debug with suspense', () => {
/** @type {HTMLDiv... | 1 | 16,856 | Since lazy is re-rendered when mounting the fallback, these checks get triggered an additional time. | preactjs-preact | js |
@@ -173,6 +173,10 @@ class AbstractWebElement(collections.abc.MutableMapping):
except KeyError:
return False
+ def is_content_editable_prop(self) -> bool:
+ """Get the value of this element's isContentEditable property."""
+ raise NotImplementedError
+
def _is_editable_obje... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2019 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 | 23,471 | There is a `is_content_editable()` method just above this, what's the difference? | qutebrowser-qutebrowser | py |
@@ -86,7 +86,7 @@ type PrometheusList struct {
type PrometheusSpec struct {
// PodMetadata configures Labels and Annotations which are propagated to the prometheus pods.
PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty"`
- // ServiceMonitors to be selected for target discovery. *Deprecated:* if
+ /... | 1 | // Copyright 2018 The prometheus-operator Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... | 1 | 15,682 | Hmm, I'm not sure this is exactly what we want to get across. The behavior of leaving both values unset allowing the entire config to be managed is what is indeed deprecated. It's just that not the entire field is deprecated, just that one behavior. | prometheus-operator-prometheus-operator | go |
@@ -146,10 +146,17 @@ static void complete_cb (struct bulk_exec *exec, void *arg)
static void output_cb (struct bulk_exec *exec, flux_subprocess_t *p,
const char *stream,
const char *data,
- int data_len,
+ int len,
... | 1 | /************************************************************\
* Copyright 2019 Lawrence Livermore National Security, LLC
* (c.f. AUTHORS, NOTICE.LLNS, COPYING)
*
* This file is part of the Flux resource manager framework.
* For details, see https://github.com/flux-framework.
*
* SPDX-License-Identifier: LGPL-3.... | 1 | 29,582 | Given the slightly vague discussion in basename(3) about POSIX basename (modifies arg) vs GNU (doesn't), I always assumed it was advisable to pass a string copy However, I guess you'd get a "discarding const" warning promoted to error by our build system here if you were getting the POSIX implementation. Hah! Cool, I p... | flux-framework-flux-core | c |
@@ -81,12 +81,12 @@ public class MetricManagerTest {
@Test
public void managerEmitterHandlingTest() throws Exception {
this.emitter.purgeAllData();
- final Date from = DateTime.now().minusMinutes(1).toDate();
+ final Date from = DateTime.now().minusMinutes(10).toDate();
this.metric.notifyManager()... | 1 | package azkaban.metric;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import azkaban.metric.inmemoryemitter.InMemoryHistoryNode;
import azkaban.metric.inmemoryemitter.InMemoryMetricEmitt... | 1 | 16,063 | Do you know somehow that this was the culprit? Even 1 minute is a lot, so I would expect the bug to lie somewhere else. | azkaban-azkaban | java |
@@ -146,7 +146,9 @@ void ActiveHostsMan::cleanExpiredHosts() {
LOG(INFO) << "set " << data.size() << " expired hosts to offline in meta rocksdb";
kvstore_->asyncMultiPut(kDefaultSpaceId, kDefaultPartId, std::move(data),
[] (kvstore::ResultCode code) {
- CHEC... | 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/ActiveHostsMan.h"
#include "meta/MetaServiceUtils.h"
#include "meta/processors/BaseProcessor.h"
namespac... | 1 | 19,487 | what to do if some failed? just logging? | vesoft-inc-nebula | cpp |
@@ -16,6 +16,19 @@ module Faker
fetch('quote.famous_last_words')
end
+ ##
+ # Produces a quote from Deep Thoughts by Jack Handey.
+ #
+ # @return [String]
+ #
+ # @example
+ # Faker::Quote.deep_thoughts # => "I hope life isn't a big joke, because I don't get it."
+... | 1 | # frozen_string_literal: true
module Faker
class Quote < Base
class << self
##
# Produces a famous last words quote.
#
# @return [String]
#
# @example
# Faker::Quote.famous_last_words #=> "My vocabulary did this to me. Your love will let you go on..."
#
# @... | 1 | 10,169 | since these thoughts are all Jack Handey's the generator should probably be called `jack_handey` to reflect that. | faker-ruby-faker | rb |
@@ -288,6 +288,8 @@ type Container struct {
Environment map[string]*string `locationName:"environment" type:"map"`
+ EnvironmentFiles []*EnvironmentFile `locationName:"environmentFiles" type:"list"`
+
Essential *bool `locationName:"essential" type:"boolean"`
FirelensConfiguration *FirelensConfiguration `loc... | 1 | // 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 "license" file ... | 1 | 24,095 | this file is autogenerated. you should edit `model/api/api-2.json` and then go generate this file. otherwise the next people generating api.go will remove the changes you added here | aws-amazon-ecs-agent | go |
@@ -0,0 +1,8 @@
+class ProgressBarsController < ApplicationController
+
+ def show
+ _trail = Trail.find(params[:trail_id])
+ @trail = TrailWithProgress.new(_trail, user: current_user)
+ render layout: false
+ end
+end | 1 | 1 | 14,575 | Extra empty line detected at class body beginning. | thoughtbot-upcase | rb | |
@@ -934,7 +934,9 @@ public class ExecutorManager extends EventHandler implements
@Override
public String submitExecutableFlow(ExecutableFlow exflow, String userId)
throws ExecutorManagerException {
- synchronized (exflow) {
+
+ String exFlowKey = exflow.getProjectName() + "." + exflow.getId() + ".submi... | 1 | /*
* Copyright 2014 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 | 12,605 | This is smart but hacky! I would probably prefer an alternate solution that would be more obvious to read/understand. | azkaban-azkaban | java |
@@ -115,7 +115,7 @@ type Client interface {
S3StreamingGet(ctx context.Context, region string, bucket string, key string) (io.ReadCloser, error)
DescribeTable(ctx context.Context, region string, tableName string) (*dynamodbv1.Table, error)
- UpdateTableCapacity(ctx context.Context, region string, tableName string... | 1 | package aws
// <!-- START clutchdoc -->
// description: Multi-region client for Amazon Web Services.
// <!-- END clutchdoc -->
import (
"context"
"io"
"net/http"
"strings"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/aws/retry"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk... | 1 | 11,691 | i would not return a pointer for status here which is an int | lyft-clutch | go |
@@ -67,6 +67,10 @@ exclude = ["AuthalicMatrixCoefficients",
"vnl_file_matrix",
"vnl_file_vector",
"vnl_fortran_copy",
+ "CosineWindowFunction",
+ "HammingWindowFunction",
+ "LanczosWindowFunction",
+ "WelchWindowFunction",
]
tota... | 1 | #==========================================================================
#
# Copyright Insight Software Consortium
#
# 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 | 10,418 | Those functions are not currently wrapped, so I don't think it is necessary to exclude them (at least for now). | InsightSoftwareConsortium-ITK | cpp |
@@ -89,6 +89,7 @@ class Uppy {
enterTextToSearch: 'Enter text to search for images',
backToSearch: 'Back to Search',
emptyFolderAdded: 'No files were added from empty folder',
+ folderAlreadyAdded: 'The folder was already added',
folderAdded: {
0: 'Added %{smart_cou... | 1 | /* global AggregateError */
const Translator = require('@uppy/utils/lib/Translator')
const ee = require('namespace-emitter')
const cuid = require('cuid')
const throttle = require('lodash.throttle')
const prettierBytes = require('@transloadit/prettier-bytes')
const match = require('mime-match')
const DefaultStore = requ... | 1 | 14,321 | Should we specify the name of the folder? | transloadit-uppy | js |
@@ -14,7 +14,7 @@ from rdkit import RDConfig, rdBase
from rdkit import DataStructs
from rdkit import Chem
import rdkit.Chem.rdDepictor
-from rdkit.Chem import rdqueries
+from rdkit.Chem import rdqueries, rdmolops
from rdkit import __version__
| 1 | #
# Copyright (C) 2003-2019 Greg Landrum and Rational Discovery LLC
# All Rights Reserved
#
""" This is a rough coverage test of the python wrapper
it's intended to be shallow, but broad
"""
import os, sys, tempfile, gzip, gc
import unittest, doctest
from rdkit import RDConfig, rdBase
from rdkit import Dat... | 1 | 20,173 | it's not wrong, but you don't technical need `rdmolops` here since it's imported as part of `Chem` | rdkit-rdkit | cpp |
@@ -534,6 +534,7 @@ class InfluxListenStore(ListenStore):
pxz.stdin.close()
+ pxz.wait()
self.log.info('ListenBrainz listen dump done!')
self.log.info('Dump present at %s!', archive_path)
return archive_path | 1 | # coding=utf-8
import listenbrainz.db.user as db_user
import os.path
import subprocess
import tarfile
import tempfile
import time
import shutil
import ujson
import uuid
from brainzutils import cache
from collections import defaultdict
from datetime import datetime
from influxdb import InfluxDBClient
from influxdb.exc... | 1 | 14,856 | I think the absence of this might have been the cause of the dump file corruption. We didn't wait for the pxz command to exit, leading to a race condition between the cp and this, leading to corrupted files in some places. I came across this because the hashes created and printed were different from the hashes of the a... | metabrainz-listenbrainz-server | py |
@@ -27,7 +27,7 @@ type blockchainConfig struct {
}
type LoggingConfig struct {
- Level logging.Level `required:"true" default:"debug"`
+ Level *logging.Level `required:"true" default:"info"`
}
func NewConfig(path string) (*Config, error) { | 1 | package dwh
import (
"github.com/jinzhu/configor"
"github.com/pkg/errors"
"github.com/sonm-io/core/accounts"
"github.com/sonm-io/core/insonmnia/logging"
)
type Config struct {
Logging LoggingConfig `yaml:"logging"`
GRPCListenAddr string `yaml:"grpc_address" default:"127.0.0.1:15021... | 1 | 6,847 | Out of the scope. | sonm-io-core | go |
@@ -1,11 +1,11 @@
describe('ColumnSorting', () => {
- var id = 'testContainer';
+ const id = 'testContainer';
beforeEach(function() {
this.$container = $(`<div id="${id}" style="overflow: auto; width: 300px; height: 200px;"></div>`).appendTo('body');
- this.sortByColumn = function(columnIndex) {
- ... | 1 | describe('ColumnSorting', () => {
var id = 'testContainer';
beforeEach(function() {
this.$container = $(`<div id="${id}" style="overflow: auto; width: 300px; height: 200px;"></div>`).appendTo('body');
this.sortByColumn = function(columnIndex) {
var element = this.$container.find(`th span.columnSorti... | 1 | 14,775 | Maybe `sortByColumnHeader` would be more precise? The plugin has a method with the same name and it could be confusing. | handsontable-handsontable | js |
@@ -36,7 +36,8 @@ export function diffChildren(
oldDom,
isHydrating
) {
- let i, j, oldVNode, childVNode, newDom, firstChildDom, refs;
+ let i, j, oldVNode, childVNode, newDom, firstChildDom;
+ let refs = [];
// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._chi... | 1 | import { diff, unmount, applyRef } from './index';
import { createVNode, Fragment } from '../create-element';
import { EMPTY_OBJ, EMPTY_ARR } from '../constants';
import { removeNode } from '../util';
import { getDomSibling } from '../component';
/**
* Diff the children of a virtual node
* @param {import('../interna... | 1 | 16,465 | @developit I vaguely remember you mentioning something about some JS engines having an escape analysis feature that makes objects (and arrays?) locally declared that never leave the function essentially free from a GC perspective or something. Do you think we could benefit from that here? Or should we leave this as it ... | preactjs-preact | js |
@@ -1252,6 +1252,8 @@ func invertOpForLocalNotifications(oldOp op) (newOp op, err error) {
}
case *GCOp:
newOp = op
+ case *resolutionOp:
+ newOp = op
}
// Now reverse all the block updates. Don't bother with bare Refs | 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 (
"context"
"errors"
"fmt"
"reflect"
"strings"
"time"
"github.com/keybase/go-codec/codec"
"github.com/keybase/kbfs/kbfscodec"
)
// op r... | 1 | 16,520 | Remind me why this is needed? | keybase-kbfs | go |
@@ -64,6 +64,14 @@ public final class ConstantScoreQuery extends Query {
return super.rewrite(reader);
}
+ @Override
+ public void visit(QueryVisitor visitor) {
+ QueryVisitor v = visitor.getSubVisitor(BooleanClause.Occur.FILTER, this);
+ if (v != null) {
+ query.visit(v);
+ }
+ }
+
/** We... | 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 | 28,604 | same as above, can this be null now? | apache-lucene-solr | java |
@@ -319,8 +319,8 @@ public class SparkOrcWriter implements OrcValueWriter<InternalRow> {
// make sure the child is big enough
cv.child.ensureSize(cv.childCount, true);
// Add each element
- for (int e = 0; e < cv.lengths[rowId]; ++e) {
- children.addValue((int) (e + cv.offsets... | 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 | 17,666 | This doesn't make sense to me. Should `cv.lengths` be an integer array instead of longs? It looks like they should always be integers since the values are assigned from `ArrayData#numElements()`. That's very likely an int. | apache-iceberg | java |
@@ -1920,7 +1920,18 @@ namespace pwiz.Skyline.Model.Results
}
else if (id.StartsWith(MsDataFileImpl.PREFIX_PRECURSOR))
{
- precursor = double.Parse(id.Substring(MsDataFileImpl.PREFIX_TOTAL.Length), CultureInfo.InvariantCulture);
+ ... | 1 | /*
* Original author: Brendan MacLean <brendanx .at. u.washington.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2009 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in co... | 1 | 13,016 | str.Substring(3).Split(' ')[0] would also work and is more concise. | ProteoWizard-pwiz | .cs |
@@ -198,7 +198,8 @@ void nano::node::keepalive (std::string const & address_a, uint16_t port_a, bool
{
auto endpoint (nano::map_endpoint_to_v6 (i->endpoint ()));
node_l->send_keepalive (endpoint);
- if (preconfigured_peer_a)
+ // Force insert only for local preconfigured peers
+ if (preconfigured... | 1 | #include <nano/node/node.hpp>
#include <nano/lib/interface.h>
#include <nano/lib/timer.hpp>
#include <nano/lib/utility.hpp>
#include <nano/node/common.hpp>
#include <nano/node/rpc.hpp>
#include <algorithm>
#include <cstdlib>
#include <future>
#include <sstream>
#include <boost/polymorphic_cast.hpp>
#include <boost/p... | 1 | 15,002 | Did you mean to negate the not_a_peer check? | nanocurrency-nano-node | cpp |
@@ -1,6 +1,6 @@
/*
* DBeaver - Universal Database Manager
- * Copyright (C) 2010-2021 DBeaver Corp and others
+ * Copyright (C) 2010-2017 Serge Rider (serge@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. | 1 | /*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2021 DBeaver Corp and others
*
* 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/LICE... | 1 | 11,662 | Copyright (C) 2010-2021 DBeaver Corp and others | dbeaver-dbeaver | java |
@@ -22,9 +22,8 @@
We use this to be able to highlight parts of the text.
"""
-import re
import html
-
+import re
from PyQt5.QtWidgets import QStyle, QStyleOptionViewItem, QStyledItemDelegate
from PyQt5.QtCore import QRectF, QSize, Qt
from PyQt5.QtGui import (QIcon, QPalette, QTextDocument, QTextOption, | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2015 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 | 13,478 | This seems like an unrelated change | qutebrowser-qutebrowser | py |
@@ -48,6 +48,10 @@ func (l *linuxStandardInit) Init() error {
runtime.LockOSThread()
defer runtime.UnlockOSThread()
if !l.config.Config.NoNewKeyring {
+ if err := label.SetKeyLabel(l.config.ProcessLabel); err != nil {
+ return err
+ }
+ defer label.SetKeyLabel("")
ringname, keepperms, newperms := l.getSes... | 1 | // +build linux
package libcontainer
import (
"fmt"
"os"
"os/exec"
"runtime"
"syscall" //only for Exec
"github.com/opencontainers/runc/libcontainer/apparmor"
"github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runc/libcontainer/keys"
"github.com/opencontainers/runc/libcontainer/... | 1 | 17,450 | Just to double-check -- are you sure this needs to be done *before* we create a new session? (Is `SetKeyLabel` setting what the label will be for all future keys or the label for the current key?) | opencontainers-runc | go |
@@ -47,6 +47,19 @@ using LocatorSelectorEntry = fastrtps::rtps::LocatorSelectorEntry;
using LocatorSelector = fastrtps::rtps::LocatorSelector;
using PortParameters = fastrtps::rtps::PortParameters;
+namespace eprosima {
+namespace fastdds {
+namespace rtps {
+
+static constexpr SharedMemTransportDescriptor::Ove... | 1 | // Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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 re... | 1 | 18,071 | I thought we were removing the FAIL policy altogether.... | eProsima-Fast-DDS | cpp |
@@ -14,7 +14,7 @@
def txt2tags_actionFunc(target,source,env):
import txt2tags
- txt2tags.exec_command_line([str(source[0])])
+ txt2tags.exec_command_line(["--outfile", str(source[0])[:-3] + "html", str(source[0])])
def exists(env):
try: | 1 | ###
#This file is a part of the NVDA project.
#URL: http://www.nvda-project.org/
#Copyright 2010 James Teh <jamie@jantrid.net>.
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License version 2.0, as published by
#the Free Software Foundation.
#... | 1 | 22,407 | Could you elaborate on why you made this change? | nvaccess-nvda | py |
@@ -374,6 +374,9 @@ TEST(Scanner, Basic) {
CHECK_SEMANTIC_VALUE("\"\\\\\\\110 \"", TokenType::STRING, "\\H "),
CHECK_SEMANTIC_VALUE("\"\\\\\\\\110 \"", TokenType::STRING, "\\\\110 "),
CHECK_SEMANTIC_VALUE("\"\\\\\\\\\110 \"", TokenType::STRING, "\\\\H "),
+
+
+ CHECK_SEMANTIC_VALUE("\"... | 1 | /* Copyright (c) 2018 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 "base/Base.h"
#include <gtest/gtest.h>
#include <sstream>
#include <vector>
#include <utility>
#include "parser... | 1 | 19,456 | before the fix, does this sentence make service crash? My point is can you re-produce the problem. I'm not sure the bug is due to non-asiic code | vesoft-inc-nebula | cpp |
@@ -86,7 +86,7 @@ func repoAssignment() macaron.Handler {
// Contexter middleware already checks token for user sign in process.
func reqToken() macaron.Handler {
return func(c *context.Context) {
- if !c.IsLogged {
+ if true != c.Data["IsApiToken"] {
c.Error(401)
return
} | 1 | // Copyright 2015 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package v1
import (
"strings"
"github.com/go-macaron/binding"
"gopkg.in/macaron.v1"
api "github.com/gogs/go-gogs-client"
"github.com/gogs/gogs/models... | 1 | 13,007 | This comparison looks a bit strange, we should first check existence of key "IsApiToken" and then check if it is equal to true. ~~Besdies, s/IsApiToken/IsAuthedByToken/~~ | gogs-gogs | go |
@@ -568,10 +568,12 @@ func (r *ReconcileClusterSync) applySyncSets(
ObservedGeneration: syncSet.AsMetaObject().GetGeneration(),
Result: hiveintv1alpha1.SuccessSyncSetResult,
}
- if syncSet.GetSpec().ResourceApplyMode == hivev1.SyncResourceApplyMode {
+ applyMode := syncSet.GetSpec().ResourceApp... | 1 | package clustersync
import (
"context"
"fmt"
"math/big"
"math/rand"
"os"
"reflect"
"sort"
"strconv"
"strings"
"time"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
log "github.com/sirupsen/logrus"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apima... | 1 | 17,405 | This might be working as is, but I'm a bit thrown by the || and then && and how things get evaluated. Testing real quick on the go playground, true || false && false seems to either evaluate the && first, or start on the right side. Anyhow could you group with braces, it looks to me like it should be ( a || b) && c in ... | openshift-hive | go |
@@ -0,0 +1,17 @@
+// Copyright (c) 2020 IoTeX Foundation
+// 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 l... | 1 | 1 | 20,687 | add an entry in makefile to generate binary with diff name? | iotexproject-iotex-core | go | |
@@ -115,6 +115,10 @@ func validatePagerDutyConfigs(configs []monitoringv1alpha1.PagerDutyConfig) erro
if conf.RoutingKey == nil && conf.ServiceKey == nil {
return errors.New("one of 'routingKey' or 'serviceKey' is required")
}
+
+ if err := conf.HTTPConfig.Validate(); err != nil {
+ return err
+ }
}
r... | 1 | // Copyright 2021 The prometheus-operator Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... | 1 | 17,374 | hmm so we didn't validate the HTTP config for all receivers? | prometheus-operator-prometheus-operator | go |
@@ -49,5 +49,14 @@ namespace OpenTelemetry.Context.Propagation
/// <param name="getter">Function that will return string value of a key with the specified name.</param>
/// <returns>Span context from it's text representation.</returns>
SpanContext Extract<T>(T carrier, Func<T, string, IEnumer... | 1 | // <copyright file="ITextFormat.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.apache.or... | 1 | 15,279 | ITextFormatActivity had this, can I add to have the same effect? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -20,8 +20,11 @@ import (
"sync"
"time"
+ "github.com/aws/amazon-ecs-agent/agent/containerresource"
+ "github.com/aws/amazon-ecs-agent/agent/containerresource/containerstatus"
+
apicontainerstatus "github.com/aws/amazon-ecs-agent/agent/api/container/status"
- apierrors "github.com/aws/amazon-ecs-agent/agent/a... | 1 | // 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 "license" file acco... | 1 | 26,591 | not blocking: can we remove extra lines here? | aws-amazon-ecs-agent | go |
@@ -44,7 +44,7 @@ var PrivateKey = function PrivateKey(data, network, compressed) {
};
// detect type of data
- if (!data){
+ if (typeof(data) === 'undefined' || data === 'random'){
info.bn = PrivateKey._getRandomBN();
} else if (data instanceof BN) {
info.bn = data; | 1 | 'use strict';
var Address = require('./address');
var base58check = require('./encoding/base58check');
var BN = require('./crypto/bn');
var JSUtil = require('./util/js');
var Networks = require('./networks');
var Point = require('./crypto/point');
var PublicKey = require('./publickey');
var Random = require('./crypto/... | 1 | 13,395 | This just feels weird... can we use some kind of constant here? something like: `if (_.isUndefined(data) || data === PrivateKey.Random)` | bitpay-bitcore | js |
@@ -61,9 +61,12 @@ class ProjectorCompilerPass implements CompilerPassInterface
}
$parameters = $method->getParameters();
- $eventClass = (string) $parameters[0]->getType();
- $definition->addMethodCall('add', [new Reference($serviceId), $eventClass]);
+ $c... | 1 | <?php
/**
* Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved.
* See LICENSE.txt for license details.
*/
declare(strict_types=1);
namespace Ergonode\EventSourcing\Application\DependencyInjection\CompilerPass;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Compo... | 1 | 9,402 | if does not have a class I guess the exception should be thrown because we cannot recognize the type based on it? | ergonode-backend | php |
@@ -262,12 +262,18 @@ public final class DiscoveryMethodModel implements MethodModel {
}
private DiscoveryField createFieldMaskField() {
+ // TODO(andrealin): Change this to a Set instead of a List.
return DiscoveryField.create(
StandardSchemaGenerator.createListSchema(
StandardSch... | 1 | /* Copyright 2017 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 | 28,205 | LOL: use your GitHub username? | googleapis-gapic-generator | java |
@@ -116,6 +116,16 @@ public class Key implements Comparable<Key> {
return toRawKey(Arrays.copyOf(value, value.length + 1));
}
+ /**
+ * nextPrefix key will be key with next available rid. For example, if the current key is
+ * prefix_rid, after calling this method, the return value should be prefix_rid+1... | 1 | /*
* Copyright 2017 PingCAP, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | 1 | 9,562 | any tests for nextPrefix() ? | pingcap-tispark | java |
@@ -482,7 +482,7 @@ public class PrettyPrintVisitor implements VoidVisitor<Void> {
printMemberAnnotations(n.getAnnotations(), arg);
printModifiers(n.getModifiers());
if (!n.getVariables().isEmpty()) {
- n.getMaximumCommonType().accept(this, arg);
+ n.getMaximumCommonType... | 1 | /*
* Copyright (C) 2007-2010 Júlio Vilmar Gesser.
* Copyright (C) 2011, 2013-2016 The JavaParser Team.
*
* This file is part of JavaParser.
*
* JavaParser can be used either under the terms of
* a) the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the ... | 1 | 12,052 | In general I'm saying "if there is no common type I'm just going to skip some stuff and fail silently." | javaparser-javaparser | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.