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 |
|---|---|---|---|---|---|---|---|
@@ -161,8 +161,6 @@ class Testinfra(Verifier):
cmd=["pytest", *util.dict2args(options), *self._tests, *args],
cwd=self._config.scenario.directory,
env=self.env,
- stdout=LOG.out,
- stderr=LOG.error,
)
# print(self._testinfra_command.cmd)
| 1 | # Copyright (c) 2015-2018 Cisco Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge... | 1 | 10,905 | Why did we leave the `stderr` param in this case while we removed it from other bake methods? | ansible-community-molecule | py |
@@ -30,6 +30,13 @@ func VerifyTrustDomainMemberID(td spiffeid.TrustDomain, id spiffeid.ID) error {
return nil
}
+func VerifySameTrustDomain(td spiffeid.TrustDomain, id spiffeid.ID) error {
+ if !id.MemberOf(td) {
+ return fmt.Errorf("%q is not a member of trust domain %q", id, td)
+ }
+ return nil
+}
+
func Trus... | 1 | package api
import (
"errors"
"fmt"
"github.com/spiffe/go-spiffe/v2/spiffeid"
"github.com/spiffe/spire/pkg/common/idutil"
"github.com/spiffe/spire/proto/spire/types"
)
func TrustDomainMemberIDFromProto(td spiffeid.TrustDomain, protoID *types.SPIFFEID) (spiffeid.ID, error) {
id, err := idFromProto(protoID)
if ... | 1 | 15,120 | This seems to only be used by the server/ca package.... maybe this can live there instead of being lumped into these API implementation helpers? | spiffe-spire | go |
@@ -1035,6 +1035,15 @@ func TestProvisionContainerResourcesSetPausePIDInVolumeResources(t *testing.T) {
}, nil),
mockCNIClient.EXPECT().SetupNS(gomock.Any(), gomock.Any(), gomock.Any()).Return(nsResult, nil),
)
+ // These mock calls would be made only for Windows.
+ dockerClient.EXPECT().CreateContainerExec(gom... | 1 | // +build unit
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "li... | 1 | 26,055 | hmm.. this is Hacky, the test will succeed in Windows even if you remove the calls to these, right? | aws-amazon-ecs-agent | go |
@@ -1,4 +1,9 @@
-test_name 'Install beaker and checkout branch if necessary' do
+ruby_version, ruby_source = ENV['RUBY_VER'], "job parameter"
+unless ruby_version
+ ruby_version = "2.3.1"
+ ruby_source = "default"
+end
+test_name 'Install and configure Ruby #{ruby_version} (from #{ruby_source}) on the SUT' do
st... | 1 | test_name 'Install beaker and checkout branch if necessary' do
step 'Download the beaker git repo' do
on default, 'git clone https://github.com/puppetlabs/beaker.git /opt/beaker/'
end
step 'Detect if checking out branch for testing and checkout' do
if ENV['BEAKER_PULL_ID']
logger.notify "Pull Reque... | 1 | 16,176 | should this block be in the file `05_install_ruby.rb`? | voxpupuli-beaker | rb |
@@ -167,7 +167,9 @@ func withDisconnectedClient(t *testing.T, recorder *Recorder, f func(raw.Client)
Unary: http.NewOutbound("http://localhost:65535"),
},
},
- Filter: recorder,
+ Filters: yarpc.Filters{
+ UnaryFilter: recorder,
+ },
})
require.NoError(t, clientDisp.Start())
defer clientDisp.Stop... | 1 | package recorder
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"math/rand"
"os"
"path"
"testing"
"time"
"go.uber.org/yarpc"
"go.uber.org/yarpc/encoding/raw"
"go.uber.org/yarpc/transport"
"go.uber.org/yarpc/transport/http"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
fun... | 1 | 11,367 | To match outbounds, let's just call this `Unary: recorder`, `Oneway: ...`. | yarpc-yarpc-go | go |
@@ -49,7 +49,7 @@ def stripControlChars(string):
def compactHash(string):
hash = md5()
- hash.update(string)
+ hash.update(string.encode('unicode_escape'))
return hash.hexdigest()
| 1 | """Copyright 2008 Orbitz WorldWide
Copyright 2011 Chris Davis
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ... | 1 | 8,373 | `string.encode('utf-8')` is more common but I guess this is mostly cosmetic :) | graphite-project-graphite-web | py |
@@ -23,6 +23,6 @@ func NewLoggingHandler(handler http.Handler) LoggingHandler {
}
func (lh LoggingHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- log.Info("Handling http request", "method", r.Method, "from", r.RemoteAddr, "uri", r.RequestURI)
+ log.Info("Handling http request", "method", r.Method, "f... | 1 | // Copyright 2014-2016 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,432 | Consider logging `r.Url.Path`? Either way, ship it! | aws-amazon-ecs-agent | go |
@@ -54,14 +54,16 @@ type Context struct {
// Group data are omitted because they are committed to in the
// transaction and its ID.
type Params struct {
- CurrSpecAddrs transactions.SpecialAddresses
- CurrProto protocol.ConsensusVersion
+ CurrSpecAddrs transactions.SpecialAddresses
+ CurrProto protocol.Con... | 1 | // Copyright (C) 2019-2020 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) ... | 1 | 39,566 | this probably should be done lazely only if logic/app call txn in the group. Or even done in LogicSigSanityCheck? | algorand-go-algorand | go |
@@ -1639,6 +1639,10 @@ func (e *mutableStateBuilder) addWorkflowExecutionStartedEventForContinueAsNew(
SearchAttributes: attributes.SearchAttributes,
}
+ if attributes.GetInitiator() == enumspb.CONTINUE_AS_NEW_INITIATOR_UNSPECIFIED {
+ attributes.Initiator = enumspb.CONTINUE_AS_NEW_INITIATOR_WORKFLOW
+ ... | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... | 1 | 10,233 | Please move this to `common/enums/defaults.go`. | temporalio-temporal | go |
@@ -2,6 +2,7 @@
import time
import json
import re
+import listenbrainz.db.user as db_user
from collections import defaultdict
from yattag import Doc
import yattag | 1 |
import time
import json
import re
from collections import defaultdict
from yattag import Doc
import yattag
from flask import Blueprint, request, render_template
from flask_login import login_required, current_user
from listenbrainz.webserver.external import messybrainz
from listenbrainz.webserver.rate_limiter import r... | 1 | 14,745 | In general, if you find unalphabetized imports, you should alphabetize them. Fine for now though. | metabrainz-listenbrainz-server | py |
@@ -39,5 +39,5 @@ class InputDevice(object):
def clear_actions(self):
self.actions = []
- def create_pause(self, duraton=0):
+ def create_pause(self, duration=0):
pass | 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 | 14,870 | we should probably deprecate (and display a warning) the misspelled keyword arg here rather than removing it... and then add the new one. This changes a public API and will break any code that is currently using the misspelled version. | SeleniumHQ-selenium | java |
@@ -49,7 +49,12 @@ namespace pwiz.Skyline.Model
SLens = explicitSLens;
ConeVoltage = explicitConeVoltage;
DeclusteringPotential = explicitDeclusteringPotential;
- CompensationVoltage = explicitCompensationVoltage;
+ if (explicitCompensationVoltage.HasValue &&... | 1 | /*
* Original author: Brian Pratt <bspratt .at. u.washington.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2014 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in complian... | 1 | 12,205 | Is this if statement here necessary? It looks like this is the same logic that is taken care of in the setter for the property "CompensationVoltage". | ProteoWizard-pwiz | .cs |
@@ -68,6 +68,14 @@ def bulk_send(elastic, list_):
raise_on_exception=False
)
+def key_to_parts(key):
+ """make a string for fulltext indexing of file name"""
+ base, ext = os.path.splitext(key)
+ key_parts = base.split("/")
+ key_parts.append(ext[1:])
+
+ return f"{key} {' '.join(key_part... | 1 | """
phone data into elastic for supported file extensions.
note: we truncate outbound documents to DOC_SIZE_LIMIT characters
(to bound memory pressure and request size to elastic)
"""
from datetime import datetime
from math import floor
import json
import os
from urllib.parse import unquote, unquote_plus
from aws_req... | 1 | 17,502 | Eliminate this function; handled by mappings and analyzer | quiltdata-quilt | py |
@@ -249,7 +249,14 @@ class JSTree extends AbstractBase
'recordID' => '__record_id__'
]
];
- $cache[$route] = $this->router->fromRoute($route, $params, $options);
+ $routeName = $route;
+ $datasource = $this->getDataSource();
+ ... | 1 | <?php
/**
* Hierarchy Tree Renderer for the JS_Tree plugin
*
* PHP version 7
*
* Copyright (C) Villanova University 2010.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*... | 1 | 28,380 | I wonder if this new logic would actually fit better as a support method, both for readability and overriding... e.g. <pre> protected function getRouteNameFromDataSource($route) { if ($route === 'collection') { return $this->getDataSource()->getCollectionRoute(); } elseif ($route === 'record') { return $this->getDataSo... | vufind-org-vufind | php |
@@ -35,13 +35,13 @@ public class BaseSuite {
public static ExternalResource testEnvironment = new ExternalResource() {
@Override
protected void before() {
- log.info("Preparing test environment");
+ log.finest("Preparing test environment");
GlobalTestEnvironment.get(SeleniumTestEnvironment... | 1 | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... | 1 | 16,446 | This is in test code: understanding what we're doing is important in this context. | SeleniumHQ-selenium | js |
@@ -16,7 +16,7 @@ import (
"github.com/tinygo-org/tinygo/ir"
"github.com/tinygo-org/tinygo/loader"
"golang.org/x/tools/go/ssa"
- "tinygo.org/x/go-llvm"
+ llvm "tinygo.org/x/go-llvm"
)
func init() { | 1 | package compiler
import (
"errors"
"fmt"
"go/ast"
"go/build"
"go/constant"
"go/token"
"go/types"
"os"
"path/filepath"
"strconv"
"strings"
"github.com/tinygo-org/tinygo/ir"
"github.com/tinygo-org/tinygo/loader"
"golang.org/x/tools/go/ssa"
"tinygo.org/x/go-llvm"
)
func init() {
llvm.InitializeAllTarget... | 1 | 7,675 | This change (and a few similar ones below) are not related to rpi3 support, and should be removed. | tinygo-org-tinygo | go |
@@ -382,7 +382,7 @@ class KoalasBoxPlot(BoxPlot):
showcaps=None,
showbox=None,
showfliers=None,
- **kwargs
+ **kwargs,
):
# Missing arguments default to rcParams.
if whis is None: | 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,712 | Hmm, why did we come to need the `,` at the end? | databricks-koalas | py |
@@ -13,7 +13,8 @@ module.exports = function selectPopulatedFields(query) {
var userProvidedFields = query._userProvidedFields || {};
if (query.selectedInclusively()) {
for (i = 0; i < paths.length; ++i) {
- if (!isPathInFields(userProvidedFields, paths[i])) {
+ var hasPath = query._fields... | 1 | 'use strict';
/*!
* ignore
*/
module.exports = function selectPopulatedFields(query) {
var opts = query._mongooseOptions;
if (opts.populate != null) {
var paths = Object.keys(opts.populate);
var i;
var userProvidedFields = query._userProvidedFields || {};
if (query.selectedInclusively()) {
... | 1 | 13,816 | I'm suspicious of this. For one thing, `query._fields[paths[i]]` may be `0`, `false`, etc. so checking for falsy will catch both cases where both the field isn't in the projection and if the field is explicitly excluded from the projection. For another, I'm not so sure that #6546 is a bug. Let's discuss that more. | Automattic-mongoose | js |
@@ -32,6 +32,8 @@ type Parser struct {
interpreter *interpreter
// Stashed set of source code for builtin rules.
builtins map[string][]byte
+
+ statements []*Statement
}
// NewParser creates a new parser instance. One is normally sufficient for a process lifetime. | 1 | // Package asp implements an experimental BUILD-language parser.
// Parsing is doing using Participle (github.com/alecthomas/participle) in native Go,
// with a custom and also native partial Python interpreter.
package asp
import (
"bytes"
"encoding/gob"
"io"
"os"
"reflect"
"strings"
"gopkg.in/op/go-logging.v... | 1 | 8,433 | What is this? I'm a bit unclear why the parser would have a list of statements in it. | thought-machine-please | go |
@@ -29,6 +29,14 @@ var (
"name",
}, nil,
)
+ descPrometheusEnforcedSampleLimit = prometheus.NewDesc(
+ "prometheus_operator_enforced_sample_limit",
+ "Global limit on the number of scraped samples per scrape target.",
+ []string{
+ "namespace",
+ "name",
+ }, nil,
+ )
)
type prometheusCollector str... | 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,129 | I believe this is Prometheus name, wonder if this is descriptive enough of a label name? @nrchakradhar @simonpasquier wdyt? | prometheus-operator-prometheus-operator | go |
@@ -213,6 +213,11 @@ type Config struct {
IpInIpMtu int `config:"int;1440;non-zero"`
IpInIpTunnelAddr net.IP `config:"ipv4;"`
+ // Knobs provided to explicitly control whether we add rules to drop encap traffic
+ // from workloads. We always add them unless explicitly disabled.
+ DropVXLANPacketsFromWor... | 1 | // Copyright (c) 2020 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... | 1 | 18,308 | Are most of our other fields default-zero-value? Would `AllowVXLANPacketsFromWorkloads` be a better formulation of this? I think it would make it easier for golang users of the API (default value matches the type zero-value) | projectcalico-felix | go |
@@ -35,7 +35,7 @@ namespace Nethermind.TxPool
void AddPeer(ITxPoolPeer peer);
void RemovePeer(PublicKey nodeId);
AddTxResult AddTransaction(Transaction tx, TxHandlingOptions handlingOptions);
- void RemoveTransaction(Keccak hash, long blockNumber);
+ void RemoveTransaction(Kecca... | 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,718 | void RemoveTransactions(Address sander, long removeBelowThisNonce) and separate these two calls | NethermindEth-nethermind | .cs |
@@ -4365,6 +4365,8 @@ func TestJetStreamSnapshotsAPI(t *testing.T) {
// Now connect through a cluster server and make sure we can get things to work this way as well.
nc2 := clientConnectToServer(t, ls)
defer nc2.Close()
+ // Wait a bit for interest to propagate.
+ time.Sleep(100 * time.Millisecond)
snapshot ... | 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 | 12,357 | Not sure which interest you are looking for to propagate here, but keep in mind that we have helpers (maybe not in /test package?) to check/wait for interest on a literal on a server for a given account. | nats-io-nats-server | go |
@@ -140,6 +140,7 @@ func execProcess(context *cli.Context) (int, error) {
detach: detach,
pidFile: context.String("pid-file"),
action: CT_ACT_RUN,
+ init: false,
}
return r.run(p)
} | 1 | // +build linux
package main
import (
"encoding/json"
"fmt"
"os"
"strconv"
"strings"
"github.com/opencontainers/runc/libcontainer"
"github.com/opencontainers/runc/libcontainer/utils"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/urfave/cli"
)
var execCommand = cli.Command{
Name: "exec",
... | 1 | 16,471 | nit: should not need this. | opencontainers-runc | go |
@@ -89,6 +89,8 @@ public class Constants {
// The flow exec id for a flow trigger instance unable to trigger a flow yet
public static final int FAILED_EXEC_ID = -2;
+ // Name of the file which keeps project directory size
+ public static final String PROJECT_DIR_SIZE_FILE_NAME = "___azkaban_project_dir_size_i... | 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 | 16,524 | Since this constant is an implementation detail rather than a user-facing API, is it better to define it in a place where it is used? | azkaban-azkaban | java |
@@ -1007,6 +1007,8 @@ class ListParameter(Parameter):
:param str x: the value to parse.
:return: the parsed value.
"""
+ if isinstance(x, list):
+ x = json.dumps(x)
return list(json.loads(x, object_pairs_hook=FrozenOrderedDict))
def serialize(self, x): | 1 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | 1 | 19,817 | It would be nice if we have some docs explaining this. Core luigi should avoid having hard to understand code. | spotify-luigi | py |
@@ -43,6 +43,11 @@ public abstract class StemmerTestBase extends LuceneTestCase {
static void init(boolean ignoreCase, String affix, String... dictionaries)
throws IOException, ParseException {
+ stemmer = new Stemmer(loadDictionary(ignoreCase, affix, dictionaries));
+ }
+
+ static Dictionary loadDicti... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 1 | 40,333 | extract a method to call from a test | apache-lucene-solr | java |
@@ -184,6 +184,8 @@ public class CoreContainer {
private volatile ExecutorService coreContainerWorkExecutor = ExecutorUtil.newMDCAwareCachedThreadPool(
new DefaultSolrThreadFactory("coreContainerWorkExecutor"));
+ final private ExecutorService collectorExecutor;
+
private final OrderedExecutor replayUpd... | 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 | 32,929 | nitpick: regular order is private than final. | apache-lucene-solr | java |
@@ -145,6 +145,11 @@ class DocstringParameterChecker(BaseChecker):
"useless-type-doc",
"Please remove the ignored parameter type documentation.",
),
+ "W9021": (
+ 'Missing any documentation in "%s"',
+ "missing-any-param-doc",
+ "Please add par... | 1 | # Copyright (c) 2014-2015 Bruno Daniel <bruno.daniel@blue-yonder.com>
# Copyright (c) 2015-2020 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2016-2019 Ashley Whetter <ashley@awhetter.co.uk>
# Copyright (c) 2016 Glenn Matthews <glenn@e-dad.net>
# Copyright (c) 2016 Glenn Matthews <glmatthe@cisco.com>
# Copyright... | 1 | 16,317 | We could add an old names here, the ideal would be to not force to disable missing-any-param when the old one was already disabled. But they are not really equivalent so maybe you were right to not add it. | PyCQA-pylint | py |
@@ -8,11 +8,13 @@
public const string BenchF = "BenchF";
public const string BenchI = "BenchI";
public const string Inlining = "Inlining";
- public const string SIMD = "SIMD";
- public const string Span = "Span";
public const string V8 = ... | 1 | namespace Benchmarks
{
public static class Categories
{
public const string CoreCLR = "CoreCLR";
public const string BenchmarksGame = "BenchmarksGame";
public const string Benchstones = "Benchstones";
public const string BenchF = "BenchF";
public ... | 1 | 7,273 | >public const string LINQ = "LINQ"; [](start = 8, length = 34) Are there duplicated benchmarks here? #Closed | dotnet-performance | .cs |
@@ -129,14 +129,16 @@ module Beaker
end
end
- def do_install hosts, version, path, pre_30, options = {}
+ def do_install hosts, options = {}
#convenience methods for installation
########################################################
- def installer_cmd(host, vers... | 1 | require 'pathname'
module Beaker
module DSL
#
# This module contains methods to help cloning, extracting git info,
# ordering of Puppet packages, and installing ruby projects that
# contain an `install.rb` script.
module InstallUtils
# The default install path
SourcePath = "/opt/pup... | 1 | 4,579 | Probably worth taking the opportunity to add yardocs to this method now. Esp. curious about what the options hash accepts. | voxpupuli-beaker | rb |
@@ -271,6 +271,12 @@ static void roots_cursor_press_button(struct roots_cursor *cursor,
break;
case WLR_BUTTON_PRESSED:
roots_seat_set_focus(seat, view);
+ if (surface && !view) {
+ struct wlr_layer_surface *layer = surface->role_data;
+ if (layer->current.keyboard_interactive) {
+ roots_seat_set... | 1 | #define _XOPEN_SOURCE 700
#include <math.h>
#include <stdlib.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/util/edges.h>
#include <wlr/util/log.h>
#ifdef __linux__
#include <linux/input-event-codes.h>
#elif __FreeBSD__
#include <dev/evdev/input-event-codes.h>
#endif
#include "rootston/cursor.h"
#include "... | 1 | 10,643 | This is Very Meh . We want to get rid of `role_data`, and it's an internal field. | swaywm-wlroots | c |
@@ -97,6 +97,11 @@ class Database {
return this.tryCall('selectOne', sql, params);
}
+ async loadExtension(path) {
+ const result = await this.driver()['loadExtension'](path);
+ return result;
+ }
+
async selectAll(sql, params = null) {
return this.tryCall('selectAll', sql, params);
} | 1 | const { Logger } = require('lib/logger.js');
const { time } = require('lib/time-utils.js');
const Mutex = require('async-mutex').Mutex;
class Database {
constructor(driver) {
this.debugMode_ = false;
this.driver_ = driver;
this.logger_ = new Logger();
this.logExcludedQueryTypes_ = [];
this.batchTransactionM... | 1 | 15,185 | `await this.driver().loadExtension(path);` should work | laurent22-joplin | js |
@@ -98,12 +98,12 @@ func TestAddDepRescan(t *testing.T) {
target1.AddDependency(buildLabel("//package1:target4"))
// Fake test: calling this now should have no effect because rescan is not true.
- state.QueueTarget(buildLabel("//package1:target1"), core.OriginalTarget, false, false)
+ state.QueueTarget(buildLabel... | 1 | // Tests for general parse functions.
package parse
import (
"github.com/stretchr/testify/assert"
"github.com/thought-machine/please/src/core"
"testing"
"time"
)
const tid = 1
// TODO(jpoole): Use brain to figure out what we're actually waiting for here instead of just sleeping 100ms
func TestAddDepSimple(t *te... | 1 | 10,134 | Is any of this needed anymore? | thought-machine-please | go |
@@ -26,6 +26,16 @@
#include "ostree-repo-private.h"
#include "otutil.h"
+/* See ostree-repo.c for a bit more info about these ABI checks */
+#if __SIZEOF_POINTER__ == 8 && __SIZEOF_LONG__ == 8 && __SIZEOF_INT__ == 4
+G_STATIC_ASSERT(sizeof(OstreeDiffDirsOptions) ==
+ sizeof(int) * 2 +
+ ... | 1 | /*
* Copyright (C) 2011 Colin Walters <walters@verbum.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version... | 1 | 12,716 | Can you add a mention here and in `ostree-repo.c` that the holes were found with `pahole`? | ostreedev-ostree | c |
@@ -78,7 +78,17 @@ module Blacklight::SolrHelper
# Returns a two-element array (aka duple) with first the solr response object,
# and second an array of SolrDocuments representing the response.docs
def get_search_results(user_params = params || {}, extra_controller_params = {})
- solr_response = query_solr(... | 1 | # -*- encoding : utf-8 -*-
# SolrHelper 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/Ba... | 1 | 5,676 | While we're changing this, I wonder if we can do away with `extra_controller_params`.. Maybe a new type of `solr_search_params_logic` that appends the attributes? | projectblacklight-blacklight | rb |
@@ -564,6 +564,8 @@ module Beaker
yield self if block_given?
+ rescue Beaker::DSL::Assertions, Minitest::Assertion => early_assertion
+ fail_test(early_assertion)
rescue Exception => early_exception
original_exception = RuntimeError.new("PuppetAcceptance::DSL::Helpers.... | 1 | # -*- coding: utf-8 -*-
require 'resolv'
require 'inifile'
require 'timeout'
require 'beaker/dsl/outcomes'
require 'beaker/options'
require 'hocon'
require 'hocon/config_error'
module Beaker
module DSL
# This is the heart of the Puppet Acceptance DSL. Here you find a helper
# to proxy commands to hosts, more... | 1 | 8,829 | I believe that you only need to rescue Beaker::DSL::Assertions, as they include Minitest::Assertions. | voxpupuli-beaker | rb |
@@ -372,6 +372,7 @@ namespace OpenTelemetry.Trace
private void RunGetRequestedDataAlwaysOffSampler(Activity activity)
{
activity.IsAllDataRequested = false;
+ activity.ActivityTraceFlags &= ActivityTraceFlags.None;
}
private void RunGetRequestedDataOtherSamp... | 1 | // <copyright file="TracerProviderSdk.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.apac... | 1 | 19,750 | Do we need `&=` or `=` is sufficient? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -161,8 +161,8 @@ $settings['trusted_host_patterns'] = ['.*'];
$settings['class_loader_auto_detect'] = FALSE;
// This specifies the default configuration sync directory.
-if (empty($config_directories[CONFIG_SYNC_DIRECTORY])) {
- $config_directories[CONFIG_SYNC_DIRECTORY] = '{{ joinPath $config.SitePath $config.... | 1 | package ddevapp
import (
"fmt"
"github.com/drud/ddev/pkg/dockerutil"
"github.com/drud/ddev/pkg/nodeps"
"github.com/drud/ddev/pkg/output"
"github.com/drud/ddev/pkg/util"
"io/ioutil"
"os"
"path"
"path/filepath"
"text/template"
"github.com/drud/ddev/pkg/fileutil"
"github.com/drud/ddev/pkg/archive"
)
// D... | 1 | 13,951 | Let's keep both of these here. It should work on most any version of Drupal 8 then true? | drud-ddev | go |
@@ -699,7 +699,7 @@ namespace OpenTelemetry.Trace.Test
private void AssertApproxSameTimestamp(DateTime one, DateTime two)
{
var timeShift = Math.Abs((one - two).TotalMilliseconds);
- Assert.InRange(timeShift, double.Epsilon, 10);
+ Assert.InRange(timeShift, double.Ep... | 1 | // <copyright file="SpanTest.cs" company="OpenTelemetry Authors">
// Copyright 2018, OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org... | 1 | 12,092 | @lmolkova This ok? I'm getting random failures from the build checks that don't happen locally from a few non-deterministic time related comparisons. | open-telemetry-opentelemetry-dotnet | .cs |
@@ -1,5 +1,5 @@
/*
- * Copyright ConsenSys AG.
+ * Copyright Hyperledger Besu Contributors.
*
* 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 | 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 | 26,205 | Q: are we supposed to change this for files that already exist? | hyperledger-besu | java |
@@ -477,7 +477,7 @@ def initialize_unbounded(obj, dimensions, key):
"""
select = dict(zip([d.name for d in dimensions], key))
try:
- obj.select([DynamicMap], **select)
+ obj.select(selection_specs=[DynamicMap], **select)
except KeyError:
pass
| 1 | from __future__ import unicode_literals, absolute_import, division
from collections import defaultdict, namedtuple
import re
import traceback
import warnings
import bisect
import numpy as np
import param
from ..core import (HoloMap, DynamicMap, CompositeOverlay, Layout,
Overlay, GridSpace, NdLay... | 1 | 23,030 | I count only four times where `selection_specs` had to be specified as a keyword instead of by position! If that is how often it was used that positional argument in our own codebase, I am pretty certain users barely used it (if at all). | holoviz-holoviews | py |
@@ -24,5 +24,10 @@ describe HashDiffDecorator do
output = HashDiffDecorator.html_for(['~', 'foo', '', 'bar'])
expect(output).to eq("<code>foo</code> was changed from <code>[empty]</code> to <code>"bar"</code>")
end
+
+ it "renders numeric events" do
+ output = HashDiffDecorator.html... | 1 | describe HashDiffDecorator do
describe '.html_for' do
it "renders add events" do
output = HashDiffDecorator.html_for(['+', 'foo', 'bar'])
expect(output).to eq("<code>foo</code> was set to <code>"bar"</code>.")
end
it "renders modification events" do
output = HashDiffDecorator.... | 1 | 15,309 | is this test for the case above? seems to cover a numeric rather than empty val? | 18F-C2 | rb |
@@ -245,6 +245,9 @@ class FlowHandler(RequestHandler):
request.port = int(v)
elif k == "headers":
request.headers.set_state(v)
+ elif k == "content":
+ print(v)
+ response.content = st... | 1 | from __future__ import absolute_import, print_function, division
import base64
import json
import logging
import os.path
import re
import six
import tornado.websocket
from io import BytesIO
from mitmproxy.flow import FlowWriter, FlowReader
from mitmproxy import filt
from mitmproxy import models
from netlib import ve... | 1 | 11,885 | I like the general idea, but this will break: - JSON is not binary-safe, so anything binary will break this. - JSON is super slow for multiple-MB things - We want to have drag-and-drop upload - the easiest way to implement this is FormData upload, so we should have a multipart/formdata endpoint. Can we put to /flow/con... | mitmproxy-mitmproxy | py |
@@ -121,6 +121,7 @@ bool dr_preinjected = false;
static bool dynamo_exiting = false;
#endif
bool dynamo_exited = false;
+bool dynamo_exited_synched = false;
bool dynamo_exited_and_cleaned = false;
#ifdef DEBUG
bool dynamo_exited_log_and_stats = false; | 1 | /* **********************************************************
* Copyright (c) 2010-2017 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 | 11,366 | _and_synched seems to be more consistent w/ exited_and_cleaned | DynamoRIO-dynamorio | c |
@@ -13,6 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
+#if NETCOREAPP3_1
using Moq;
using Newtonsoft.Json;
using OpenTelemetry.Trace; | 1 | // <copyright file="DurationTest.cs" company="OpenTelemetry Authors">
// Copyright 2018, OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache... | 1 | 13,384 | nit: in case of whole file `ifdef` it may be helpful to have `_netcore31` suffix it in the name of the file as well. | open-telemetry-opentelemetry-dotnet | .cs |
@@ -35,12 +35,9 @@ public class SetNetworkConnection extends WebDriverHandler<Number> implements Js
@SuppressWarnings("unchecked")
@Override
public void setJsonParameters(Map<String, Object> allParameters) throws Exception {
- Map<String, Map<String, Object>> parameters = (Map<String, Map<String, Object>>)al... | 1 | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... | 1 | 13,952 | should use Number instead of Long | SeleniumHQ-selenium | js |
@@ -10,7 +10,8 @@ class CartDecorator < Draper::Decorator
end
def approvals_by_status
- object.approvals.order(
+ # Override default scope
+ object.approvals.reorder(
# http://stackoverflow.com/a/6332081/358804
<<-SQL
CASE approvals.status | 1 | class CartDecorator < Draper::Decorator
delegate_all
def number_approved
object.approved_approvals.count
end
def total_approvers
object.approvals.count
end
def approvals_by_status
object.approvals.order(
# http://stackoverflow.com/a/6332081/358804
<<-SQL
CASE approvals.sta... | 1 | 12,794 | Had no idea that method existed! | 18F-C2 | rb |
@@ -38,6 +38,7 @@ class TestTabWidget:
qtbot.addWidget(w)
monkeypatch.setattr(tabwidget.objects, 'backend',
usertypes.Backend.QtWebKit)
+ monkeypatch.setattr(w.tabBar(), 'width', w.width)
return w
@pytest.fixture | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2015-2018 Daniel Schadt
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of... | 1 | 22,307 | I wonder if we shouldn't just do `w.show()` here, which causes Qt to correctly calculate the sizes. | qutebrowser-qutebrowser | py |
@@ -24,12 +24,14 @@ class SparkDataFrameS3StoragePlugin(TypeStoragePlugin): # pylint: disable=no-in
@classmethod
def set_object(cls, object_store, obj, _context, _runtime_type, paths):
target_path = object_store.key_for_paths(paths)
- obj.write.parquet('s3a://' + target_path)
+ obj.wri... | 1 | """Type definitions for the airline_demo."""
from collections import namedtuple
import sqlalchemy
from pyspark.sql import DataFrame
from dagster import as_dagster_type, Dict, Field, String
from dagster.core.object_store import get_valid_target_path, TypeStoragePlugin
from dagster.core.runs import RunStorageMode
fr... | 1 | 12,928 | may be nice to have helper method to generate s3 paths rather than the minor code dup | dagster-io-dagster | py |
@@ -169,11 +169,15 @@ export default Controller.extend(ValidationEngine, {
_oauthSetup() {
let blogTitle = this.get('blogTitle');
let config = this.get('config');
+ let promises = [];
+
+ promises.pushObject(this.get('settings').fetch());
+ promises.pushObject(this.get('confi... | 1 | /* eslint-disable camelcase */
import Controller from 'ember-controller';
import RSVP from 'rsvp';
import ValidationEngine from 'ghost-admin/mixins/validation-engine';
import injectController from 'ember-controller/inject';
import injectService from 'ember-service/inject';
import {isInvalidError} from 'ember-ajax/error... | 1 | 8,533 | This isn't needed here, we still run `this._afterAuthentication` which loads settings & config - the reason the settings fetch is here is to make sure we have all the settings before saving the blog title rather than fetching everything once auth has completed. Probably moot anyway as the oauth code will be removed sho... | TryGhost-Admin | js |
@@ -397,7 +397,7 @@ func assertConfigsCompatible(cfg1, cfg2 *Config) error {
if c1.ClientAuth != c2.ClientAuth {
return fmt.Errorf("client authentication policy mismatch")
}
- if c1.ClientAuth != tls.NoClientCert && c2.ClientAuth != tls.NoClientCert && c1.ClientCAs != c2.ClientCAs {
+ if c1.ClientAuth != tls.NoC... | 1 | // Copyright 2015 Light Code Labs, 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 agre... | 1 | 13,317 | This line is getting a little long; let's move the conditions to at least two lines (maybe three). | caddyserver-caddy | go |
@@ -37,6 +37,10 @@
#include <fastdds/dds/log/Log.hpp>
+#include "../../../../fastdds/core/policy/ParameterList.hpp"
+
+using ParameterList = eprosima::fastdds::dds::ParameterList;
+
namespace eprosima {
namespace fastrtps {
namespace rtps { | 1 | // Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless re... | 1 | 18,473 | Don't use relative paths. src directory is already on the include search path | eProsima-Fast-DDS | cpp |
@@ -2,7 +2,7 @@ class Api::V1::CompletionsController < ApiController
before_action :doorkeeper_authorize!, if: lambda { !signed_in? }
def index
- respond_with current_resource_owner.completions.only_trail_object_ids
+ respond_with completions: current_resource_owner.completions.only_trail_object_ids
en... | 1 | class Api::V1::CompletionsController < ApiController
before_action :doorkeeper_authorize!, if: lambda { !signed_in? }
def index
respond_with current_resource_owner.completions.only_trail_object_ids
end
def create
completion = current_resource_owner.completions.create(
trail_object_id: params[:tr... | 1 | 13,472 | Line is too long. [86/80] | thoughtbot-upcase | rb |
@@ -4,6 +4,11 @@ describe 'TwitterDigits' do
let(:service_provider_url) { Faker::Internet.url }
let(:credentials) { "oauth_consumer_key=#{ Faker::Internet.password }" }
+ before do
+ original_twitter_digits_path = File.expand_path('../../../../app/lib/twitter_digits.rb', __FILE__)
+ load original_twitter... | 1 | require 'test_helper'
describe 'TwitterDigits' do
let(:service_provider_url) { Faker::Internet.url }
let(:credentials) { "oauth_consumer_key=#{ Faker::Internet.password }" }
it 'must return the id_str when response is 200' do
id_str = Faker::Internet.password
response = stub(code: '200', body: { id_str:... | 1 | 8,090 | We have to navigate up four directories to come down three? I see it, but it's kinda icky. Is something like `load Rails.root + 'app/lib/twitter_digits.rb'` out of fashion nowadays? | blackducksoftware-ohloh-ui | rb |
@@ -208,6 +208,10 @@ int main(int argc, char *argv[]) {
res = fpgaDmaOpen(afc_h, &dma_h);
ON_ERR_GOTO(res, out_dma_close, "fpgaDmaOpen");
+ if(!dma_h) {
+ res = FPGA_EXCEPTION;
+ ON_ERR_GOTO(res, out_dma_close, "Invaid DMA Handle");
+ }
if(use_ase)
count = ASE_TEST_BUF_SIZE; | 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 | 14,773 | Empty space at end. | OPAE-opae-sdk | c |
@@ -215,6 +215,7 @@ module Bolt
def with_bolt_executor(executor, inventory, pdb_client = nil, applicator = nil, &block)
setup
opts = {
+ bolt_project: @project,
bolt_executor: executor,
bolt_inventory: inventory,
bolt_pdb_client: pdb_client, | 1 | # frozen_string_literal: true
require 'bolt/applicator'
require 'bolt/executor'
require 'bolt/error'
require 'bolt/plan_result'
require 'bolt/util'
require 'bolt/config/modulepath'
require 'etc'
module Bolt
class PAL
# PALError is used to convert errors from executing puppet code into
# Bolt::Errors
cla... | 1 | 17,894 | I think similar to line 176 here we'll want to call `detect_project_conflict` after overriding this. | puppetlabs-bolt | rb |
@@ -1,7 +1,8 @@
const fs = require('fs')
const path = require('path')
const chalk = require('chalk')
-const { exec } = require('child_process')
+const { spawn } = require('child_process')
+const readline = require('readline')
const YAML = require('js-yaml')
const { promisify } = require('util')
const gzipSize = r... | 1 | const fs = require('fs')
const path = require('path')
const chalk = require('chalk')
const { exec } = require('child_process')
const YAML = require('js-yaml')
const { promisify } = require('util')
const gzipSize = require('gzip-size')
const prettierBytes = require('@transloadit/prettier-bytes')
const browserify = requi... | 1 | 14,306 | How about `const { promises: fs } = require('fs')` and then replacing `fs.promises.` with `fs.`? | transloadit-uppy | js |
@@ -129,13 +129,9 @@ func getGithubData(ctx context.Context, url string) ([]byte, error) {
return nil, fmt.Errorf("unexpected status %v (%v) returned", res.StatusCode, res.Status)
}
- buf, err := ioutil.ReadAll(res.Body)
- if err != nil {
- _ = res.Body.Close()
- return nil, err
- }
+ defer res.Body.Close()
... | 1 | package selfupdate
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"strings"
"time"
"github.com/pkg/errors"
"golang.org/x/net/context/ctxhttp"
)
// Release collects data about a single release on GitHub.
type Release struct {
Name string `json:"name"`
TagName string `json:... | 1 | 11,586 | This ignores errors closing the body. Not likely to happen, but no reason to take the risk either. | restic-restic | go |
@@ -73,7 +73,7 @@ public abstract class FlinkTestBase extends AbstractTestBase {
}
protected static TableResult exec(TableEnvironment env, String query, Object... args) {
- return env.executeSql(String.format(query, args));
+ return env.executeSql(args.length > 0 ? String.format(query, args) : query);
... | 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 | 30,041 | Why was this change needed? | apache-iceberg | java |
@@ -259,6 +259,8 @@ namespace pwiz.Skyline
(c, p) => c.LockmassNegative = p.ValueDouble);
public static readonly Argument ARG_IMPORT_LOCKMASS_TOLERANCE = new DocArgument(@"import-lockmass-tolerance", NUM_VALUE,
(c, p) => c.LockmassTolerance = p.ValueDouble);
+ public static rea... | 1 | /*
* Original author: John Chilton <jchilton .at. u.washington.edu>,
* Brendan MacLean <brendanx .at. u.washington.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2011-2019 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Versi... | 1 | 14,467 | Needs a description added to CommandArgsUsage.resx | ProteoWizard-pwiz | .cs |
@@ -153,7 +153,7 @@ public class DownloadServiceNotification {
iconId = R.drawable.ic_notification_sync_error;
intent = ClientConfig.downloadServiceCallbacks.getReportNotificationContentIntent(context);
id = R.id.notification_download_report;
- content =... | 1 | package de.danoeh.antennapod.core.service.download;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.os.Build;
import android.util.Log;
import androidx.core.app.NotificationCompat;
import de.danoeh.antennapod.core.... | 1 | 17,181 | The line is a bit too long. That's why the test currently fails. Please break it into two lines. | AntennaPod-AntennaPod | java |
@@ -59,6 +59,13 @@ public class NodeStatus {
}
}
+ public boolean hasCapability(Capabilities caps) {
+ long count = slots.stream()
+ .filter(slot -> slot.isSupporting(caps))
+ .count();
+ return count > 0;
+ }
+
public boolean hasCapacity() {
return slots.stream().anyMatch(slot -... | 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,174 | Prefer `Stream.anyMatch` instead of iterating over all slots. | SeleniumHQ-selenium | rb |
@@ -1,4 +1,6 @@
module Ncr
+ START_OF_NEW_6X_APPROVAL_POLICY = Time.zone.local(2016, 7, 5, 0, 0, 0)
+
class ApprovalManager
def initialize(work_order)
@work_order = work_order | 1 | module Ncr
class ApprovalManager
def initialize(work_order)
@work_order = work_order
end
def system_approvers
if %w(BA60 BA61).include?(work_order.expense_type)
ba_6x_approvers
else
[ba_80_approver]
end
end
def setup_approvals_and_observers
if work_o... | 1 | 17,718 | Can this just be a feature flag to check if it's on? This will give us flexibility on launch date (which could be turned on July 1st) and allow us to easily revert back in case the policy is reverted. | 18F-C2 | rb |
@@ -44,4 +44,5 @@ func (p Pin) Low() {
type ADC struct {
Pin Pin
+ Bus uint8
} | 1 | package machine
import "errors"
var (
ErrInvalidInputPin = errors.New("machine: invalid input pin")
ErrInvalidOutputPin = errors.New("machine: invalid output pin")
ErrInvalidClockPin = errors.New("machine: invalid clock pin")
ErrInvalidDataPin = errors.New("machine: invalid data pin")
ErrNoPinChangeC... | 1 | 12,156 | Due to this change, src/examples/adc needs to be modified | tinygo-org-tinygo | go |
@@ -19,6 +19,12 @@ import (
"unsafe"
)
+// singlePointer wraps an unsafe.Pointer and supports basic
+// load(), store(), clear(), and swapNil() operations.
+type singlePtr struct {
+ ptr unsafe.Pointer
+}
+
func (l *sortedLabels) Len() int {
return len(*l)
} | 1 | // Copyright 2019, 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.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... | 1 | 11,070 | `s/singlePointer/singlePtr` or please rename the type to `singlePointer`. | open-telemetry-opentelemetry-go | go |
@@ -577,7 +577,8 @@ bool nano::node_config::upgrade_json (unsigned version_a, nano::jsonconfig & jso
}
case 17:
{
- json.put ("vote_generator_delay", vote_generator_delay.count ()); // Update value
+ json.put ("active_elections_size", 10000); // Update value
+ json.put ("vote_generator_delay", 100); // U... | 1 | #include <nano/crypto_lib/random_pool.hpp>
#include <nano/lib/config.hpp>
#include <nano/lib/jsonconfig.hpp>
#include <nano/lib/rocksdbconfig.hpp>
#include <nano/lib/rpcconfig.hpp>
#include <nano/lib/tomlconfig.hpp>
#include <nano/node/nodeconfig.hpp>
// NOTE: to reduce compile times, this include can be replaced by mo... | 1 | 15,925 | Do we need it? If right now it's toml | nanocurrency-nano-node | cpp |
@@ -22,6 +22,16 @@ options._catchError = function(error, newVNode, oldVNode) {
oldCatchError(error, newVNode, oldVNode);
};
+const oldUnmount = options.unmount;
+options.unmount = function(vnode) {
+ /** @type {import('./internal').Component} */
+ const component = vnode._component;
+ if (component && component._o... | 1 | import { Component, createElement, options, Fragment } from 'preact';
import { assign } from './util';
const oldCatchError = options._catchError;
options._catchError = function(error, newVNode, oldVNode) {
if (error.then) {
/** @type {import('./internal').Component} */
let component;
let vnode = newVNode;
fo... | 1 | 16,536 | You are never calling oldUnmount, this could lead to a plugin chain failing. | preactjs-preact | js |
@@ -119,7 +119,9 @@ public class MetaUtils {
name = "Table" + tid;
}
return new TiTableInfo(
- tid, CIStr.newCIStr(name), "", "", pkHandle, columns, indices, "", 0, 0, 0, 0);
+ tid, CIStr.newCIStr(name), "", "", pkHandle, columns,
+ indices, "", 0, 0, 0
+ , 0, ... | 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 | 8,804 | What does setting partitionInfo to null mean exactly? | pingcap-tispark | java |
@@ -225,6 +225,18 @@ class BokehPlot(DimensionedPlot):
source.data.update(converted_data)
else:
source.stream(data, stream.length)
+ return
+
+ # Determine if the CDS.data requires a full update or simply needs
+ # to be updated, this i... | 1 | import json
from itertools import groupby
import numpy as np
import param
from bokeh.models import (ColumnDataSource, Column, Row, Div)
from bokeh.models.widgets import Panel, Tabs
from ...core import (OrderedDict, Store, AdjointLayout, NdLayout, Layout,
Empty, GridSpace, HoloMap, Element, Dynam... | 1 | 20,966 | Not sure you need the initial ``not_updated`` as ``any([])`` evaluates to false. | holoviz-holoviews | py |
@@ -0,0 +1,13 @@
+class AddPublishedAtToVideos < ActiveRecord::Migration
+ def up
+ add_column :videos, :published_at, :datetime
+ execute <<-SQL
+ UPDATE videos
+ SET published_at = created_at
+ SQL
+ end
+
+ def down
+ remove_column :videos, :published_at
+ end
+end | 1 | 1 | 9,351 | Since this migration hasn't been merged to master yet, what do you think about just squashing these two into the migration you really want? | thoughtbot-upcase | rb | |
@@ -0,0 +1 @@
+BetterErrors.editor = :subl if defined? BetterErrors | 1 | 1 | 8,596 | This doesn't apply to all developers | blackducksoftware-ohloh-ui | rb | |
@@ -52,13 +52,16 @@ class SonataMediaExtension extends Extension
$loader->load('gaufrette.xml');
$loader->load('validators.xml');
$loader->load('serializer.xml');
- $loader->load('api_form.xml');
-
+
$bundles = $container->getParameter('kernel.bundles');
if ... | 1 | <?php
/*
* This file is part of the Sonata project.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\MediaBundle\DependencyInjection;
use Symfony\Component... | 1 | 6,401 | I think `serializer.xml` can be moved into condition below too | sonata-project-SonataMediaBundle | php |
@@ -21,6 +21,9 @@ namespace Benchmarks
{
public static void Main(string[] args)
{
+ // examples to run from command line:
+ // navigate to opentelemetry-dotnet\src\benchmarks directory and run the following
+ // dotnet run --framework netcoreapp3.1 --configuration... | 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.org/li... | 1 | 14,269 | Probably put this in a simple README.md file? | open-telemetry-opentelemetry-dotnet | .cs |
@@ -0,0 +1,18 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace AutoRest.Core.Validation
+{
... | 1 | 1 | 23,859 | Super Cool bitwise Minor: Most likely you don't need `System.Collections.Generic`, `System.Linq` & `System.Threading.Tasks` | Azure-autorest | java | |
@@ -20,7 +20,7 @@ public class DefaultMicroserviceClassLoaderFactory implements MicroserviceClassL
public static final MicroserviceClassLoaderFactory INSTANCE = new DefaultMicroserviceClassLoaderFactory();
@Override
- public ClassLoader create(String microserviceName, String version) {
+ public ClassLoader cr... | 1 | /*
* Copyright 2017 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... | 1 | 7,078 | If we just return the TCC, maybe we need to update the method name for it. | apache-servicecomb-java-chassis | java |
@@ -111,8 +111,7 @@ namespace AutoRest.Extensions
if (methodList.Count == 1)
{
Method method = methodList.Single();
- return string.Format(CultureInfo.InvariantCulture, "Additional parameters for the {0} operation.",
- createOperationDisplaySt... | 1 | using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using AutoRest.Core.Model;
using Newtonsoft.Json.Linq;
using static AutoRest.Core.Utilities.DependencyInjection;
using AutoRest.Core.Utilities;
namespace AutoRest.Extensions
{
public static class ParameterGroupExtension... | 1 | 25,353 | For consistency, shouldn't this use `SwaggerModeler.GetMethodNameFromOperationId(method.Name)` as above? I'd just reuse `"Additional parameters for " + SwaggerModeler.GetMethodNameFromOperationId(method.Name) + " operation."` here, `string.Format` with `CultureInfo` is complete nonsense here anyways. | Azure-autorest | java |
@@ -32,7 +32,7 @@ TEST(LivelinessQos, Liveliness_Automatic_Reliable)
// Liveliness lease duration and announcement period
uint32_t liveliness_ms = 200;
Duration_t liveliness_s(liveliness_ms * 1e-3);
- Duration_t announcement_period(liveliness_ms * 1e-3 * 0.5);
+ Duration_t announcement_period(livel... | 1 | // Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless re... | 1 | 16,379 | As this is just a backport, I guess it is fine to leave these timings, although they are not enough to make tests stable. | eProsima-Fast-DDS | cpp |
@@ -70,8 +70,8 @@ func New(p client.ConfigProvider, cfgs ...*aws.Config) *ECS {
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *ECS {
- if signingName == "" {
- signingName = Service... | 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 | 17,209 | Why this way? | aws-amazon-ecs-agent | go |
@@ -38,10 +38,7 @@ const (
func setupEnvironment(t *testing.T) string {
t.Helper()
// TODO(shahms): ExtractCompilations should take an output path.
- output := os.Getenv("TEST_TMPDIR")
- if output == "" {
- t.Skip("Skipping test due to incompatible environment (missing TEST_TMPDIR)")
- }
+ output := t.TempDir()
... | 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 | 13,072 | Changing this because otherwise the second run of testExtractCompilationsEndToEndWithDatabase will try to overwrite a generated file and fail. Maybe there's a better way? | kythe-kythe | go |
@@ -90,6 +90,9 @@ public final class HttpUtils {
* @return the encoded path param
*/
public static String encodePathParam(String pathParam) {
+ if (pathParam.indexOf(';') != -1) {
+ pathParam = pathParam.substring(0, pathParam.indexOf(';'));
+ }
return UrlEscapers.urlPathSegmentEscaper().esca... | 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 | 12,576 | This modification is not correct. Suggections: 1. upgread guava to 30.0-jre will fix this issue | apache-servicecomb-java-chassis | java |
@@ -17,8 +17,8 @@ type syscalls struct {
var _ specsruntime.Syscalls = (*syscalls)(nil)
// VerifySignature implements Syscalls.
-func (sys syscalls) VerifySignature(signature specscrypto.Signature, signer address.Address, plaintext []byte) bool {
- return crypto.IsValidSignature(plaintext, signer, signature)
+func ... | 1 | package vmcontext
import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-filecoin/internal/pkg/crypto"
"github.com/filecoin-project/specs-actors/actors/abi"
specscrypto "github.com/filecoin-project/specs-actors/actors/crypto"
specsruntime "github.com/filecoin-project/specs-actors/actors... | 1 | 23,055 | All changes to signature code stem from here. The syscalls interfaces expects VerifySignature to return an error. I performed the change here and bubbled it up through the rest of the code - mostly mechanical. | filecoin-project-venus | go |
@@ -77,15 +77,12 @@ public final class InMemoryStorage extends StorageComponent implements SpanStore
int maxSpanCount = 500000;
List<String> autocompleteKeys = Collections.emptyList();
- /** {@inheritDoc} */
- @Override
- public Builder strictTraceId(boolean strictTraceId) {
+ @Override public B... | 1 | /*
* Copyright 2015-2020 The OpenZipkin Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | 1 | 17,203 | This strategy seems good. Just wondering do you think this is a good time to move stuff out of core? For example, I guess storage, since it's for use by server and not client, doesn't need to be Java 6? | openzipkin-zipkin | java |
@@ -283,7 +283,8 @@ class Reader implements DataSourceReader, SupportsScanColumnarBatch, SupportsPus
return new Stats(0L, 0L);
}
- if (filterExpressions == null || filterExpressions == Expressions.alwaysTrue()) {
+ // estimate stats using snapshot summary only for partitioned tables (metadata tables... | 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,661 | We had a wrong predicate before: we compared a list to an expression. | apache-iceberg | java |
@@ -21,6 +21,13 @@ func Test_acl_decode(t *testing.T) {
},
want: "user::rw-\nuser:0:rwx\nuser:65534:rwx\ngroup::rwx\nmask::rwx\nother::r--\n",
},
+ {
+ name: "decode group",
+ args: args{
+ xattr: []byte{2, 0, 0, 0, 8, 0, 1, 0, 254, 255, 0, 0},
+ },
+ want: "group:65534:--x\n",
+ },
{
nam... | 1 | package dump
import (
"reflect"
"testing"
)
func Test_acl_decode(t *testing.T) {
type args struct {
xattr []byte
}
tests := []struct {
name string
args args
want string
}{
{
name: "decode string",
args: args{
xattr: []byte{2, 0, 0, 0, 1, 0, 6, 0, 255, 255, 255, 255, 2, 0, 7, 0, 0, 0, 0, 0, 2... | 1 | 14,349 | Name copy-pasted from above. "empty"? | restic-restic | go |
@@ -98,7 +98,7 @@ class Bottle2neck(_Bottleneck):
self.stage_type = stage_type
self.scales = scales
self.width = width
- delattr(self, 'conv2')
+ # delattr(self, 'conv2')
delattr(self, self.norm2_name)
def forward(self, x): | 1 | import math
import torch
import torch.nn as nn
import torch.utils.checkpoint as cp
from mmcv.cnn import build_conv_layer, build_norm_layer
from ..builder import BACKBONES
from .resnet import Bottleneck as _Bottleneck
from .resnet import ResNet
class Bottle2neck(_Bottleneck):
expansion = 4
def __init__(self... | 1 | 21,235 | May I ask why change this? | open-mmlab-mmdetection | py |
@@ -23,15 +23,7 @@ namespace Datadog.Trace.Agent.MessagePack
len++;
}
- if (value.Tags != null)
- {
- len++;
- }
-
- if (value.Metrics != null)
- {
- len++;
- }
+ len += 2; // Tags ... | 1 | using System;
using Datadog.Trace.ExtensionMethods;
using Datadog.Trace.Vendors.MessagePack;
using Datadog.Trace.Vendors.MessagePack.Formatters;
namespace Datadog.Trace.Agent.MessagePack
{
internal class SpanMessagePackFormatter : IMessagePackFormatter<Span>
{
public int Serialize(ref byte[] bytes, int... | 1 | 17,733 | Does this mean we now always include the dictionaries even if they're empty? If so, we should make sure that this doesn't break the Agent (even older versions). It's possible that it doesn't handle empty dictionaries well. | DataDog-dd-trace-dotnet | .cs |
@@ -29,6 +29,9 @@ namespace Nethermind.Blockchain
[ConfigItem(Description = "If set to 'true' then the Fast Sync (eth/63) synchronization algorithm will be used.", DefaultValue = "false")]
bool FastSync { get; set; }
+ [ConfigItem(Description = "Relevant only if 'FastSync' is 'true'. ... | 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 | 23,080 | The description and name is unclear. Typo in 'which'. | NethermindEth-nethermind | .cs |
@@ -43,7 +43,12 @@ module Selenium
def text
@bridge.getAlertText
end
+
+ def authenticate(username, password)
+ @bridge.setAuthentication username: username, password: password
+ accept
+ end
end # Alert
end # WebDriver
-end # Selenium
+end # Selenium | 1 | # encoding: utf-8
#
# 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
# "Li... | 1 | 13,040 | Files should have an extra line at the end of them. | SeleniumHQ-selenium | js |
@@ -74,6 +74,12 @@ proc_num_simd_saved(void)
return num_simd_saved;
}
+void
+proc_set_num_simd_saved(int num)
+{
+ num_simd_saved = num;
+}
+
DR_API
int
proc_num_simd_registers(void) | 1 | /* **********************************************************
* Copyright (c) 2016 ARM Limited. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condit... | 1 | 17,739 | > i#1312 AVX-512 support: Add code cache to/from context switching. s|to/from|| (redundant and mildly confusing (called "enter" and "return" in code)). | DynamoRIO-dynamorio | c |
@@ -521,10 +521,10 @@ void dag_to_cyto(struct dag *d, int condense_display, int change_size)
fprintf(cytograph, "\t<att name = \"layoutAlgorithm\" value = \"Grid Layout\" type = \"string\" cy:hidden = \"1\"/>\n");
if(change_size) {
- hash_table_firstkey(d->completed_files);
- while(hash_table_nextkey(d->complet... | 1 | /*
Copyright (C) 2013- The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/utsname.h>
#include <inttypes.h>
#include <ctype.h>
#include <limit... | 1 | 12,046 | This stat may fail, right? I think dag_file_exists does not actually check the file is there. | cooperative-computing-lab-cctools | c |
@@ -16,7 +16,11 @@ describe('Options Validation', function() {
});
const testObject = { a: 1 };
- const validatedObject = objectValidator(testObject, { validationLevel: testValidationLevel });
+ const validatedObject = objectValidator(
+ testObject,
+ {},
+ { validationLevel: testValida... | 1 | 'use strict';
const expect = require('chai').expect;
const createValidationFunction = require('../../lib/options_validator').createValidationFunction;
const sinonChai = require('sinon-chai');
const sinon = require('sinon');
const chai = require('chai');
chai.use(sinonChai);
describe('Options Validation', function() {... | 1 | 14,844 | I think we can make a safe assumption that if only two values are passed in then you have `(optionsToValidate, optionsForValidation)`, if its three then you have `(optionsToValidate, overrideOptions, optionsForValidation)` | mongodb-node-mongodb-native | js |
@@ -141,12 +141,14 @@ func runExperimentalBeamPipeline(ctx context.Context) error {
entries := beamio.ReadEntries(s, *entriesFile)
k := pipeline.FromEntries(s, entries)
shards := 8 // TODO(schroederc): better determine number of shards
+ edgeSets, edgePages := k.Edges()
xrefSets, xrefPages := k.CrossReferences(... | 1 | /*
* Copyright 2015 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,494 | If there are more items to add to what's being written out here, please add a TODO. | kythe-kythe | go |
@@ -106,8 +106,12 @@ class SuperSocket(six.with_metaclass(_SuperSocket_metaclass)):
pkt = pkt[:12] + tag + pkt[12:]
elif cmsg_lvl == socket.SOL_SOCKET and \
cmsg_type == SO_TIMESTAMPNS:
- tmp = struct.unpack("iiii", cmsg_data)
- ... | 1 | # This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more information
# Copyright (C) Philippe Biondi <phil@secdev.org>
# This program is published under a GPLv2 license
"""
SuperSocket.
"""
from __future__ import absolute_import
from select import select, error as select_error
import ctypes
im... | 1 | 16,762 | Can you add an `else:` case to handle an invalid length? That will prevent weird errors. | secdev-scapy | py |
@@ -9,14 +9,10 @@ public class ASTAttribute extends AbstractJspNode {
private String name;
- public ASTAttribute(int id) {
+ ASTAttribute(int id) {
super(id);
}
- public ASTAttribute(JspParser p, int id) {
- super(p, id);
- }
-
/**
* @return Returns the name.
... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
/* Generated By:JJTree: Do not edit this line. ASTAttribute.java */
package net.sourceforge.pmd.lang.jsp.ast;
public class ASTAttribute extends AbstractJspNode {
private String name;
public ASTAttribute(int id) {
... | 1 | 17,006 | * We need to deprecate/internalize first on master. * We should directly make the AST node final now * The setter `setName()` can be package-private. | pmd-pmd | java |
@@ -137,12 +137,6 @@ public class InitCodeTransformer {
// Remove the request object for flattened method
orderedItems.remove(orderedItems.size() - 1);
}
- for (InitCodeNode param :
- sampleFuncParams(
- root, initCodeContext.sampleArgStrings(), initCodeContext.sampleParamConfigM... | 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... | 1 | 29,396 | Where did this functionality move to? | googleapis-gapic-generator | java |
@@ -68,6 +68,19 @@ public class TiDBJDBCClient implements AutoCloseable {
}
}
+ // SPLIT TABLE table_name [INDEX index_name] BETWEEN (lower_value) AND (upper_value) REGIONS
+ // region_num
+ public boolean splitTableRegion(
+ String dbName, String tblName, long minVal, long maxVal, long regionNum) thr... | 1 | /*
* Copyright 2019 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,439 | maybe should firstly check whether current tidb support `split table region`? | pingcap-tispark | java |
@@ -27,7 +27,8 @@ import { Fragment } from '@wordpress/element';
import Data from 'googlesitekit-data';
import Logo from './Logo';
import UserMenu from './UserMenu';
-import ErrorNotification from '../components/notifications/error-notification';
+import LegacyErrorNotification from './legacy-notifications/error-not... | 1 | /**
* Header component.
*
* Site Kit by Google, Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Un... | 1 | 34,118 | Please use the same (plural) name for the new component since it renders multiple notifications. | google-site-kit-wp | js |
@@ -466,6 +466,7 @@ func (cs *CatchpointCatchupService) processStageBlocksDownload() (err error) {
}
if attemptsCount <= uint64(cs.config.CatchupBlockDownloadRetryAttempts) {
// try again.
+ cs.log.Infof("Failed to download block %d. %v", topBlock.Round()-basics.Round(blocksFetched), err)
cont... | 1 | // Copyright (C) 2019-2020 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) ... | 1 | 40,342 | Perhaps show attempt x of y in message ie: Failed to download block %d (attempt %d of %d). %v | algorand-go-algorand | go |
@@ -94,8 +94,7 @@ public class PrivateTransactionHandler {
}
}
- public String getPrivacyGroup(final String key, final PrivateTransaction privateTransaction)
- throws Exception {
+ public String getPrivacyGroup(final String key, final PrivateTransaction privateTransaction) {
if (privateTransaction... | 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 | 20,427 | why did you took `Exception` out? Is this method only throwing runtime exceptions? | hyperledger-besu | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.