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 |
|---|---|---|---|---|---|---|---|
@@ -66,6 +66,7 @@ type OnewayOutbound interface {
// Outbounds encapsulates outbound types for a service
type Outbounds struct {
- Unary UnaryOutbound
- Oneway OnewayOutbound
+ ServiceName string
+ Unary UnaryOutbound
+ Oneway OnewayOutbound
} | 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 | 12,304 | We definitely want some detailed and thoughtful docs being added to this type. | yarpc-yarpc-go | go |
@@ -467,7 +467,7 @@ func NewIntDataplaneDriver(config Config) *InternalDataplane {
}
// TODO Integrate XDP and BPF infra.
- if !config.BPFEnabled && dp.xdpState == nil {
+ if !config.BPFEnabled && config.XDPEnabled && dp.xdpState == nil {
xdpState, err := NewXDPState(config.XDPAllowGeneric)
if err == nil {
... | 1 | // Copyright (c) 2020-2021 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... | 1 | 19,174 | We would like this code to run, even when `config.XDPEnabled` is false, so that Felix can clean up its own XDP state after a restart. | projectcalico-felix | go |
@@ -25,6 +25,18 @@ DEFINE_int32(clean_wal_interval_secs, 600, "inerval to trigger clean expired wal
namespace nebula {
namespace kvstore {
+#define SPACE_EXIST_RETURN_IF_ERROR(...) \
+ do { ... | 1 | /* Copyright (c) 2018 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "base/Base.h"
#include "kvstore/NebulaStore.h"
#include <folly/Likely.h>
#include <algorithm>
#include <cstdint... | 1 | 29,835 | If the status is `ERR_SPACE_NOT_FOUND` why return `SUCCEEDED` ? | vesoft-inc-nebula | cpp |
@@ -17,6 +17,8 @@ class ResLayer(nn.Sequential):
Default: None
norm_cfg (dict): dictionary to construct and config norm layer.
Default: dict(type='BN')
+ reverse (bool): Reverse the order of planes in layer sequence.
+ False for ResNet, True for Houglass. Default: Fa... | 1 | from mmcv.cnn import build_conv_layer, build_norm_layer
from torch import nn as nn
class ResLayer(nn.Sequential):
"""ResLayer to build ResNet style backbone.
Args:
block (nn.Module): block used to build ResLayer.
inplanes (int): inplanes of block.
planes (int): planes of block.
... | 1 | 19,760 | It is is more appropriate to use `downsample_first`. If `downsample_first=True`, the downsample block is the first block and it is used for ResNet. If `downsample_first=False`, the downsample block is the last block, which is used by Hourglass network. | open-mmlab-mmdetection | py |
@@ -198,6 +198,10 @@ class Driver extends webdriver.WebDriver {
* @return {!Driver} A new driver instance.
*/
static createSession(options, service = getDefaultService()) {
+ if (!service) {
+ service = getDefaultService();
+ }
+
let client = service.start().then(url => new http.HttpClien... | 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 | 15,395 | Would you mind removing the default parameter above? (I doubt I'll ever use defaults again since you still have to protect against callers explicitly passing `null` or `undefined`) | SeleniumHQ-selenium | java |
@@ -273,6 +273,11 @@ class RefactoringChecker(checkers.BaseTokenChecker):
"consider using the list, dict or set constructor. "
"It is faster and simpler.",
),
+ "R1722": (
+ "Consider using sys.exit()",
+ "consider-using-sys-exit",
+ "Instead of... | 1 | # -*- coding: utf-8 -*-
# Copyright (c) 2016-2018 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2016-2017 Łukasz Rogalski <rogalski.91@gmail.com>
# Copyright (c) 2016 Moises Lopez <moylop260@vauxoo.com>
# Copyright (c) 2016 Alexander Todorov <atodorov@otb.bg>
# Copyright (c) 2017-2018 hippo91 <guillaume.peillex@... | 1 | 11,332 | I don't know if there are strict conventions about this, but I think the name of the warning should be the diagnosis, not the suggested course of action. In this case, that would mean changing the name of the warning to `interactive-exit` or something like that. | PyCQA-pylint | py |
@@ -315,7 +315,7 @@ func (c *controller) certificateRequiresIssuance(ctx context.Context, log logr.L
}
// validate the common name is correct
- expectedCN := pki.CommonNameForCertificate(crt)
+ expectedCN := crt.Spec.CommonName
if expectedCN != cert.Subject.CommonName {
log.Info("certificate common name is n... | 1 | /*
Copyright 2019 The Jetstack cert-manager 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | 1 | 18,980 | If `crt.Spec.CommonName` is not set, and `cert.Subject.CommonName` *is* set, we are not correctly handling it here. | jetstack-cert-manager | go |
@@ -23,8 +23,15 @@ import pytest
from PyQt5.QtCore import Qt
from qutebrowser.mainwindow import prompt as promptmod
-from qutebrowser.utils import usertypes
-
+from qutebrowser.utils import usertypes, objreg
+from qutebrowser.misc import cmdhistory
+
+@pytest.fixture(autouse=True)
+def test_init(fake_save_manager, ... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2021 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 | 26,397 | This isn't a test, so it shouldn't be named `test_init`. You could name it `cmdhistory_init` or so. | qutebrowser-qutebrowser | py |
@@ -292,6 +292,10 @@ class PySparkTask(SparkSubmitTask):
if self.deploy_mode == "cluster":
return [self.run_pickle]
+ @property
+ def pickle_protocol(self):
+ return configuration.get_config().getint(self.spark_version, "pickle-protocol", pickle.DEFAULT_PROTOCOL)
+
def setup(se... | 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,931 | why is this pulling from `self.spark_version` config section rather than the `spark` config section (`py-packages` appears to pull from a config section called `spark`) | spotify-luigi | py |
@@ -31,6 +31,18 @@ func TestDefaultOptions(t *testing.T) {
}
}
+func TestOptions_RandomPort(t *testing.T) {
+ opts := &Options{
+ Port: RANDOM_PORT,
+ }
+ processOptions(opts)
+
+ if opts.Port != 0 {
+ t.Fatalf("Process of options should have resolved random port to "+
+ "zero.\nexpected: %d\ngot: %d\n", 0, op... | 1 | // Copyright 2013-2014 Apcera Inc. All rights reserved.
package server
import (
"reflect"
"testing"
"time"
)
func TestDefaultOptions(t *testing.T) {
golden := &Options{
Host: DEFAULT_HOST,
Port: DEFAULT_PORT,
MaxConn: DEFAULT_MAX_CONNECTIONS,
PingInterval: DEF... | 1 | 5,977 | nit: Think it can be one line.. | nats-io-nats-server | go |
@@ -12,10 +12,7 @@
*/
package org.camunda.bpm.application;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.ServiceLoader;
+import java.util.*;
import java.util.concurrent.Callable;
import javax.script.ScriptEngine; | 1 | /* 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, software
* distributed... | 1 | 8,992 | please inline imports | camunda-camunda-bpm-platform | java |
@@ -85,8 +85,7 @@ func (p *setnsProcess) start() (err error) {
if err = p.execSetns(); err != nil {
return newSystemErrorWithCause(err, "executing setns process")
}
- // We can't join cgroups if we're in a rootless container.
- if !p.config.Rootless && len(p.cgroupPaths) > 0 {
+ if len(p.cgroupPaths) > 0 {
if... | 1 | // +build linux
package libcontainer
import (
"encoding/json"
"errors"
"fmt"
"io"
"os"
"os/exec"
"path/filepath"
"strconv"
"syscall" // only for Signal
"github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runc/libcontainer/... | 1 | 15,148 | This check is still correct in some cases, but I guess erroring out is acceptable if someone explicitly asked for an impossible cgroup configuration (now that we could in principle nest things). I would like to see a test for this though. | opencontainers-runc | go |
@@ -34,6 +34,7 @@ var skip = map[string]string{
"task_per_line": "join produces inconsistent/racy results when table schemas do not match (https://github.com/influxdata/flux/issues/855)",
"rowfn_with_import": "imported libraries are not visible in user-defined functions (https://github.com/i... | 1 | package stdlib_test
import (
"bytes"
"context"
"strings"
"testing"
"github.com/influxdata/flux"
"github.com/influxdata/flux/ast"
"github.com/influxdata/flux/execute"
"github.com/influxdata/flux/lang"
"github.com/influxdata/flux/querytest"
"github.com/influxdata/flux/stdlib"
)
func init() {
flux.FinalizeBu... | 1 | 10,063 | Should we update integral to operate on a single column as well? | influxdata-flux | go |
@@ -91,7 +91,9 @@ static std::atomic<int> num_uvm_allocations(0);
} // namespace
void DeepCopyCuda(void *dst, const void *src, size_t n) {
- KOKKOS_IMPL_CUDA_SAFE_CALL(cudaMemcpy(dst, src, n, cudaMemcpyDefault));
+ cudaStream_t s = cuda_get_deep_copy_stream();
+ KOKKOS_IMPL_CUDA_SAFE_CALL(
+ cudaMemcpyAsyn... | 1 | /*
//@HEADER
// ************************************************************************
//
// Kokkos v. 3.0
// Copyright (2020) National Technology & Engineering
// Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Govern... | 1 | 31,205 | Doesn't belong to this PR | kokkos-kokkos | cpp |
@@ -26,7 +26,7 @@ type ECSClient interface {
// ContainerInstanceARN if successful. Supplying a non-empty container
// instance ARN allows a container instance to update its registered
// resources.
- RegisterContainerInstance(existingContainerInstanceArn string, attributes []*ecs.Attribute) (string, error)
+ Reg... | 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 | 20,883 | Just for my own understanding, does aws ecs API take this token as a new input attribute? Which version of the aws sdk? I did not find it in the official aws sdk doc. | aws-amazon-ecs-agent | go |
@@ -68,6 +68,7 @@ public class UserAccount {
private static final String TAG = "UserAccount";
private static final String FORWARD_SLASH = "/";
private static final String UNDERSCORE = "_";
+ private static final String SF_APP_FEATURE_CODE_USER_AUTH = "UA";
private String authToken;
private String refreshTok... | 1 | /*
* Copyright (c) 2014-present, salesforce.com, inc.
* All rights reserved.
* Redistribution and use of this software 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 noti... | 1 | 15,653 | Could we shorten this constant to maybe `FEATURE_USER_AUTH`? | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -14,6 +14,10 @@ import (
"golang.org/x/net/context"
)
+const (
+ numRekeyWorkers = 8
+)
+
type rekeyQueueEntry struct {
id tlf.ID
ch chan error | 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 (
"sync"
"github.com/keybase/client/go/logger"
"github.com/keybase/kbfs/kbfssync"
"github.com/keybase/kbfs/tlf"
"golang.org/x/net/context"... | 1 | 15,419 | Any particular reason for 8? I feel like we could probably handle more... | keybase-kbfs | go |
@@ -91,6 +91,13 @@ class CodeSetAdminTest < ActionDispatch::IntegrationTest
assert_response :redirect
end
+ it 'should update retry_count' do
+ login_as admin
+ job = create(:fetch_job, repository: create(:repository))
+ put admin_job_path(job), job: { retry_count: 3 }
+ job.reload.retry_count.mu... | 1 | require 'test_helper'
class CodeSetAdminTest < ActionDispatch::IntegrationTest
let(:admin) { create(:admin, password: TEST_PASSWORD) }
it 'mark_as_failed should work' do
job = create(:sloc_job, repository: create(:repository, best_code_set: create(:code_set)))
login_as admin
get mark_as_failed_admin_... | 1 | 8,634 | Try to use factory association declaration for default values, so it could minimal the line length. You may write in fetch_job factory like association :repository, factory: :repository. | blackducksoftware-ohloh-ui | rb |
@@ -1,7 +1,7 @@
<tr class="m-shared-email_status">
<td colspan="2" padding="10">
<table id="status-container-detail" width="770" class="col-md-12">
- <tr class="status-header-container">
+ <tr class="status-header-container cancelled">
<td>
<strong>Approval Status</strong>
... | 1 | <tr class="m-shared-email_status">
<td colspan="2" padding="10">
<table id="status-container-detail" width="770" class="col-md-12">
<tr class="status-header-container">
<td>
<strong>Approval Status</strong>
</td>
<td class="status-header">
<%= status_icon_tag(@pro... | 1 | 13,380 | Should the "cancelled" class be added regardless of the proposal's state? | 18F-C2 | rb |
@@ -115,7 +115,6 @@ const validOptions = require('./operations/mongo_client_ops').validOptions;
*/
function MongoClient(url, options) {
if (!(this instanceof MongoClient)) return new MongoClient(url, options);
-
// Set up event emitter
EventEmitter.call(this);
| 1 | 'use strict';
const ChangeStream = require('./change_stream');
const Db = require('./db');
const EventEmitter = require('events').EventEmitter;
const executeOperation = require('./utils').executeOperation;
const handleCallback = require('./utils').handleCallback;
const inherits = require('util').inherits;
const MongoE... | 1 | 14,541 | nit: random whitespace change, let's try to keep these out of commits unless there are other useful changes. | mongodb-node-mongodb-native | js |
@@ -624,9 +624,15 @@ exports.populate = function populate(path, select, model, match, options, subPop
var ret = [];
var paths = path.split(' ');
+ var models = undefined;
+ if (typeof model === 'string') {
+ models = model.split(' ');
+ }
options = exports.clone(options, { retainKeyOrder: true });
f... | 1 | /*!
* Module dependencies.
*/
var ObjectId = require('./types/objectid');
var cloneRegExp = require('regexp-clone');
var sliced = require('sliced');
var mpath = require('mpath');
var ms = require('ms');
var MongooseBuffer;
var MongooseArray;
var Document;
/*!
* Produces a collection name from model `name`.
*
* @... | 1 | 13,376 | Seems kinda dangerous - what if models length is different from paths length? | Automattic-mongoose | js |
@@ -412,7 +412,7 @@ func stageSenders(db kv.RwDB, ctx context.Context) error {
s := stage(sync, tx, nil, stages.Senders)
log.Info("Stage", "name", s.ID, "progress", s.BlockNumber)
- cfg := stagedsync.StageSendersCfg(db, chainConfig, tmpdir)
+ cfg := stagedsync.StageSendersCfg(db, chainConfig, tmpdir, prune.Mode{}... | 1 | package commands
import (
"context"
"fmt"
"path"
"sort"
"strings"
"github.com/c2h5oh/datasize"
"github.com/ledgerwatch/erigon-lib/kv"
"github.com/ledgerwatch/erigon/cmd/sentry/download"
"github.com/ledgerwatch/erigon/cmd/utils"
"github.com/ledgerwatch/erigon/common"
"github.com/ledgerwatch/erigon/common/et... | 1 | 22,525 | set real one plz (get it from DB). | ledgerwatch-erigon | go |
@@ -180,8 +180,9 @@ static fpga_result send_uafu_event_request(fpga_handle handle,
struct _fpga_handle *_handle = (struct _fpga_handle *)handle;
struct fpga_port_info port_info = {.argsz = sizeof(port_info),
.flags = 0 };
- struct fpga_port_uafu_irq_set uafu_irq = {.argsz = sizeof(uafu_irq),
- .flags =... | 1 | // Copyright(c) 2017, Intel Corporation
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the ... | 1 | 15,891 | Should this be initialized to zeroes? | OPAE-opae-sdk | c |
@@ -419,7 +419,7 @@ public abstract class FacetProcessor<FacetRequestT extends FacetRequest> {
}
count = result.size(); // don't really need this if we are skipping, but it's free.
} else {
- if (q == null) {
+ if (q == null || fcontext.base.size() == 0) {
count = fcontext.base.s... | 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 | 38,754 | The query is already built at this point, so I don't think this particular change actually helps wrt SOLR-10732? (and the `base.size()==0` case is already trivially optimized in `SolrIndexSearcher.numDocs(Query, DocSet)`) | apache-lucene-solr | java |
@@ -1,16 +1,14 @@
-
package net.runelite.client.plugins.wildernesslocations;
+
import java.util.Arrays;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import java.util.Objects;
-import java.util.Set;
-import java.util.function.Consumer;
import javax.inject.Inject;
+
+import lombok.Gette... | 1 |
package net.runelite.client.plugins.wildernesslocations;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.function.Consumer;
import javax.inject.Inject;
import net.runelite.api.Client;
import net.runelite.a... | 1 | 14,758 | re-add the type in the annotation here | open-osrs-runelite | java |
@@ -226,9 +226,11 @@ func GetLatestVersion() (string, error) {
//Download the tar from repo
versionURL := "curl -k " + latestReleaseVersionURL
cmd := exec.Command("sh", "-c", versionURL)
+ var stderr bytes.Buffer
+ cmd.Stderr = &stderr
latestReleaseData, err := cmd.Output()
if err != nil {
- return "", err
+... | 1 | /*
Copyright 2019 The KubeEdge 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, so... | 1 | 16,411 | Could we simpify it as `cmd.Stderr = &bytes.Buffer{}`? | kubeedge-kubeedge | go |
@@ -13,6 +13,11 @@ func ShouldRotateX509(now time.Time, cert *x509.Certificate) bool {
return shouldRotate(now, cert.NotBefore, cert.NotAfter)
}
+// X509Expired returns true if the given X509 cert has expired
+func X509Expired(now time.Time, cert *x509.Certificate) bool {
+ return !now.Before(cert.NotAfter)
+}
+
... | 1 | package rotationutil
import (
"crypto/x509"
"time"
"github.com/spiffe/spire/pkg/agent/client"
)
// ShouldRotateX509 determines if a given SVID should be rotated, based
// on presented current time, and the certificate's expiration.
func ShouldRotateX509(now time.Time, cert *x509.Certificate) bool {
return should... | 1 | 13,665 | there's enough "nots" in here that while it's correct by my review, I'd like to see a small unit test (just passing in an expired and non-expired cert) | spiffe-spire | go |
@@ -21,7 +21,7 @@ import (
"github.com/ghodss/yaml"
- "istio.io/fortio/log"
+ "fortio.org/fortio/log"
"istio.io/tools/isotope/convert/pkg/graph"
"istio.io/tools/isotope/convert/pkg/graph/size"
"istio.io/tools/isotope/convert/pkg/graph/svc" | 1 | // Copyright 2018 Istio Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this currentFile 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 | 6,767 | File is not `goimports`-ed (from `goimports`) | istio-tools | go |
@@ -73,6 +73,11 @@ class Config(param.ParameterizedFunction):
recommended that users switch this on to update any uses of
__call__ as it will be deprecated in future.""")
+ rtol = param.Number(default=10e-6, doc="""
+ The tolerance used to enforce regular sampling for gridded data
+ where... | 1 | import os, sys, warnings, operator
import time
import types
import numbers
import inspect
import itertools
import string, fnmatch
import unicodedata
import datetime as dt
from collections import defaultdict
from functools import partial
from contextlib import contextmanager
from distutils.version import LooseVersion
f... | 1 | 20,050 | The config option should probably have a more specific name. Also it's not for all gridded data but specifically for Images (and its subclasses). | holoviz-holoviews | py |
@@ -80,7 +80,7 @@ public class PreferencesTest {
}
clickPreference(R.string.user_interface_label);
clickPreference(R.string.pref_set_theme_title);
- onView(withText(otherTheme)).perform(click());
+ clickPreference(otherTheme);
Awaitility.await().atMost(1000, MILLISECOND... | 1 | package de.test.antennapod.ui;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.preference.PreferenceManager;
import androidx.annotation.StringRes;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;
import com... | 1 | 15,614 | Be careful. This is not a preference but an option in a dialog. | AntennaPod-AntennaPod | java |
@@ -30,8 +30,11 @@ func (s *svc) DescribeDeployment(ctx context.Context, clientset, cluster, namesp
}
func ProtoForDeployment(cluster string, deployment *appsv1.Deployment) *k8sapiv1.Deployment {
+ if deployment.ClusterName == "" {
+ deployment.ClusterName = cluster
+ }
return &k8sapiv1.Deployment{
- Cluster: ... | 1 | package k8s
import (
"context"
"encoding/json"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/strategicpatch"
"k8s.io/client-go/util/retry"
appsv1 "k8s.io/api/apps/v1"
k8sapiv1 "github.com/lyft/clutch/backend/api/k8s/v1"
)
func (s *svc) DescribeD... | 1 | 8,299 | this will modify the incoming object, which may not be desirable in some cases. i think we should stick with the local var, override it with deployment.ClusterName if deployment.ClusterName not empty | lyft-clutch | go |
@@ -156,7 +156,6 @@ test.suite(
await driver.get(fileServer.Pages.basicAuth)
let source = await driver.getPageSource()
assert.strictEqual(source.includes('Access granted!'), true)
- await server.stop()
})
})
| 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,850 | Is this not required? | SeleniumHQ-selenium | rb |
@@ -121,8 +121,13 @@ Blockly.BlockSvg.INLINE = -1;
*/
Blockly.BlockSvg.prototype.initSvg = function() {
goog.asserts.assert(this.workspace.rendered, 'Workspace is headless.');
+ // "Input shapes" for each input. Used to draw "holes" for unoccupied value inputs.
+ this.inputShapes_ = {};
for (var i = 0, input... | 1 | /**
* @license
* Visual Blocks Editor
*
* Copyright 2012 Google Inc.
* https://developers.google.com/blockly/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apach... | 1 | 7,820 | You're using scare quotes on these terms instead of defining them. | LLK-scratch-blocks | js |
@@ -13,6 +13,9 @@ var DdevVersion = "v0.3.0-dev" // Note that this is overridden by make
// for examples defining version constraints.
var DockerVersionConstraint = ">= 17.05.0-ce"
+// DockerComposeVersionConstraint is the current minimum version of docker-compose required for ddev.
+var DockerComposeVersionConstra... | 1 | package version
// VERSION is supplied with the git committish this is built from
var VERSION = ""
// IMPORTANT: These versions are overridden by version ldflags specifications VERSION_VARIABLES in the Makefile
// DdevVersion is the current version of ddev, by default the git committish (should be current git tag)
v... | 1 | 11,996 | These should both be const, not var right? | drud-ddev | go |
@@ -78,9 +78,7 @@ public class SettingsManager {
public void save() {
Settings settings = load();
- try {
- File file = new File(settingsFileName);
- OutputStream outputStream = new FileOutputStream(file);
+ try (OutputStream outputStream = new FileOutputStream(new Fi... | 1 | /*
* Copyright (C) 2015-2017 PÂRIS Quentin
*
* 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 2 of the License, or
* (at your option) any later version.
*
* This program is... | 1 | 10,008 | Can you catch a more specific exception here? Thanks :-) | PhoenicisOrg-phoenicis | java |
@@ -80,6 +80,7 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
r.Log.Error(err, "failed to recover chaos")
return ctrl.Result{Requeue: true}, nil
}
+ return ctrl.Result{}, nil
}
// Start failure action | 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 to i... | 1 | 13,076 | This is a bug during handling the recover logic in `common chaos` controller, I fixed in this request when I found it. | chaos-mesh-chaos-mesh | go |
@@ -11,7 +11,11 @@ from mmcv.runner import get_dist_info
from mmdet.core import tensor2imgs
-def single_gpu_test(model, data_loader, show=False, out_dir=None):
+def single_gpu_test(model,
+ data_loader,
+ show=False,
+ out_dir=None,
+ scor... | 1 | import os.path as osp
import pickle
import shutil
import tempfile
import mmcv
import torch
import torch.distributed as dist
from mmcv.runner import get_dist_info
from mmdet.core import tensor2imgs
def single_gpu_test(model, data_loader, show=False, out_dir=None):
model.eval()
results = []
dataset = data... | 1 | 19,399 | During testing, we adopt the score threshold specified in the config file. Here the threshold is only used for visualization, and the variable name `score_thr` can be misleading. Renaming it to `show_score_thr` would be better. | open-mmlab-mmdetection | py |
@@ -1,7 +1,7 @@
-<header class="banner" role="banner">
+<header class="banner">
<div class="container">
<a class="brand" href="<?= esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a>
- <nav role="navigation">
+ <nav class="site-nav">
<?php
if (has_nav_menu('primary_navigation')) :
... | 1 | <header class="banner" role="banner">
<div class="container">
<a class="brand" href="<?= esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a>
<nav role="navigation">
<?php
if (has_nav_menu('primary_navigation')) :
wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' =>... | 1 | 9,174 | can you make this `nav-primary` please? i'd like to roll with this since the `<ul>` class is `nav`, and primary is the name of the navigation menu | roots-sage | php |
@@ -49,7 +49,16 @@ app.factory('CalendarListItem', function($rootScope, $window, Calendar, WebCal,
},
publicSharingURL: {
get: () => {
- return $rootScope.root + 'p/' + context.calendar.publicToken;
+ let displayname = context.calendar.displayname
+ .replace(/\s+/g, '-').replace(/[^\w\-]+/g, '... | 1 | /**
* Calendar App
*
* @author Raghu Nayyar
* @author Georg Ehrke
* @copyright 2016 Raghu Nayyar <hey@raghunayyar.com>
* @copyright 2016 Georg Ehrke <oc.list@georgehrke.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
*... | 1 | 5,998 | @georgehrke Just out of curiosity. Couldn't you combine at least the combine the regex for '-' and '' with groups? | nextcloud-calendar | js |
@@ -292,7 +292,7 @@ HashedCollectionConfig::SwiftObjectAtAddress(
if (error.Fail())
return nullptr;
- CompilerType anyObject_type = ast_ctx->FindQualifiedType("Swift.AnyObject");
+ CompilerType anyObject_type = ast_ctx->GetAnyObjectType();
if (!anyObject_type)
return nullptr;
| 1 | //===-- SwiftHashedContainer.cpp --------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | 1 | 16,996 | I think this is objectively better than looking up the object by name. As a follow-up, I'm going to see whether we do this name-based lookup somewhere else and switch to your method. | apple-swift-lldb | cpp |
@@ -81,7 +81,8 @@ Blockly.FlyoutExtensionCategoryHeader.prototype.createDom = function() {
var marginX = 15;
var marginY = 10;
- var statusButtonX = (this.flyoutWidth_ - statusButtonWidth - marginX) / this.workspace_.scale;
+ var statusButtonX = this.workspace_.RTL ? (marginX - this.flyoutWidth_ + statusButto... | 1 | /**
* @license
* Visual Blocks Editor
*
* Copyright 2018 Google Inc.
* https://developers.google.com/blockly/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apach... | 1 | 9,698 | Why are you dividing by scale in the LTR case but not the RTL case? | LLK-scratch-blocks | js |
@@ -368,6 +368,8 @@ class RemoteConnection(object):
('POST', '/session/$sessionId/window/rect'),
Command.GET_WINDOW_RECT:
('GET', '/session/$sessionId/window/rect'),
+ Command.W3C_MINIMIZE_WINDOW:
+ ('POST', '/session/$sessionId/window/minimize'),... | 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,688 | Update after command rename | SeleniumHQ-selenium | py |
@@ -61,8 +61,8 @@ export default function createLegacySettingsWrapper( moduleSlug, moduleComponent
useEffect( () => {
removeAllFilters( `googlesitekit.ModuleSettingsDetails-${ moduleSlug }` );
addFilter(
- 'googlesitekit.ModuleSettingsDetails-tagmanager',
- 'googlesitekit.TagManagerModuleSettings',
+ ... | 1 | /**
* Legacy Settings Storybook component wrapper.
*
* 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/li... | 1 | 30,644 | I added this change to fix a bug with the legacy settings wrapper which was preventing it from working properly with the other modules | google-site-kit-wp | js |
@@ -33,12 +33,15 @@ package azkaban;
public class Constants {
// Azkaban Flow Versions
- public static final String AZKABAN_FLOW_VERSION_2_0 = "2.0";
+ public static final double VERSION_2_0 = 2.0;
// Flow 2.0 file suffix
public static final String PROJECT_FILE_SUFFIX = ".project";
public static fina... | 1 | /*
* Copyright 2017 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 | 15,175 | isn't AZKABAN_FLOW_VERSION_2_0 more explicit? | azkaban-azkaban | java |
@@ -308,9 +308,7 @@ public class AccountActivity extends ThemedActivity implements AccountContract.V
/*case ONEDRIVE:
signInOneDrive();
break;*/
-
- default:
- SnackBarHandler.show(coordinatorLayout, R.string.feature_not_presen... | 1 | package org.fossasia.phimpme.accounts;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle;
import android.support.design.widget.Bott... | 1 | 12,869 | Please don't leave an empty default | fossasia-phimpme-android | java |
@@ -15,6 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
/**
* External dependencies
*/ | 1 | /**
* Utility functions.
*
* 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
*
* U... | 1 | 27,478 | This isn't directly related, but the `import React from 'react';` below should be removed. We never import this directly and any modules from it we need are imported through `@wordpress/element`. This was probably added automatically at some point, but we also provide this automatically via `ProvidePlugin`. | google-site-kit-wp | js |
@@ -84,7 +84,9 @@ module Travis
sh.cmd 'sudo chmod 2777 /usr/local/lib/R /usr/local/lib/R/site-library'
when 'osx'
- sh.cmd 'brew update', retry: true
+ # We want to update, but we don't need the 800+ lines of
+ # output.
+ sh.cmd 'brew update >/dev/... | 1 | module Travis
module Build
class Script
class R < Script
DEFAULTS = {
# Basic config options
cran: 'http://cran.rstudio.com',
warnings_are_errors: false,
# Dependencies (installed in this order)
apt_packages: [],
brew_packages: [],
... | 1 | 12,955 | You can also use `echo: false` instead. Either is fine; I'm just pointing it out. | travis-ci-travis-build | rb |
@@ -115,12 +115,13 @@ namespace NLog.Layouts
/// </summary>
protected override void InitializeLayout()
{
- base.InitializeLayout();
if (!WithHeader)
{
Header = null;
}
+ base.InitializeLayout();
+
swi... | 1 | //
// Copyright (c) 2004-2018 Jaroslaw Kowalski <jaak@jkowalski.net>, Kim Christensen, Julian Verdurmen
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//
// * Redistributions of s... | 1 | 17,693 | what's the reason for this moved line? | NLog-NLog | .cs |
@@ -986,6 +986,10 @@ import 'programStyles';
lines = [];
}
+ if (overlayText && showTitle) {
+ lines = [item.Name];
+ }
+
const addRightTextMargin = isOuterFooter && options.cardLayout && !options.centerText && options.cardFooterAside !==... | 1 | /* eslint-disable indent */
/**
* Module for building cards from item data.
* @module components/cardBuilder/cardBuilder
*/
import datetime from 'datetime';
import imageLoader from 'imageLoader';
import connectionManager from 'connectionManager';
import itemHelper from 'itemHelper';
import focusManager from 'focus... | 1 | 17,438 | I don't really follow what is happening here, but it looks like this _could_ conflict with the logic on the lines above... should this be an `else if`? | jellyfin-jellyfin-web | js |
@@ -97,10 +97,10 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Navigation
out int startLineNumber,
out int endLineNumber)
{
- var startPoint = methodDebugDefinition.GetSequencePoints().OrderBy(s => s.StartLine).FirstOrDefault();
+ var startPoint = ... | 1 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Navigation
{
#if !NET46
using System;
using System.IO;
using System.Linq;
using S... | 1 | 11,536 | `s => s.IsHidden == false` What's the purpose of adding this? | microsoft-vstest | .cs |
@@ -45,6 +45,7 @@ const (
optionNameGatewayMode = "gateway-mode"
optionNameClefSignerEnable = "clef-signer-enable"
optionNameClefSignerEndpoint = "clef-signer-endpoint"
+ optionNameClefSignerAddress = "clef-signer-address"
optionNameSwapEndpoint = "swap-endpoint"
optionNameSwapFactor... | 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 cmd
import (
"errors"
"fmt"
"os"
"path/filepath"
"strings"
"github.com/ethersphere/bee/pkg/swarm"
"github.com/spf13/cobra"
"github.com/spf1... | 1 | 14,003 | I would name this `clef-ethereum-address`. We already have a bunch of addresses in Bee, and people might wrongly think that this is yet another address | ethersphere-bee | go |
@@ -202,6 +202,7 @@ class TestCase(unittest.TestCase):
# ofile.write(mb)
# ofile.close()
+ #@unittest.skip
def test6ChangeBondLength(self):
m = Chem.MolFromSmiles('CC')
rdDepictor.Compute2DCoords(m) | 1 | # Automatically adapted for numpy.oldnumeric Jun 27, 2008 by -c
#
# $Id: testDepictor.py 2112 2012-07-02 09:47:45Z glandrum $
#
# pylint:disable=E1101,C0111,C0103,R0904
import unittest
import os
import sys
import numpy as np
from rdkit import Chem
from rdkit.Chem import rdDepictor
from rdkit import Geometry
from rdk... | 1 | 22,621 | you can just remove this | rdkit-rdkit | cpp |
@@ -297,6 +297,13 @@ func buildUpgradeTask(kind, name, openebsNamespace string) *apis.UpgradeTask {
PoolName: name,
},
}
+ case "storagePoolClaim":
+ utaskObj.Name = "upgrade-cstor-pool-" + name
+ utaskObj.Spec.ResourceSpec = apis.ResourceSpec{
+ StoragePoolClaim: &apis.StoragePoolClaim{
+ SPCName: n... | 1 | /*
Copyright 2019 The OpenEBS Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, soft... | 1 | 17,611 | I think we should avoid creating a dummy CR in the case of SPC. Please see if we can avoid this since we will not be patching anything in this CR. | openebs-maya | go |
@@ -7,6 +7,10 @@
<%= render 'trails' %>
</section>
+<% if locked_features.any? %>
+ <%= render 'locked_features' %>
+<% end %>
+
<% if current_user_has_access_to?(:exercises) %>
<p class="product-headline">Hone your skills by completing these exercises</p>
<%= render 'products/exercises' %> | 1 | <%= render 'mentor_info' %>
<section class='resources'>
<%= render 'learn_repo' %>
<%= render 'learn_live' %>
<%= render 'forum' %>
<%= render 'trails' %>
</section>
<% if current_user_has_access_to?(:exercises) %>
<p class="product-headline">Hone your skills by completing these exercises</p>
<%= render '... | 1 | 10,049 | Honestly not sure myself, but do you think it makes sense to move this conditional into the partial? | thoughtbot-upcase | rb |
@@ -70,7 +70,7 @@ def run(args):
sys.exit(usertypes.Exit.ok)
if args.temp_basedir:
- args.basedir = tempfile.mkdtemp()
+ args.basedir = tempfile.mkdtemp(prefix='qutebrowser-prefix-')
quitter = Quitter(args)
objreg.register('quitter', quitter) | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 12,987 | As discussed in IRC (just so it doesn't get lost): This probably should be `-basedir-`, not `-prefix-` | qutebrowser-qutebrowser | py |
@@ -40,7 +40,8 @@ namespace Nethermind.Db
public DbOnTheRocks(string basePath, string dbPath, IDbConfig dbConfig, ILogManager logManager = null) // TODO: check column families
{
- var fullPath = Path.Combine(basePath, dbPath);
+ var directory = PathUtils.GetExecutingDirectory()... | 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 th... | 1 | 22,664 | basepath can be absoluta path and this needs to be supported | NethermindEth-nethermind | .cs |
@@ -280,7 +280,7 @@ void ConfigPanelWidget::updateIconThemeSettings()
void ConfigPanelWidget::addPosition(const QString& name, int screen, LXQtPanel::Position position)
{
if (LXQtPanel::canPlacedOn(screen, position))
- ui->comboBox_position->addItem(name, QVariant::fromValue((ScreenPosition){screen, posit... | 1 | /* BEGIN_COMMON_COPYRIGHT_HEADER
* (c)LGPL2+
*
* LXQt - a lightweight, Qt based, desktop toolset
* https://lxqt.org
*
* Copyright: 2010-2011 Razor team
* Authors:
* Marat "Morion" Talipov <morion.self@gmail.com>
*
* This program or library is free software; you can redistribute it
* and/or modify it under ... | 1 | 6,381 | Didn't get to the commit message | lxqt-lxqt-panel | cpp |
@@ -0,0 +1,14 @@
+class DesignForDevelopersResourcesController < ApplicationController
+ layout "d4d_resources"
+
+ def index
+ end
+
+ def show
+ if template_exists?(params[:id], params[:controller])
+ render params[:id]
+ else
+ raise ActiveRecord::RecordNotFound
+ end
+ end
+end | 1 | 1 | 6,669 | What about raising `ActionView::MissingTemplate` instead? That's what HighVoltage does. | thoughtbot-upcase | rb | |
@@ -527,6 +527,7 @@ void nano::json_handler::account_balance ()
auto balance (node.balance_pending (account, include_only_confirmed));
response_l.put ("balance", balance.first.convert_to<std::string> ());
response_l.put ("pending", balance.second.convert_to<std::string> ());
+ response_l.put ("receivable", ba... | 1 | #include <nano/lib/config.hpp>
#include <nano/lib/json_error_response.hpp>
#include <nano/lib/timer.hpp>
#include <nano/node/bootstrap/bootstrap_lazy.hpp>
#include <nano/node/common.hpp>
#include <nano/node/election.hpp>
#include <nano/node/json_handler.hpp>
#include <nano/node/node.hpp>
#include <nano/node/node_rpc_co... | 1 | 16,871 | Is it kept for compatibility? | nanocurrency-nano-node | cpp |
@@ -537,10 +537,16 @@ func (m *StorageMinerNodeConnector) getMinerWorkerAddress(ctx context.Context, t
return address.Undef, xerrors.Errorf("failed to get tip state: %w", err)
}
- _, waddr, err := m.stateViewer.StateView(root).MinerControlAddresses(ctx, m.minerAddr)
+ view := m.stateViewer.StateView(root)
+ _, w... | 1 | package storageminerconnector
import (
"context"
"errors"
"github.com/filecoin-project/go-address"
storagenode "github.com/filecoin-project/go-storage-miner/apis/node"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/specs-actors/actors/builtin"
"github.com/filecoin-project/sp... | 1 | 23,158 | I would find it pretty reasonable to add a MinerSigner method on the state view that puts these together. | filecoin-project-venus | go |
@@ -310,6 +310,10 @@ class DBUpgrader {
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEEDS +
" ADD COLUMN " + PodDBAdapter.KEY_FEED_SKIP_ENDING + " INTEGER DEFAULT 0;");
}
+ if (oldVersion < 1090001) { // fixme / todo: fix version
+ db.execSQL("ALTER ... | 1 | package de.danoeh.antennapod.core.storage;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.media.MediaMetadataRetriever;
import android.util.Log;
import de.danoeh.antennapod.core.feed.FeedItem;
import static de.danoeh.antennapod.core... | 1 | 17,657 | It's stored in `PodDBAdapter.VERSION`. I usually use the expected release version code for that change. As this will be released in AntennaPod 2.2.0, the code would be `2020000`. | AntennaPod-AntennaPod | java |
@@ -150,7 +150,7 @@ func (task *UpdateTask) execCQLStmts(ver string, stmts []string) error {
log.Println(rmspaceRegex.ReplaceAllString(stmt, " "))
e := task.db.Exec(stmt)
if e != nil {
- return fmt.Errorf("error executing CQL statement:%v", e)
+ return fmt.Errorf("error executing statement:%v", e)
}
}... | 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,578 | What about method name itself? Do we run this for SQL too? | temporalio-temporal | go |
@@ -42,7 +42,7 @@ public class SalesforceHybridTestActivity extends SalesforceDroidGapActivity {
static String refreshToken = "5Aep861KIwKdekr90IDidO4EhfJiYo3fzEvTvsEgM9sfDpGX0qFFeQzHG2mZeUH_.XNSBE0Iz38fnWsyYYkUgTz";
static String authToken = "--will-be-set-through-refresh--";
static String identityUrl = "https:/... | 1 | /*
* Copyright (c) 2013, salesforce.com, inc.
* All rights reserved.
* Redistribution and use of this software 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... | 1 | 15,597 | `instanceUrl` should be `cs1.salesforce.com`. `communityUrl` would be `mobilesdk.cs1.my.salesforce.com`. | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -200,7 +200,10 @@ adios2_error adios2_variable_name(char *name, size_t *size,
const adios2::core::VariableBase *variableBase =
reinterpret_cast<const adios2::core::VariableBase *>(variable);
*size = variableBase->m_Name.size();
- variableBase->m_Name.copy(name, *size);
+ ... | 1 | /*
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* adios2_c_variable.cpp
*
* Created on: Nov 10, 2017
* Author: William F Godoy godoywf@ornl.gov
*/
#include "adios2_c_variable.h"
#include "adios2/core/Variable.h"
#include "adios2/... | 1 | 12,497 | Let's use `if(name != nullptr)` to remove ambiguity | ornladios-ADIOS2 | cpp |
@@ -1027,4 +1027,12 @@ public class SurfaceNamer extends NameFormatterDelegator {
public String getReleaseAnnotation(ReleaseLevel releaseLevel) {
return getNotImplementedString("SurfaceNamer.getReleaseAnnotation");
}
+
+ public String getMetadataIdentifier() {
+ return getNotImplementedString("SurfaceNam... | 1 | /* Copyright 2016 Google Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 1 | 20,233 | I wonder if it would make sense to have a separate namer for metadata? Metadata files tend to be expressed in a different language from the repo language, and have mutually exclusive concepts. So, `PackageMetadataNamer`. | googleapis-gapic-generator | java |
@@ -37,6 +37,15 @@ import org.apache.logging.log4j.Logger;
public class BftValidatorsValidationRule implements AttachedBlockHeaderValidationRule {
private static final Logger LOGGER = LogManager.getLogger();
+ private final boolean extraDataValidatorsAndVoteMustBeEmpty;
+
+ public BftValidatorsValidationRule() ... | 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 | 25,695 | This rule is quite specific to qbft and so I don't think it should be part of the common rules. Would rather the common bft code didn't know anything about contract based voting/validator governance. | hyperledger-besu | java |
@@ -163,6 +163,15 @@ public interface Set<T> extends Traversable<T>, Function1<T, Boolean>, Serializa
*/
Set<T> removeAll(Iterable<? extends T> elements);
+ /**
+ * Reverse the order of all given elements in this set, if present.
+ *
+ * @return A new set consisting of the elements in revers... | 1 | /* ____ ______________ ________________________ __________
* \ \/ / \ \/ / __/ / \ \/ / \
* \______/___/\___\______/___/_____/___/\___\______/___/\___\
*
* Copyright 2019 Vavr, http://vavr.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use ... | 1 | 13,338 | This makes our life harder than it needs to be. A Set is unordered by definition. Please remove this method from Set and add it to SortedSet, but with no default implementation. We need to duplicate it then to LinkedHashSet but that's ok, it is the best we can do. Could you please add it also to SortedMap and LinkedHas... | vavr-io-vavr | java |
@@ -366,6 +366,10 @@ class S3Connection(AWSAuthConnection):
if version_id is not None:
params['VersionId'] = version_id
+ if response_headers is not None:
+ for header, value in response_headers.items():
+ params[header] = value
+
http_request = self.bui... | 1 | # Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation file... | 1 | 11,454 | we can replace `for` with `params.update(response_headers)` | boto-boto | py |
@@ -118,13 +118,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Https
return certificate2;
}
-#if NETSTANDARD1_3
- // conversion X509Certificate to X509Certificate2 not supported
- // https://github.com/dotnet/corefx/issues/4510
return null;
-#else
-... | 1 | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.IO;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
using Micro... | 1 | 13,130 | Any chance this is available in .NET Core 2.0 now? | aspnet-KestrelHttpServer | .cs |
@@ -8,16 +8,15 @@ package blocksync
import (
"context"
- "net"
"github.com/golang/protobuf/proto"
+ peerstore "github.com/libp2p/go-libp2p-peerstore"
"go.uber.org/zap"
"github.com/iotexproject/iotex-core/actpool"
"github.com/iotexproject/iotex-core/blockchain"
"github.com/iotexproject/iotex-core/bloc... | 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 | 14,598 | I wonder if it's necessary to let app pass in the context. What app level context should be sent? If no, is it enough for p2p agent to compose a context with network info there? | iotexproject-iotex-core | go |
@@ -26,8 +26,11 @@
#define LBANN_INPUT_LAYER_INSTANTIATE
#include "lbann/layers/io/input_layer.hpp"
-#include "lbann/utils/profiling.hpp"
+
#include "lbann/callbacks/imcomm.hpp"
+#include "lbann/execution_contexts/execution_context.hpp"
+#include "lbann/execution_contexts/sgd_execution_context.hpp"
+#include "lban... | 1 | ////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2014-2019, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory.
// Written by the LBANN Research Team (B. Van Essen, et al.) listed in
// the CONTRIBUTORS file. <lbann-dev@l... | 1 | 16,159 | Why do we need both includes here? | LLNL-lbann | cpp |
@@ -600,7 +600,7 @@ public class SmartStore {
List<String> soupNames = new ArrayList<String>();
Cursor cursor = null;
try {
- cursor = DBHelper.getInstance(db).query(db, SOUP_NAMES_TABLE, new String[]{SOUP_NAME_COL}, null, null, null);
+ cursor = DBHelper.getInstance(db).query(db, SOUP_NAMES... | 1 | /*
* Copyright (c) 2012-2015, salesforce.com, inc.
* All rights reserved.
* Redistribution and use of this software 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,... | 1 | 14,766 | SmartStoreInspectorTest expected results in a certain order | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -310,6 +310,11 @@ const conduit::Node& data_reader_jag_conduit::get_conduit_node(const conduit::No
}
bool data_reader_jag_conduit::load_conduit_node(const size_t i, const std::string& key, conduit::Node& node) const {
+
+ if (m_io_thread_pool != nullptr && m_using_random_node.count(m_io_thread_pool->get_local_t... | 1 | ////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2014-2016, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory.
// Written by the LBANN Research Team (B. Van Essen, et al.) listed in
// the CONTRIBUTORS file. <lbann-dev@l... | 1 | 14,066 | I think that you need something like `m_using_random_node.emplace(m_io_thread_pool->get_local_thread_id());` | LLNL-lbann | cpp |
@@ -175,6 +175,9 @@ public class UnusedAssignmentRule extends AbstractJavaRule {
if (isIgnorablePrefixIncrement(entry.rhs)) {
continue;
}
+ if (isUsedLocalVarWithoutInitializer(entry, result.usedVariables)) {
+ continue;
+ ... | 1 | /*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.rule.bestpractices;
import static net.sourceforge.pmd.lang.java.rule.codestyle.ConfusingTernaryRule.unwrapParentheses;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.uti... | 1 | 18,664 | I don't think we need to maintain a separate set. The problem here is that the "assignment" that is killed for this variable is not really an assignment. If we just don't `assign` the variable with the non-existent value, it will not be reported. I pushed a fix. | pmd-pmd | java |
@@ -209,4 +209,9 @@ public interface TableScan {
*/
boolean isCaseSensitive();
+ /**
+ * Returns the target split size for this scan.
+ */
+ long targetSplitSize();
+
} | 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 | 34,208 | Let me know if this is too pervasive. It is currently a private method in `BaseTableScan`. It seems both `SparkBatchQueryScan` and `SparkMergeScan` need to know the scan-specific split size when planning tasks. Therefore, I made it open. Another approach is to move all the `planTasks` logic to scan implementations, but... | apache-iceberg | java |
@@ -1550,7 +1550,8 @@ func (c *client) flushSignal() {
func (c *client) traceMsg(msg []byte) {
maxTrace := c.srv.getOpts().MaxTracedMsgLen
if maxTrace > 0 && (len(msg)-LEN_CR_LF) > maxTrace {
- c.Tracef("<<- MSG_PAYLOAD: [\"%s...\"]", msg[:maxTrace])
+ tm := fmt.Sprintf("%q", msg[:maxTrace])
+ c.Tracef("<<- MSG... | 1 | // Copyright 2012-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,116 | Not sure what is this change doing? | nats-io-nats-server | go |
@@ -272,8 +272,9 @@ def revoke_user_code_tokens(user):
db.session.delete(code)
revoke_tokens(user)
-def get_exp(mins=30):
- return datetime.utcnow() + timedelta(minutes=mins)
+def get_exp(mins=None):
+ delta = timedelta(minutes=mins) if mins is not None else timedelta(days=90)
+ return datetime... | 1 | import base64
from datetime import datetime, timedelta
import json
import uuid
from flask import redirect, request
import itsdangerous
import jwt
from passlib.context import CryptContext
from sqlalchemy import func
from . import app, db
from .const import (VALID_EMAIL_RE, VALID_USERNAME_RE, blacklisted_name,
... | 1 | 16,857 | this is funky. either don't take` minutes` as keyword arg or take both `minutes` and `days` and pass all of them on to `timedelta`. i'm guessing you're aiming for backwards compatibility, but i don't think it's worth it given how confusing this is. atlernatively, make `mins=60*24*30` the default. and that brings me to ... | quiltdata-quilt | py |
@@ -267,6 +267,11 @@ public final class RememberMeConfigurer<H extends HttpSecurityBuilder<H>>
validateInput();
String key = getKey();
RememberMeServices rememberMeServices = getRememberMeServices(http, key);
+ if (key == null) {
+ if (rememberMeServices instanceof AbstractRememberMeServices) {
+ key ... | 1 | /*
* Copyright 2002-2015 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | 1 | 10,621 | Please use a tab for indentation instead of spaces. | spring-projects-spring-security | java |
@@ -40,7 +40,7 @@ import java.util.stream.Collector;
* @since 2.0.0
*/
@SuppressWarnings("deprecation")
-public final class Queue<T> extends AbstractsQueue<T, Queue<T>> implements LinearSeq<T>, Kind1<Queue<T>, T> {
+public final class Queue<T> extends AbstractQueue<T, Queue<T>> implements LinearSeq<T>, Kind1<Queue... | 1 | /* / \____ _ _ ____ ______ / \ ____ __ _______
* / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG
* _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2017 Javaslang, http://javaslang.io
* /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ ... | 1 | 12,180 | I can't believe we didn't see this typo before :)) | vavr-io-vavr | java |
@@ -25,6 +25,9 @@ from Queue import Empty, Queue
from google.cloud.forseti.services.inventory.base import crawler
from google.cloud.forseti.services.inventory.base import gcp
from google.cloud.forseti.services.inventory.base import resources
+from google.cloud.forseti.common.util import log_util
+
+LOGGER = log_util... | 1 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 1 | 28,533 | If the logger isn't used, it probably doesn't need to be added. | forseti-security-forseti-security | py |
@@ -0,0 +1,4 @@
+var script = document.createElement('script')
+script.type = 'text/javascript'
+script.src = '{}'
+document.head.appendChild(script) | 1 | 1 | 18,012 | These files should in `/javascript/brython` | SeleniumHQ-selenium | js | |
@@ -54,11 +54,15 @@ func (ci *CreateImages) UnmarshalJSON(b []byte) error {
func imageUsesAlphaFeatures(imagesAlpha []*ImageAlpha) bool {
for _, imageAlpha := range imagesAlpha {
- if imageAlpha != nil && len(imageAlpha.RolloutOverride.DefaultRolloutTime) > 0 {
- return true
+ if imageAlpha != nil && imageAlph... | 1 | // Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | 1 | 13,494 | minor, you can squash these into one `if` | GoogleCloudPlatform-compute-image-tools | go |
@@ -73,7 +73,7 @@ func (s *transmissionTaskSuite) TearDownTest() {
func (s *transmissionTaskSuite) TestHandleTransmissionTask_RegisterNamespaceTask_IsGlobalNamespace() {
taskType := replicationgenpb.ReplicationTaskType_NamespaceTask
- id := primitives.NewUUID()
+ id := primitives.NewUUID().String()
name := "some... | 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 | 9,611 | Used regexes to do most of this, hence different methods of string creation of UUIDs. I plan to follow up with an additional change to remove direct references to google/pborman UUID so `uuid.New()` and `uuid.NewRandom()` will instead use our `primitives.UUID`. | temporalio-temporal | go |
@@ -581,7 +581,7 @@ namespace pwiz.Skyline.Controls.Graphs
requestContext.Settings = null;
}
- if (GraphSummary.IsHandleCreated)
+ if (GraphSummary.IsHandleCreated && !GraphSummary.Disposing)
{
try
... | 1 | /*
* Original author: Brendan MacLean <brendanx .at. u.washington.edu>,
* MacCoss Lab, Department of Genome Sciences, UW
*
* Copyright 2009 University of Washington - Seattle, WA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in co... | 1 | 13,256 | Add a TODO here to revisit if this was problematic. | ProteoWizard-pwiz | .cs |
@@ -23,7 +23,11 @@ class SSDHead(AnchorHead):
anchor_generator (dict): Config dict for anchor generator
bbox_coder (dict): Config of bounding box coder.
reg_decoded_bbox (bool): If true, the regression loss would be
- applied on decoded bounding boxes. Default: False
+ a... | 1 | import torch
import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import xavier_init
from mmcv.runner import force_fp32
from mmdet.core import (build_anchor_generator, build_assigner,
build_bbox_coder, build_sampler, multi_apply)
from ..builder import HEADS
from ..losses import s... | 1 | 22,288 | Note generally it -> It | open-mmlab-mmdetection | py |
@@ -51,6 +51,7 @@ model* instantiate_model(lbann_comm* comm,
if (type == "directed_acyclic_graph_model") {
return new directed_acyclic_graph_model(comm, mini_batch_size, obj, opt);
}
+#if 0
if (type == "recurrent_model") {
const auto& params = proto_model.recurrent();
return new recurrent_model(... | 1 | ////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2014-2016, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory.
// Written by the LBANN Research Team (B. Van Essen, et al.) listed in
// the CONTRIBUTORS file. <lbann-dev@l... | 1 | 12,965 | Is this relevant to this PR? | LLNL-lbann | cpp |
@@ -102,7 +102,7 @@ module Beaker
end
if block_hosts.is_a? Array
if block_hosts.length > 0
- if opts[:run_in_parallel]
+ if opts[:run_in_parallel] == true
# Pass caller[1] - the line that called block_on - for logging purposes.
result = bl... | 1 | module Beaker
module Shared
#Methods for managing Hosts.
#- selecting hosts by role (Symbol or String)
#- selecting hosts by name (String)
#- adding additional method definitions for selecting by role
#- executing blocks of code against selected sets of hosts
module HostManager
#Find ho... | 1 | 13,183 | Can we instead ensure that `opts[:run_in_parellel]` will always be a boolean? Otherwise we'll have to account for the case when it's a non-boolean value in multiple places, such as any/every other `if` statement. | voxpupuli-beaker | rb |
@@ -25,6 +25,11 @@ import (
"go.opentelemetry.io/otel/codes"
)
+var (
+ HTTPSchemeHTTP = HTTPSchemeKey.String("http")
+ HTTPSchemeHTTPS = HTTPSchemeKey.String("https")
+)
+
// NetAttributesFromHTTPRequest generates attributes of the net
// namespace as specified by the OpenTelemetry specification for a
// span... | 1 | // 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/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... | 1 | 15,313 | Is this just moved out of the other files? It doesn't seem like this was generated like the other files. | open-telemetry-opentelemetry-go | go |
@@ -0,0 +1,14 @@
+using System.IO;
+using System.Threading.Tasks;
+
+namespace HttpOverStream
+{
+ internal interface IHttpContent
+ {
+ long? Length { get; }
+
+ void CopyTo(Stream destination);
+
+ Task CopyToAsync(Stream destination);
+ }
+} | 1 | 1 | 18,322 | I started out doing everything `async`, but it was getting in the way of debugging, so I switched back to all synchronous until I got things working. We should probably move everything back to `async` and remove the synchronous versions. | DataDog-dd-trace-dotnet | .cs | |
@@ -98,7 +98,9 @@ namespace Nethermind.Mev.Test
protected override IBlockProducer CreateTestBlockProducer(TxPoolTxSource txPoolTxSource, ISealer sealer, ITransactionComparerProvider transactionComparerProvider)
{
MiningConfig miningConfig = new() {MinGasPrice = UInt256.One};
-... | 1 | // Copyright (c) 2021 Demerzel Solutions Limited
// This file is part of the Nethermind library.
//
// The Nethermind library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of ... | 1 | 26,099 | this looks already too complicated... | NethermindEth-nethermind | .cs |
@@ -176,6 +176,18 @@ TEST(RocksEngineTest, OptionTest) {
engine->setDBOption("max_background_compactions", "bad_value"));
}
+TEST(RocksEngineTest, CompactTest) {
+ fs::TempDir rootPath("/tmp/rocksdb_compact_test.XXXXXX");
+ auto engine = std::make_unique<RocksEngine>(0, rootPath.path());
+ std:... | 1 | /* Copyright (c) 2018 - present, VE Software Inc. All rights reserved
*
* This source code is licensed under Apache 2.0 License
* (found in the LICENSE.Apache file in the root directory)
*/
#include "base/Base.h"
#include <gtest/gtest.h>
#include <rocksdb/db.h>
#include <folly/lang/Bits.h>
#include "fs/TempDir.h"... | 1 | 16,183 | As for the testings, we better to verify the actual effects of the compaction. Of course, you could do it in future. | vesoft-inc-nebula | cpp |
@@ -85,7 +85,9 @@ public class Catalog implements AutoCloseable {
if (tableMap == null) {
tableMap = loadTables(db);
}
- return ImmutableList.copyOf(tableMap.values());
+ Collection<TiTableInfo> tables = tableMap.values();
+ tables.removeIf(TiTableInfo::isView);
+ return Immut... | 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,736 | should we add a TODO here? | pingcap-tispark | java |
@@ -35,14 +35,12 @@ import { Component, render } from '@wordpress/element';
import { loadTranslations } from './util';
import './components/notifications';
import DashboardDetailsApp from './components/dashboard-details/dashboard-details-app';
-import ErrorHandler from './components/ErrorHandler';
+import Root from ... | 1 | /**
* DashboardDetails 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.... | 1 | 28,986 | This can be inlined below as `GoogleSitekitDashboardDetails` is an unnecessary wrapper now. | google-site-kit-wp | js |
@@ -191,7 +191,7 @@ func (s *nDCTransactionMgrSuite) TestBackfillWorkflow_CurrentWorkflow_Active_Clo
versionHistory := versionhistory.New([]byte("branch token"), []*historyspb.VersionHistoryItem{
{EventId: lastWorkflowTaskStartedEventID, Version: lastWorkflowTaskStartedVersion},
})
- histories := versionhistory.... | 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,609 | NewVHS -> NewVersionHistories this one looks better | temporalio-temporal | go |
@@ -36,10 +36,17 @@ module Selenium
SOCKET_LOCK_TIMEOUT = 45
STOP_TIMEOUT = 20
+ @executable = nil
+ @missing = ''
+
+ class << self
+ attr_accessor :executable, :missing_text
+ end
+
attr_accessor :host
def initialize(executable_path, port, *extra_args)... | 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,879 | Is this `@missing_text` ? | SeleniumHQ-selenium | java |
@@ -25,6 +25,7 @@ CONFIG_PATH = BASE_PATH / 'config.yml'
OPEN_DATA_URL = "https://open.quiltdata.com"
PACKAGE_NAME_FORMAT = r"[\w-]+/[\w-]+$"
+SUBPACKAGE_NAME_FORMAT = r"([\w-]+/[\w-]+)(?:/(.+))?$"
## CONFIG_TEMPLATE
# Must contain every permitted config key, as well as their default values (which can be 'null'... | 1 | import re
from collections import OrderedDict
from collections.abc import Mapping, Sequence, Set
import datetime
import json
import os
import pathlib
from urllib.parse import parse_qs, quote, unquote, urlencode, urlparse, urlunparse
from urllib.request import pathname2url, url2pathname
import warnings
# Third-Party
im... | 1 | 18,376 | Minor suggestion, but wouldn't it be cleaner to simply replace PACKAGE_NAME_FORMAT to all the optional path, then check that the path is empty in validate_package_name? We might also want a helper function to pull out the package name and sub-package path. | quiltdata-quilt | py |
@@ -56,9 +56,9 @@ module.exports = class FileCard extends Component {
{this.props.fileCardFor &&
<div style="width: 100%; height: 100%;">
<div class="uppy-DashboardContent-bar">
- <h2 class="uppy-DashboardContent-title">Editing <span class="uppy-DashboardContent-titleFile">{file.me... | 1 | const getFileTypeIcon = require('./getFileTypeIcon')
const { checkIcon } = require('./icons')
const { h, Component } = require('preact')
module.exports = class FileCard extends Component {
constructor (props) {
super(props)
this.meta = {}
this.tempStoreMetaOrSubmit = this.tempStoreMetaOrSubmit.bind(thi... | 1 | 10,448 | we should have a way to insert components into a i18n string. so that we could define a translation string like `'%{filename} is being edited'`, and inject the filename `<span/>` at the right place. I imagine there must be a language where the `Editing` text should come after the file name. we can think about that late... | transloadit-uppy | js |
@@ -254,6 +254,9 @@ fpga_result enum_thermalmgmt_metrics(fpga_metric_vector *vector,
for (i = 0; i < pglob.gl_pathc; i++) {
+ if (!pglob.gl_pathv)
+ continue;
+
char *dir_name = strrchr(pglob.gl_pathv[i], '/');
if (!dir_name) | 1 | // Copyright(c) 2018-2019, 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... | 1 | 19,203 | Probably want break instead of continue. | OPAE-opae-sdk | c |
@@ -305,7 +305,7 @@ func testMQTTDefaultOptions() *Options {
func testMQTTRunServer(t testing.TB, o *Options) *Server {
t.Helper()
- o.NoLog = false
+ o.NoLog = true
if o.StoreDir == _EMPTY_ {
o.StoreDir = createDir(t, "mqtt_js")
} | 1 | // Copyright 2020 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wr... | 1 | 14,203 | This was on purpose that I would set logging (NoLog=false) and a dummy logger below. The idea is to have better code coverage and test of debug/trace statements. Any reason you have removed this? | nats-io-nats-server | go |
@@ -83,11 +83,11 @@ public final class StringBuilderConstantParameters
.build();
}
List<ExpressionTree> arguments = result.get();
- Stream<String> prefixStream = arguments.stream().findFirst()
+ Stream<String> prefixStream = arguments.stream()
+ .findF... | 1 | /*
* (c) Copyright 2019 Palantir Technologies 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 ... | 1 | 7,915 | does adding a `Stream.<String>empty()` help here? | palantir-gradle-baseline | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.