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 |
|---|---|---|---|---|---|---|---|
@@ -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 | rb |
@@ -75,6 +75,14 @@ type diskBlockCacheSetter interface {
MakeDiskBlockCacheIfNotExists() error
}
+type diskBlockCacheFractionSetter interface {
+ SetDiskBlockCacheFraction(float64)
+}
+
+type syncBlockCacheFractionSetter interface {
+ SetSyncBlockCacheFraction(float64)
+}
+
type clockGetter interface {
Clock() ... | 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 (
"time"
kbname "github.com/keybase/client/go/kbun"
"github.com/keybase/client/go/logger"
"github.com/keybase/client/go/protocol/chat1"
"gi... | 1 | 20,324 | This should go in `ConfigLocal` (and then re-generate the mocks). | keybase-kbfs | go |
@@ -51,10 +51,10 @@ class releaseTestCase(SparkTestCase):
if entry['release_name'] != '':
expected[entry['user_name']].append({
'release_name': entry['release_name'],
- 'release_msid': entry['release_msid'],
- 'release_mbid': entry... | 1 | import json
import os
from collections import defaultdict
from datetime import datetime
import listenbrainz_spark.stats.user.release as release_stats
from listenbrainz_spark import utils
from listenbrainz_spark.path import LISTENBRAINZ_DATA_DIRECTORY
from listenbrainz_spark.tests import SparkTestCase
from pyspark.sql ... | 1 | 16,562 | Nitty but entry.get for the same thing | metabrainz-listenbrainz-server | py |
@@ -10,11 +10,12 @@ import (
"github.com/opencontainers/runc/libcontainer/logs"
_ "github.com/opencontainers/runc/libcontainer/nsenter"
"github.com/sirupsen/logrus"
- "github.com/urfave/cli"
)
func init() {
if len(os.Args) > 1 && os.Args[1] == "init" {
+ // This is the golang entry point for runc init, exe... | 1 | package main
import (
"fmt"
"os"
"runtime"
"strconv"
"github.com/opencontainers/runc/libcontainer"
"github.com/opencontainers/runc/libcontainer/logs"
_ "github.com/opencontainers/runc/libcontainer/nsenter"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
func init() {
if len(os.Args) > 1 && os.Args[1... | 1 | 24,353 | Might not hurt to mention the function never returns (since this all ends in `execve`) so `main` never actually runs. | opencontainers-runc | go |
@@ -100,6 +100,11 @@ namespace Microsoft.AspNetCore.Server.Kestrel
"ThreadCount must be positive.");
}
+ if (!Constants.ECONNRESET.HasValue)
+ {
+ _logger.LogWarning("Unable to determine ECONNRESET value on this platform.");
+ ... | 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.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using Microsoft.AspNetCore.Hosting;
using M... | 1 | 10,759 | nit: add new line after this block | aspnet-KestrelHttpServer | .cs |
@@ -1111,10 +1111,10 @@ Blockly.Css.CONTENT = [
'}',
'.scratchCategoryMenu {',
- 'width: 60px;',
+ 'width: 3.25rem;',
'background: $colour_toolbox;',
'color: $colour_toolboxText;',
- 'font-size: .7em;',
+ 'font-size: .7rem;',
'user-select: none;',
'-webkit-user-select: none;',
... | 1 | /**
* @license
* Visual Blocks Editor
*
* Copyright 2013 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,839 | I believe there is some javascript that also uses this 60px number for calculations. I think I'd rather keep the number in px instead of rem to make that correspondence easier to see. If 3.25rem != 60px, can you also change the other place where `60` is used to in the JS? | LLK-scratch-blocks | js |
@@ -20,10 +20,11 @@ import urllib2
import jinja2
-from retrying import retry
import sendgrid
from sendgrid.helpers import mail
+from retrying import retry
+
from google.cloud.security.common.util import errors as util_errors
from google.cloud.security.common.util import log_util
from google.cloud.security.c... | 1 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 1 | 28,311 | retrying is an installed 3rd party library just like jinja and sendgrid; perhaps try grouping all of them together? | forseti-security-forseti-security | py |
@@ -133,12 +133,12 @@ public interface List<T> extends Seq<T>, Stack<T> {
@SuppressWarnings("unchecked")
final List<T> list = (List<T>) elements;
return list;
- } else if (elements instanceof ArrayList) {
+ } else if (elements instanceof ArrayList || elements instanc... | 1 | /* / \____ _ ______ _____ / \____ ____ _____
* / \__ \/ \ / \__ \ / __// \__ \ / \/ __ \ Javaslang
* _/ // _\ \ \/ / _\ \\_ \/ // _\ \ /\ \__/ / Copyright 2014-2015 Daniel Dietrich
* /___/ \_____/\____/\_____/____/\___\_____/_/ \_/____/ Licensed under the Apache License... | 1 | 5,996 | you could always use List.listIterator with previous() and hasPrevious() to traverse all kinds of j.u.List backwards. No need for special cases for ArrayList and Vector. | vavr-io-vavr | java |
@@ -355,10 +355,17 @@ public class EditImageActivity extends EditBaseActivity implements View.OnClickL
private void addToUndoList() {
try{
+ TODO:// implement a more efficient way, like storing only the difference of bitmaps or
+ // steps followed to edit
+
bitmapsForU... | 1 | package org.fossasia.phimpme.editor.editimage;
import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bu... | 1 | 11,259 | remove the bitmap of index 1 from the list not the 0th one. because when we keep on undoing, it would be better if we end up with the original image rather than some randomly edited image. I am not sure whether only just removing bitmap from the list would clear memory. I think you should call bitmap.recycle before rem... | fossasia-phimpme-android | java |
@@ -1,4 +1,4 @@
-// Copyright 2019 Google Inc. All Rights Reserved.
+// Copyright 2020 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. | 1 | // Copyright 2019 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | 1 | 11,074 | this is a existing file so let's keep 2019 | GoogleCloudPlatform-compute-image-tools | go |
@@ -42,7 +42,7 @@ public class RemoteNetworkConnection implements NetworkConnection {
@Override
public ConnectionType setNetworkConnection(
ConnectionType type) {
- Map<String, ConnectionType> mode = ImmutableMap.of("type", type);
+ Map<String, Integer> mode = ImmutableMap.of("type", type.getBitMask(... | 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 | 13,854 | can you change this instead to just `type.toString()` and then you wouldn't have to expose the getBitMask in the enum. (Alternatively you could have used `type.hashCode()` but that doesn't feel as nice) | SeleniumHQ-selenium | java |
@@ -257,7 +257,7 @@ namespace Nethermind.AuRa.Test.Transactions
TransactionPermissionContractVersions =
new LruCache<Keccak, UInt256>(PermissionBasedTxFilter.Cache.MaxCacheSize, nameof(TransactionPermissionContract));
- var trieStore = new ReadOnlyTrieStore(new Tri... | 1 | // Copyright (c) 2021 Demerzel Solutions Limited
// This file is part of the Nethermind library.
//
// The Nethermind library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of ... | 1 | 25,090 | AsReadOnly() would be better here | NethermindEth-nethermind | .cs |
@@ -427,9 +427,12 @@ class Collection {
* @param {function(collection, changes)} callback - A function to be called when changes occur.
* The callback function is called with two arguments:
* - `collection`: the collection instance that changed,
- * - `changes`: a dictionary with keys `inser... | 1 | ////////////////////////////////////////////////////////////////////////////
//
// Copyright 2016 Realm Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/li... | 1 | 17,043 | I suggest that we use `query_based_sync` instead of `partial_sync`. | realm-realm-js | js |
@@ -15,6 +15,11 @@
// Package azureblob provides a blob implementation that uses Azure Storage’s
// BlockBlob. Use OpenBucket to construct a *blob.Bucket.
//
+// NOTE: SignedURLs for PUT created with this package are not fully portable;
+// they will not work unless the PUT request includes a "x-ms-blob-type" header... | 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 | 19,675 | How does the user use this? By converting the type using `As` function and add the header? Maybe add an example on how. | google-go-cloud | go |
@@ -38,11 +38,14 @@ import java.util.List;
*/
public class DynamicLangApiMethodTransformer {
private final ApiMethodParamTransformer apiMethodParamTransformer;
- private final InitCodeTransformer initCodeTransformer = new InitCodeTransformer();
+ private final InitCodeTransformer initCodeTransformer;
private... | 1 | /* Copyright 2017 Google Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 1 | 21,404 | I'm trying to understand the effects of this change. Is setting this to something other than the old default (that is, `initCodeTransformer = new InitCodeTransformer()`) generally necessary, or are we doing this only to support Python? | googleapis-gapic-generator | java |
@@ -151,14 +151,15 @@
//
// Representing Keys
//
-// The key of a docstore document is some function of its contents, usually a field.
+// The key of a docstore document is its unique identifier, usually a field.
// Keys never appear alone in the docstore API, only as part of a document. For
// instance, to retrie... | 1 | // Copyright 2019 The Go Cloud Development Kit Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... | 1 | 19,542 | "Constructor" isn't a standard term in Go or this project, although we use it informally amongst ourselves. And I think it will confuse people coming from languages like Java. So can we leave this as it was? | google-go-cloud | go |
@@ -114,7 +114,7 @@ class TestCtuFailure(unittest.TestCase):
""" Test that Clang indeed logs the AST import events when using
on-demand mode.
"""
- self.__set_up_test_dir('ctu_on_demand_failure')
+ self.__set_up_test_dir('ctu_failure')
output = self.__do_ctu_all(on_de... | 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,436 | Why do we have to change the test dir? | Ericsson-codechecker | c |
@@ -65,9 +65,11 @@ dom.isNativelyFocusable = function(el) {
return el.type !== 'hidden';
case 'TEXTAREA':
case 'SELECT':
- case 'DETAILS':
+ case 'SUMMARY':
case 'BUTTON':
return true;
+ case 'DETAILS':
+ return !el.querySelector('summary');
}
return false;
}; | 1 | /* global dom */
/**
* Determines if focusing has been disabled on an element.
* @param {HTMLElement} el The HTMLElement
* @return {Boolean} Whether focusing has been disabled on an element.
*/
function focusDisabled(el) {
return (
el.disabled ||
(el.nodeName.toUpperCase() !== 'AREA' && dom.isHiddenWithCSS(el... | 1 | 15,224 | This should test the flattened tree instead. details > summary works across shadow tree boundaries. | dequelabs-axe-core | js |
@@ -0,0 +1,17 @@
+// MvxBindingLog.cs
+
+// MvvmCross is licensed using Microsoft Public License (Ms-PL)
+// Contributions and inspirations noted in readme.md and license.txt
+//
+// Project Lead - Stuart Lodge, @slodge, me@slodge.com
+
+using MvvmCross.Platform;
+using MvvmCross.Platform.Logging;
+
+namespace MvvmCro... | 1 | 1 | 13,676 | Not sure I am a big fan of these duplicated Log classes. | MvvmCross-MvvmCross | .cs | |
@@ -39,6 +39,10 @@ import (
const (
reasonDomainVerified = "DomainVerified"
+ CleanUpError = "CleanUpError"
+ PresentError = "PresentError"
+ Presented = "Presented"
+ Failed = "Failed"
)
// solver solves ACME challenges by presenting the given token and key in an | 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,038 | It's long-winded, but the convention is to give constants a common prefix which, see `reasonDomainVerified` . | jetstack-cert-manager | go |
@@ -32,7 +32,7 @@ const constexpr double LOOKAHEAD_DISTANCE_WITHOUT_LANES = 10.0;
// smaller widths, ranging from 2.5 to 3.25 meters. As a compromise, we use
// the 3.25 here for our angle calculations
const constexpr double ASSUMED_LANE_WIDTH = 3.25;
-const constexpr double FAR_LOOKAHEAD_DISTANCE = 30.0;
+const con... | 1 | #include "extractor/guidance/coordinate_extractor.hpp"
#include "extractor/guidance/constants.hpp"
#include "extractor/guidance/toolkit.hpp"
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <iomanip>
#include <limits>
#include <numeric>
#include <tuple>
#include <utility>
#include <boost/range/algo... | 1 | 18,773 | Using lanes later down, this threshold could be reduced for similar effects. Otherwise we look a bit to far. | Project-OSRM-osrm-backend | cpp |
@@ -78,6 +78,12 @@ typedef enum {
CONTAINER_MODE_UMBRELLA
} container_mode_t;
+struct environment {
+ char *tarball; /* Conda environemnt as produced by conda-pack. */
+ char *expansion; /* Directory in cache/. Only set when environemnt has been expanded.*/
+ int error; /* Whether the expansion had a... | 1 | /*
Copyright (C) 2008- The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "work_queue.h"
#include "work_queue_protocol.h"
#include "work_queue_internal.h"
#include "work_queue_resources.h"
#include "work_queue_process.h"
#includ... | 1 | 14,861 | Let's get more verbose about names. struct `wq_conda_environment`: if it can really only be used for conda. struct `wq_software_environment`: if it has potential use outside of conda. | cooperative-computing-lab-cctools | c |
@@ -28,6 +28,8 @@ func TestStore_ListProjects(t *testing.T) {
cowProjectString, err := marshal(cowProject)
require.NoError(t, err, "Marshal project should not fail")
+ lastPageInPaginatedResp := false
+
testCases := map[string]struct {
mockGetParametersByPath func(t *testing.T, param *ssm.GetParametersByPath... | 1 | // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package ssm
import (
"fmt"
"testing"
"github.com/aws/PRIVATE-amazon-ecs-archer/internal/pkg/archer"
"github.com/aws/PRIVATE-amazon-ecs-archer/internal/pkg/store"
"github.com/aws/aws-sdk-go/aws"
"gi... | 1 | 10,445 | Should we set this back to `false` inside each `t.Run`? so that we can have more than one testcase that can have paginated responses | aws-copilot-cli | go |
@@ -130,6 +130,9 @@ class BaseSnapshot implements Snapshot {
if (dataManifests == null) {
this.dataManifests = ImmutableList.copyOf(Iterables.filter(allManifests,
manifest -> manifest.content() == ManifestContent.DATA));
+ }
+
+ if (deleteManifests == null) {
this.deleteManifests = I... | 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 | 21,215 | What about using `dataManifests == null || deleteManifests == null`? | apache-iceberg | java |
@@ -469,7 +469,7 @@ public class IndexSearcher {
@Override
public TopScoreDocCollector newCollector() throws IOException {
- return TopScoreDocCollector.create(cappedNumHits, after, TOTAL_HITS_THRESHOLD);
+ return TopScoreDocCollector.create(cappedNumHits, after, new GlobalHitsThresholdChe... | 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 | 30,094 | The `HitsThresholdChecker` should be created once and shared within the collectors ? We also don't need to use the `GlobalHitsThresholdChecker` if the executor is null or if there is a single slice. | apache-lucene-solr | java |
@@ -15,10 +15,14 @@
package openflow
import (
+ "antrea.io/antrea/pkg/agent/config"
+ "antrea.io/antrea/pkg/agent/openflow/cookie"
"fmt"
+ "k8s.io/client-go/tools/cache"
"net"
"strconv"
"strings"
+ "sync"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/klog/v2" | 1 | // Copyright 2019 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 48,686 | move this to below `antrea.io` import section | antrea-io-antrea | go |
@@ -80,6 +80,8 @@ namespace OpenTelemetry.Trace
/// </summary>
/// <param name="activity">Activity instance.</param>
/// <param name="kind">Activity execution kind.</param>
+ /// <remarks>This extension method should only be used on <see cref="Activity"/> instances that were created
+ ... | 1 | // <copyright file="ActivityExtensions.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.ap... | 1 | 16,704 | Seems likely to confuse people. What if we moved it into ActivitySourceAdapter and made it private? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -320,6 +320,18 @@ func (b *EthAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction)
if len(signedTx.Data()) > b.MaxCallDataSize {
return fmt.Errorf("Calldata cannot be larger than %d, sent %d", b.MaxCallDataSize, len(signedTx.Data()))
}
+ // The gas price must be a multiple of a gwei
+ ... | 1 | // Copyright 2015 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... | 1 | 15,602 | gas price don't need to be a multiple cuz we support allll gas prices now | ethereum-optimism-optimism | go |
@@ -81,5 +81,10 @@ namespace Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.Interfaces
/// Send the request to abort the test run
/// </summary>
void SendTestRunAbort();
+
+ /// <summary>
+ /// handle client process exit
+ /// </summary>
+ void OnClient... | 1 | // Copyright (c) Microsoft. All rights reserved.
namespace Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.Interfaces
{
using System;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.ObjectModel;
using Microsoft.VisualStudio.TestPlatform.Ob... | 1 | 11,242 | We are exposing implementation details in the interface. What if there is no processes involved in an implementation of `ITestRequestSender`? | microsoft-vstest | .cs |
@@ -1167,6 +1167,8 @@ def main(args,
'address.\n')
else:
print('Error occurred on the server side, message: {}'.format(e))
+ except Exception as e: # pylint: disable=broad-except
+ print ('Error occurred, message: {}'.format(e.message))
return config
| 1 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 1 | 30,281 | It would be awesome not to handle the broad exception here. Instead, raise a custom exception, something like `ModelNotSetException`, from the `require_model()`, and then handle it here with a nicer message to tell the user to set the model first. | forseti-security-forseti-security | py |
@@ -18,7 +18,8 @@ return [
'widget_title_default' => 'Website',
'online' => 'Online',
'maintenance' => 'In maintenance',
- 'manage_themes' => 'Manage themes'
+ 'manage_themes' => 'Manage themes',
+ 'customize_theme' => 'Customize Theme'
]
... | 1 | <?php
return [
'cms_object' => [
'invalid_file' => 'Invalid file name: :name. File names can contain only alphanumeric symbols, underscores, dashes and dots. Some examples of correct file names: page.htm, page, subdirectory/page',
'invalid_property' => "The property ':name' cannot be set",
... | 1 | 11,990 | This already exists under the `theme` lang key, please remove this. | octobercms-october | php |
@@ -223,6 +223,10 @@ class SetupUsingGCP extends Component {
return (
<Fragment>
<Header />
+ { /*
+ Note: this component doesn't use hooks and thus can't access the
+ feature flags, so we don't render the HelpMenu here.
+ */ }
<div className="googlesitekit-wizard">
<div className="... | 1 | /**
* SetupUsingGCP 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-2.0
... | 1 | 36,664 | Let's add a simple inline HOC around the default export below to provide the value as a prop (no need to introduce a reusable function for this yet). | google-site-kit-wp | js |
@@ -29,7 +29,7 @@ module Beaker
v_file << " v.vm.box = '#{host['box']}'\n"
v_file << " v.vm.box_url = '#{host['box_url']}'\n" unless host['box_url'].nil?
v_file << " v.vm.base_mac = '#{randmac}'\n"
- v_file << " v.vm.network :private_network, ip: \"#{host['ip'].to_s}\", :ne... | 1 | require 'open3'
module Beaker
class Vagrant < Beaker::Hypervisor
# Return a random mac address
#
# @return [String] a random mac address
def randmac
"080027" + (1..3).map{"%0.2X"%rand(256)}.join
end
def rand_chunk
(2 + rand(252)).to_s #don't want a 0, 1, or a 255
end
de... | 1 | 4,927 | I believe that you end up printing out the result of the assignment here instead of the netmask. | voxpupuli-beaker | rb |
@@ -0,0 +1,11 @@
+export const CREDENTIALS = {
+ user: 'test',
+ password: 'test'
+};
+
+export const TARBALL = 'tarball-blahblah-file.name';
+export const PORT_SERVER_APP = '55550';
+export const PORT_SERVER_1 = '55551';
+export const PORT_SERVER_2 = '55552';
+export const PORT_SERVER_3 = '55553';
+export const DOMA... | 1 | 1 | 18,071 | We have to update the filename here. | verdaccio-verdaccio | js | |
@@ -121,6 +121,11 @@ std::string FlatCompiler::GetUsageString(const char *program_name) const {
" (see the --cpp-str-flex-ctor option to change this behavior).\n"
" --cpp-str-flex-ctor Don't construct custom string types by passing std::string\n"
" from... | 1 | /*
* Copyright 2014 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 1 | 21,387 | The `--cpp-field-case` looks like `--cpp-field-style` instead of `-case`. - 'unchanged' - leave unchanged (default); - 'upper_camel' -upper camel case; - 'lower_camel' - lower camel case. | google-flatbuffers | java |
@@ -95,9 +95,6 @@ ot_admin_builtin_upgrade (int argc, char **argv, GCancellable *cancellable, GErr
"override-commit", NULL);
}
- /* Should we consider requiring --discard-hotfix here? */
- origin_changed |= g_key_file_remove_key (origin, "origin", ... | 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
*
* Copyright (C) 2012 Colin Walters <walters@verbum.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
*... | 1 | 7,836 | I haven't thought about this a lot yet, but if we were to try this change, we'd still need to keep the code to delete it from the `.origin` file for backcompat. | ostreedev-ostree | c |
@@ -18,6 +18,9 @@ package org.hyperledger.besu.evmtool;
import org.hyperledger.besu.config.GenesisConfigOptions;
import org.hyperledger.besu.consensus.clique.CliqueProtocolSchedule;
import org.hyperledger.besu.consensus.ibft.IbftBlockHeaderFunctions;
+import org.hyperledger.besu.crypto.KeyPairSecurityModule;
+import... | 1 | /*
* Copyright 2018 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 wr... | 1 | 22,462 | In my opinion I think it is possible to add `private final` here | hyperledger-besu | java |
@@ -265,7 +265,7 @@ func (p *Builder) writeProgramHeader() {
p.b.LoadMapFD(R1, uint32(p.stateMapFD)) // R1 = 0 (64-bit immediate)
p.b.Call(HelperMapLookupElem) // Call helper
// Check return value for NULL.
- p.b.JumpEqImm64(R0, 0, "deny")
+ p.b.JumpEqImm64(R0, 0, "exit")
// Save state pointer in R9.
... | 1 | // Copyright (c) 2020-2021 Tigera, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ap... | 1 | 19,373 | Feel like "exit" doesn't convey that the packet will be dropped. "drop-and-exit" or "error-exit" maybe? | projectcalico-felix | go |
@@ -1330,7 +1330,7 @@ static bool check_main_create(pass_opt_t* opt, ast_t* ast)
if(ast_childcount(params) != 1)
{
ast_error(opt->check.errors, params,
- "the create constructor of a Main actor must take a single Env "
+ "A Main actor must have a create constructor which takes a single Env "
... | 1 | #include "reference.h"
#include "literal.h"
#include "postfix.h"
#include "call.h"
#include "../pass/expr.h"
#include "../pass/names.h"
#include "../pass/flatten.h"
#include "../type/subtype.h"
#include "../type/assemble.h"
#include "../type/alias.h"
#include "../type/viewpoint.h"
#include "../type/cap.h"
#include "../... | 1 | 8,786 | How do you feel about "The Main actor" instead of "A Main actor", while we're already here changing the message? | ponylang-ponyc | c |
@@ -38,6 +38,7 @@ public interface PermissionNameProvider {
COLL_READ_PERM("collection-admin-read", null),
CORE_READ_PERM("core-admin-read", null),
CORE_EDIT_PERM("core-admin-edit", null),
+ ZK_READ_PERM("zk-read", null),
READ_PERM("read", "*"),
UPDATE_PERM("update", "*"),
CONFIG_EDIT_P... | 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,045 | I cannot see that this new permission is used anywhere? And if the new zk handler is covered by `zk-read`, should not also existing `ZookeeperInfoHandler` handler implement PermissionNameProvider and declare the same permission, for consistency? | apache-lucene-solr | java |
@@ -103,7 +103,7 @@ def as_spark_type(tpe) -> types.DataType:
"""
# TODO: Add "boolean" and "string" types.
# ArrayType
- if tpe in (np.ndarray,):
+ if tpe in (list, np.ndarray,):
return types.ArrayType(types.StringType())
elif hasattr(tpe, "__origin__") and issubclass(tpe.__origin__,... | 1 | #
# Copyright (C) 2019 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 1 | 17,464 | Is this reasonable? | databricks-koalas | py |
@@ -21,6 +21,7 @@ class AutoAugment(object):
augment images.
Examples:
+ TODO: Implement 'Shear', 'Sharpness' and 'Rotate' transforms
>>> replace = (104, 116, 124)
>>> policies = [
>>> [ | 1 | import copy
import numpy as np
from ..builder import PIPELINES
from .compose import Compose
@PIPELINES.register_module()
class AutoAugment(object):
"""Auto augmentation.
This data augmentation is proposed in
`Learning Data Augmentation Strategies for Object Detection <https://arxiv.org/pdf/1906.11172>`... | 1 | 20,646 | We may move this TODO to Line15. | open-mmlab-mmdetection | py |
@@ -263,7 +263,12 @@ class OrderController extends BaseFrontController
/* check cart count */
$this->checkCartNotEmpty();
-
+
+ /* check stock not empty */
+ if(true === ConfigQuery::checkAvailableStock()) {
+ return $this->checkStockNotEmpty();
+ }
+
... | 1 | <?php
/*************************************************************************************/
/* */
/* Thelia */
/* ... | 1 | 10,681 | You have to verify the return type. If it's a reponse, return it. Otherwise do nothing. | thelia-thelia | php |
@@ -44,15 +44,17 @@
#include <Kokkos_Core.hpp>
#include <Kokkos_Timer.hpp>
-#include <bench.hpp>
#include <cstdlib>
+template <class T>
+void run_stride_unroll(int, int, int, int, int, int, int, int);
+
int main(int argc, char* argv[]) {
Kokkos::initialize();
if (argc < 10) {
printf("Arguments: N K... | 1 | /*
//@HEADER
// ************************************************************************
//
// Kokkos v. 3.0
// Copyright (2020) National Technology & Engineering
// Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Govern... | 1 | 32,605 | No. Keep the header include and do `extern template ...` to skip the instantiation from that compile unit. (I pushed a fix directly to your branch) | kokkos-kokkos | cpp |
@@ -203,6 +203,8 @@ class TestPython3Checker(testutils.CheckerTestCase):
'[x for x in {}]',
'func({})',
'a, b = {}',
+ 'max({}())',
+ 'min({}())',
]
non_iterating_code = [
'x = __({}())', | 1 | # -*- coding: utf-8 -*-
# Copyright (c) 2014-2017 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014-2015 Brett Cannon <brett@python.org>
# Copyright (c) 2015 Ionel Cristian Maries <contact@ionelmc.ro>
# Copyright (c) 2015 Cosmin Poieana <cmin@ropython.org>
# Copyright (c) 2015 Viorel Stirbu <viorels@gmail.com>
... | 1 | 10,302 | these tests are currently somewhat nonsensical. This code expands to `a, b = {}.keys` when it really should be expanding to `a, b = {}.keys()` -- though fixing this causes the test to fail so I suspect something worse is going on here that I don't quite understand? | PyCQA-pylint | py |
@@ -90,7 +90,7 @@ public class TestAvroNameMapping extends TestAvroReadProjection {
projected = writeAndRead(writeSchema, readSchema, record, nameMapping);
Record projectedL1 = ((Map<String, Record>) projected.get("location")).get("l1");
Assert.assertNotNull("Field missing from table mapping is renamed",... | 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 | 14,497 | Why did this need to change? | apache-iceberg | java |
@@ -0,0 +1,14 @@
+// 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 l... | 1 | 1 | 19,034 | /go/pkg/mod/golang.org/x/xerrors@v0.0.0-20190410155217-1f06c39b4373/adaptor_go1_13.go:16:21: Frame not declared by package errors (from `typecheck`) | iotexproject-iotex-core | go | |
@@ -128,6 +128,7 @@ public class ZkStateReader implements SolrCloseable {
public static final String CONFIGS_ZKNODE = "/configs";
public final static String CONFIGNAME_PROP = "configName";
+ public final static String COLLECTION_CONFIG_PROP = "collection.configName";
public static final String SAMPLE_PERC... | 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 | 40,397 | Probably doesn't go here because I think it's specific to the HTTP API layer. This class is too internal to declare such a name. | apache-lucene-solr | java |
@@ -60,8 +60,11 @@ public class ITZipkinMetricsHealth {
}
@Test public void healthIsOK() throws Exception {
- assertThat(get("/health").isSuccessful())
- .isTrue();
+ Response check = get("/health");
+ assertThat(check.isSuccessful()).isTrue();
+ assertThat(check.body().string()).isEqualTo(
+ ... | 1 | /*
* Copyright 2015-2019 The OpenZipkin Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | 1 | 15,845 | in preparation of directly writing the /health endpoint one day.. we should have content checks. | openzipkin-zipkin | java |
@@ -10,7 +10,7 @@ import (
type MultipleIDMatchesError struct{ prefix string }
func (e *MultipleIDMatchesError) Error() string {
- return fmt.Sprintf("multiple IDs with prefix %s found", e.prefix)
+ return fmt.Sprintf("multiple IDs with prefix %q found", e.prefix)
}
// A NoIDByPrefixError is returned by Find() ... | 1 | package restic
import (
"context"
"fmt"
)
// A MultipleIDMatchesError is returned by Find() when multiple IDs with a
// given prefix are found.
type MultipleIDMatchesError struct{ prefix string }
func (e *MultipleIDMatchesError) Error() string {
return fmt.Sprintf("multiple IDs with prefix %s found", e.prefix)
}
... | 1 | 15,273 | question (non-blocking): Is there a benefit from using `%q` instead of `%s`? | restic-restic | go |
@@ -26,7 +26,6 @@ std::string MetaUtils::spaceKey(GraphSpaceID spaceId) {
return key;
}
-
std::string MetaUtils::spaceVal(int32_t partsNum, int32_t replicaFactor, const std::string& name) {
std::string val;
val.reserve(256); | 1 | /* Copyright (c) 2018 - present, VE Software Inc. All rights reserved
*
* This source code is licensed under Apache 2.0 License
* (found in the LICENSE.Apache file in the root directory)
*/
#include "meta/MetaUtils.h"
#include <thrift/lib/cpp2/protocol/Serializer.h>
#include <thrift/lib/cpp2/protocol/CompactProto... | 1 | 15,890 | I would suggest to keep two empty lines between functions in cpp files | vesoft-inc-nebula | cpp |
@@ -178,7 +178,7 @@ void runTests(int64_t numElements) {
{
test(0x01, C_d, C_h, numElements, syncNone, true /*expectMismatch*/);
test(0x02, C_d, C_h, numElements, syncNullStream, false /*expectMismatch*/);
- test(0x04, C_d, C_h, numElements, syncOtherStream, true /*expectMismatch*/);
+ ... | 1 | /*
Copyright (c) 2015-2016 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 use, cop... | 1 | 7,061 | This change causes the test to fail on both rocm-1.9.x and rocm-head. | ROCm-Developer-Tools-HIP | cpp |
@@ -0,0 +1,17 @@
+/**
+ * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
+ */
+
+package net.sourceforge.pmd;
+
+/**
+ * This interface allows to determine which rule violations are fixable, and with which class the fixes will be made.
+ */
+public interface AutoFixableRuleViolation extend... | 1 | 1 | 13,423 | I'd consider moving all fix related stuff to a distinct package to avoid contaminating the base package | pmd-pmd | java | |
@@ -266,7 +266,18 @@ def parse_compile_commands_json(logfile, parseLogOptions):
results = option_parser.parse_options(command)
action.original_command = command
- action.analyzer_options = results.compile_opts
+
+ # If the original include directory could not be found
+ # in the... | 1 | # -------------------------------------------------------------------------
# The CodeChecker Infrastructure
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
# -------------------------------------------------------------------------... | 1 | 9,546 | Use `os.path.join` for path concatenation. | Ericsson-codechecker | c |
@@ -18,11 +18,13 @@ from .retina_head import RetinaHead
from .retina_sepbn_head import RetinaSepBNHead
from .rpn_head import RPNHead
from .ssd_head import SSDHead
+from .yolact_head import YolactHead, YolactProtonet, YolactSegmHead
__all__ = [
'AnchorFreeHead', 'AnchorHead', 'GuidedAnchorHead', 'FeatureAdapt... | 1 | from .anchor_free_head import AnchorFreeHead
from .anchor_head import AnchorHead
from .atss_head import ATSSHead
from .corner_head import CornerHead
from .fcos_head import FCOSHead
from .fovea_head import FoveaHead
from .free_anchor_retina_head import FreeAnchorRetinaHead
from .fsaf_head import FSAFHead
from .ga_retina... | 1 | 20,907 | Use upper case: YOLACTHead, YOLACTProtonet, YOLACTSegmHead | open-mmlab-mmdetection | py |
@@ -43,7 +43,7 @@ type harness struct {
}
func (h *harness) MakeDriver(ctx context.Context) (driver.Crypter, error) {
- return &Crypter{
+ return &crypter{
keyID: &KeyID{
ProjectID: projectID,
Location: location, | 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 | 13,537 | The driver tests should be updated to use the concrete type instead of the driver directly; right now your test coverage of the concrete type is 0%. | google-go-cloud | go |
@@ -1038,7 +1038,14 @@ class CommentAnalyzer
if ($method_tree_child->children) {
- $param_type = Type::getTypeFromTree($method_tree_child->children[0], $codebase);
+ try {
+ $param_type = Type::getTypeFromTree($method_tree... | 1 | <?php
namespace Psalm\Internal\Analyzer;
use PhpParser;
use Psalm\Aliases;
use Psalm\DocComment;
use Psalm\Exception\DocblockParseException;
use Psalm\Exception\IncorrectDocblockException;
use Psalm\Exception\TypeParseTreeException;
use Psalm\FileSource;
use Psalm\Internal\Scanner\ClassLikeDocblockComment;
use Psalm\I... | 1 | 8,481 | I would prefer the message to be more actionable. Like 'There should be no space between & and the variable name' or something similar. | vimeo-psalm | php |
@@ -83,7 +83,16 @@ public class AntlrBaseNode extends ParserRuleContext implements AntlrNode {
@Override
public Node jjtGetChild(final int index) {
- return (Node) children.get(index); // TODO: review if all children are Nodes
+ try {
+ return (Node) children.get(index);
+ } ... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.ast;
import org.antlr.v4.runtime.ParserRuleContext;
import net.sourceforge.pmd.lang.dfa.DataFlowNode;
public class AntlrBaseNode extends ParserRuleContext implements AntlrNode {
// TODO: wha... | 1 | 16,052 | The image attribute is not supposed to be the text of the node. I'd rather keep it separate (the previous `@Text` attribute was fine). A practical reason for that is in the future, other languages may have a way to get the text of their node, in which case that wouldn't be fetched with `getImage`, for compatibility, bu... | pmd-pmd | java |
@@ -12,14 +12,14 @@ module RSpec
def initialize
@full_backtrace = false
- @exclusion_patterns = [] << Regexp.union(
+ @system_exclusion_patterns = [] << Regexp.union(
*["/lib\d*/ruby/",
"org/jruby/",
"bin/",
"/gems/",
"lib/rs... | 1 | module RSpec
module Core
class BacktraceFormatter
# This is only used externally by rspec-expectations. Can be removed once
# rspec-expectations uses
# RSpec.configuration.backtrace_formatter.format_backtrace instead.
def self.format_backtrace(backtrace, options = {})
RSpec.configu... | 1 | 11,766 | The `[] +` seems weird to me. Why is it there? | rspec-rspec-core | rb |
@@ -1,7 +1,7 @@
class FollowUp < ActiveRecord::Base
belongs_to :course
- validates_presence_of :email
- validates_format_of :email, with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i, on: :create
+ EMAIL_FORMAT = /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i
+ validates :email, presence: true, format: { with: ... | 1 | class FollowUp < ActiveRecord::Base
belongs_to :course
validates_presence_of :email
validates_format_of :email, with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i, on: :create
scope :have_not_notified, where(notified_at: nil)
def notify(section)
Mailer.follow_up(self, section).deliver
self.notified... | 1 | 6,764 | Not sure if this constant is defined at the right place style-wise. Maybe move it up to before 'belongs_to' like DISCOUNT_TYPES in coupon.rb? | thoughtbot-upcase | rb |
@@ -251,6 +251,17 @@ func checksum(bytes []byte) string {
return hex.EncodeToString(d[:])
}
+func isEmptyYaml(yaml []byte) bool {
+ isEmpty := true
+ lines := bytes.Split(yaml, []byte("\n"))
+ for _, k := range lines {
+ if string(k) != "---" && !bytes.HasPrefix(k, []byte("#")) && string(k) != "" {
+ isEmpty = ... | 1 | package deploy
import (
"bufio"
"bytes"
"context"
"crypto/sha256"
"encoding/hex"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
"time"
errors2 "github.com/pkg/errors"
v1 "github.com/rancher/k3s/types/apis/k3s.cattle.io/v1"
"github.com/rancher/norman"
"github.com/rancher/norman/objectclient"
"github.... | 1 | 7,276 | What about a line with just spaces/tabs? Or a line with a couple spaces followed by a `#`? | k3s-io-k3s | go |
@@ -376,7 +376,7 @@ module OrgAdmin
# Load the funder's template(s)
templates = Template.valid.publicly_visible.where(published: true, org_id: funder_id).to_a
- if org_id.present?
+ unless org_id.blank?
# Swap out any organisational cusotmizations of a funder templ... | 1 | module OrgAdmin
class TemplatesController < ApplicationController
include Paginable
include TemplateFilter
after_action :verify_authorized
# GET /org_admin/templates
# -----------------------------------------------------
def index
authorize Template
# Apply scoping
a... | 1 | 17,369 | if funder_is is not blank (L375) there is not need to check if org_id is not blank (L379) since you will never enter in the if (L374). | DMPRoadmap-roadmap | rb |
@@ -3403,6 +3403,13 @@ void Client::Handle_OP_AutoFire(const EQApplicationPacket *app)
DumpPacket(app);
return;
}
+
+ if (GetTarget() == this) {
+ this->MessageString(Chat::TooFarAway, TRY_ATTACKING_SOMEONE);
+ auto_fire = false;
+ return;
+ }
+
bool *af = (bool*)app->pBuffer;
auto_fire = *af;
auto_att... | 1 | /* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
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; version 2 of the License.
This program is di... | 1 | 11,024 | Don't need this-> here. | EQEmu-Server | cpp |
@@ -20,6 +20,9 @@ The metadata server is only accessible on GCE.
import httplib
import socket
+from google.auth.compute_engine import _metadata
+from google.auth.transport import requests
+
from google.cloud.forseti.common.util import errors
from google.cloud.forseti.common.util import logger
| 1 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 1 | 30,240 | I'm a little concerned about relying on a private module, as they could change the implementation at some point, I'd like to have some test to validate this is working as intended. | forseti-security-forseti-security | py |
@@ -1095,7 +1095,7 @@ class Resource:
send_alert(self.request, message, url)
operator = COMPARISON.LT
- if value == "":
+ if value == "" or isinstance(value, dict):
raise_invalid(self.request, **error_details)
... | 1 | import functools
import logging
import re
import warnings
from uuid import uuid4
import colander
import venusian
from pyramid import exceptions as pyramid_exceptions
from pyramid.decorator import reify
from pyramid.httpexceptions import (
HTTPNotFound,
HTTPNotModified,
HTTPPreconditionFailed,
HTTPServi... | 1 | 12,681 | There might other values that we don't support here (eg. `[]`). So it might be safer to check for the supported types instead (string or number). | Kinto-kinto | py |
@@ -179,6 +179,18 @@ Status GoExecutor::prepareFrom() {
status = Status::Error();
break;
}
+ if (expr->isFunCallExpression()) {
+ auto *funcExpr = static_cast<FunctionCallExpression*>(expr);
+ if (*(funcExpr->name()) == "near") {
+ ... | 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 "graph/GoExecutor.h"
#include "graph/SchemaHelper.h"
#include "dataman/RowReader.h"
#inc... | 1 | 23,057 | FYI, It won't have any benefit to move from trivial types. | vesoft-inc-nebula | cpp |
@@ -37,6 +37,7 @@ const (
capabilityDockerPluginInfix = "docker-plugin."
attributeSeparator = "."
capabilityPrivateRegistryAuthASM = "private-registry-authentication.secretsmanager"
+ capabilitySecretEnvSSM = "secrets-ssm-environment-variabl... | 1 | // Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license... | 1 | 21,012 | i missed these discussions- but ` "secrets-ssm-environment-variables"` is what was agreed upon with cp? | aws-amazon-ecs-agent | go |
@@ -20,6 +20,7 @@ import (
"google.golang.org/protobuf/types/known/anypb"
"gopkg.in/yaml.v3"
+ "github.com/gogo/protobuf/jsonpb"
gatewayv1 "github.com/lyft/clutch/backend/api/config/gateway/v1"
"github.com/lyft/clutch/backend/middleware/timeouts"
) | 1 | package gateway
import (
"bytes"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
"text/template"
"time"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/kno... | 1 | 11,998 | whats the difference between this package and `github.com/golang/protobuf` ? or did vscode just decided this was the package it wanted to used? | lyft-clutch | go |
@@ -127,6 +127,7 @@ public class RepositoriesPanel extends StackPane {
this.addButton.setText(tr("Add"));
this.addButton.setOnAction((ActionEvent event) -> {
AddRepositoryDialog dialog = new AddRepositoryDialog();
+ dialog.initOwner(this.getParent().getScene().getWindow());
... | 1 | package org.phoenicis.javafx.views.mainwindow.settings;
import javafx.application.Platform;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.geometry.VPos;
import javafx.scene.con... | 1 | 10,755 | Just asking: What does this line do? Does it add the stylesheet from the parent to the dialog? | PhoenicisOrg-phoenicis | java |
@@ -108,6 +108,7 @@ if __name__ == "__main__":
"pytest-xdist==2.1.0",
"pytest==6.1.1",
"responses==0.10.*",
+ "scikit-learn<1.0.0", # scikit-learn 1.0 requires python 3.7
"snapshottest==0.6.0",
"tox==3.14.2",
... | 1 | from typing import Dict
from setuptools import find_packages, setup # type: ignore
def long_description() -> str:
return """
## Dagster
Dagster is a data orchestrator for machine learning, analytics, and ETL.
Dagster lets you define pipelines in terms of the data flow between reusable, logical components,
then... | 1 | 17,134 | Including the scikit-learn dependency here would pull in scikit-learn for everyone who depends on Dagster. If you put it in the setup.py under docs_snippets, we'd avoid that problem (although I think it's already there). | dagster-io-dagster | py |
@@ -274,7 +274,6 @@ Status DataCollectExecutor::collectMultiplePairShortestPath(const std::vector<st
Status DataCollectExecutor::collectPathProp(const std::vector<std::string>& vars) {
DataSet ds;
ds.colNames = colNames_;
- DCHECK(!ds.colNames.empty());
// 0: vertices's props, 1: Edges's props 2: paths witho... | 1 | /* Copyright (c) 2020 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 "graph/executor/query/DataCollectExecutor.h"
#include "graph/planner/plan/Query.h"
#include "graph/util/Scoped... | 1 | 31,408 | Why remove this? | vesoft-inc-nebula | cpp |
@@ -145,13 +145,3 @@ def test_completion_item_focus(tree, count, expected, completionview):
completionview.completion_item_focus(direction)
idx = completionview.selectionModel().currentIndex()
assert filtermodel.data(idx) == expected
-
-
-def test_completion_item_focus_no_model(completionview):
- ... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016 Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>
#
# 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 Software Foun... | 1 | 15,738 | Why remove this? It seems like we should keep this around as a regression test, unless we can guarantee this will never be called without a model set (does your new code guarantee that?) | qutebrowser-qutebrowser | py |
@@ -27,6 +27,7 @@ const SET_PERMISSION_SCOPE_ERROR = 'SET_PERMISSION_SCOPE_ERROR';
export const INITIAL_STATE = {
permissionError: null,
+ capabilities: global._googlesitekitUserData?.permissions || {},
};
export const actions = { | 1 | /**
* core/user Data store: permission scopes.
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licens... | 1 | 30,366 | Because this defaults to `{}` if `global._googlesitekitUserData?.permissions` is `false`-y, the checks below around `state.capabilities` always result in the `!! capabilities === true` path. This shouldn't have a default value of `{}` if there's the possibility that `global._googlesitekitUserData?.permissions` can be `... | google-site-kit-wp | js |
@@ -234,3 +234,17 @@ def repeat_command(win_id, count=None):
cmd = runners.last_command[mode_manager.mode]
commandrunner = runners.CommandRunner(win_id)
commandrunner.run(cmd[0], count if count is not None else cmd[1])
+
+@cmdutils.register(debug=True,name='debug-log-capacity')
+def log_capacity(capacity... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 15,574 | Please add a space after the comma here (generally, with arguments there's always a space after commas). | qutebrowser-qutebrowser | py |
@@ -17,7 +17,7 @@ package org.hyperledger.besu.config.experimental;
import picocli.CommandLine.Option;
/**
- * Flags defined in those class must be used with cautious, and strictly reserved to experimental
+ * Flags defined in those class must be used with caution, and strictly reserved to experimental
* EIPs.
... | 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 | 23,941 | From the context, should it say "Flags defined in this class must be used with caution..." ? | hyperledger-besu | java |
@@ -0,0 +1,19 @@
+module.exports = {
+ roots: [
+ "<rootDir>/javascript/grid-ui/src"
+ ],
+ testMatch: [
+ "<rootDir>/javascript/grid-ui/src/tests/**/*.test.tsx"
+ ],
+ transform: {
+ "^.+\\.(ts|tsx)$": "ts-jest"
+ },
+ moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
+ snapshotSeriali... | 1 | 1 | 18,309 | We don't need this file, we can use the one that is in the grid-ui directory | SeleniumHQ-selenium | py | |
@@ -28,6 +28,7 @@ const (
infoNoAccounts = "Did not find any account. Please import or create a new one."
infoRenamedAccount = "Renamed account '%s' to '%s'"
infoImportedKey = "Imported %s"
+ infoExportedKey = "Imported key for account %s: \"%s\""
infoIm... | 1 | // Copyright (C) 2019 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any l... | 1 | 35,239 | "Exported key for account"? | algorand-go-algorand | go |
@@ -37,6 +37,7 @@ namespace pwiz.Skyline.Util.Extensions
{
public const string EXT_CSV = ".csv"; // Not L10N
public const string EXT_TSV = ".tsv"; // Not L10N
+ public const string CRLF = "\r\n"; // Not L10N
public static string FILTER_CSV
{ | 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 | 12,219 | Normally we use Environment.NewLine unless you really want it to always be \r\n | ProteoWizard-pwiz | .cs |
@@ -697,13 +697,6 @@ func (c *AuRa) verifyFamily(chain consensus.ChainHeaderReader, e consensus.Epoch
return nil
}
-// VerifyHeaders is similar to VerifyHeader, but verifies a batch of headers. The
-// method returns a quit channel to abort the operations and a results channel to
-// retrieve the async verificatio... | 1 | // Copyright 2017 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License... | 1 | 22,942 | why did you remove `verifyHeaders`? | ledgerwatch-erigon | go |
@@ -66,14 +66,14 @@ class RegistrationsController < Devise::RegistrationsController
if other_org.nil?
redirect_to(after_sign_up_error_path_for(resource), alert: _('You cannot be assigned to other organisation since that option does not exist in the system. Please contact your system administrato... | 1 | # app/controllers/registrations_controller.rb
class RegistrationsController < Devise::RegistrationsController
def edit
@user = current_user
@prefs = @user.get_preferences(:email)
@languages = Language.sorted_by_abbreviation
@orgs = Org.where(parent_id: nil).order("name")
@other_organisations = Or... | 1 | 17,954 | Thanks for cleaning up these deprecated calls | DMPRoadmap-roadmap | rb |
@@ -110,13 +110,13 @@ def _create_user(username, password='', email=None, is_admin=False,
requires_activation=True, requires_reset=False):
def check_conflicts(username, email):
if not VALID_USERNAME_RE.match(username):
- raise ValidationException("Unacceptable username.")
+ ... | 1 | import base64
from datetime import datetime, timedelta
import json
import uuid
from flask import redirect, request
import itsdangerous
import jwt
from passlib.context import CryptContext
from sqlalchemy import func
from . import app, db
from .const import (VALID_EMAIL_RE, VALID_USERNAME_RE, blacklisted_name,
... | 1 | 16,867 | @akarve this breaks error catching logic on the front end, I'll fix this. That's why I prefer to use some machine-friendly error codes that won't change frequently. | quiltdata-quilt | py |
@@ -115,7 +115,7 @@ func parseResource(resource string) (string, string, string) {
// is resource type require remote query
func requireRemoteQuery(resType string) bool {
- return resType == model.ResourceTypeConfigmap || resType == model.ResourceTypeSecret || resType == constants.ResourceTypeService || resType == ... | 1 | package metamanager
import (
"encoding/json"
"fmt"
"strings"
"time"
"github.com/kubeedge/beehive/pkg/common/config"
"github.com/kubeedge/beehive/pkg/common/log"
"github.com/kubeedge/beehive/pkg/common/util"
"github.com/kubeedge/beehive/pkg/core/context"
"github.com/kubeedge/beehive/pkg/core/model"
"github.c... | 1 | 12,548 | We support process remoteQuery for Service. Why are we removing it ? | kubeedge-kubeedge | go |
@@ -6,10 +6,17 @@ require 'bolt/task'
require 'json'
class TransportAPI < Sinatra::Base
+ # This disables Sinatra's error page generation
+ set :show_exceptions, false
+
get '/' do
200
end
+ get '/500_error' do
+ raise 'Unexpected error'
+ end
+
post '/ssh/run_task' do
content_type :json... | 1 | # frozen_string_literal: true
require 'sinatra'
require 'bolt'
require 'bolt/task'
require 'json'
class TransportAPI < Sinatra::Base
get '/' do
200
end
post '/ssh/run_task' do
content_type :json
body = JSON.parse(request.body.read)
keys = %w[user password port ssh-key-content connect-timeout r... | 1 | 9,405 | This is specifically for testing? | puppetlabs-bolt | rb |
@@ -71,7 +71,6 @@ class TagsController extends AbstractAdmin
{
$view = $this->createViewModel();
$view->setTemplate('admin/tags/home');
- $view->statistics = $this->getTable('resourcetags')->getStatistics(true);
return $view;
}
| 1 | <?php
/**
* Admin Tag Controller
*
* PHP version 5
*
* Copyright (C) Villanova University 2010.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distri... | 1 | 24,899 | I think this is related to the social stats and probably does not need to be removed. | vufind-org-vufind | php |
@@ -13,6 +13,7 @@ import { PhysicalIndexToValueMap as IndexToValueMap } from './../../translations
const privatePool = new WeakMap();
const COLUMN_SIZE_MAP_NAME = 'autoColumnSize';
+/* eslint-disable jsdoc/require-description-complete-sentence */
/**
* @plugin AutoColumnSize
* | 1 | import BasePlugin from './../_base';
import { arrayEach, arrayFilter, arrayReduce, arrayMap } from './../../helpers/array';
import { cancelAnimationFrame, requestAnimationFrame } from './../../helpers/feature';
import GhostTable from './../../utils/ghostTable';
import { isObject, hasOwnProperty } from './../../helpers/... | 1 | 17,104 | Yep, jsdoc again .. It seems that when the plugin description is wrapped within `eslint-disable/enable` expression it's not generated at all. After adding the `@class AutoColumnSize` tag right after the `@plugin` tag the plugin appears in the docs. Please review the other plugins. | handsontable-handsontable | js |
@@ -58,6 +58,13 @@ func (c *azureClient) GetVirtualMachineResourceID(ctx context.Context, principal
}
values := result.Values()
+ for len(values) == 0 {
+ nerr := result.NextWithContext(ctx)
+ if nerr != nil {
+ return "", errs.Wrap(nerr)
+ }
+ values = result.Values()
+ }
if len(values) == 0 {
return ... | 1 | package azure
import (
"context"
"fmt"
"github.com/Azure/azure-sdk-for-go/profiles/latest/compute/mgmt/compute"
"github.com/Azure/azure-sdk-for-go/profiles/latest/network/mgmt/network"
"github.com/Azure/azure-sdk-for-go/profiles/latest/resources/mgmt/resources"
"github.com/Azure/go-autorest/autorest"
"github.c... | 1 | 16,101 | This usage of the result doesn't look quite right. I would not expect the first page of values to be empty if there were multiple pages of results. This also obscures the error case when no values are returned (handled in the next `if` block) by returning a more generic error from the Azure SDK from `result.NextWithCon... | spiffe-spire | go |
@@ -1358,6 +1358,10 @@ func (exp *Service) GetBlockOrActionByHash(hashStr string) (explorer.GetBlkOrAct
return explorer.GetBlkOrActResponse{Execution: &exe}, nil
}
+ if exe, err := exp.GetAddressDetails(hashStr); err == nil {
+ return explorer.GetBlkOrActResponse{AddressDetails: &exe}, nil
+ }
+
return explor... | 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 | 15,055 | unknown field AddressDetails in struct literal (from `typecheck`) | iotexproject-iotex-core | go |
@@ -33,7 +33,13 @@ func sessionForRegion(region string) (*session.Session, error) {
return s.(*session.Session), nil
}
- ns, err := session.NewSession(aws.NewConfig().WithRegion(region))
+ ns, err := session.NewSessionWithOptions(session.Options{
+ // Provide SDK Config options, such as Region.
+ Config: aws.C... | 1 | /*
Copyright 2019 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 | 14,862 | Just noticed, are we specifically missing the addition of `SharedConfigState: session.SharedConfigEnable` ? | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -67,9 +67,9 @@ namespace pwiz.Skyline.Model.Results
var newTimeIntensities = GetTimeIntensities(Source);
if (newTimeIntensities != null)
{
- if (oldTimeIntensities != null)
+ if (oldTimeIntensities != null && oldTimeIntensities.... | 1 | /*
* Original author: Brian Pratt <bspratt .at. proteinms.net>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2015 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance ... | 1 | 12,840 | Not sure what this is. Bad merge? | ProteoWizard-pwiz | .cs |
@@ -1318,9 +1318,12 @@ func (s *Server) updateAccountWithClaimJWT(acc *Account, claimJWT string) error
if acc == nil {
return ErrMissingAccount
}
- if acc.claimJWT != "" && acc.claimJWT == claimJWT && !acc.incomplete {
+ acc.mu.Lock()
+ sameClaim := acc.claimJWT != "" && acc.claimJWT == claimJWT && !acc.incomple... | 1 | // Copyright 2012-2020 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 12,917 | I think this may be a RW lock. | nats-io-nats-server | go |
@@ -1,4 +1,4 @@
-package pluginhelper
+package helpers
import (
"bytes" | 1 | package pluginhelper
import (
"bytes"
"io/ioutil"
"github.com/hashicorp/hcl"
"github.com/hashicorp/hcl/hcl/ast"
"github.com/hashicorp/hcl/hcl/printer"
)
// PluginConfig is the plugin config data
type Config interface {
ParseConfig(file string) error
setConfig(data interface{}) error
}
type PluginConfig stru... | 1 | 8,205 | Perhaps we should tuck this away into a dedicated subdir and name it `config` or something similar? Or maybe it would be happy living in `common`? | spiffe-spire | go |
@@ -810,6 +810,14 @@ void Client::SendTradeskillSearchResults(
continue;
}
}
+
+ //Check if we need to learn it before sending them the recipe..
+ DBTradeskillRecipe_Struct spec;
+ if (content_db.GetTradeRecipe(recipe_id, objtype, someid, this->CharacterID(), &spec)) {
+ if ((spec.must_learn & 0xf) ... | 1 | /* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net)
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; version 2 of the License.
This program... | 1 | 10,826 | Doing a select query inside of a loop like this is not ideal. We should fetch recipes once and then loop through it in memory to perform this check | EQEmu-Server | cpp |
@@ -386,6 +386,8 @@ class Index(IndexOpsMixin):
array([0, 1, 2, 3])
>>> ks.DataFrame({'a': ['a', 'b', 'c']}, index=[[1, 2, 3], [4, 5, 6]]).index.to_numpy()
array([(1, 4), (2, 5), (3, 6)], dtype=object)
+ >>> ks.DataFrame({'a': ['a', 'b', 'c']}, index=[[1, 2, 3], [4, 5, 6]]).index.to_nu... | 1 | #
# Copyright (C) 2019 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 1 | 14,714 | too long here. (104 > 100) | databricks-koalas | py |
@@ -210,7 +210,14 @@ namespace Nethermind.DataMarketplace.Subprotocols
}
Logger.Warn($"GETTING MESSAGE: ndm.{NdmMessageCode.GetDescription(message.PacketType)}");
- MessageHandlers[message.PacketType](message);
+ try
+ {
+ MessageHa... | 1 | // Copyright (c) 2018 Demerzel Solutions Limited
// This file is part of the Nethermind library.
//
// The Nethermind library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of ... | 1 | 24,560 | Use TryGetValue instead of catching exception | NethermindEth-nethermind | .cs |
@@ -4,12 +4,12 @@ feature 'Admin manages mentors' do
scenario 'creating a new mentor' do
user = create(:admin)
- visit admin_path(as: user)
+ visit admin_root_path(as: user)
click_link 'Mentors'
- click_link 'Add new'
+ click_link 'New mentor'
select(user.name, from: 'User')
- click_b... | 1 | require "rails_helper"
feature 'Admin manages mentors' do
scenario 'creating a new mentor' do
user = create(:admin)
visit admin_path(as: user)
click_link 'Mentors'
click_link 'Add new'
select(user.name, from: 'User')
click_button 'Save'
expect(page).to have_content('Mentor successfully ... | 1 | 15,540 | Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. | thoughtbot-upcase | rb |
@@ -61,6 +61,17 @@ namespace fastrtps {
namespace rtps {
+static void add_statistics_sent_submessage(
+ CacheChange_t* change,
+ size_t num_locators)
+{
+ static_cast<void>(change);
+ static_cast<void>(num_locators);
+
+#ifdef FASTDDS_STATISTICS
+ change->num_sent_submessages += num_locators... | 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 | 22,200 | I think this method should be either: - a static method of `RTPSWriter` to avoid a StatelessWriter redefinition of the function. - a setter in the `CacheChange_t` struct. | eProsima-Fast-DDS | cpp |
@@ -74,10 +74,11 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2
}
}
- // Review: This is called when a CancellationToken fires mid-write. In HTTP/1.x, this aborts the entire connection.
- // Should we do that here?
+ // This is called when a Cancellatio... | 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.Diagnostics;
using System.IO.Pipelines;
using System.Threading;
using System.Threading.Tasks;
using Mic... | 1 | 16,971 | You add a stream back reference for trailers, and all of the sudden we have tight coupling! | aspnet-KestrelHttpServer | .cs |
@@ -2,6 +2,7 @@ using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
+using System.Linq;
using Datadog.Trace.ClrProfiler.Emit;
using Datadog.Trace.ExtensionMethods;
using Datadog.Trace.Headers; | 1 | using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using Datadog.Trace.ClrProfiler.Emit;
using Datadog.Trace.ExtensionMethods;
using Datadog.Trace.Headers;
using Datadog.Trace.Logging;
using Datadog.Trace.Util;
namespace Datadog.Trace.ClrProfiler.Integrations... | 1 | 17,319 | I don't think we use `AspNetAmbientContext` anymore since . We can probably delete this file. | DataDog-dd-trace-dotnet | .cs |
@@ -65,14 +65,14 @@
return modules;
}([
/* 0 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(1);
-/***/ },
+/***/ }),
/* 1 */
-/***/ function(module, exports, __webpack_require__) {
+/***/ (function(mod... | 1 | /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModu... | 1 | 6,033 | Please avoid committing build artifacts, as they produce unnecessary conflicts and noise. | Hacker0x01-react-datepicker | js |
@@ -101,7 +101,7 @@ class RetryWrapper:
if name in self.__unwrap_methods:
return partial(x.__func__, self)
- elif hasattr(x, "__call__"):
+ elif callable(x):
return self.__wrap_method_with_call_and_maybe_retry(x)
else:
return x | 1 | # This file duplicated from the Yelp MRJob project:
#
# https://github.com/Yelp/mrjob
#
#
# Copyright 2009-2013 Yelp, David Marin
# Copyright 2015 Yelp
# Copyright 2017 Yelp
# Copyright 2018 Contributors
# Copyright 2019 Yelp and Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you m... | 1 | 14,149 | this is vendored code so i would hesitate to make random changes to it | dagster-io-dagster | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.