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 |
|---|---|---|---|---|---|---|---|
@@ -116,10 +116,6 @@ function upgradeToVNodes(arr, offset) {
if (Array.isArray(obj)) {
upgradeToVNodes(obj);
}
- else if (obj && typeof obj==='object' && !isValidElement(obj) && ((obj.props && obj.type) || obj.text!=null)) {
- if (obj.text) continue;
- arr[i] = createElement(obj.type, obj.props, obj.prop... | 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,582 | This branch is not needed anymore because every `vnode` that passes through `h` in compat or core will have the `$$typeof`-property now . | preactjs-preact | js |
@@ -0,0 +1,16 @@
+const { getComposedParent } = axe.commons.dom;
+
+function shouldMatchElement(el) {
+ if (!el) {
+ return true;
+ }
+ const ariaHiddenValue = el.getAttribute('aria-hidden')
+ ? el.getAttribute('aria-hidden')
+ : null;
+ if (ariaHiddenValue === null) {
+ return shouldMatchElement(getComposedParent(... | 1 | 1 | 13,441 | Did you mean to use `hasAttribute`? You shouldn't. This does not improve performance and it messes with the readability. | dequelabs-axe-core | js | |
@@ -37,13 +37,14 @@ import pytest
import py.path # pylint: disable=no-name-in-module
import helpers.stubs as stubsmod
+from helpers.utils import CallbackChecker
from qutebrowser.config import config, configdata, configtypes, configexc
from qutebrowser.utils import objreg, standarddir
from qutebrowser.browser.we... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 19,638 | Please import modules and not classes (except for Qt stuff). | qutebrowser-qutebrowser | py |
@@ -20,6 +20,11 @@ public class DummyJavaNode extends AbstractJavaNode {
super(id);
}
+ @Override
+ public void setImage(String image) {
+ super.setImage(image);
+ }
+
@Override
public Object jjtAccept(JavaParserVisitor visitor, Object data) {
return data; | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.ast;
import net.sourceforge.pmd.annotation.InternalApi;
/**
* This is a basic JavaNode implementation, useful when needing to create a
* dummy node.
*/
@Deprecated
@InternalApi
public clas... | 1 | 17,275 | Hm... why do we have a "DummyJavaNode" in src/main? Looks like, this should have gone into src/test.... | pmd-pmd | java |
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
+// Package v1alpha1
package v1alpha1
// CasKey is used for all cas specific annotation keys | 1 | /*
Copyright 2017 The OpenEBS Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | 1 | 10,198 | This seems meaningless. If we cannot add any info let us remove this. | openebs-maya | go |
@@ -493,6 +493,14 @@ func (c *Container) GetLabels() map[string]string {
return c.labels
}
+// GetPorts gets the ports for a container
+func (c *Container) GetPorts() []PortBinding {
+ c.lock.RLock()
+ defer c.lock.RUnlock()
+
+ return c.Ports
+}
+
// HealthStatusShouldBeReported returns true if the health check ... | 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 | 19,118 | Can you rename `Ports` to `PortsUnsafe`? | aws-amazon-ecs-agent | go |
@@ -0,0 +1,10 @@
+module ReturnToHelper
+ def make_return_to(name, path)
+ sig = OpenSSL::HMAC.digest(
+ OpenSSL::Digest::SHA256.new,
+ Rails.application.secrets.secret_key_base,
+ name + "$" + path
+ )
+ {name: name, path: path, sig: Base64.urlsafe_encode64(sig)}
+ end
+end | 1 | 1 | 13,014 | This feels like it could be moved out to your first gem! | 18F-C2 | rb | |
@@ -44,7 +44,7 @@ public abstract class NewSessionQueue implements HasReadyState {
public abstract boolean offerFirst(HttpRequest request, RequestId requestId);
- public abstract Optional<HttpRequest> poll();
+ public abstract Optional<HttpRequest> poll(RequestId requestId);
public abstract int clear();
| 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,213 | The expected behaviour for `poll` would be to match what `Deque` does, which is: > Retrieves and removes the head of the queue represented by this deque As such, you shouldn't need the `RequestId` here. | SeleniumHQ-selenium | java |
@@ -7,4 +7,17 @@
axe.utils.toArray = function (thing) {
'use strict';
return Array.prototype.slice.call(thing);
-};
+};
+
+
+/**
+ * Creates an array without duplicate values from 2 array inputs
+ * @param {Array} arr1 First array
+ * @param {Array} arr2 Second array
+ * @return {Array}
+ */
+axe.utils.uniqueArr... | 1 |
/**
* Converts array-like (numerical indicies and `length` property) structures to actual, real arrays
* @param {Mixed} thing Array-like thing to convert
* @return {Array}
*/
axe.utils.toArray = function (thing) {
'use strict';
return Array.prototype.slice.call(thing);
}; | 1 | 11,993 | This is super minor, but it'd be nice if this iterated over an arbitrary number of array inputs. | dequelabs-axe-core | js |
@@ -1676,9 +1676,10 @@ _tmain(int argc, TCHAR *targv[])
}
# ifdef UNIX
/* i#1676: detect whether under gdb */
- _snprintf(buf, BUFFER_SIZE_ELEMENTS(buf), "/proc/%d/exe", getppid());
- NULL_TERMINATE_BUFFER(buf);
- i = readlink(buf, buf, BUFFER_SIZE_ELEMENTS(buf));
+ char path_buf[MAXIMUM_PATH];
+... | 1 | /* **********************************************************
* Copyright (c) 2011-2018 Google, Inc. All rights reserved.
* Copyright (c) 2008-2010 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or witho... | 1 | 13,378 | What is the problem here? The commit message has strange wording "readlink is defined with restrict pointers": do you mean "restricted"? Is that a well-defined language term? I'm not sure what it means. | DynamoRIO-dynamorio | c |
@@ -17,6 +17,7 @@ package com.google.api.codegen.util.ruby;
import com.google.api.codegen.util.Name;
import com.google.api.codegen.util.NameFormatter;
import com.google.api.codegen.util.NamePath;
+import com.google.common.collect.ImmutableSet;
/**
* The NameFormatter for Ruby. | 1 | /* Copyright 2016 Google Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 1 | 18,876 | Why are we not wrapping here? | googleapis-gapic-generator | java |
@@ -2,12 +2,10 @@
namespace Shopsys\FrameworkBundle\Model\Product\Filter;
-use Shopsys\FrameworkBundle\Model\Product\Parameter\Parameter;
-
class ParameterFilterData
{
/**
- * @var \Shopsys\FrameworkBundle\Model\Product\Parameter\Parameter
+ * @var \Shopsys\FrameworkBundle\Model\Product\Parameter\Pa... | 1 | <?php
namespace Shopsys\FrameworkBundle\Model\Product\Filter;
use Shopsys\FrameworkBundle\Model\Product\Parameter\Parameter;
class ParameterFilterData
{
/**
* @var \Shopsys\FrameworkBundle\Model\Product\Parameter\Parameter
*/
public $parameter;
/**
* @var \Shopsys\FrameworkBundle\Model\Pr... | 1 | 10,714 | I though that all data objects are being unified in the fashion where all default values are initialized in constructor, are not they? | shopsys-shopsys | php |
@@ -22,16 +22,16 @@ var sourceHashes = map[string]string{
"libflux/flux-core/src/ast/flatbuffers/mod.rs": "00c75dc1da14487953a4a017616fb8a237fe3da437c876f1328532dd7906f015",
"libflux/flux-core/src/ast/flatbuffers/monotype.rs": ... | 1 | // Generated by buildinfo
//
// DO NOT EDIT!
package libflux
// sourceHashes is the hash of the build sources for
// the rust components used by cgo.
// This gets generated from the libflux sources
// and forces the cgo library to rebuild and relink
// the sources. This is because non-C/C++ sources
// are not tracked... | 1 | 16,859 | Does this file actually need to be committed to git? Having to run `make generate` is rather tedious on each PR and it conflicts easily. | influxdata-flux | go |
@@ -440,18 +440,6 @@ func parseConfig(loc location.Location, opts options.Options) (interface{}, erro
cfg.ProjectID = os.Getenv("GOOGLE_PROJECT_ID")
}
- if cfg.JSONKeyPath == "" {
- if path := os.Getenv("GOOGLE_APPLICATION_CREDENTIALS"); path != "" {
- // Check read access
- if _, err := ioutil.ReadFi... | 1 | package main
import (
"context"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"runtime"
"strings"
"syscall"
"time"
"github.com/restic/restic/internal/backend"
"github.com/restic/restic/internal/backend/azure"
"github.com/restic/restic/internal/backend/b2"
"github.com/restic/restic/internal/backend/gs"
"g... | 1 | 9,251 | We don't need this anymore, as Google's library handles various auth mechanisms for us. We'll be less explicit about why we're failing but we gain support for several authentication methods- swings and roundabouts! | restic-restic | go |
@@ -1,11 +1,12 @@
package plugin
type Config struct {
- SocketPath string `yaml:"path"`
- Volumes VolumesConfig `yaml:"volume"`
+ SocketDir string `yaml:"socket_dir" default:"/run/docker/plugins"`
+ Volumes VolumesConfig `yaml:"volume"`
+ GPUs map[string]map[str... | 1 | package plugin
type Config struct {
SocketPath string `yaml:"path"`
Volumes VolumesConfig `yaml:"volume"`
}
type VolumesConfig struct {
Root string
Volumes map[string]map[string]string
}
| 1 | 6,282 | No need to speficy attribute here. Moreover in yaml it is default to use lowercase names. | sonm-io-core | go |
@@ -8,10 +8,12 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
+using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading;
+using System.Threading.Tasks;
using Task = System.Threading.Tasks.Task;
namespace Microsoft.D... | 1 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System;
using System.Collections.Generic;
us... | 1 | 14,434 | In general I'm a trying to understand the reason behind this PR. Looks like if a blob (name) already exists we check if the contents are identical? In what scenarios this is not the case? When we want to publish a package/asset that has changed but still we want to use the same version? | dotnet-buildtools | .cs |
@@ -151,7 +151,9 @@ class BlacklistRuleBook(bre.BaseRuleBook):
lists: first one is IP addresses,
second one is network blocks
"""
- data = urllib2.urlopen(url).read()
+ req = urllib2.build_opener()
+ req.addheaders = [('User-Agent', 'Forseti blacklist rules engine... | 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 | 32,108 | Can rename `req` to be `opener`, since that is the object, and it wraps `req` internally? | forseti-security-forseti-security | py |
@@ -1405,6 +1405,8 @@ def getFormatFieldSpeech(attrs,attrsCache=None,formatConfig=None,unit=None,extra
linePrefix=attrs.get("line-prefix")
if linePrefix:
textList.append(linePrefix)
+ breakpoint=attrs.get("breakpoint")
+ if breakpoint: textList.append(breakpoint)
if attrsCache is not None:
attrsCache.cle... | 1 | # -*- coding: UTF-8 -*-
#speech.py
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2006-2014 NV Access Limited, Peter Vágner, Aleksey Sadovoy
"""High-level functions to speak information.
"""
import i... | 1 | 17,525 | @MichaelDCurran, thoughts on adding a breakpoint format field attribute? It seems almost app specific, but I guess it does seem odd abusing line-prefix. Is there any more generic concept here? | nvaccess-nvda | py |
@@ -539,7 +539,10 @@ class WebElement(object):
@property
def rect(self):
"""A dictionary with the size and location of the element."""
- return self._execute(Command.GET_ELEMENT_RECT)['value']
+ if self._w3c:
+ return self._execute(Command.GET_ELEMENT_RECT)['value']
+ ... | 1 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 1 | 15,812 | This would return a tuple of two dictionaries. You need to combine them and return a dictionary | SeleniumHQ-selenium | rb |
@@ -7,10 +7,14 @@ import (
"errors"
"fmt"
+ "github.com/aws/amazon-ecs-cli-v2/internal/pkg/archer"
+ "github.com/aws/amazon-ecs-cli-v2/internal/pkg/manifest"
+ "github.com/aws/amazon-ecs-cli-v2/internal/pkg/store/secretsmanager"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/store/ssm"
"github.com/aws/amazon-... | 1 | // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"errors"
"fmt"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/store/ssm"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/term/color"
"github.com/aws/amazon-ecs-cli-v2/internal/pk... | 1 | 11,000 | What do you think of moving the example to the help text of the prompt? and the prompt itself can be "What is your application's GitHub repository URL?" | aws-copilot-cli | go |
@@ -58,9 +58,12 @@ public class TracerTest {
public void shouldBeAbleToCreateATracer() {
List<SpanData> allSpans = new ArrayList<>();
Tracer tracer = createTracer(allSpans);
+ long timeStamp = 1593493828L;
try (Span span = tracer.getCurrentContext().createSpan("parent")) {
span.setAttribut... | 1 | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... | 1 | 17,762 | Break out tests for events into their own tests rather than placing them in other ones. That makes it easier for us to figure out where problems lie and to do a TDD-driven implementation over new APIs. | SeleniumHQ-selenium | js |
@@ -266,7 +266,7 @@ bool parse_it(Iterator &first, Iterator last, RDKit::RWMol &mol) {
} else {
if (!parse_atom_labels(first, last, mol)) return false;
}
- } else if ((first + 9) < last &&
+ } else if (std::distance(first, last) > 9 &&
std::string(first, first + 9) == "atomP... | 1 | //
// Copyright (C) 2016 Greg Landrum
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <RDGeneral/BoostStartInclude.h>
#include <b... | 1 | 16,896 | Nice use of std::distance. I'm a bit worried about first += 9 though. | rdkit-rdkit | cpp |
@@ -578,8 +578,9 @@ func (c *Operator) syncNodeEndpoints(ctx context.Context) error {
ObjectMeta: metav1.ObjectMeta{
Name: c.kubeletObjectName,
Labels: c.config.Labels.Merge(map[string]string{
- "k8s-app": "kubelet",
- "app.kubernetes.io/name": "kubelet",
+ "k8s-app": ... | 1 | // Copyright 2016 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,642 | Shouldn't this be `app.kubernetes.io/managed-by` as prometheus-operator manages this resource, but this resource isn't a part of prometheus-operator? | prometheus-operator-prometheus-operator | go |
@@ -41,8 +41,9 @@ namespace Datadog.Trace.ClrProfiler
if (parent != null &&
parent.Type == SpanTypes.Http &&
- parent.GetTag(Tags.HttpMethod).Equals(httpMethod, StringComparison.OrdinalIgnoreCase) &&
- parent.GetTag(Tags.HttpUrl).Equals(UriHe... | 1 | using System;
using System.Data;
using System.Data.Common;
using Datadog.Trace.ExtensionMethods;
using Datadog.Trace.Logging;
using Datadog.Trace.Util;
namespace Datadog.Trace.ClrProfiler
{
/// <summary>
/// Convenience class that creates scopes and populates them with some standard details.
/// </summary>... | 1 | 17,202 | As long as we're being extra-vigilant about NREs, should we check that `httpMethod` and `requestUri` are not null? | DataDog-dd-trace-dotnet | .cs |
@@ -19,6 +19,7 @@ import (
"github.com/iotexproject/iotex-core/cli/ioctl/cmd/node"
"github.com/iotexproject/iotex-core/cli/ioctl/cmd/update"
"github.com/iotexproject/iotex-core/cli/ioctl/cmd/version"
+ xrc20 "github.com/iotexproject/iotex-core/cli/ioctl/cmd/xrc20"
)
// RootCmd represents the base command when... | 1 | // Copyright (c) 2019 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 | 18,080 | No need to have `xrc20` alias | iotexproject-iotex-core | go |
@@ -172,6 +172,19 @@ def define_environment_cls(pipeline_def):
)
+def context_cls_inst(pipeline_def):
+ check.inst_param(pipeline_def, 'pipeline_def', PipelineDefinition)
+ pipeline_name = camelcase(pipeline_def.name)
+ return SystemNamedDict(
+ name='{pipeline_name}.Context'.format(pipeline_na... | 1 | from dagster import check
from dagster.utils import camelcase, single_item
from dagster.core.definitions import (
PipelineContextDefinition,
PipelineDefinition,
ResourceDefinition,
Solid,
SolidDefinition,
SolidInputHandle,
)
from dagster.core.types import Bool, Field, List, NamedDict, NamedS... | 1 | 12,142 | the naming convention I'm been adopting if `_type` for instances of these classes. So maybe `context_config_type` is a better name for this fn | dagster-io-dagster | py |
@@ -54,6 +54,7 @@ public class BlockMiner<C, M extends AbstractBlockCreator<C>> implements Runnabl
private final ProtocolSchedule<C> protocolSchedule;
private final Subscribers<MinedBlockObserver> observers;
private final AbstractBlockScheduler scheduler;
+ private Boolean gpuMining = false;
public Block... | 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 | 19,640 | Don't call it GPU mining, call it `externalMining`, here and throughout. | hyperledger-besu | java |
@@ -252,6 +252,15 @@ return [
| folder - a folder prefix for storing all generated files inside.
| path - the public path relative to the application base URL,
| or you can specify a full URL path.
+ |
+ | For the 'media' resource you can also specify:
+ |
+ | imageMaxWidth - R... | 1 | <?php
return [
/*
|--------------------------------------------------------------------------
| Specifies the default CMS theme.
|--------------------------------------------------------------------------
|
| This parameter value can be overridden by the CMS back-end settings.
|
*/
... | 1 | 13,247 | `within this with` typo, should be `within this width` | octobercms-october | php |
@@ -22,10 +22,12 @@ import (
)
// Prometheus defines a Prometheus deployment.
+// +k8s:openapi-gen=true
type Prometheus struct {
metav1.TypeMeta `json:",inline"`
// Standard object’s metadata. More info:
// https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#metadata
+ /... | 1 | // Copyright 2016 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 | 9,582 | how come this is false? | prometheus-operator-prometheus-operator | go |
@@ -24,6 +24,19 @@ function node_require(module) {
return require(module);
}
+function typeOf(obj) {
+ return ({}).toString.call(obj).match(/\s(\w+)/)[1].toLowerCase();
+}
+
+function checkTypes(args, types) {
+ args = [].slice.call(args);
+ for (var i = 0; i < types.length; ++i) {
+ if (typeOf(... | 1 | ////////////////////////////////////////////////////////////////////////////
//
// Copyright 2016 Realm Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/li... | 1 | 15,935 | How about `Object.prototype.toString`? Or using the `typeof` operator? | realm-realm-js | js |
@@ -83,6 +83,7 @@ type ReporterKBPKI struct {
notifySyncBuffer chan *keybase1.FSPathSyncStatus
suppressCh chan time.Duration
canceler func()
+ ctx context.Context
}
// NewReporterKBPKI creates a new ReporterKBPKI. | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"fmt"
"strconv"
"strings"
"time"
"github.com/keybase/client/go/logger"
"github.com/keybase/client/go/protocol/keybase1"
"github.com/key... | 1 | 19,862 | I know @jzila suggested this, but I disagree: you're really not supposed to save a context in a struct. Can you get by with just saving the `Done()` channel instead? The `ctx` should continue to be passed around explicitly. | keybase-kbfs | go |
@@ -12,12 +12,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Networking
{
IsWindows = PlatformApis.IsWindows;
- var isDarwinMono =
-#if DNX451
- IsWindows ? false : PlatformApis.IsDarwin;
-#else
- false;
-#endif
+ var isDarwinMono = !IsWindows ... | 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.Runtime.InteropServices;
namespace Microsoft.AspNet.Server.Kestrel.Networking
{
public class Libuv
{
public ... | 1 | 7,613 | This check isn't right though. | aspnet-KestrelHttpServer | .cs |
@@ -96,6 +96,8 @@ public abstract class DynamicLangXApiView implements ViewModel {
return missingDefaultServiceAddress() || missingDefaultServiceScopes();
}
+ public abstract String codeGenVersion();
+
@Override
public String resourceRoot() {
return SnippetSetRunner.SNIPPET_RESOURCE_ROOT; | 1 | /* Copyright 2016 Google Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 1 | 21,324 | maybe `toolkitVersion` instead? It doesn't necessarily have to be called that in the generated code, but in the view model classes, I think it makes it clearer that it is the version of toolkit itself. | googleapis-gapic-generator | java |
@@ -230,15 +230,13 @@ module.exports = class XHRUpload extends Plugin {
const body = opts.getResponseData(xhr.responseText, xhr)
const uploadURL = body[opts.responseUrlFieldName]
- const response = {
+ const uploadResp = {
status: ev.target.status,
bod... | 1 | const { Plugin } = require('@uppy/core')
const cuid = require('cuid')
const Translator = require('@uppy/utils/lib/Translator')
const { Provider, Socket } = require('@uppy/companion-client')
const emitSocketProgress = require('@uppy/utils/lib/emitSocketProgress')
const getSocketHost = require('@uppy/utils/lib/getSocketH... | 1 | 11,307 | the response data was added intentionally in #612, i think we could keep the `setFileState` stuff here as a special case, at least for now | transloadit-uppy | js |
@@ -134,7 +134,7 @@ func (s *stream) Read(p []byte) (int, error) {
} else {
select {
case <-s.readChan:
- case <-time.After(deadline.Sub(time.Now())):
+ case <-time.After(time.Until(deadline)):
}
}
s.mutex.Lock() | 1 | package quic
import (
"context"
"fmt"
"io"
"net"
"sync"
"time"
"github.com/lucas-clemente/quic-go/flowcontrol"
"github.com/lucas-clemente/quic-go/frames"
"github.com/lucas-clemente/quic-go/internal/utils"
"github.com/lucas-clemente/quic-go/protocol"
)
// A Stream assembles the data from StreamFrames and pr... | 1 | 6,646 | This isn't really easy to read. | lucas-clemente-quic-go | go |
@@ -123,7 +123,7 @@ func (c *CStorVolumeReplicaController) cVREventHandler(operation common.QueueOpe
err := volumereplica.DeleteVolume(fullVolName)
if err != nil {
- glog.Errorf("Error in deleting volume %q: %s", cVR.ObjectMeta.Name,err)
+ glog.Errorf("Error in deleting volume %q: %s", cVR.ObjectMeta.Name, ... | 1 | /*
Copyright 2018 The OpenEBS Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | 1 | 9,287 | This line changed due to go formatting. Format was not there earlier. | openebs-maya | go |
@@ -28,13 +28,13 @@ type staticUpstream struct {
Path string
Interval time.Duration
}
+ Without string
}
// NewStaticUpstreams parses the configuration input and sets up
// static upstreams for the proxy middleware.
func NewStaticUpstreams(c parse.Dispenser) ([]Upstream, error) {
var upstreams []Ups... | 1 | package proxy
import (
"io"
"io/ioutil"
"net/http"
"net/url"
"strconv"
"strings"
"time"
"github.com/mholt/caddy/config/parse"
)
var (
supportedPolicies map[string]func() Policy = make(map[string]func() Policy)
proxyHeaders http.Header = make(http.Header)
)
type staticUpstream struct {
f... | 1 | 6,935 | The name "Without" in code is a little nebulous. Maybe something more descriptive like TrimPrefix or StripPrefix or WithoutPathPrefix or something like that. (Thoughts?) | caddyserver-caddy | go |
@@ -254,6 +254,12 @@ public class MoveIT {
linkDataset.then().assertThat()
.statusCode(OK.getStatusCode());
+ // A dataset cannot be linked to the same dataverse again.
+ Response tryToLinkAgain = UtilIT.linkDataset(datasetPid, dataverse2Alias, superuserApiToken);
+ tryT... | 1 | package edu.harvard.iq.dataverse.api;
import com.jayway.restassured.RestAssured;
import com.jayway.restassured.path.json.JsonPath;
import com.jayway.restassured.response.Response;
import edu.harvard.iq.dataverse.authorization.DataverseRole;
import java.io.StringReader;
import java.util.logging.Logger;
import javax.jso... | 1 | 43,422 | is this test in the move tests? I see what you mean then - it works, but I wonder if we won't lose track that it's being tested here. | IQSS-dataverse | java |
@@ -368,5 +368,8 @@ type Instance struct {
EBSOptimized *bool `json:"ebsOptimized"`
// The tags associated with the instance.
- Tags map[string]string `json:"tag"`
+ Tags map[string]string `json:"tags"`
+
+ // The security groups associated with the instance.
+ SecurityGroups map[string]string `json:"securityGrou... | 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 ag... | 1 | 6,181 | I'm not sure if this wanted to be `json:"tags"` (which I'd set in my PR) or `json:"tag"` that someone elses PR had set. Given that the rest of the fields had their JSON field name set to the same as the struct field name, I opted for `tags`. | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -47,6 +47,11 @@ module Ncr
message: "must be three letters or numbers"
}, allow_blank: true
+ scope :for_fiscal_year, lambda { |year|
+ range = self.class.range_for_fiscal_year(year)
+ where(created_at: range[:start_time]...range[:end_time])
+ }
+
def self.all_system_approver_email... | 1 | require 'csv'
module Ncr
# Make sure all table names use 'ncr_XXX'
def self.table_name_prefix
'ncr_'
end
EXPENSE_TYPES = %w(BA60 BA61 BA80)
BUILDING_NUMBERS = YAML.load_file("#{Rails.root}/config/data/ncr/building_numbers.yml")
class WorkOrder < ActiveRecord::Base
# must define before include Pur... | 1 | 16,110 | since the logic here and in `Proposal` is exactly the same, do you think it makes sense for us to include it elsewhere? I am not opposed to duplicated code when it makes sense, but the reason I first identified this was that I was looking for code in NCR::WorkOrder that was not specific to Work Orders. Seems like fisca... | 18F-C2 | rb |
@@ -42,6 +42,11 @@ class InfluxWriterSubscriber(object):
self.time = 0
+ def on_connection_closed(self, connection, reply_code, reply_text):
+ self.log.info('RabbitMQ connection got closed!')
+ self.connection.add_timeout(5, self.connect_to_rabbitmq)
+
+
@staticmethod
def static_... | 1 | #!/usr/bin/env python3
import sys
import os
import pika
from influxdb import InfluxDBClient
from influxdb.exceptions import InfluxDBClientError, InfluxDBServerError
import ujson
import logging
from listenbrainz.listen import Listen
from time import time, sleep
import listenbrainz.config as config
from listenbrainz.li... | 1 | 14,617 | there is no static method as a go between -- how does this work? | metabrainz-listenbrainz-server | py |
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+# encoding: utf-8
+
+class StringifiedSymbol
+ include Mongoid::Document
+ store_in collection: "stringified_symbols", client: :other
+ field :stringified_symbol, type: StringifiedSymbol
+end | 1 | 1 | 12,881 | Can you please change the name of this class to be something else? | mongodb-mongoid | rb | |
@@ -403,7 +403,7 @@ size_t h2o_strstr(const char *haysack, size_t haysack_len, const char *needle, s
}
/* note: returns a zero-width match as well */
-const char *h2o_next_token(h2o_iovec_t *iter, int separator, size_t *element_len, h2o_iovec_t *value)
+const char *h2o_next_token(h2o_iovec_t *iter, int separator, s... | 1 | /*
* Copyright (c) 2014-2016 DeNA Co., Ltd., Kazuho Oku, Justin Zhu, Fastly, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
... | 1 | 14,168 | I think we might prefer generalizing the interface rather than creating an exception. Current design of `h2o_next_token` assumes the input to be a comma-separated list, and allows the caller to specify a different separator when parsing a nested list. As I understand, what we are trying to attain in this PR is to have ... | h2o-h2o | c |
@@ -43,8 +43,8 @@ namespace Nethermind.Blockchain
{
private const long LowestInsertedBodyNumberDbEntryAddress = 0;
private const int CacheSize = 64;
- private readonly ICache<Keccak, Block> _blockCache = new LruCacheWithRecycling<Keccak, Block>(CacheSize, CacheSize, "blocks");
- pr... | 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,306 | why not recycling? I Lru cache now recycling? | NethermindEth-nethermind | .cs |
@@ -69,7 +69,7 @@ func (consumer *createConsumer) Consume(requestPtr interface{}) (response interf
issuerID := consumer.peerID
if request.ConsumerInfo != nil {
issuerID = request.ConsumerInfo.IssuerID
- if request.ConsumerInfo.PaymentVersion == PaymentVersionV2 {
+ if request.ConsumerInfo.PaymentVersion == Pay... | 1 | /*
* Copyright (C) 2017 The "MysteriumNetwork/node" Authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | 1 | 15,050 | Why it is now called `PaymentVersionV3`? | mysteriumnetwork-node | go |
@@ -165,7 +165,7 @@ func (dc *DownstreamController) syncSecret() {
}
nodes := dc.lc.SecretNodes(secret.Namespace, secret.Name)
- klog.Infof("there are %d nodes need to sync secret, operation: %s", len(nodes), e.Type)
+ klog.V(4).Infof("there are %d nodes need to sync secret, operation: %s", len(nodes), e.... | 1 | package controller
import (
"fmt"
"strings"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/kubernetes"
"k8s.io/klog"
beehiveContext "github.com/kubeedge/beehive/pkg/cor... | 1 | 16,172 | changed for debug purpose? | kubeedge-kubeedge | go |
@@ -46,6 +46,13 @@ namespace OpenTelemetry
/// <inheritdoc />
public abstract override void OnEnd(T data);
+ internal override void SetParentProvider(BaseProvider parentProvider)
+ {
+ base.SetParentProvider(parentProvider);
+
+ this.exporter.ParentProvider = pare... | 1 | // <copyright file="BaseExportProcessor.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 | 17,887 | @cijothomas I needed a way to set the Exporter.ParentProvider when the Processor's gets set. Internal to SDK though. | open-telemetry-opentelemetry-dotnet | .cs |
@@ -31,9 +31,13 @@ inline extractor::RoadClassification roadClass(const ConnectedRoad &road,
return graph.GetEdgeData(road.eid).flags.road_classification;
}
-inline bool isRampClass(EdgeID eid, const util::NodeBasedDynamicGraph &node_based_graph)
+inline bool isRampClass(EdgeID eid,
+ con... | 1 | #include "guidance/motorway_handler.hpp"
#include "extractor/road_classification.hpp"
#include "guidance/constants.hpp"
#include "util/assert.hpp"
#include "util/bearing.hpp"
#include "util/guidance/name_announcements.hpp"
#include <limits>
#include <utility>
#include <boost/assert.hpp>
using osrm::guidance::getTur... | 1 | 23,438 | Talking through this scenario with @srividyacb and she's wondering if there should also be a check of `(from_trunk && node_based_graph.GetEdgeData(eid).flags.road_classification.IsLinkClass())` as highways with trunk classifications can also have this scenario. | Project-OSRM-osrm-backend | cpp |
@@ -13,7 +13,7 @@ module Beaker
:q_verify_packages => ENV['q_verify_packages'] || 'y',
:q_puppet_symlinks_install => 'y',
:q_puppetagent_certname => host,
- :q_puppetagent_server => master,
+ :q_puppetagent_server => master_certname,
# Disable database, co... | 1 | module Beaker
module Answers
module Version30
def self.host_answers(host, master_certname, master, database, dashboard, options)
# Windows hosts don't have normal answers...
return nil if host['platform'] =~ /windows/
# Everything's an agent
agent_a = {
:q_puppeta... | 1 | 4,624 | where does `master_certname` come from? | voxpupuli-beaker | rb |
@@ -1,5 +1,7 @@
from .resnet import ResNet, make_res_layer
from .resnext import ResNeXt
from .ssd_vgg import SSDVGG
+from .hrnet import HRNet
-__all__ = ['ResNet', 'make_res_layer', 'ResNeXt', 'SSDVGG']
+__all__ = ['ResNet', 'make_res_layer', 'ResNeXt', 'SSDVGG',
+ 'HRNet'] | 1 | from .resnet import ResNet, make_res_layer
from .resnext import ResNeXt
from .ssd_vgg import SSDVGG
__all__ = ['ResNet', 'make_res_layer', 'ResNeXt', 'SSDVGG']
| 1 | 17,413 | The line breaking is unnecessary. | open-mmlab-mmdetection | py |
@@ -28,7 +28,7 @@ void DatasetLoader::SetHeader(const char* filename) {
// get column names
if (io_config_.has_header) {
std::string first_line = text_reader.first_line();
- feature_names_ = Common::Split(first_line.c_str(), "\t ,");
+ feature_names_ = Common::Split(first_line.c_str(), "\t,")... | 1 | #include <LightGBM/utils/openmp_wrapper.h>
#include <LightGBM/utils/log.h>
#include <LightGBM/dataset_loader.h>
#include <LightGBM/network.h>
namespace LightGBM {
DatasetLoader::DatasetLoader(const IOConfig& io_config, const PredictFunction& predict_fun, int num_class, const char* filename)
:io_config_(io_config)... | 1 | 16,505 | why not enable split by space here ? | microsoft-LightGBM | cpp |
@@ -1076,7 +1076,8 @@ fpga_result mmio_error(struct RASCommandLine *rasCmdLine)
return result;
}
- if(value != FPGA_INTEGRATED_DEVICEID) {
+ if( (value != FPGA_INTEGRATED_DEVICEID) ||
+ (value != FPGA_DISCRETE_DEVICEID) ) {
FPGA_ERR("Failed to read Device id");
return FPGA_NOT_SUPPORTED;
} | 1 | // Copyright(c) 2017, Intel Corporation
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the ... | 1 | 15,152 | Shouldn't the operator be && ? | OPAE-opae-sdk | c |
@@ -161,6 +161,17 @@ module Beaker
FileUtils.rm_rf(@vagrant_path)
end
+ #snapshotting depends on https://github.com/scalefactory/vagrant-multiprovider-snap
+ def take_snapshot(host,snapshot_name)
+ @logger.debug "Creating snapshot of #{host}"
+ vagrant_cmd("snap take #{host} --name=#{snaps... | 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 | 8,529 | My best guess is that you want to use host.name in these parts to get the name of the host ? | voxpupuli-beaker | rb |
@@ -270,13 +270,6 @@ func (n *Node) UnmarshalBinary(data []byte) error {
n.entry = append([]byte{}, data[nodeHeaderSize:nodeHeaderSize+refBytesSize]...)
offset := nodeHeaderSize + refBytesSize // skip entry
- // Currently we don't persist the root nodeType when we marshal the manifest, as a result
- // the ro... | 1 | // Copyright 2020 The Swarm Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package mantaray
import (
"bytes"
"crypto/rand"
"encoding/binary"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
)
const (
maxUint16 = ^uint16(0)
)
... | 1 | 15,226 | IMO this edge case handling could remain here, just instead of overwriting the `n.nodeType`, the `makeEdgeType` method of `n` should be called, so `n.nodeType = nodeTypeEdge` -> `n.makeEdge()` | ethersphere-bee | go |
@@ -205,9 +205,10 @@ public class DownloadService extends Service {
Log.d(TAG, "Service shutting down");
isRunning = false;
+ boolean showAutoDownloadReport = UserPreferences.showAutoDownloadReport();
if (ClientConfig.downloadServiceCallbacks.shouldCreateReport()
- && ... | 1 | package de.danoeh.antennapod.core.service.download;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Binder... | 1 | 15,779 | Just wondering... The two kinds of notifications are now quite different (Channel, text, maybe even icon). Would it make sense to extract the auto download notification to a new class instead of handling everything in the existing `notificationManager`? I have not checked if this will lead to a lot of code duplication,... | AntennaPod-AntennaPod | java |
@@ -140,3 +140,11 @@ func (c *Call) RoutingDelegate() string {
}
return c.ic.req.RoutingDelegate
}
+
+// Features returns the RequestFeatures for this request.
+func (c *Call) Features() transport.RequestFeatures {
+ if c == nil {
+ return transport.RequestFeatures{}
+ }
+ return c.ic.req.Features
+} | 1 | // Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... | 1 | 15,422 | Do we need to put this on the Call? We only need the API communication between the Encoding and the Transports which is currently done through the Transport.Request. The Call is used by users right? | yarpc-yarpc-go | go |
@@ -1202,3 +1202,15 @@ L:
}
return filtered
}
+
+func (a *WebAPI) GenerateAPIKey(ctx context.Context, req *webservice.GenerateAPIKeyRequest) (*webservice.GenerateAPIKeyResponse, error) {
+ return nil, status.Error(codes.Unimplemented, "")
+}
+
+func (a *WebAPI) DisableAPIKey(ctx context.Context, req *webservice.Di... | 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 | 11,638 | `ctx` is unused in GenerateAPIKey | pipe-cd-pipe | go |
@@ -75,6 +75,7 @@ type (
func NewBlockDAO(indexers []BlockIndexer, cfg config.DB) BlockDAO {
blkStore, err := filedao.NewFileDAO(cfg)
if err != nil {
+ log.L().Fatal(err.Error(), zap.Any("cfg", cfg))
return nil
}
return createBlockDAO(blkStore, indexers, cfg) | 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 | 22,978 | Can you judge the type of error? | iotexproject-iotex-core | go |
@@ -204,7 +204,7 @@ class GridInterface(DictInterface):
if edges and not isedges:
data = cls._infer_interval_breaks(data)
elif not edges and isedges:
- data = np.convolve(data, [0.5, 0.5], 'valid')
+ data = data[:-1] + np.diff(data)/2.
return data
| 1 | from __future__ import absolute_import
from collections import OrderedDict, defaultdict, Iterable
try:
import itertools.izip as zip
except ImportError:
pass
import numpy as np
array_types = (np.ndarray,)
try:
import dask.array as da
array_types += (da.Array,)
except ImportError:
da = None
fro... | 1 | 21,055 | Much simpler than a weird and confusing ``convolve`` call! | holoviz-holoviews | py |
@@ -739,8 +739,8 @@ describe('suspense', () => {
expect(scratch.innerHTML).to.eql(
`<div>Hello first 2</div><div>Hello second 2</div>`
);
- expect(Suspender1.prototype.render).to.have.been.calledThrice;
- expect(Suspender2.prototype.render).to.have.been.calledThrice;
+ expect(Suspender1.prototy... | 1 | import { setupRerender } from 'preact/test-utils';
import React, {
createElement,
render,
Component,
Suspense,
lazy,
Fragment,
createContext
} from 'preact/compat';
import { setupScratch, teardown } from '../../../test/_util/helpers';
const h = React.createElement;
/* eslint-env browser, mocha */
/**
* @typed... | 1 | 15,387 | Huh, this seems weird to me... Surely the suspenders render was called again in order to get the new `<div>Hello second 2</div>` output... Imma take a peak at these tests to understand what's going on | preactjs-preact | js |
@@ -80,6 +80,10 @@ class ApplicationController < ActionController::Base
def failed_destroy_error(obj, obj_name)
"#{_('Could not delete the %{o}.') % {o: obj_name}} #{errors_to_s(obj)}"
end
+
+ def success_message(obj_name, action)
+ "#{_('Successfully %{action} your %{object}.') % {object: obj_name, ac... | 1 | class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
# Look for template overrides before rendering
before_filter :prepend_view_paths
include GlobalHelpers
include Pundit
helper_method GlobalHelpers.instance_methods
rescue_from Pundit::NotAuthorizedError, with: :u... | 1 | 16,752 | Since this is just a helper function to create text, perhaps this could live in a helper? I noticed that we have a few other error/message creators in the application controller as well, but I think this type of function should be re-factored to be part of a helper. | DMPRoadmap-roadmap | rb |
@@ -92,7 +92,7 @@ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details
-#msg-template=
+msg-template=[{msg_id}] {path}:{line:3d}:{column}: {msg}... | 1 | [MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
init-hook='import sys;
sys.path.append("build/thrift/v6/gen-py");
sys.path.append("tools/plist_to_html");
sys.path.append("analyzer");
sy... | 1 | 10,511 | Will this mess up parsing the messages by other editors? (vscode, vim ...) | Ericsson-codechecker | c |
@@ -1,4 +1,3 @@
-# Set up gems listed in the Gemfile.
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
-require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
+require 'bundler/setup' # Set up gems listed in the Gemfile. | 1 | # Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
| 1 | 18,619 | Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. | thoughtbot-upcase | rb |
@@ -28,8 +28,13 @@ namespace Microsoft.AspNet.Server.Kestrel.Filter
_filteredStream = filteredStream;
_socketInputStream = new SocketInputStream(SocketInput);
- _filteredStream.CopyToAsync(_socketInputStream).ContinueWith((task, state) =>
+ var block = memory.Lease();
+... | 1 | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNet.Server.Kestrel.Http;
using Microsoft.AspNet.Server.Kestrel.Infrastr... | 1 | 7,272 | Why can the pool be null? | aspnet-KestrelHttpServer | .cs |
@@ -74,6 +74,15 @@ class ToggleButton(ia2Web.Ia2Web):
return states
+class PresentationalList(ia2Web.Ia2Web):
+ """ Ensures that lists like UL, DL and OL always have the readonly state."""
+
+ def _get_states(self):
+ states = super().states
+ states.add(controlTypes.STATE_READONLY)
+ return states
+
+
def f... | 1 | #NVDAObjects/IAccessible/chromium.py
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
# Copyright (C) 2010-2013 NV Access Limited
"""NVDAObjects for the Chromium browser project
"""
from comtypes import COMError
impor... | 1 | 30,669 | It might be good to have a note here: > work-around for issue #7562 allowing us to differentiate presentational lists from interactive lists (such as of size greater 1 and ARIA list boxes). In firefox, this is possible by the presence of a read-only state, even in content editable. | nvaccess-nvda | py |
@@ -66,16 +66,16 @@ import java.util.Set;
* the current node) may be queried.
*
*/
-class DigraphNode implements Cloneable, Serializable {
+class DigraphNode<E> implements Cloneable, Serializable {
/** The data associated with this node. */
- protected Object data;
+ protected E data;
/**
... | 1 | /*
Copyright (C) 2005-2012, by the President and Fellows of Harvard College.
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
Unle... | 1 | 36,251 | This set of changes is the one part of this that I'm not completely sure is valid. Can someone look over this to make sure I got the E's right? | IQSS-dataverse | java |
@@ -282,8 +282,12 @@ void nano::bootstrap_attempt_legacy::request_push (nano::unique_lock<std::mutex>
void nano::bootstrap_attempt_legacy::add_frontier (nano::pull_info const & pull_a)
{
nano::pull_info pull (pull_a);
- nano::lock_guard<std::mutex> lock (mutex);
- frontier_pulls.push_back (pull);
+ // Prevent incor... | 1 | #include <nano/crypto_lib/random_pool.hpp>
#include <nano/node/bootstrap/bootstrap.hpp>
#include <nano/node/bootstrap/bootstrap_attempt.hpp>
#include <nano/node/bootstrap/bootstrap_bulk_push.hpp>
#include <nano/node/bootstrap/bootstrap_frontier.hpp>
#include <nano/node/common.hpp>
#include <nano/node/node.hpp>
#include... | 1 | 16,598 | There doesn't seem to be a reason to copy this here. | nanocurrency-nano-node | cpp |
@@ -1774,6 +1774,7 @@ std::string h2o_raw_tracer::bpf_text() {
#include <linux/sched.h>
#include <linux/limits.h>
+#include "include/h2o/ebpf.h"
#define STR_LEN 64
| 1 | // Generated code. Do not edit it here!
extern "C" {
#include <sys/time.h>
#include "quicly.h"
#include "h2o/ebpf.h"
}
#include <cstdlib>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <string>
#include <algorithm>
#include "h2olog.h"
#include "json.h"
#include "raw_tracer.cc.h"
#define STR_LEN 6... | 1 | 15,200 | We've avoided including h2o headers in BPF programs because it's a runtime dependency. However, IIRC, this is because h2olog was maintained in the separate repository so that h2olog did not know where h2o was installed. Now h2olog can use `H2O_ROOT`, we should add it to BCC's `cflags` in order to include h2o headers in... | h2o-h2o | c |
@@ -170,6 +170,10 @@ type ThanosRulerSpec struct {
// Note: Currently only the CAFile, CertFile, and KeyFile fields are supported.
// Maps to the '--grpc-server-tls-*' CLI args.
GRPCServerTLSConfig *TLSConfig `json:"grpcServerTlsConfig,omitempty"`
+ // The external Query URL the Thanos Ruler will set in the 'Sour... | 1 | // Copyright 2020 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 | 13,980 | I think the docstring here should include the CLI arg `--alert.query-url` just to make it clear to users which setting this uses. | prometheus-operator-prometheus-operator | go |
@@ -224,9 +224,7 @@ func (m *ipipManager) CompleteDeferredWork() error {
for _, ip := range m.activeHostnameToIP {
members = append(members, ip)
}
- for _, ip := range m.externalNodeCIDRs {
- members = append(members, ip)
- }
+ members = append(members, m.externalNodeCIDRs...)
m.ipsetsDataplane.AddOrR... | 1 | // Copyright (c) 2016-2017, 2019 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 requir... | 1 | 17,206 | Same change just above? | projectcalico-felix | c |
@@ -511,4 +511,14 @@ describe('services_SearchEngine', function() {
expect((await engine.search('"- [ ]"', { searchType: SearchEngine.SEARCH_TYPE_BASIC })).length).toBe(1);
expect((await engine.search('"[ ]"', { searchType: SearchEngine.SEARCH_TYPE_BASIC })).length).toBe(2);
}));
+
+ it('should not mistake cyri... | 1 | /* eslint-disable no-unused-vars */
/* eslint prefer-const: 0*/
const time = require('@joplin/lib/time').default;
const { fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync, restoreDate } = require('... | 1 | 15,679 | Could you check the result content rather than just the number of search results please? For example with this test if the search engine suddenly starts returning "latin n" for both queries, we won't know about it. | laurent22-joplin | js |
@@ -47,9 +47,10 @@ const (
otherDomainID = "spiffe://otherdomain.test"
- serverID = "spiffe://example.org/spire/server"
- agentID = "spiffe://example.org/spire/agent/test/id"
- workloadID = "spiffe://example.org/workload"
+ serverID = "spiffe://example.org/spire/server"
+ agentID = "spiffe://example.o... | 1 | package node
import (
"crypto/rand"
"crypto/tls"
"crypto/x509"
"errors"
"fmt"
"math/big"
"net"
"sync"
"testing"
"time"
"github.com/gogo/protobuf/proto"
"github.com/sirupsen/logrus/hooks/test"
"github.com/spiffe/spire/pkg/common/auth"
"github.com/spiffe/spire/pkg/common/bundleutil"
"github.com/spiffe/sp... | 1 | 10,922 | nit: I think that `workloadID` should suffice for this test... that's what we'd be issuing anyways | spiffe-spire | go |
@@ -1,4 +1,4 @@
-require 'spec_helper'
+require 'rails_helper'
feature 'Admin manages mentors' do
scenario 'creating a new mentor' do | 1 | require 'spec_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 c... | 1 | 10,609 | Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. | thoughtbot-upcase | rb |
@@ -204,11 +204,7 @@ public class ClassTypeResolver extends JavaParserVisitorAdapter {
if (className != null) {
populateClassName(node, className);
}
- } catch (ClassNotFoundException e) {
- if (LOG.isLoggable(Level.FINE)) {
- LOG.log(Level.FIN... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.typeresolution;
import static net.sourceforge.pmd.lang.java.typeresolution.MethodTypeResolution.getApplicableMethods;
import static net.sourceforge.pmd.lang.java.typeresolution.MethodTypeResol... | 1 | 13,678 | We should have a rule to detect identical catch branches | pmd-pmd | java |
@@ -28,10 +28,6 @@ namespace Microsoft.DotNet.Build.Tasks.Feed
public bool PublishFlatContainer { get; set; }
- public int RetryAttempts { get; set; } = 5;
-
- public int RetryDelayInSeconds { get; set; } = 30;
-
public int MaxClients { get; set; } = 8;
public bool SkipCre... | 1 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.Build.Framework;
using Microsoft.DotNet.Build.CloudTestTasks;
using System;
using System.Collections... | 1 | 14,070 | remove these from the targets file. | dotnet-buildtools | .cs |
@@ -11,14 +11,13 @@ import (
"time"
"github.com/ethersphere/bee/pkg/addressbook"
+ "github.com/ethersphere/bee/pkg/bzz"
"github.com/ethersphere/bee/pkg/hive/pb"
"github.com/ethersphere/bee/pkg/logging"
"github.com/ethersphere/bee/pkg/p2p"
"github.com/ethersphere/bee/pkg/p2p/protobuf"
"github.com/ethersp... | 1 | // Copyright 2020 The Swarm Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package hive
import (
"context"
"errors"
"fmt"
"time"
"github.com/ethersphere/bee/pkg/addressbook"
"github.com/ethersphere/bee/pkg/hive/pb"
"github.... | 1 | 10,242 | now that we have the signature in the hive messages, it might be that this must be drastically reduced, since there are limits on the protobuf reader/writers i believe | ethersphere-bee | go |
@@ -35,11 +35,12 @@ NAMESPACE_PACKAGES = [
REQUIRED_PACKAGES = [
# Installation related.
'anytree==2.4.3',
- 'google-api-python-client==1.7.7',
- 'google-auth==1.6.2',
+ 'google-api-python-client==1.7.10',
+ 'google-auth==1.6.3',
'google-auth-httplib2==0.0.3',
'Jinja2==2.10.1',
'jm... | 1 | #!/usr/bin/env python
# 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
#
#... | 1 | 35,042 | I recommend that we move this to be optional, as other users might not need it. Can you look at `OPTIONAL_PACKAGES` section, around line 68? | forseti-security-forseti-security | py |
@@ -8,10 +8,7 @@ package javaslang.control;
import javaslang.Serializables;
import org.junit.Test;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-import java.util.Objects;
-import java.util.Optional;
+import java.util.*;
import static org.assertj.core.api.Assertions.assertThat;
| 1 | /* / \____ _ ______ _____ / \____ ____ _____
* / \__ \/ \ / \__ \ / __// \__ \ / \/ __ \ Javaslang
* _/ // _\ \ \/ / _\ \\_ \/ // _\ \ /\ \__/ / Copyright 2014-2015 Daniel Dietrich
* /___/ \_____/\____/\_____/____/\___\_____/_/ \_/____/ Licensed under the Apache License... | 1 | 6,476 | I usually set idea to never use wildcard import such as `import java.util.*;` Now i use setting from javaslang standard. | vavr-io-vavr | java |
@@ -29,7 +29,9 @@ 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 | 7,331 | Where is host['ips'] coming from? | voxpupuli-beaker | rb |
@@ -3,14 +3,7 @@
package userns
-import (
- "strings"
-
- "github.com/opencontainers/runc/libcontainer/user"
-)
-
-func FuzzUIDMap(data []byte) int {
- uidmap, _ := user.ParseIDMap(strings.NewReader(string(data)))
- _ = uidMapInUserNS(uidmap)
+func FuzzUIDMap(uidmap []byte) int {
+ _ = uidMapInUserNS(string(uidmap... | 1 | //go:build gofuzz
// +build gofuzz
package userns
import (
"strings"
"github.com/opencontainers/runc/libcontainer/user"
)
func FuzzUIDMap(data []byte) int {
uidmap, _ := user.ParseIDMap(strings.NewReader(string(data)))
_ = uidMapInUserNS(uidmap)
return 1
}
| 1 | 22,884 | oh! missed a `:` here; let me fix that; also can get rid of the intermediate variable | opencontainers-runc | go |
@@ -1,6 +1,8 @@
describe "Display status text" do
let(:proposal) { FactoryGirl.create(:proposal, :with_parallel_approvers) }
before do
+ proposal.approvers.first.update(first_name: "Uniquely", last_name: "Named")
+ proposal.approvers.second.update(first_name: "Onlyof", last_name: "Itskind")
login_as(p... | 1 | describe "Display status text" do
let(:proposal) { FactoryGirl.create(:proposal, :with_parallel_approvers) }
before do
login_as(proposal.requester)
end
it "displays approved status" do
proposal.approvals.each{|approval| approval.approve!}
visit proposals_path
expect(page).to have_content('Appro... | 1 | 13,606 | Is this necessary? | 18F-C2 | rb |
@@ -1,8 +1,16 @@
-import React from 'react';
+import React, {Component} from 'react';
import 'element-theme-default';
import {i18n} from 'element-react';
import locale from 'element-react/src/locale/lang/en';
+import storage from './utils/storage';
+import logo from './utils/logo';
+import {makeLogin, isTokenExpir... | 1 | import React from 'react';
import 'element-theme-default';
import {i18n} from 'element-react';
import locale from 'element-react/src/locale/lang/en';
i18n.use(locale);
import Route from './router';
import './styles/main.scss';
import 'normalize.css';
export default class App extends React.Component {
render() {
... | 1 | 18,856 | I'd create a different method for each render section. | verdaccio-verdaccio | js |
@@ -23,6 +23,8 @@ public class EstimateGasOperationTracer implements OperationTracer {
private Gas sStoreStipendNeeded = Gas.ZERO;
+ private boolean isReverted = false;
+
@Override
public void traceExecution(
final MessageFrame frame, final OperationTracer.ExecuteOperation executeOperation) { | 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,615 | Instead of storing the revert flag in the tracer is it possible to use org.hyperledger.besu.ethereum.mainnet.TransactionProcessor.Result#getRevertReason? (via org.hyperledger.besu.ethereum.transaction.TransactionSimulatorResult#getResult)? If a TX reverts without a reason do we get an empty revert reason or a revert re... | hyperledger-besu | java |
@@ -71,7 +71,7 @@ public class TestSparkOrcReader extends AvroDataTest {
try (CloseableIterable<InternalRow> reader = ORC.read(Files.localInput(testFile))
.project(schema)
- .createReaderFunc(SparkOrcReader::new)
+ .createReaderFunc(readOrcSchema -> new SparkOrcReader(schema, readOrcSchema... | 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 | 19,872 | I think this should test with and without container reuse if that is implemented in this PR. Probably just make this test parameterized. | apache-iceberg | java |
@@ -100,6 +100,10 @@ abstract class BaseFile<F>
found = true;
fromProjectionPos[i] = j;
}
+ if (fields.get(i).fieldId() == ManifestFile.SPEC_ID.fieldId()) {
+ found = true;
+ fromProjectionPos[i] = 14;
+ }
}
if (!found) { | 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 | 24,158 | These modifications allow BaseFile to translate into a SparkRow with the specID as a column | apache-iceberg | java |
@@ -519,7 +519,7 @@ function resolveReadPreference(parent, options) {
throw new Error('No readPreference was provided or inherited.');
}
- return readPreference;
+ return typeof readPreference === 'string' ? new ReadPreference(readPreference) : readPreference;
}
/** | 1 | 'use strict';
const MongoError = require('./core').MongoError;
const ReadPreference = require('./core').ReadPreference;
const WriteConcern = require('./write_concern');
var shallowClone = function(obj) {
var copy = {};
for (var name in obj) copy[name] = obj[name];
return copy;
};
// Figure out the read prefere... | 1 | 16,045 | is this something we've been missing this whole time? | mongodb-node-mongodb-native | js |
@@ -25,6 +25,7 @@ import (
const (
defaultWaitApprovalTimeout = Duration(6 * time.Hour)
defaultAnalysisQueryTimeout = Duration(30 * time.Second)
+ allEvents = "*"
)
type GenericDeploymentSpec struct { | 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 | 21,408 | nit: this is a package-wide constant so better to narrow the scope like `allEventsSign`. | pipe-cd-pipe | go |
@@ -111,6 +111,15 @@ def generate_thrift_files(thrift_files_dir, env, silent=True):
LOG.error('Failed to generate viewer server files')
return ret
+ auth_thrift = os.path.join(thrift_files_dir, 'authentication.thrift')
+ auth_thrift = 'authentication.thrift'
+ auth_cmd = ['thrift', '-r', '-... | 1 | #!/usr/bin/env python
"""
CodeChecker packager script creates a package based on the given layout config.
"""
from __future__ import print_function
import argparse
import errno
import json
import logging
import ntpath
import os
import shutil
import sys
try:
import urlparse
except ImportError:
import urllib.pa... | 1 | 6,139 | There seems to be some repetition. Does a local function make this code shorter overall? | Ericsson-codechecker | c |
@@ -298,6 +298,7 @@ function diffElementNodes(
}
if (dom == null) {
+ isHydrating = false;
if (newVNode.type === null) {
return document.createTextNode(newProps);
} | 1 | import { EMPTY_OBJ, EMPTY_ARR } from '../constants';
import { Component } from '../component';
import { Fragment } from '../create-element';
import { diffChildren } from './children';
import { diffProps } from './props';
import { assign, removeNode } from '../util';
import options from '../options';
/**
* Diff two vi... | 1 | 15,531 | Might be cheaper to reuse the `null` assignment of line 313 and set `isHydrating` to null instead WDYT? | preactjs-preact | js |
@@ -22,7 +22,6 @@ import java.util.List;
@AutoValue
public abstract class TestCaseView {
-
public abstract String clientMethodName();
public abstract InitCodeView initCode(); | 1 | /* Copyright 2016 Google Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 1 | 21,194 | Revert this blank line | googleapis-gapic-generator | java |
@@ -50,8 +50,8 @@ public class MoveReplicaHDFSTest extends MoveReplicaTest {
HdfsTestUtil.teardownClass(dfsCluster);
} finally {
dfsCluster = null;
- System.setProperty("solr.hdfs.blockcache.blocksperbank", "512");
- System.setProperty("tests.hdfs.numdatanodes", "1");
+ System.clearPro... | 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,756 | This was introduced recently for the Hadoop 3 upgrade. Copy/paste error but definitely causing some of the new test failures. | apache-lucene-solr | java |
@@ -2,6 +2,7 @@ class ProposalsController < ApplicationController
include TokenAuth
skip_before_action :authenticate_user!, only: [:approve]
+ before_action :check_disabled_client
# TODO use Policy for all actions
before_action ->{authorize proposal}, only: [:show, :cancel, :cancel_form, :history]
bef... | 1 | class ProposalsController < ApplicationController
include TokenAuth
skip_before_action :authenticate_user!, only: [:approve]
# TODO use Policy for all actions
before_action ->{authorize proposal}, only: [:show, :cancel, :cancel_form, :history]
before_action :needs_token_on_get, only: :approve
before_action... | 1 | 15,959 | I think we should only need to do this for `:approve` since we are using `authenticate_user!` for all other actions and that checks for disabled client | 18F-C2 | rb |
@@ -56,9 +56,10 @@ class DefaultBucketViewTest(BaseWebTest, unittest.TestCase):
self.app.get(self.collection_url, headers=self.headers)
def test_querystring_parameters_are_taken_into_account(self):
- self.app.get(self.collection_url + '/records?_since=invalid',
- headers=self.... | 1 | from six import text_type
from uuid import UUID
from cliquet.utils import hmac_digest
from .support import (BaseWebTest, unittest, get_user_headers,
MINIMALIST_RECORD)
class DefaultBucketViewTest(BaseWebTest, unittest.TestCase):
bucket_url = '/buckets/default'
collection_url = '/bucke... | 1 | 8,016 | I wonder if we should create new tests for header checks; here for instance we're mixing querystring and headers. Thoughts? | Kinto-kinto | py |
@@ -42,7 +42,7 @@ module Bolt
path = File.join(libexec, 'custom_facts.rb')
file = { 'name' => 'custom_facts.rb', 'path' => path }
metadata = { 'supports_noop' => true, 'input_method' => 'stdin' }
- Bolt::Task.new(name: 'custom_facts', files: [file], metadata: metadata)
+ Bolt::T... | 1 | # frozen_string_literal: true
require 'base64'
require 'concurrent'
require 'find'
require 'json'
require 'logging'
require 'minitar'
require 'open3'
require 'bolt/task'
require 'bolt/util/puppet_log_level'
module Bolt
class Applicator
def initialize(inventory, executor, modulepath, plugin_dirs, pdb_client, hie... | 1 | 9,566 | We should be able to add sensitive by hard-coding the parameters, same as you put into the metadata in apply_helpers. | puppetlabs-bolt | rb |
@@ -0,0 +1,11 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Shopsys\ShopBundle\Model\Order\Item;
+
+use Shopsys\FrameworkBundle\Model\Order\Item\OrderItemFactory as BaseOrderItemFactory;
+
+class OrderItemFactory extends BaseOrderItemFactory
+{
+} | 1 | 1 | 18,706 | Why do you think that it is necessary to create this class? | shopsys-shopsys | php | |
@@ -18,8 +18,8 @@ type Hash struct {
//
// See http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html for more information.
func ComputeHashes(r io.ReadSeeker) Hash {
- r.Seek(0, 0) // Read the whole stream
- defer r.Seek(0, 0) // Rewind stream at end
+ start, _ := r.Seek(0, 1) // Read... | 1 | package glacier
import (
"crypto/sha256"
"io"
)
const bufsize = 1024 * 1024
// Hash contains information about the tree-hash and linear hash of a
// Glacier payload. This structure is generated by ComputeHashes().
type Hash struct {
TreeHash []byte
LinearHash []byte
}
// ComputeHashes computes the tree-hash a... | 1 | 9,086 | replacing the `1` with `io.SeekCurrent` may be good here | aws-aws-sdk-go | go |
@@ -0,0 +1,15 @@
+package main
+
+import (
+ "time"
+
+ "gopkg.in/square/go-jose.v2"
+)
+
+type JWKSSource interface {
+ // FetchJWKS returns the key set and modified time.
+ FetchKeySet() (*jose.JSONWebKeySet, time.Time, bool)
+
+ // Close closes the source.
+ Close() error
+} | 1 | 1 | 12,047 | nit: perhaps this file would be better named `jwks_source.go` ? | spiffe-spire | go | |
@@ -153,6 +153,9 @@ public class Constants {
// Overridable plugin load properties
public static final String AZ_PLUGIN_LOAD_OVERRIDE_PROPS = "azkaban.plugin.load.override.props";
+ // File containing param override configs
+ public static final String PARAM_OVERRIDE_FILE = "param_override.properties";
+
/... | 1 | /*
* Copyright 2018 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 | 22,697 | It will be helpful to specify the intended priority as well for the properties within this file. | azkaban-azkaban | java |
@@ -23,6 +23,8 @@ import (
"github.com/GoogleCloudPlatform/compute-image-tools/go/osinfo"
)
+type RunFunc func(*exec.Cmd) ([]byte, error)
+
var (
// AptExists indicates whether apt is installed.
AptExists bool | 1 | /*
Copyright 2017 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | 1 | 7,988 | Make this private and update all the public functions to not take this argument. The variable you set below should also be private, then in the tests instead of passing the variable in to the function just update the variable. We don't want to expose the testing implementation in the public api if it can be avoided. | GoogleCloudPlatform-compute-image-tools | go |
@@ -1956,7 +1956,7 @@ SDDkwd__(EXE_DIAGNOSTIC_EVENTS, "OFF"),
DDkwd__(HIVE_DEFAULT_CHARSET, (char *)SQLCHARSETSTRING_UTF8),
DD_____(HIVE_DEFAULT_SCHEMA, "HIVE"),
DD_____(HIVE_FILE_CHARSET, ""),
- DD_____(HIVE_FILE_NAME, "/hive/tpcds/customer/customer.dat" ),... | 1 | /* -*-C++-*-
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache Licen... | 1 | 16,990 | Do you now why is it a specific table name is used as a default? | apache-trafodion | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.