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 |
|---|---|---|---|---|---|---|---|
@@ -60,6 +60,11 @@ module Bolt
print_table('tasks' => tasks, 'modulepath' => modulepath)
end
+ def print_plugin_list(plugins, modulepath)
+ plugins.delete(:validate_resolve_reference)
+ print_table('plugins' => plugins, 'modulepath' => modulepath)
+ end
+
def print_plan_... | 1 | # frozen_string_literal: true
module Bolt
class Outputter
class JSON < Bolt::Outputter
def initialize(color, verbose, trace, spin, stream = $stdout)
super
@items_open = false
@object_open = false
@preceding_item = false
end
def print_head
@stream.puts '{... | 1 | 18,547 | I think this should also filter out `validate_resolve_reference` hooks. | puppetlabs-bolt | rb |
@@ -18,8 +18,8 @@ using System;
using System.Diagnostics;
using System.Security;
using OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation;
-using OpenTelemetry.Trace;
using OpenTelemetry.Metrics;
+using OpenTelemetry.Trace;
namespace OpenTelemetry.Exporter
{ | 1 | // <copyright file="OtlpExporterOptions.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 | 21,239 | unrelated, but required fix as metrics branch got broken with the latest main->metrics merge and conflict resolution. | open-telemetry-opentelemetry-dotnet | .cs |
@@ -1,9 +1,8 @@
# -*- coding: UTF-8 -*-
-#globalCommands.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-2018 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Leonard de Ruij... | 1 | # -*- coding: UTF-8 -*-
#globalCommands.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-2018 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Leonard de Ruijter, Derek Riemer... | 1 | 27,807 | Feel free to remove this line | nvaccess-nvda | py |
@@ -25,7 +25,7 @@ module Subscriptions
end
def click_upcase_call_to_action_in_header
- click_link "Upcase Membership"
+ click_link I18n.t("shared.subscriptions.single_user")
end
def settings_page | 1 | module Subscriptions
def sign_in_as_user_with_subscription(*traits)
@current_user = create(
:subscriber,
*traits,
stripe_customer_id: FakeStripe::CUSTOMER_ID,
completed_welcome: true
)
visit practice_path(as: @current_user)
end
def sign_in_as_user_with_downgraded_subscription
... | 1 | 16,574 | ~~Should this match the key updated above?~~ :+1: | thoughtbot-upcase | rb |
@@ -180,7 +180,9 @@ func isDirExcludedByFile(dir, tagFilename, header string) bool {
Warnf("could not open exclusion tagfile: %v", err)
return false
}
- defer f.Close()
+ defer func() {
+ _ = f.Close()
+ }()
buf := make([]byte, len(header))
_, err = io.ReadFull(f, buf)
// EOF is handled with a dedicated ... | 1 | package main
import (
"bytes"
"fmt"
"io"
"os"
"path/filepath"
"strconv"
"strings"
"sync"
"github.com/restic/restic/internal/debug"
"github.com/restic/restic/internal/errors"
"github.com/restic/restic/internal/filter"
"github.com/restic/restic/internal/fs"
"github.com/restic/restic/internal/repository"
)
... | 1 | 14,940 | `gofmt` allows a more compact form `defer func() { _ = f.Close() }()` or just add `// nolint:errcheck` before `defer`. | restic-restic | go |
@@ -10,11 +10,10 @@ import (
"github.com/filecoin-project/go-filecoin/address"
"github.com/filecoin-project/go-filecoin/porcelain"
- "github.com/filecoin-project/go-filecoin/types"
)
// MinerCreate runs the `miner create` command against the filecoin process
-func (f *Filecoin) MinerCreate(ctx context.Context... | 1 | package fat
import (
"context"
"fmt"
"math/big"
cid "gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid"
"gx/ipfs/QmY5Grm8pJdiSSVsYxx4uNRgweY72EmYwuSDbRnbFok3iY/go-libp2p-peer"
"github.com/filecoin-project/go-filecoin/address"
"github.com/filecoin-project/go-filecoin/porcelain"
"github.com/filecoi... | 1 | 16,526 | collateral is in FIL | filecoin-project-venus | go |
@@ -84,6 +84,11 @@ func (q *ChannelEventQueue) dispatchMessage() {
log.LOGGER.Warnf("node id is not found in the message")
continue
}
+ _, ok := q.channelPool.Load(nodeID)
+ if !ok {
+ rChannel := make(chan model.Event, rChanBufSize)
+ q.channelPool.LoadOrStore(nodeID, rChannel)
+ }
rChannel, err :... | 1 | package channelq
import (
"fmt"
"strings"
"sync"
"github.com/kubeedge/beehive/pkg/common/log"
"github.com/kubeedge/beehive/pkg/core/context"
"github.com/kubeedge/kubeedge/cloud/pkg/cloudhub/common/model"
)
// Read channel buffer size
const (
rChanBufSize = 10
)
// EventSet holds a set of events
type EventSet... | 1 | 10,454 | We should not create channel of node which are not connected. | kubeedge-kubeedge | go |
@@ -40,6 +40,7 @@ class MongoCredentials {
* @param {string} [options.username] The username used for authentication
* @param {string} [options.password] The password used for authentication
* @param {string} [options.source] The database that the user should authenticate against
+ * @param {string} [opti... | 1 | 'use strict';
// Resolves the default auth mechanism according to
// https://github.com/mongodb/specifications/blob/master/source/auth/auth.rst
function getDefaultAuthMechanism(ismaster) {
if (ismaster) {
// If ismaster contains saslSupportedMechs, use scram-sha-256
// if it is available, else scram-sha-1
... | 1 | 17,228 | I think the docstring should say something like "Alias for the `source` option" or something similar. | mongodb-node-mongodb-native | js |
@@ -129,6 +129,14 @@ public class Product implements Serializable {
private String nutritionDataPer;
@JsonProperty("no_nutrition_data")
private String noNutritionData;
+ @JsonProperty("other_information_fr")
+ private String otherInformation;
+ @JsonProperty("conservation_conditions_fr")
+ pr... | 1 | package openfoodfacts.github.scrachx.openfood.models;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.... | 1 | 66,525 | Please use properties without suffix `_fr` so they can work across different languages as @teolemon mentioned | openfoodfacts-openfoodfacts-androidapp | java |
@@ -132,6 +132,7 @@ struct st_h2o_http3client_req_t {
static int handle_input_expect_data_frame(struct st_h2o_http3client_req_t *req, const uint8_t **src, const uint8_t *src_end,
int err, const char **err_desc);
static void start_request(struct st_h2o_http3client_req_t *req)... | 1 | /*
* Copyright (c) 2018 Fastly, Kazuho Oku
*
* 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 | 14,440 | Declaration here is `static` but the definition at the bottom is non-static? | h2o-h2o | c |
@@ -65,6 +65,9 @@ type WriterOptions struct {
// write in a single request, if supported. Larger objects will be split into
// multiple requests.
BufferSize int
+ // Content-MD5 which may be used as a message integrity check (MIC)
+ // https://tools.ietf.org/html/rfc1864
+ ContentMD5 string
// Metadata holds ke... | 1 | // Copyright 2018 The Go Cloud Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 1 | 11,572 | Hi @myml, thanks for the contribution! `blob` and `blob/driver` are both in the same module, so you shouldn't need to split this change up into multiple Pull Requests. Also, I'd like to see it working, including the implementation for `s3blob` and `gcsblob` (these should be easy, just pass-through to the provider) and ... | google-go-cloud | go |
@@ -610,11 +610,11 @@ func (i *Initializer) configureGatewayInterface(gatewayIface *interfacestore.Int
gatewayIface.IPs = []net.IP{}
if i.networkConfig.TrafficEncapMode.IsNetworkPolicyOnly() {
// Assign IP to gw as required by SpoofGuard.
- if i.nodeConfig.NodeIPv4Addr != nil {
+ if i.nodeConfig.NodeTransportI... | 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 | 47,857 | Was it a bug? | antrea-io-antrea | go |
@@ -54,10 +54,8 @@ class ProxyType:
value = str(value).upper()
for attr in dir(cls):
attr_value = getattr(cls, attr)
- if isinstance(attr_value, dict) and \
- 'string' in attr_value and \
- attr_value['string'] is not None and \
- ... | 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 | 18,411 | # `attr_value['string'] is not None` probably not required as `attr_value['string'] == value` check is already being done | SeleniumHQ-selenium | py |
@@ -66,6 +66,7 @@ def replace_variables(win_id, arglist):
'url:host': lambda: _current_url(tabbed_browser).host(),
'clipboard': utils.get_clipboard,
'primary': lambda: utils.get_clipboard(selection=True),
+ 'link_hovered': lambda: tabbed_browser._now_focused._last_hovered_link,
}
... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2018 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 | 21,680 | You're accessing private variables here - `last_hovered_link` should be public in `TabData`. As for `tabbed_browser._now_focused`, I think you can use `tabbed_browser.widget.currentWidget()` instead. | qutebrowser-qutebrowser | py |
@@ -0,0 +1,10 @@
+class InvitationMailer < BaseMailer
+ def invitation(invitation_id)
+ @invitation = Invitation.find(invitation_id)
+
+ mail(
+ to: @invitation.email,
+ subject: 'Invitation'
+ )
+ end
+end | 1 | 1 | 10,791 | Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. | thoughtbot-upcase | rb | |
@@ -0,0 +1,15 @@
+namespace Fixtures.Azure.SwaggerBatSubscriptionIdApiVersion
+{
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+ using Microsoft.Rest;
+ using Microsoft.Azure;
+ using Models;
+
+ publi... | 1 | 1 | 20,728 | We should file a bug for this - we don't need the extensions class if there are no operations on the client | Azure-autorest | java | |
@@ -415,6 +415,8 @@ func (p *csiPlugin) NewMounter(
}
klog.V(4).Info(log("created path successfully [%s]", dataDir))
+ mounter.MetricsProvider = NewMetricsCsi(volumeHandle, dir, csiDriverName(driverName))
+
// persist volume info data for teardown
node := string(p.host.GetNodeName())
volData := map[string]s... | 1 | /*
Copyright 2017 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 | 24,189 | Is it possible to import from k8s instead of copy in? :) | kubeedge-kubeedge | go |
@@ -25,7 +25,7 @@ class ProjectCacheProvider extends \Psalm\Internal\Provider\ProjectCacheProvider
*
* @return void
*/
- public function processSuccessfulRun($start_time)
+ public function processSuccessfulRun(float $start_time)
{
$this->last_run = (int) $start_time;
} | 1 | <?php
namespace Psalm\Tests\Internal\Provider;
use function microtime;
use PhpParser;
class ProjectCacheProvider extends \Psalm\Internal\Provider\ProjectCacheProvider
{
/**
* @var int
*/
private $last_run = 0;
public function __construct()
{
}
public function getLastRun(): int
... | 1 | 9,037 | `@param float` can be dropped here. | vimeo-psalm | php |
@@ -35,7 +35,7 @@ import java.util.NoSuchElementException;
public abstract class CoprocessIterator<T> implements Iterator<T> {
protected final TiSession session;
protected final List<RegionTask> regionTasks;
- protected final DAGRequest dagRequest;
+ protected DAGRequest dagRequest;
protected final DataType... | 1 | /*
* Copyright 2017 PingCAP, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | 1 | 10,433 | maybe we can leave this change un-reverted. | pingcap-tispark | java |
@@ -5,7 +5,7 @@
package net.sourceforge.pmd.lang.java.ast;
-public class ASTMethodDeclarator extends AbstractJavaNode {
+public class ASTMethodDeclarator extends AbstractJavaAccessNode {
public ASTMethodDeclarator(int id) {
super(id);
} | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
/* Generated By:JJTree: Do not edit this line. ASTMethodDeclarator.java */
package net.sourceforge.pmd.lang.java.ast;
public class ASTMethodDeclarator extends AbstractJavaNode {
public ASTMethodDeclarator(int id) {
sup... | 1 | 13,755 | I wouldn't make MethodDeclarator an AccessNode, nor an Annotatable. It's the MethodDeclaration that can be annotated, and has info about the modifiers, and is already an AccessNode | pmd-pmd | java |
@@ -0,0 +1,16 @@
+package net.runelite.api.events.player.headicon;
+
+import lombok.Getter;
+import net.runelite.api.Player;
+import net.runelite.api.events.Event;
+
+public abstract class PlayerHeadIconChanged implements Event
+{
+ @Getter
+ private final Player player;
+
+ public PlayerHeadIconChanged(Player player)
... | 1 | 1 | 16,367 | delete this class | open-osrs-runelite | java | |
@@ -378,7 +378,7 @@ window.PopulatorView = countlyView.extend({
if (["true", "false"].indexOf(s) !== -1) {
return s === "true";
}
- else if (/^[1-9][0-9]+|0$/.test(s)) {
+ else if (/^[1-9][0-9]+|0|[1-9]$/.test(s)) {
return parseInt(s);
... | 1 | /*global countlyPopulator, countlyGlobal, store, countlyCommon, $, moment, app, countlyView, T, jQuery, PopulatorView, CountlyHelpers*/
window.PopulatorView = countlyView.extend({
_tab: 'populator',
templateTable: undefined,
templateId: undefined,
rowInEdit: undefined,
initialize: function() {
... | 1 | 13,583 | Replacing `+` (1 or more) with `*` (0 or more) would've also done the trick. | Countly-countly-server | js |
@@ -58,7 +58,7 @@ TDTWriter::TDTWriter(std::ostream *outStream, bool takeOwnership) {
df_writeNames = true;
}
-TDTWriter::~TDTWriter() throw() {
+TDTWriter::~TDTWriter() {
// close the writer if it's still open:
if (dp_ostream != nullptr) close();
} | 1 | // $Id$
//
// Copyright (C) 2005-2010 Greg Landrum and Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <RD... | 1 | 19,036 | I've been meaning to fix this for a while. Thanks. | rdkit-rdkit | cpp |
@@ -27,10 +27,12 @@ public class Program
{
using var otel = Sdk.CreateTracerProvider(b => b
.AddActivitySource("MyCompany.MyProduct.MyLibrary")
- .AddProcessorPipeline(pipeline =>
- {
- pipeline.AddProcessor(current => new MyActivityProcessor());
- ... | 1 | // <copyright file="Program.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache... | 1 | 15,807 | This is adding multiple processor pipelines. I guess you wanted to add multiple processors to the same, single pipeline? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -11,13 +11,14 @@ from __future__ import absolute_import
from __future__ import print_function
from scapy.error import Scapy_Exception
import scapy.modules.six as six
+from scapy.compat import *
###############################
## Direct Access dictionary ##
###############################
def fixname(x):
... | 1 | ## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Philippe Biondi <phil@secdev.org>
## This program is published under a GPLv2 license
"""
Direct Access dictionary.
"""
from __future__ import absolute_import
from __future__ import print_function
from scap... | 1 | 10,466 | If you need str(x[0]) here, you'll probably need str(x) the line after that I suppose. Also, shouldn't we use `raw()` here instead of `str()`? | secdev-scapy | py |
@@ -96,8 +96,8 @@ public class TwoPhaseCommitter {
*/
private static final int TXN_COMMIT_BATCH_SIZE = 768 * 1024;
- /** unit is second */
- private static final long DEFAULT_BATCH_WRITE_LOCK_TTL = 3000;
+ /** unit is millisecond */
+ private static final long DEFAULT_BATCH_WRITE_LOCK_TTL = 3600000;
p... | 1 | /*
* Copyright 2017 PingCAP, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | 1 | 10,590 | 3.6 seconds? what does it stand for? | pingcap-tispark | java |
@@ -834,6 +834,19 @@ module Beaker
sign_certificate_for(default)
end
+ # Get a facter fact from a provided host
+ #
+ # @param [Host] host The host to query the fact for
+ # @param [String] name The name of the fact to query for
+ # @!macro common_opts
+ #
+ # @retu... | 1 | require 'resolv'
require 'inifile'
require 'timeout'
require 'beaker/dsl/outcomes'
module Beaker
module DSL
# This is the heart of the Puppet Acceptance DSL. Here you find a helper
# to proxy commands to hosts, more commands to move files between hosts
# and execute remote scripts, confine test cases to ... | 1 | 4,768 | If the command fails, is stdout nil or ""? | voxpupuli-beaker | rb |
@@ -84,10 +84,10 @@ public interface AutoRestValidationTest {
* used by Retrofit to perform actually REST calls.
*/
interface AutoRestValidationTestService {
- @GET("/fakepath/{subscriptionId}/{resourceGroupName}/{id}?api-version={apiVersion}")
+ @GET("/fakepath/{subscriptionId}/{resource... | 1 | /**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator 0.14.0.0
* Changes may cause incorrect behavior and will be lost if the code is
* regenerate... | 1 | 21,481 | Why is api-version now removed in the generated code? | Azure-autorest | java |
@@ -0,0 +1,3 @@
+from mmdet.utils import Registry
+
+OPTIMIZERS = Registry('optimizer') | 1 | 1 | 18,601 | We may register all built-in optimizers of PyTorch here to simplify the builder. | open-mmlab-mmdetection | py | |
@@ -109,7 +109,8 @@ std::string BaseGenerator::WrapInNameSpace(const Namespace *ns,
const std::string &name) const {
if (CurrentNameSpace() == ns) return name;
std::string qualified_name = qualifying_start_;
- for (auto it = ns->components.begin(); it != ns->components... | 1 | /*
* Copyright 2016 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 | 13,130 | No need for this new variable. | google-flatbuffers | java |
@@ -87,11 +87,11 @@ export function diff(dom, parentDom, newVNode, oldVNode, context, isSvg, excessD
c._vnode = newVNode;
// Invoke getDerivedStateFromProps
- let s = c._nextState || c.state;
+ if (c._nextState==null) {
+ c._nextState = c.state;
+ }
if (newType.getDerivedStateFromProps!=null) {
-... | 1 | import { EMPTY_OBJ, EMPTY_ARR } from '../constants';
import { Component, enqueueRender } from '../component';
import { coerceToVNode, Fragment } from '../create-element';
import { diffChildren } from './children';
import { diffProps } from './props';
import { assign, removeNode } from '../util';
import options from '..... | 1 | 12,872 | doesn't this enqueue a double render or is that safeguarded somehow | preactjs-preact | js |
@@ -878,7 +878,9 @@ func (a *Account) randomClient() *client {
}
var c *client
for c = range a.clients {
- break
+ if c.acc == a {
+ break
+ }
}
return c
} | 1 | // Copyright 2018-2021 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 12,285 | But now you may get DATA RACE reports because c.acc is sometimes changed. I wonder if we should not rework that whole sending subs through route. | nats-io-nats-server | go |
@@ -194,7 +194,18 @@ std::shared_ptr<Engine> ADIOS::Open(const std::string &name,
"HDF5 library, can't use HDF5\n");
#endif
}
-
+ else if (type == "HDF5Reader") // -Junmin
+ {
+//#if defined(ADIOS_HAVE_PHDF5) && defined(ADIOS_HAVE_MPI)
+#ifdef ADIOS_HAVE_PHDF5
+ /... | 1 | /*
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* ADIOS.cpp
*
* Created on: Sep 29, 2016
* Author: William F Godoy
*/
#include "ADIOS.h"
#include "ADIOS.tcc"
#include <fstream>
#include <ios> //std::ios_base::failure
#include <io... | 1 | 11,481 | Use `ADIADIOS2_HAVE_HDF5`, not `ADIOS_HAVE_PHDF5` | ornladios-ADIOS2 | cpp |
@@ -282,6 +282,7 @@ module RSpec
context "with a non-string and a string" do
it "concats the args" do
expect(group_value_for Object, 'group').to eq("Object group")
+ expect(group_value_for 'group', Object).to eq("group Object")
end
end
| 1 | require 'spec_helper'
module RSpec
module Core
RSpec.describe Metadata do
describe '.relative_path' do
let(:here) { File.expand_path(".") }
it "transforms absolute paths to relative paths" do
expect(Metadata.relative_path(here)).to eq "."
end
it "transforms absolu... | 1 | 13,553 | Would be nice to put this in a separate context named `"with a string and a non-string"` (since that's what it is -- it's definitely not a non-string and a string!). | rspec-rspec-core | rb |
@@ -1265,7 +1265,7 @@ void ResStatisticsStatement::setStatistics(SRVR_STMT_HDL *pSrvrStmt, SQLSTATS_TY
#define MAX_PERTABLE_STATS_DESC 30
#define MAX_MASTERSTATS_ENTRY 31
-#define MAX_MEASSTATS_ENTRY 34
+#define MAX_MEASSTATS_ENTRY 26
#define MAX_PERTABLE_ENTRY 14
int i; | 1 | /**********************************************************************
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. ... | 1 | 15,543 | Should MAX_PERTABLE_ENTRY here be 10 ? | apache-trafodion | cpp |
@@ -29,6 +29,17 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
private static readonly ArraySegment<byte> _emptyData = new ArraySegment<byte>(new byte[0]);
private static readonly byte[] _hex = Encoding.ASCII.GetBytes("0123456789abcdef");
+ private static readonly byte[] _bytesConnectionCl... | 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.Net;
using System.Text;
using System.Threading;
using S... | 1 | 6,726 | Should move these out of frame into a static class? Similar to reason phrases? | aspnet-KestrelHttpServer | .cs |
@@ -608,7 +608,7 @@ std::vector<RouteStep> buildIntersections(std::vector<RouteStep> steps)
{
auto &step = steps[step_index];
const auto instruction = step.maneuver.instruction;
- if (instruction.type == TurnType::Suppressed)
+ if (instruction.type == TurnType::Suppressed || instruc... | 1 | #include "engine/guidance/post_processing.hpp"
#include "extractor/guidance/constants.hpp"
#include "extractor/guidance/turn_instruction.hpp"
#include "engine/guidance/assemble_steps.hpp"
#include "engine/guidance/lane_processing.hpp"
#include "engine/guidance/collapsing_utility.hpp"
#include "util/bearing.hpp"
#incl... | 1 | 22,238 | That means we still create `UseLane` instructions but threat them like `Suppressed`? Can we maybe change this in the pre-processing so that we will just emit `Suppress` instructions in these cases? | Project-OSRM-osrm-backend | cpp |
@@ -21,14 +21,13 @@ import (
"github.com/iotexproject/go-pkgs/hash"
"github.com/iotexproject/iotex-address/address"
- "github.com/iotexproject/iotex-proto/golang/iotextypes"
-
"github.com/iotexproject/iotex-core/action"
"github.com/iotexproject/iotex-core/action/protocol"
accountutil "github.com/iotexprojec... | 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,843 | no need to move here, iotex-proto is outside of iotex-core and considered same as iotex-address, go-pkgs | iotexproject-iotex-core | go |
@@ -600,6 +600,14 @@ static void
app_exit_event(void)
{
check_stack_alignment();
+
+#if defined(LINUX) && defined(X86_64)
+ /* i#4335: Test allocation of more than 2.8GB in unreachable heap */
+ for (int i = 0; i != 50; ++i)
+ {
+ malloc(100000000);
+ }
+#endif
}
DR_EXPORT void | 1 | /* **********************************************************
* Copyright (c) 2012-2020 Google, Inc. All rights reserved.
* Copyright (c) 2008 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
*... | 1 | 21,142 | Looks like a clang-format style violation: should turn Travis red. | DynamoRIO-dynamorio | c |
@@ -127,6 +127,11 @@ MESSAGE
# Run all examples if none match the configured filters (default: `false`).
add_setting :run_all_when_everything_filtered
+
+ # Allow user to configure their own success/pending/failure colors
+ add_setting :success_color
+ add_setting :pending_color
+ ... | 1 | require 'fileutils'
module RSpec
module Core
# Stores runtime configuration information.
#
# Configuration options are loaded from `~/.rspec`, `.rspec`,
# `.rspec-local`, command line switches, and the `SPEC_OPTS` environment
# variable (listed in lowest to highest precedence; for example, an opt... | 1 | 8,209 | I think we need some YARD docs here, particularly to list all the color symbols that are valid. Otherwise users will have to look at the source to discover that. | rspec-rspec-core | rb |
@@ -31,6 +31,13 @@ import { STORE_NAME, AMP_MODE_PRIMARY, AMP_MODE_SECONDARY } from './constants';
const { createRegistrySelector } = Data;
+function getSiteInfoProperty( propName ) {
+ return createRegistrySelector( ( select ) => () => {
+ const siteInfo = select( STORE_NAME ).getSiteInfo() || {};
+ return site... | 1 | /**
* core/site data store: site info.
*
* 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/licenses/LICEN... | 1 | 30,844 | Not sure if this needs a doc block or not since it's completely internal, but for cleaning this up. (@felixarntz docs?) | google-site-kit-wp | js |
@@ -616,7 +616,8 @@ libponyc.benchmarks.buildoptions += -DLLVM_BUILD_MODE=$(LLVM_BUILD_MODE)
libgbenchmark.buildoptions := \
-Wshadow -pedantic -pedantic-errors \
- -Wfloat-equal -fstrict-aliasing -Wstrict-aliasing -Wno-invalid-offsetof \
+ -fstrict-aliasing -Wstrict-aliasing \
+ -Wno-invalid-offsetof -Wno-dep... | 1 | # Determine the operating system
OSTYPE ?=
ifeq ($(OS),Windows_NT)
OSTYPE = windows
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
OSTYPE = linux
ifndef AR
ifneq (,$(shell which gcc-ar 2> /dev/null))
AR = gcc-ar
endif
endif
ALPINE=$(wildcard /etc/alpine-release)
... | 1 | 14,039 | The change here is to address what exactly? | ponylang-ponyc | c |
@@ -101,9 +101,14 @@ const (
// Options sets options for constructing a *blob.Bucket backed by Azure Block Blob.
type Options struct {
// Credential represents the authorizer for SignedURL.
- // Required to use SignedURL.
+ // Required to use SignedURL. If you're using MSI for authentication, this will
+ // attempt... | 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 | 20,271 | Is this really an Option? IIUC, you compute it automatically for the URLOpener case, why would we require a user to fill it in when using the constructor? I.e., can't we drop this and use `adal.MSIAvailable` instead? If that call is expensive, cache it on `bucket`, not `Options`. | google-go-cloud | go |
@@ -23,7 +23,7 @@
ExplicitBitVect::ExplicitBitVect(unsigned int size, bool bitsSet) {
d_size = 0;
- dp_bits = 0;
+ dp_bits = nullptr;
d_numOnBits = 0;
_initForSize(size);
if (bitsSet) { | 1 | // $Id$
//
// Copyright (c) 2001-2008 greg Landrum and Rational Discovery LLC
// Copyright (c) 2014, Novartis Institutes for BioMedical Research Inc.
//
// @@ 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 licen... | 1 | 16,080 | Was this done automatically or by hand? | rdkit-rdkit | cpp |
@@ -136,6 +136,18 @@ module Bolt
end
private :expand_targets
+ def remove_target(current_group, target, desired_group)
+ if current_group.name == desired_group
+ current_group.remove_target(target)
+ end
+ current_group.groups.each do |child_group|
+ # If targ... | 1 | # frozen_string_literal: true
require 'bolt/inventory/group2'
require 'bolt/inventory/target'
module Bolt
class Inventory
class Inventory2
attr_reader :targets, :plugins, :config
# This uses "targets" in the message instead of "nodes"
class WildcardError < Bolt::Error
def initialize(ta... | 1 | 13,374 | This looks like it will only work for the first child, since after that we've overridden `desired_group`. Should we have a separate variable for this? | puppetlabs-bolt | rb |
@@ -3194,7 +3194,7 @@ void CoreChecks::PostCallRecordCreateDevice(VkPhysicalDevice gpu, const VkDevice
std::copy(std::istreambuf_iterator<char>(read_file), {}, std::back_inserter(validation_cache_data));
read_file.close();
} else {
- LogInfo(core_checks->device, "VUID-NONE"... | 1 | /* Copyright (c) 2015-2022 The Khronos Group Inc.
* Copyright (c) 2015-2022 Valve Corporation
* Copyright (c) 2015-2022 LunarG, Inc.
* Copyright (C) 2015-2022 Google Inc.
* Modifications Copyright (C) 2020-2022 Advanced Micro Devices, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (t... | 1 | 23,944 | Should this be a constant somewhere? | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -17,5 +17,9 @@
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("OpenTelemetry.Tests" + AssemblyInfo.PublicKey)]
+[assembly: InternalsVisibleTo("OpenTelemetry.Instrumentation.Http" + AssemblyInfo.PublicKey)]
+[assembly: InternalsVisibleTo("OpenTelemetry.Instrumentation.AspNet" + AssemblyInfo.... | 1 | // <copyright file="AssemblyInfo.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.or... | 1 | 17,849 | nit: sort alphabetically. | open-telemetry-opentelemetry-dotnet | .cs |
@@ -28,6 +28,10 @@ import org.apache.solr.common.SolrException;
* @lucene.internal
*/
class JsonQueryConverter {
+ public static final String paramsPrefix = "_tt";
+
+ public static final Object contextKey = JsonQueryConverter.class.getSimpleName();
+
private int numParams = 0;
String toLocalParams(Objec... | 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 | 31,732 | Now, It's redundant, I suppose. | apache-lucene-solr | java |
@@ -70,6 +70,8 @@ type ChooserList interface {
//
// peerlist.List and ListImplementation compose well with sharding schemes the
// degenerate to returning the only available peer.
+//
+// Deprecated in favor of "go.uber.org/yarpc/peer/peerlist/v2".Implementation.
type ListImplementation interface {
transport.Lif... | 1 | // Copyright (c) 2018 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 | 17,234 | nit: The format recognized by tooling is `// Deprecated: [..]` so you likely want this to be, // Deprecated: Use "go.uber.org/yarpc/peer/peerlist/v2".Implementation instead. | yarpc-yarpc-go | go |
@@ -41,9 +41,9 @@ func lookupTelemetryEndpoint(cfg config.Local, genesisNetwork protocol.NetworkID
for _, bootstrapID := range bootstrapArray {
addrs, err := ReadFromSRV("telemetry", bootstrapID, cfg.FallbackDNSResolverAddress)
if err != nil {
- log.Warnf("An issue occurred reading telemetry entry for: %s", b... | 1 | package network
import (
"time"
"github.com/algorand/go-algorand/config"
"github.com/algorand/go-algorand/logging"
"github.com/algorand/go-algorand/protocol"
)
// StartTelemetryURIUpdateService starts a go routine which queries SRV records for a telemetry URI every <interval>
func StartTelemetryURIUpdateService(... | 1 | 36,909 | nit: 1. when formatting input strings, make sure to place them in quotes so we could identify white space issues. i.e. '%s' 2. If there is untyped, non-nil error, you want to log the error string as well. | algorand-go-algorand | go |
@@ -4,7 +4,16 @@ namespace Datadog.Trace.ClrProfiler
{
internal static class NativeMethods
{
- [DllImport("Datadog.Trace.ClrProfiler.Native.dll")]
- public static extern bool IsProfilerAttached();
+ public static class Windows
+ {
+ [DllImport("Datadog.Trace.ClrProfiler... | 1 | using System.Runtime.InteropServices;
namespace Datadog.Trace.ClrProfiler
{
internal static class NativeMethods
{
[DllImport("Datadog.Trace.ClrProfiler.Native.dll")]
public static extern bool IsProfilerAttached();
}
}
| 1 | 14,974 | I believe this can be fixed with the original code if you just omit the ".dll" file extension so it reads `[DllImport("Datadog.Trace.ClrProfiler.Native")]`. On Windows it would look for `Datadog.Trace.ClrProfiler.Native.dll` and Linux/Mac it would look for `Datadog.Trace.ClrProfiler.Native.so`. | DataDog-dd-trace-dotnet | .cs |
@@ -71,6 +71,11 @@ class UpdateManager {
UserPreferences.setEpisodeCleanupValue(oldValueInDays * 24);
} // else 0 or special negative values, no change needed
}
+ if (oldVersionCode < 1070197) {
+ if (prefs.getBoolean(UserPreferences.PREF_MOBILE_UPDATE_OLD, false... | 1 | package de.danoeh.antennapod.core;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Build;
import android.util.Log;
import org.antennapod.audio.MediaPlayer;
import de.danoeh.antennapod.core.pr... | 1 | 14,658 | couldn't we just read the boolean as a string (I would assume that this return "true" or "false"), migrate if to its new value and keep using the same pref key? | AntennaPod-AntennaPod | java |
@@ -126,6 +126,7 @@ static int skip_file_check = 0;
static int cache_mode = 1;
+static int json_input = 0;
static int jx_input = 0;
static char *jx_context = NULL;
| 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 "auth_all.h"
#include "auth_ticket.h"
#include "batch_job.h"
#include "cctools.h"
#include "copy_stream.h"
#include "create_dir.h"
#include "debug.h"
#inc... | 1 | 13,790 | If these variables are only used in main function, move these to the beginning of that function. If there is a foreseeable reason to have them as global statics just let me know. | cooperative-computing-lab-cctools | c |
@@ -40,12 +40,12 @@ namespace Microsoft.Sarif.Viewer
{
if (serviceProvider == null)
{
- throw new ArgumentNullException("serviceProvider");
+ throw new ArgumentNullException(nameof(serviceProvider));
}
if (region == null)
... | 1 | using System;
using System.Diagnostics;
using Microsoft.CodeAnalysis.Sarif;
using Microsoft.VisualStudio.ComponentModelHost;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Adornments;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudi... | 1 | 10,940 | This one was wrong. | microsoft-sarif-sdk | .cs |
@@ -1697,9 +1697,14 @@ type Observer interface {
// updated locally, but not yet saved at the server.
LocalChange(ctx context.Context, node Node, write WriteRange)
// BatchChanges announces that the nodes have all been updated
- // together atomically. Each NodeChange in changes affects the
- // same top-level f... | 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"
"github.com/keybase/client/go/libkb"
"github.com/keybase/client/go/logger"
"github.com/keybase/client/go/protocol/keybase1"
"githu... | 1 | 19,036 | What happens if nodes throughout a hierarchy are modified (as they would be)? It looks like we're going to `Reset` once for each `NodeID` affected. | keybase-kbfs | go |
@@ -1065,7 +1065,6 @@ error:
* process, mode_switch_buf_sz is maximum size for switch code, and
* mode_switch_data is the address where the app stack pointer is stored.
*/
-
static size_t
generate_switch_mode_jmp_to_hook(HANDLE phandle, byte *local_code_buf,
byte *mode_switch_b... | 1 | /* **********************************************************
* Copyright (c) 2011-2021 Google, Inc. All rights reserved.
* Copyright (c) 2000-2010 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or witho... | 1 | 24,068 | > Note that allocation of vmheap fails upon initializing dynamoRIO 64 on WoW64 processes. Thus, we need to pass -reachable_heap to avoid having to make this allocation. This should be solved by changing the default `vmheap_size` to be much smaller than 8GB for x64 DR inside WOW64. | DynamoRIO-dynamorio | c |
@@ -200,6 +200,12 @@ module RSpec::Core
@exception_presenter.fully_formatted(failure_number, colorizer)
end
+ # @return [Array] The failure information fully formatted in the way that
+ # RSpec's built-in formatters emit, split by line.
+ def fully_formatted_lines(failure_number, colo... | 1 | RSpec::Support.require_rspec_core "formatters/console_codes"
RSpec::Support.require_rspec_core "formatters/exception_presenter"
RSpec::Support.require_rspec_core "formatters/helpers"
RSpec::Support.require_rspec_core "shell_escape"
module RSpec::Core
# Notifications are value objects passed to formatters to provide ... | 1 | 16,459 | Is it really worth expanding our public API for this? After all, isn't calling this the same as calling `notification.fully_formatted(...).lines`? If so, I'd rather not widen our API (and thus, increase our maintenance burden) when it's so simple to get all the lines already. | rspec-rspec-core | rb |
@@ -14,18 +14,10 @@
*/
package com.google.api.codegen;
-/**
- * A SnippetSetRunner takes the element, snippet file, and context as input and then uses the
- * Snippet Set templating engine to generate an output document.
- */
+/** Defines the SNIPPET_RESOURCE_ROOT. */
public final class SnippetSetRunner {
/*... | 1 | /* Copyright 2016 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 1 | 24,284 | Is it necessary to keep this class around just to define this constant? Or can we place it somewhere else? | googleapis-gapic-generator | java |
@@ -60,6 +60,10 @@ type rule struct {
// The parent Policy ID. Used to identify rules belong to a specified
// policy for deletion.
PolicyUID types.UID
+ // The metadata of parent Policy. Used to associate the rule with Policy
+ // for troubleshooting purpose (logging and CLI).
+ PolicyName string
+ PolicyNa... | 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 | 14,452 | Question - do we cache NetworkPolicy itself? If so, here we can point to NetworkPolicy? | antrea-io-antrea | go |
@@ -11,7 +11,6 @@ import (
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/tools/cache"
- "k8s.io/client-go/util/workqueue"
"k8s.io/klog"
beehiveContext "github.com/kubeedge/beehive/pkg/core/context" | 1 | package handler
import (
"encoding/json"
"fmt"
"regexp"
"strings"
"sync"
"time"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/util/workqueue"
"k8s.io/klog"
beehiveContext "github.com/kubeedge/beehive/pkg/core/... | 1 | 16,425 | For my view, `Register` means the process of **insert node resource to etcd through api-server**, which is called by upstream rather than here, how about changing the func name to `OnConnected`? | kubeedge-kubeedge | go |
@@ -865,7 +865,8 @@ public abstract class ProcessEngineConfigurationImpl extends ProcessEngineConfig
// telemetry ///////////////////////////////////////////////////////
- protected boolean telemetryEnabled = false;
+ /** if set to true the telemetry will be enabled from the first engine start*/
+ protected b... | 1 | /*
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
* under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership. Camunda licenses this file to you under the Apache License,
* Version 2.0; y... | 1 | 10,534 | I would prefer an active verb for this property, e.g. `initializeTelemetry`. The reason is that this property refers to something the engine does once on startup. Other properties that use passive voice (e.g. `authorizationEnabled`) refer to a state of the engine during its lifetime. | camunda-camunda-bpm-platform | java |
@@ -105,5 +105,10 @@ namespace Microsoft.Rest.Generator.NodeJS
return requiredParams.ToString();
}
}
+
+ public bool ContainsTimeSpan
+ {
+ get { return this.Methods.FirstOrDefault(m => m.Parameters.FirstOrDefault(p => p.Type == PrimaryType.TimeSpan) != nu... | 1 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using Microsoft.Rest.Generator.ClientModel;
using Microsoft.Rest.Generator.Utili... | 1 | 21,151 | please use new line to maintain reasonable line width | Azure-autorest | java |
@@ -67,6 +67,9 @@ func (s *server) fileUploadHandler(w http.ResponseWriter, r *http.Request) {
var fileSize uint64
ta := s.createTag(w, r)
+ if ta == nil {
+ return
+ }
// Add the tag to the context
r = r.WithContext(context.WithValue(r.Context(), tags.TagsContextKey{}, ta)) | 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 api
import (
"bufio"
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"mime"
"mime/multipart"
"net/http"
"os"
"strconv... | 1 | 11,689 | I would skip this check or add an internal server error response. | ethersphere-bee | go |
@@ -7,6 +7,12 @@ const createDist = (buildConfig = config.defaultBuildConfig, options) => {
config.buildConfig = buildConfig
config.update(options)
+ if (config.notarize) {
+ notarize = config.notarize
+ notary_user = config.notary_user
+ notary_password = config.notary_password
+ }
+
util.updateB... | 1 | const config = require('../lib/config')
const util = require('../lib/util')
const path = require('path')
const fs = require('fs-extra')
const createDist = (buildConfig = config.defaultBuildConfig, options) => {
config.buildConfig = buildConfig
config.update(options)
util.updateBranding()
fs.removeSync(path.jo... | 1 | 6,073 | missing `{` here (and then `}` after `notary_password = config.notary_password`); it's only going to do the first one | brave-brave-browser | js |
@@ -538,11 +538,10 @@ func TestDdevImportDB(t *testing.T) {
assert.True(settingsHashSalt)
case "wordpress":
// nolint: vetshadow
- hasAuthSalt, err := fileutil.FgrepStringInFile(app.SiteSettingsPath, "SECURE_AUTH_SALT")
+ hasAuthSalt, err := fileutil.FgrepStringInFile(app.SiteLocalSettingsPath, "SEC... | 1 | package ddevapp_test
import (
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
"regexp"
"runtime"
"strconv"
"strings"
"testing"
"time"
"github.com/drud/ddev/pkg/archive"
"github.com/drud/ddev/pkg/ddevapp"
"github.com/drud/ddev/pkg/dockerutil"
"github.com/drud/ddev/pkg/exec"
"github.com/drud/ddev/pkg/file... | 1 | 12,767 | This is odd because it's actually in our generated SiteSettingsPath, not in the SiteLocalSettingsPath (wp-config-ddev.php). Are these two files swapped somehow? I'd expect SiteSettingsPath to be wp-config.php and SiteLocalSettingsPath to be wp-config-ddev.php. BTW, I'm *way* ok with renaming that to SiteDdevSettingsPat... | drud-ddev | php |
@@ -26,10 +26,13 @@ import (
"os/exec"
"path/filepath"
"strings"
+
+ ecpb "kythe.io/kythe/proto/extraction_config_go_proto"
)
// kytheConfigFileName The name of the Kythe extraction config
const kytheExtractionConfigFile = ".kythe-extraction-config"
+const defaultConfigDir = "kythe/go/extractors/config/defau... | 1 | /*
* Copyright 2018 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 applicabl... | 1 | 8,451 | It seems like this must necessarily be a stopgap. Can you please add a TODO(#xyz) to point to the appropriate issue? | kythe-kythe | go |
@@ -29,12 +29,15 @@ func Agent(config *config.Agent) error {
defer logs.FlushLogs()
startKubelet(config)
- startKubeProxy(config)
+
+ if !config.DisableKubeProxy {
+ return startKubeProxy(config)
+ }
return nil
}
-func startKubeProxy(cfg *config.Agent) {
+func startKubeProxy(cfg *config.Agent) error {
a... | 1 | package agent
import (
"bufio"
"context"
"math/rand"
"os"
"path/filepath"
"strings"
"time"
"github.com/opencontainers/runc/libcontainer/system"
"github.com/rancher/k3s/pkg/daemons/config"
"github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/util/net"
"k8s.io/component-base/logs"
proxy "k8s.io/kubernetes... | 1 | 8,037 | Is the return signature necessary since we never actually return if there is a problem (I'm referring to the call to `logrus.Fatalf`). Let's pick a pattern and stick with it. | k3s-io-k3s | go |
@@ -5,6 +5,8 @@ export default Ember.Controller.extend({
barcodeUri: function() {
let id = this.get('model.id');
let name = this.get('model.name');
+
+ /* eslint new-cap: ['error', { 'capIsNew': false }] */
return Ember.$(document).JsBarcode(id, {
width: 1,
height: 20, | 1 | import Ember from 'ember';
export default Ember.Controller.extend({
selectedPrinter: null,
barcodeUri: function() {
let id = this.get('model.id');
let name = this.get('model.name');
return Ember.$(document).JsBarcode(id, {
width: 1,
height: 20,
fontSize: 10,
displayValue: name,
... | 1 | 13,217 | @btecu why is this override needed here? I'm not seeing a `new` being used here. | HospitalRun-hospitalrun-frontend | js |
@@ -2527,7 +2527,11 @@ func (s *Server) leafNodeFinishConnectProcess(c *client) {
c.mu.Unlock()
// Make sure we register with the account here.
- c.registerWithAccount(acc)
+ if err := c.registerWithAccount(acc); err != nil {
+ c.Errorf("Registering leaf with account %s resulted in error: %v", acc.Name, err)
+ ... | 1 | // Copyright 2019-2021 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 14,242 | Should it not be more something like: `MaxAccountConnectionsExceeded` here? | nats-io-nats-server | go |
@@ -180,6 +180,13 @@ func TestTrimComputeEndpoint(t *testing.T) {
parseAndValidate(t, "-compute_endpoint_override", " http://endpoint ").ComputeEndpoint)
}
+func TestTrimComputeServiceAccount(t *testing.T) {
+ assert.Equal(t, "",
+ parseAndValidate(t, "-compute_service_account", " ").ComputeServiceAccount)
+ a... | 1 | // 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.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | 1 | 12,926 | minor: use a non-default CE service account for testing (since default is handled in a specific way in the code) | GoogleCloudPlatform-compute-image-tools | go |
@@ -84,6 +84,10 @@ func TestBootstrapWindowedPoSt(t *testing.T) {
wd, _ := os.Getwd()
genCfgPath := filepath.Join(wd, "..", "fixtures/setup.json")
presealPath := filepath.Join(wd, "..", "fixtures/genesis-sectors")
+ // setup presealed sectors and uncomment to run test against sectors with larger sector size
+ //g... | 1 | package functional
import (
"context"
"os"
"path/filepath"
"testing"
"time"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/abi/big"
"github.com/filecoin-project/specs-actors/actors/builtin"
"github.com/stretchr/... | 1 | 23,471 | This is how I ran the 512MiB test. It's probably too much data for a fixture, and makes for longer functional tests (although still less than a minute on my laptop). | filecoin-project-venus | go |
@@ -90,7 +90,9 @@ module Beaker
# @return nil
# @api public
def resolve_symlinks!
- @options[:hosts_file] = File.realpath(@options[:hosts_file]) if @options[:hosts_file]
+ if @options[:hosts_file] && !@options[:hosts_file_generated]
+ @options[:hosts_file] = File.realpath(@op... | 1 | require 'yaml'
module Beaker
module Options
#An Object that parses, merges and normalizes all supported Beaker options and arguments
class Parser
GITREPO = 'git://github.com/puppetlabs'
#These options can have the form of arg1,arg2 or [arg] or just arg,
#should default to []
LONG... | 1 | 12,828 | So we weren't able to hide the fact that the file wasn't pre-generated and had to introduce this "option" to detect that? | voxpupuli-beaker | rb |
@@ -20,16 +20,11 @@
package http
-import (
- "fmt"
-
- "go.uber.org/yarpc/api/yarpcerrors"
-)
-
-// TODO: Should we expose the maps as public variables to document the mappings?
+import "go.uber.org/yarpc/api/yarpcerrors"
var (
- _codeToHTTPStatusCode = map[yarpcerrors.Code]int{
+ // CodeToStatusCode maps all C... | 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 | 14,553 | Agree that exporting these maps is the best tradeoff, just registering my ongoing discontent with the lack of `const` collections. | yarpc-yarpc-go | go |
@@ -351,6 +351,15 @@ class WebKitCaret(browsertab.AbstractCaret):
def selection(self, callback):
callback(self._widget.selectedText())
+ def reverse_selection(self):
+ self._tab.run_js_async("""{
+ let sel = window.getSelection();
+ sel.setBaseAndExtent(
+ ... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2018 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 | 22,977 | This could probably use `const` as well? | qutebrowser-qutebrowser | py |
@@ -40,7 +40,7 @@ import (
// file. The Restore method replaces the contents of the original with the
// backup, overwriting any changes that were made since the backup was created.
type File struct {
- orig, tmp string // file paths
+ Orig, Tmp string // file paths
}
// New creates a backup copy of the specifi... | 1 | /*
* Copyright 2018 The Kythe 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 | 12,031 | it doesn't look like these need to be exported? | kythe-kythe | go |
@@ -5,6 +5,7 @@ package fs
import (
"bytes"
"errors"
+ "fmt"
"io/ioutil"
"os"
"path/filepath" | 1 | // +build linux
package fs
import (
"bytes"
"errors"
"io/ioutil"
"os"
"path/filepath"
"github.com/moby/sys/mountinfo"
"github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/opencontainers/runc/libcontainer/cgroups/fscommon"
"github.com/opencontainers/runc/libcontainer/configs"
libcontainerUtils ... | 1 | 20,110 | I think you should remove "fmt" here. And change `fmt.Errorf` to `errors.Errorf`. | opencontainers-runc | go |
@@ -0,0 +1,6 @@
+class AddVideoAttributesToProducts < ActiveRecord::Migration
+ def change
+ add_column :products, :length_in_days, :integer
+ add_column :products, :resources, :text, default: "", null: false
+ end
+end | 1 | 1 | 11,548 | Here's the `resources` attribute @jferris. I'm not against renaming `Product` to `Resource`, and this one... something else. | thoughtbot-upcase | rb | |
@@ -11,7 +11,7 @@ import (
// one of the workers, it is returned. FinalFunc is always run, regardless of
// any other previous errors.
func RunWorkers(ctx context.Context, count int, workerFunc func() error, finalFunc func()) error {
- wg, ctx := errgroup.WithContext(ctx)
+ wg, _ := errgroup.WithContext(ctx)
// ... | 1 | package repository
import (
"context"
"golang.org/x/sync/errgroup"
)
// RunWorkers runs count instances of workerFunc using an errgroup.Group.
// After all workers have terminated, finalFunc is run. If an error occurs in
// one of the workers, it is returned. FinalFunc is always run, regardless of
// any other pre... | 1 | 12,183 | If the context is unused, this is equivalent to `var wg errgroup.Group`. | restic-restic | go |
@@ -47,6 +47,8 @@ public interface HighlightParams {
// sizing
public static final String FRAGSIZE = HIGHLIGHT+".fragsize"; // OH, FVH, UH
+ public static final String FRAGALIGNRATIO = HIGHLIGHT+".fragAlignRatio"; // UH
+ public static final String FRAGSIZEISMINIMUM = HIGHLIGHT+".fragsizeIsMinimum"; // UH
... | 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 | 31,780 | very minor: I'd prefer these two added rows are switched so that fragsizeIsMinimum directly follows fragsize | apache-lucene-solr | java |
@@ -98,6 +98,10 @@ def is_local_interface(host):
if ':' in host:
host = host.split(':',1)[0]
+ # If "localhost" or a loopback IP has been specified it is a deliberate reference
+ if host == 'localhost' or host.startswith('127.'):
+ return False
+
try:
sock = socket.socket(socket.AF_INET, socket.S... | 1 | import os, time, fnmatch, socket, errno
from django.conf import settings
from os.path import isdir, isfile, join, exists, splitext, basename, realpath
import whisper
from graphite.logger import log
from graphite.remote_storage import RemoteStore
from graphite.util import unpickle
try:
import rrdtool
except ImportEr... | 1 | 9,565 | Given that 115 returns `True`, why would this be `False` here? | graphite-project-graphite-web | py |
@@ -367,6 +367,17 @@ public class OAuth2LoginConfigurerTests {
assertThat(this.response.getRedirectedUrl()).matches("http://localhost/oauth2/authorization/google");
}
+ // gh-6802
+ @Test
+ public void oauth2LoginWithOneClientConfiguredAndFormLoginThenRedirectDefaultLoginPage() throws Exception {
+ loadConfig(O... | 1 | /*
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | 1 | 17,542 | Please move this test method just below `oauth2LoginWithOneClientConfiguredThenRedirectForAuthorization()` | spring-projects-spring-security | java |
@@ -270,6 +270,9 @@ bool LatencyTestPublisher::init(int n_sub, int n_sam, bool reliable, uint32_t pi
PubDataparam.topic.topicName = pt.str();
PubDataparam.times.heartbeatPeriod.seconds = 0;
PubDataparam.times.heartbeatPeriod.fraction = 4294967 * 100;
+ PubDataparam.qos.m_liveliness.lease_duration = c_... | 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 | 13,200 | Why this new configuration? | eProsima-Fast-DDS | cpp |
@@ -245,8 +245,14 @@ public class IcebergPigInputFormat<T> extends InputFormat<Void, T> {
private Object convertPartitionValue(Type type, Object value) {
if (type.typeId() == Types.BinaryType.get().typeId()) {
- ByteBuffer buffer = (ByteBuffer) value;
- return new DataByteArray(buffer.get(ne... | 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 | 23,088 | I don't think that we need to check `hasArray` here. I think the reason why this didn't previously check `hasArray` is that the array passed to `DataByteArray` must start at offset 0 and be valid through the array length, so a copy was needed in almost every case. It may be simpler to change this to use `ByteBuffers.to... | apache-iceberg | java |
@@ -28,15 +28,15 @@ namespace OpenTelemetry.Metrics
/// <summary>
/// Adds the given value to the bound counter metric.
/// </summary>
- /// <param name="context">the associated <see cref="SpanContext"/>.</param>
+ /// <param name="spanReference">the associated <see cref="SpanRe... | 1 | // <copyright file="BoundCounterMetric.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.apa... | 1 | 17,564 | `spanReference` -> `baggage` | open-telemetry-opentelemetry-dotnet | .cs |
@@ -32,9 +32,8 @@ module.exports = function(config, auth, storage) {
});
});
- router.get('/-/logo', function(req, res) {
- res.sendFile(_.get(config, 'web.logo') || `${env.APP_ROOT}/static/logo-sm.png`
- );
+ router.get('/-/verdaccio/logo', function(req, res) {
+ res.send(_.get(config, 'web.logo')... | 1 | 'use strict';
const express = require('express');
const Search = require('../../lib/search');
const Middleware = require('./middleware');
const Utils = require('../../lib/utils');
/* eslint new-cap:off */
const router = express.Router();
const _ = require('lodash');
const env = require('../../config/env');
const fs = ... | 1 | 17,217 | Why the `/-/verdaccio/` ? | verdaccio-verdaccio | js |
@@ -478,8 +478,7 @@ func TestAppDeployOpts_pushAddonsTemplateToS3Bucket(t *testing.T) {
opts := appDeployOpts{
appDeployVars: appDeployVars{
- AppName: tc.inputApp,
- enableAddons: true,
+ AppName: tc.inputApp,
GlobalOpts: &GlobalOpts{
projectName: tc.inputProject,
}, | 1 | // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"bytes"
"errors"
"fmt"
"testing"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/archer"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
climocks "githu... | 1 | 12,280 | Has been waiting for a million years | aws-copilot-cli | go |
@@ -31,6 +31,10 @@ msg.Number = {};
msg.Number.min = "Path `{PATH}` ({VALUE}) is less than minimum allowed value ({MIN}).";
msg.Number.max = "Path `{PATH}` ({VALUE}) is more than maximum allowed value ({MAX}).";
+msg.Date = {};
+msg.Date.min = "Path `{PATH}` ({VALUE}) is before than minimum allowed value ({MIN}).";... | 1 |
/**
* The default built-in validator error messages. These may be customized.
*
* // customize within each schema or globally like so
* var mongoose = require('mongoose');
* mongoose.Error.messages.String.enum = "Your custom message for {PATH}.";
*
* As you might have noticed, error messages suppor... | 1 | 12,633 | Minor grammar detail: the 'than' is unnecessary | Automattic-mongoose | js |
@@ -4873,10 +4873,11 @@ class Series(Frame, IndexOpsMixin, Generic[T]):
>>> kser.item()
10
"""
- item_top_two = self[:2]
+ scol = self.spark_column
+ item_top_two = self._internal._sdf.select(scol).head(2)
if len(item_top_two) != 1:
raise ValueError(... | 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 | 15,233 | I think you can just simply fix this line to `self[:2].to_pandas()` | databricks-koalas | py |
@@ -1229,6 +1229,14 @@ class WebDriver {
if (target && cdpTargets.indexOf(target.toLowerCase()) === -1) {
throw new error.InvalidArgumentError('invalid target value')
}
+
+ if (debuggerAddress.match(/\/se\/cdp/)) {
+ if (debuggerAddress.match("ws:\/\/", "http:\/\/")) {
+ return debuggerA... | 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 | 19,062 | if we are returning the `ws` here when passing in `se:cdp` we can just return it straight or do we have to make a request to get the `ws` address? | SeleniumHQ-selenium | java |
@@ -20,6 +20,6 @@
* Internal dependencies
*/
import Data from 'googlesitekit-data';
-import { registerStore } from 'assets/js/googlesitekit/datastore/site';
+import { registerStore } from './googlesitekit/datastore/site';
registerStore( Data ); | 1 | /**
* Entrypoint for the "core/site" data store.
*
* 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/lice... | 1 | 40,126 | I could add a resolver for this (like above) but it seems more sensible to just change the one reference! | google-site-kit-wp | js |
@@ -44,11 +44,14 @@ public class TimestampMoreRecentThanParent implements DetachedBlockHeaderValidat
private boolean validateHeaderSufficientlyAheadOfParent(
final long timestamp, final long parentTimestamp) {
- if ((timestamp - minimumSecondsSinceParent) < parentTimestamp) {
+ final long actualTimeSi... | 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,836 | not sure "actual" adds value - secondsSinceParent is probably closer. | hyperledger-besu | java |
@@ -159,7 +159,7 @@ module Blacklight::SearchHelper
# Get the solr response when retrieving only a single facet field
# @return [Blacklight::SolrResponse] the solr response
def get_facet_field_response(facet_field, user_params = params || {}, extra_controller_params = {})
- query = search_builder.with(user_... | 1 | # -*- encoding : utf-8 -*-
# SearchHelper is a controller layer mixin. It is in the controller scope: request params, session etc.
#
# NOTE: Be careful when creating variables here as they may be overriding something that already exists.
# The ActionController docs: http://api.rubyonrails.org/classes/ActionController/... | 1 | 5,983 | Line is too long. [94/80] | projectblacklight-blacklight | rb |
@@ -585,4 +585,7 @@ return [
'image_size' => 'Image size:',
'selected_size' => 'Selected:'
],
+ 'repeater' => [
+ 'min_items_error' => 'You cannot delete any item. You should modify the existing.'
+ ]
]; | 1 | <?php
return [
'auth' => [
'title' => 'Administration Area'
],
'field' => [
'invalid_type' => 'Invalid field type used :type.',
'options_method_invalid_model' => "The attribute ':field' does not resolve to a valid model. Try specifying the options method for model class :model expli... | 1 | 12,846 | The error should be `At least :number items are required` | octobercms-october | php |
@@ -172,11 +172,9 @@ func (s *server) Ping(in *pb.Request, stream pb.Simulator_PingServer) error {
// message type of 1999 means that it's a dummy message to allow the engine to pass back proposed blocks
if in.InternalMsgType != dummyMsgType {
msg := CombineMsg(in.InternalMsgType, msgValue)
- switch msg.(type) ... | 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 | 13,802 | singleCaseSwitch: should rewrite switch statement to if statement (from `gocritic`) | iotexproject-iotex-core | go |
@@ -506,11 +506,7 @@ type encryptionKeyGetter interface {
kbfscrypto.TLFCryptKey, error)
}
-// KeyManager fetches and constructs the keys needed for KBFS file
-// operations.
-type KeyManager interface {
- encryptionKeyGetter
-
+type mdDecryptionKeyGetter interface {
// GetTLFCryptKeyForMDDecryption gets the cr... | 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"
"github.com/keybase/client/go/libkb"
"github.com/keybase/client/go/logger"
"github.com/keybase/client/go/protocol/keybase1"
"githu... | 1 | 13,738 | Could combine this with `encryptionKeyGetter` to have a single `keyGetter` interface. I'm not sure which way is better. | keybase-kbfs | go |
@@ -6316,7 +6316,8 @@ Lng32 SQL_EXEC_DeleteHbaseJNI()
threadContext->incrNumOfCliCalls();
HBaseClient_JNI::deleteInstance();
- HiveClient_JNI::deleteInstance();
+ // The Hive client persists across connections
+ // HiveClient_JNI::deleteInstance();
}
catch(...)
{ | 1 | /**********************************************************************
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. ... | 1 | 11,031 | Is there any security issue here? If we integrate with Hive security (and I don't know if we have or not) is there some notion of re-authentication at connection time? | apache-trafodion | cpp |
@@ -22,7 +22,7 @@ const illegalCommandFields = [
'raw',
'readPreference',
'session',
- 'writeConcern'
+ 'readConcern'
];
class CreateCollectionOperation extends CommandOperation { | 1 | 'use strict';
const Aspect = require('./operation').Aspect;
const defineAspects = require('./operation').defineAspects;
const CommandOperation = require('./command');
const applyWriteConcern = require('../utils').applyWriteConcern;
const handleCallback = require('../utils').handleCallback;
const loadCollection = requi... | 1 | 15,657 | Does this mean we do not support writeConcern on `createCollection`? | mongodb-node-mongodb-native | js |
@@ -36,7 +36,7 @@ func TestProducer_RequestSessionDestroy(t *testing.T) {
assert.NoError(t, err)
destroySender := &fakeDestroySender{}
- err = RequestSessionDestroy(destroySender, sid)
+ err = RequestSessionDestroy(destroySender, sid.ID)
assert.NoError(t, err)
}
| 1 | /*
* Copyright (C) 2018 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 | 13,588 | I guess `sid` was for `sessionID`, but now it looks strange: `sid.ID`. | mysteriumnetwork-node | go |
@@ -379,7 +379,11 @@ func (s *Service) getSecurityGroupIngressRules(role infrav1.SecurityGroupRole) (
Protocol: infrav1.SecurityGroupProtocolTCP,
FromPort: 6443,
ToPort: 6443,
- CidrBlocks: []string{anyIPv4CidrBlock},
+ SourceSecurityGroupIDs: []string{
+ s.scope.SecurityGroups()[in... | 1 | /*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | 1 | 13,129 | We'll need `infrav1.SecurityGroupBastion` as well | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -1470,6 +1470,15 @@ func Rcat(fdst fs.Fs, dstFileName string, in io.ReadCloser, modTime time.Time) (
return dst, nil
}
+// PublicLink adds a "readable by anyone with link" permission on the given file or folder.
+func PublicLink(f fs.Fs, fileName string) (string, error) {
+ doPublicLink := f.Features().PublicLi... | 1 | // Package operations does generic operations on filesystems and objects
package operations
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"log"
"path"
"sort"
"strconv"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/fs/accounting"
"github.com/ncw/rclone/fs/config"
"gi... | 1 | 6,962 | This `fileName` should probably be `remote` and be relative to the Fs root as per normal rclone usage. | rclone-rclone | go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.