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 |
|---|---|---|---|---|---|---|---|
@@ -26,6 +26,11 @@ func (s *AuditLogsSourceStatus) GetCondition(t apis.ConditionType) *apis.Conditi
return auditLogsSourceCondSet.Manage(s).GetCondition(t)
}
+// GetTopLevelCondition returns the top level condition.
+func (s *AuditLogsSourceStatus) GetTopLevelCondition() *apis.Condition {
+ return auditLogsSourceC... | 1 | /*
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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dis... | 1 | 10,326 | sorry, I wasn't familiar with this TopLevelCondition... What it would be in this case? The AuditsLogReady condition? | google-knative-gcp | go |
@@ -109,6 +109,7 @@ type DiffTransformation struct {
d execute.Dataset
cache execute.TableBuilderCache
+ alloc *memory.Allocator
inputCache *execute.GroupLookup
} | 1 | package testing
import (
"bytes"
"errors"
"fmt"
"sort"
"sync"
"github.com/apache/arrow/go/arrow/array"
"github.com/influxdata/flux"
"github.com/influxdata/flux/arrow"
"github.com/influxdata/flux/execute"
"github.com/influxdata/flux/memory"
"github.com/influxdata/flux/plan"
"github.com/influxdata/flux/sema... | 1 | 9,923 | Where does the `alloc` field get set? | influxdata-flux | go |
@@ -273,9 +273,10 @@ func setupPostgres(w *DWH) error {
return nil
}
-func runQueryPostgres(db *sql.DB, opts *queryOpts) (*sql.Rows, string, error) {
+func runQueryPostgres(db *sql.DB, opts *queryOpts) (*sql.Rows, int64, error) {
var (
query = fmt.Sprintf("SELECT * FROM %s %s", opts.table, opts.selectAs)... | 1 | package dwh
import (
"database/sql"
"fmt"
"strings"
"github.com/pkg/errors"
pb "github.com/sonm-io/core/proto"
)
var (
postgresSetupCommands = map[string]string{
"createTableDeals": `
CREATE TABLE IF NOT EXISTS Deals (
Id TEXT UNIQUE NOT NULL,
SupplierID TEXT NOT NULL,
ConsumerID TEXT NOT N... | 1 | 6,901 | looks expensive to do it on each query | sonm-io-core | go |
@@ -38,16 +38,16 @@ import model_params
_LOGGER = logging.getLogger(__name__)
_INPUT_DATA_FILE = resource_filename(
- "nupic.datafiles", "extra/nyctaxi/nyc_taxi.csv"
+ "nupic.datafiles", "extra/nyctaxi/nycTaxi.csv"
)
_OUTPUT_PATH = "anomaly_scores.csv"
_ANOMALY_THRESHOLD = 0.9
-# minimum metric value of ny... | 1 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2016, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | 1 | 22,208 | @rhyolight -- but weren't we supposed to be standardizing on using underscores in file names (versus camelcase)? | numenta-nupic | py |
@@ -209,9 +209,9 @@ module Mongoid
# @since 2.1.0
def empty?
if _loaded?
- in_memory.count == 0
+ in_memory.length == 0
else
- _unloaded.count + _added.count == 0
+ _added.length == 0 && !_unloaded.exists?
e... | 1 | # frozen_string_literal: true
# encoding: utf-8
module Mongoid
module Association
module Referenced
class HasMany
# This class is the wrapper for all referenced associations that have a
# target that can be a criteria or array of _loaded documents. This
# handles both cases or a co... | 1 | 13,274 | Can this simply call `in_memory.empty?` ? | mongodb-mongoid | rb |
@@ -88,6 +88,13 @@ func init() {
// CreateSettingsFile creates the settings file (like settings.php) for the
// provided app is the apptype has a settingsCreator function.
func (app *DdevApp) CreateSettingsFile() (string, error) {
+ // If the user has asked us to skip settings file manipulation, then just bail
+ // ... | 1 | package ddevapp
import (
"fmt"
"os"
"path"
"path/filepath"
"github.com/drud/ddev/pkg/util"
)
type settingsCreator func(*DdevApp) (string, error)
type uploadDir func(*DdevApp) string
// hookDefaultComments should probably change its arg from string to app when
// config refactor is done.
type hookDefaultComment... | 1 | 13,763 | The styling/wording here probably needs some thought. It's more of a placeholder. | drud-ddev | php |
@@ -9,10 +9,10 @@ Rails.application.routes.draw do
resources :stack_entries
- resources :password_reset, only: [:new, :create] do
+ resources :password_resets, only: [:new, :create] do
collection do
get :confirm
- post :reset
+ patch :reset
end
end
resources :activation_resends... | 1 | Rails.application.routes.draw do
ActiveAdmin.routes(self)
root to: 'home#index'
resources :sessions, only: [:new, :create] do
collection do
delete :destroy
end
end
resources :stack_entries
resources :password_reset, only: [:new, :create] do
collection do
get :confirm
post :re... | 1 | 7,459 | Using a plural route helps in detecting the path automatically for `= form_for @password_reset`. | blackducksoftware-ohloh-ui | rb |
@@ -9,8 +9,8 @@ const fs = require('fs');
const { MongoClient } = require('../../../src');
const { TestConfiguration } = require('./config');
const { getEnvironmentalOptions } = require('../utils');
-const { eachAsync } = require('../../../src/utils');
const mock = require('../mongodb-mock/index');
+const { inspect... | 1 | 'use strict';
require('source-map-support').install({
hookRequire: true
});
const path = require('path');
const fs = require('fs');
const { MongoClient } = require('../../../src');
const { TestConfiguration } = require('./config');
const { getEnvironmentalOptions } = require('../utils');
const { eachAsync } = requi... | 1 | 21,822 | Is `metadata` required on all tests? I actually just removed the metadata field entirely from a few tests in my PR. | mongodb-node-mongodb-native | js |
@@ -191,7 +191,7 @@ public class FileHandler {
final long copied = Files.copy(from.toPath(), out);
final long length = from.length();
if (copied != length) {
- throw new IOException("Could not transfer all bytes.");
+ throw new IOException("Could not transfer all bytes of " + from.toP... | 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,214 | seems reasonable to also want to include the 'to' location? | SeleniumHQ-selenium | js |
@@ -145,6 +145,10 @@ public class TemporaryFilesystem {
}
public boolean deleteBaseDir() {
- return baseDir.delete();
+ boolean wasDeleted = baseDir.delete();
+ if (wasDeleted) {
+ Runtime.getRuntime().removeShutdownHook(shutdownHook);
+ }
+ return wasDeleted;
}
} | 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,021 | I don't think we need to necessarily check if that returned true or not, we should just remove the shutdown hook. Since nothing would check or do anything with this flag anyways. | SeleniumHQ-selenium | rb |
@@ -232,7 +232,17 @@ func (c *CVCController) updateCVCObj(
// 4. Create cstorvolumeclaim resource.
// 5. Update the cstorvolumeclaim with claimRef info and bound with cstorvolume.
func (c *CVCController) createVolumeOperation(cvc *apis.CStorVolumeClaim) (*apis.CStorVolumeClaim, error) {
- _ = cvc.Annotations[string(... | 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,732 | Better to push getting policy details into a func we can reuse later. | openebs-maya | go |
@@ -52,6 +52,14 @@ type outbound struct {
URL string
}
+func (o outbound) Start() error {
+ return nil // nothing to do
+}
+
+func (o outbound) Stop() error {
+ return nil // nothing to do
+}
+
func (o outbound) Call(ctx context.Context, req *transport.Request) (*transport.Response, error) {
start := time.No... | 1 | // Copyright (c) 2016 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 | 10,148 | optional: while there's nothing to do, a good way to catch bugs (where we use an outbound without calling `Start`) might be to have this outbound verify that `Start` is called before `Call` or `Stop` | yarpc-yarpc-go | go |
@@ -20,6 +20,9 @@ import (
"flag"
"os"
+ "sigs.k8s.io/cluster-api-provider-aws/pkg/apis"
+ "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/actuators/cluster"
+ "sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/aws/actuators/machine"
clusterapis "sigs.k8s.io/cluster-api/pkg/apis"
"sigs.k8s.io/cluster-api/pkg... | 1 | /*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | 1 | 6,856 | Not a blocker by any means, but I think there is value in keeping the local imports in a separate group. | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -295,3 +295,14 @@ func TestStartStopFailures(t *testing.T) {
}
}
}
+
+func TestNoOutboundsForService(t *testing.T) {
+ assert.Panics(t, func() {
+ NewDispatcher(Config{
+ Name: "test",
+ Outbounds: Outbounds{
+ "my-test-service": {},
+ },
+ })
+ })
+} | 1 | // Copyright (c) 2016 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 | 11,639 | nit - I would test the error message as well. For panic, you might need to see if the stack contains the error message, instead of equaling. | yarpc-yarpc-go | go |
@@ -162,6 +162,18 @@ func substitute(s reflect.Value, replacer *strings.Replacer) {
case *compute.Client, *storage.Client, context.Context, context.CancelFunc:
// We specifically do not want to change fields with these types.
continue
+ case *WaitForInstancesStopped:
+ var newSlice WaitForInstancesStopped... | 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 | 6,313 | Didn't we have specific logic for handling slices vs structs? | GoogleCloudPlatform-compute-image-tools | go |
@@ -4199,7 +4199,15 @@ void EntityList::QuestJournalledSayClose(Mob *sender, float dist, const char *mo
buf.WriteInt32(0); // location, client doesn't seem to do anything with this
buf.WriteInt32(0);
buf.WriteInt32(0);
- buf.WriteString(message);
+
+ // auto inject saylinks (say)
+ if (RuleB(Chat, AutoInjectSayli... | 1 | /* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2003 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program... | 1 | 10,768 | `c_str()` is not needed. | EQEmu-Server | cpp |
@@ -310,9 +310,12 @@ func installHandlers(c *ExtraConfig, s *genericapiserver.GenericAPIServer) {
})
}
+ if features.DefaultFeatureGate.Enabled(features.Egress) || features.DefaultFeatureGate.Enabled(features.ServiceExternalIP) {
+ s.Handler.NonGoRestfulMux.HandleFunc("/validate/externalippool", webhook.Handler... | 1 | // Copyright 2019 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 50,348 | The handler will be installed twice if you don't remove the below one. | antrea-io-antrea | go |
@@ -35,9 +35,14 @@ public class EthashConfigOptions {
return JsonUtil.getLong(ethashConfigRoot, "fixeddifficulty");
}
+ public OptionalLong getEpochLengthActivationBlock() {
+ return JsonUtil.getLong(ethashConfigRoot, "epochlengthactivation");
+ }
+
Map<String, Object> asMap() {
final ImmutableMa... | 1 | /*
* Copyright ConsenSys AG.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing... | 1 | 23,541 | How about putting `epochLength` (or something like that) in place of `a` just to make it easier to read | hyperledger-besu | java |
@@ -79,6 +79,14 @@ func (graph *BuildGraph) Target(label BuildLabel) *BuildTarget {
func (graph *BuildGraph) TargetOrDie(label BuildLabel) *BuildTarget {
target := graph.Target(label)
if target == nil {
+ // TODO(jpoole): This is just a small usability message to help with the migration from v15 to v16. We should... | 1 | // Representation of the build graph.
// The graph of build targets forms a DAG which we discover from the top
// down and then build bottom-up.
package core
import (
"reflect"
"sort"
"sync"
)
// A BuildGraph contains all the loaded targets and packages and maintains their
// relationships, especially reverse dep... | 1 | 9,270 | Wouldn't this still fire afterwards if you created one called `pleasings`? or am I missing something? | thought-machine-please | go |
@@ -63,14 +63,14 @@ const kbpRecordPrefix = "_keybase_pages."
// _keybase_pages.meatball.gao.io TXT "kbp=/keybase/public/songgao/meatball/"
// _keybase_pages.song.gao.io TXT "kbp=/keybase/private/songgao,kb_bot/blah"
// _keybase_pages.blah.strib.io TXT "kbp=/keybase/private/strib#kb_bot/blahblahb" "lah/b... | 1 | // Copyright 2017 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 libpages
import (
"net"
"strings"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
const (
keybasePagesPrefix = "kbp="
)
// ErrKeybasePagesRecordNotFound i... | 1 | 18,995 | I don't love this syntax; it doesn't match anything we're currently doing and it's not obvious. Why isn't this `/keybase/private/jzila,kb_bot/.kbfs_autogit/public/jzila/kbp.git`? | keybase-kbfs | go |
@@ -1135,11 +1135,17 @@ public final class Queue<T> extends AbstractsQueue<T, Queue<T>> implements Linea
return ofAll(toList().update(index, element));
}
- @SuppressWarnings("unchecked")
@Override
public <U> Queue<Tuple2<T, U>> zip(Iterable<? extends U> that) {
+ return zipWith(that,... | 1 | /* / \____ _ _ ____ ______ / \ ____ __ _______
* / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG
* _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2016 Javaslang, http://javaslang.io
* /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ ... | 1 | 8,885 | Does a type-hint work instead of casting? `return ofAll(toList().<U> zipWith(that, mapper));` (Probably not, just a question.) | vavr-io-vavr | java |
@@ -90,11 +90,11 @@ public class TestTableMetadata {
long previousSnapshotId = System.currentTimeMillis() - new Random(1234).nextInt(3600);
Snapshot previousSnapshot = new BaseSnapshot(
ops.io(), previousSnapshotId, null, previousSnapshotId, null, null, null, ImmutableList.of(
- new GenericMan... | 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 | 39,147 | Are these required? | apache-iceberg | java |
@@ -544,6 +544,13 @@ func (c *client) initClient() {
// Snapshots to avoid mutex access in fast paths.
c.out.wdl = opts.WriteDeadline
c.out.mp = opts.MaxPending
+ // Snapshot max control line since currently can not be changed on reload and we
+ // were checking it on each call to parse. If this changes and we al... | 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 | 12,374 | This is consistent for all clients that we will check yes? Seems like we should just use the singleton, maybe pass it to the parse function or since clients have a server pointer set it at server start and just access that way without locks? | nats-io-nats-server | go |
@@ -62,7 +62,7 @@ public class JavaTokenizer extends JavaCCTokenizer {
if (ignoreLiterals && (javaToken.kind == JavaTokenKinds.STRING_LITERAL
|| javaToken.kind == JavaTokenKinds.CHARACTER_LITERAL
- || javaToken.kind == JavaTokenKinds.DECIMAL_LITERAL
+ || javaTok... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.cpd;
import java.io.IOException;
import java.io.StringReader;
import java.util.Deque;
import java.util.LinkedList;
import java.util.Properties;
import net.sourceforge.pmd.cpd.internal.JavaCCTokenizer;
... | 1 | 16,934 | Note that this is a bug, that should be fixed on master. `DECIMAL_LITERAL` cannot match any token, because it's declared with a `#`. | pmd-pmd | java |
@@ -26,6 +26,8 @@ import (
"sync/atomic"
"time"
+ "github.com/nats-io/nuid"
+
"github.com/nats-io/nats-server/v2/server/pse"
)
| 1 | // Copyright 2018-2019 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 | 10,276 | Don't need extra line here. | nats-io-nats-server | go |
@@ -637,9 +637,7 @@ namespace Nethermind.JsonRpc.Test.Modules.Proof
.Op(Instruction.DELEGATECALL)
.Done;
CallResultWithProof result = TestCallWithCode(code);
-
- // change in test after the modification to how the ReleaseSpec is delivered to the virt... | 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,309 | For the first look, this change is strange. Were we passing these tests before? | NethermindEth-nethermind | .cs |
@@ -21,9 +21,16 @@ import (
)
func gracefullyStopProcess(pid int) error {
- cmd := exec.Command("taskkill", "/pid", strconv.Itoa(pid))
+ fmt.Printf("Stop...")
+ // process on windows will not stop unless forced with /f
+ cmd := exec.Command("taskkill", "/pid", strconv.Itoa(pid), "/f")
if err := cmd.Run(); err != ... | 1 | // Copyright 2015 Matthew Holt and The Caddy 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 applicab... | 1 | 13,341 | On Windows, doesn't `os.Args[0]` include the `.exe`? What if you run the program like `caddy.exe`? | caddyserver-caddy | go |
@@ -112,13 +112,8 @@ type OpenvpnConfigNegotiator struct {
vpnConfig openvpn_service.VPNConfig
}
-// ConsumeConfig doesn't do anything on the openvpn side, since it's not required here
-func (ocn *OpenvpnConfigNegotiator) ConsumeConfig(json.RawMessage) error {
- return nil
-}
-
// ProvideConfig returns the config... | 1 | /*
* Copyright (C) 2017 The "MysteriumNetwork/node" Authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | 1 | 13,074 | I don't see anywhere where `ServiceConfiguration` interface implementation would return any kind of error. Not sure if its needed, but we could ALWAYS return a valid 'pseudo' configuration without possibility of error. | mysteriumnetwork-node | go |
@@ -36,4 +36,15 @@ public class CommonRenderingUtilTest {
assertThat(CommonRenderingUtil.stripQuotes("'a'bc'")).isEqualTo("'a'bc'");
assertThat(CommonRenderingUtil.stripQuotes("\"a\"bc\"")).isEqualTo("\"a\"bc\"");
}
+
+ @Test
+ public void testGetDocLines() {
+ // Check that we don't care which form o... | 1 | /* Copyright 2018 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 | 26,665 | Do we actually want to split on `\r`? I thought that the "newline sequence" was only `\r\n` on windows. | googleapis-gapic-generator | java |
@@ -273,10 +273,14 @@ void t_json_generator::write_type_spec(t_type* ttype) {
write_key_and_string("valueTypeId", get_type_name(vtype));
write_type_spec_object("keyType", ktype);
write_type_spec_object("valueType", vtype);
- } else if (ttype->is_list() || ttype->is_set()) {
+ } else if (ttype->is_list(... | 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 ma... | 1 | 13,014 | Nit: these lines are duplicated from above. They can be refactored by setting etype in a conditional and putting 282 and 283 below that. | apache-thrift | c |
@@ -49,7 +49,7 @@ func (s *Server) handleSignals() {
s.Debugf("Trapped %q signal", sig)
switch sig {
case syscall.SIGINT:
- s.Noticef("Server Exiting..")
+ s.Shutdown()
os.Exit(0)
case syscall.SIGUSR1:
// File log re-open for rotating file logs. | 1 | // Copyright 2012-2019 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 | 9,667 | I would do an s.Notice("Initiating Shutdown...") then after Shutdown() do the original Server Exiting. | nats-io-nats-server | go |
@@ -57,6 +57,11 @@ namespace Nethermind.DataMarketplace.Consumers.Refunds.Services
ulong now = _timestamper.UnixTime.Seconds;
if (!deposit.CanClaimRefund(now))
{
+ var timeLeftToClaimRefund = deposit.GetTimeLeftToClaimRefund(now);
+ if (timeLeftToClai... | 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,878 | Not sure with how many seconds on average are we dealing with but maybe it's better to have hh:mm:ss format in logs - you can make it with `TimeSpan.FromSeconds(seconds).ToString()` | NethermindEth-nethermind | .cs |
@@ -257,6 +257,12 @@ func (a *ClusterDeploymentValidatingAdmissionHook) validateCreate(admissionSpec
if aws.Region == "" {
allErrs = append(allErrs, field.Required(awsPath.Child("region"), "must specify AWS region"))
}
+ for i, mp := range newObject.Spec.Compute {
+ computePath := specPath.Child("compute")... | 1 | package validatingwebhooks
import (
"bufio"
"encoding/json"
"fmt"
"net/http"
"os"
"reflect"
"regexp"
"strings"
log "github.com/sirupsen/logrus"
admissionv1beta1 "k8s.io/api/admission/v1beta1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runt... | 1 | 8,137 | Why is this required? The user should be able to omit it and use the defaults. | openshift-hive | go |
@@ -1353,6 +1353,12 @@ class MouseSettingsPanel(SettingsPanel):
self.audioDetectBrightnessCheckBox=sHelper.addItem(wx.CheckBox(self,label=audioDetectBrightnessText))
self.audioDetectBrightnessCheckBox.SetValue(config.conf["mouse"]["audioCoordinates_detectBrightness"])
+ # Translators: This is the label for a c... | 1 | # -*- coding: UTF-8 -*-
#settingsDialogs.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2006-2018 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Heiko Folkerts, Zahari Yurukov, Leonard de Ruijter, Derek Riemer, Babbage B.V., Davy Kager, Ethan Holliger
#This file is covered ... | 1 | 22,600 | I don't think the naming of this setting conveys what it does. Maybe something like "Ignore mouse movement triggered by other applications" | nvaccess-nvda | py |
@@ -26,11 +26,12 @@ namespace OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation
public static readonly OpenTelemetryProtocolExporterEventSource Log = new OpenTelemetryProtocolExporterEventSource();
[NonEvent]
- public void FailedToReachCollector(Exception ex)
+ public void Fa... | 1 | // <copyright file="OpenTelemetryProtocolExporterEventSource.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
//... | 1 | 22,784 | Didn't went with backwards compatibility since it's still in beta | open-telemetry-opentelemetry-dotnet | .cs |
@@ -82,6 +82,9 @@ python::tuple fragmentMolHelper3(const RDKit::ROMol& mol, python::object ob,
std::vector<std::pair<RDKit::ROMOL_SPTR, RDKit::ROMOL_SPTR>> tres;
std::unique_ptr<std::vector<unsigned int>> v =
pythonObjectToVect<unsigned int>(ob);
+ if (!v) {
+ throw_value_error("invalid value for bonds... | 1 | //
// Copyright (C) 2015 Greg Landrum
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#define PY_ARRAY_UNIQUE_SYMBOL rdmmpa_array_API
#inc... | 1 | 23,819 | Perhaps bondsToCut must be None or non empty. | rdkit-rdkit | cpp |
@@ -79,6 +79,7 @@ function Sparkline( {
return (
<div className="googlesitekit-analytics-sparkline-chart-wrap">
<GoogleChart
+ chartType="line"
data={ data }
options={ chartOptions }
// eslint-disable-next-line sitekit/camelcase-acronyms | 1 | /**
* Sparkline 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
*
*... | 1 | 35,430 | See above, we could avoid adding that (same applies below). | google-site-kit-wp | js |
@@ -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 | rb |
@@ -1,6 +1,7 @@
'use strict';
var assert = require('assert');
+const expect = require('chai').expect;
var co = require('co');
var test = require('./shared').assert;
var setupDatabase = require('./shared').setupDatabase; | 1 | 'use strict';
var assert = require('assert');
var co = require('co');
var test = require('./shared').assert;
var setupDatabase = require('./shared').setupDatabase;
function processResult() {}
describe('Examples', function() {
before(function() {
return setupDatabase(this.configuration);
});
/**
* @igno... | 1 | 14,158 | Should the rest of the file be updated to use `expect` or should this test use the same format as the rest of the tests? | mongodb-node-mongodb-native | js |
@@ -227,6 +227,12 @@ func (a *AWSActuator) Refresh() error {
}
logger.Debug("Found hosted zone")
a.zoneID = &zoneID
+
+ // Update dnsZone status now that we have the zoneID
+ if err := a.ModifyStatus(); err != nil {
+ a.logger.WithError(err).Error("failed to update status after refresh")
+ return err
+ ... | 1 | package dnszone
import (
"errors"
"fmt"
"strings"
log "github.com/sirupsen/logrus"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/arn"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi"
"github.com/aws/aws-sdk-go/service/route53"
corev1 "k8s... | 1 | 13,979 | How would you feel about a different approach where the `DeleteAWSRecordSets` gets passed the zone ID and zone name rather than the `DNSZone`? | openshift-hive | go |
@@ -66,15 +66,17 @@ class PhotoMetricDistortion(object):
class Expand(object):
- def __init__(self, mean=(0, 0, 0), to_rgb=True, ratio_range=(1, 4)):
+ def __init__(self, mean=(0, 0, 0), to_rgb=True,
+ ratio_range=(1, 4), prob=0.5):
if to_rgb:
self.mean = mean[::-1]
... | 1 | import mmcv
import numpy as np
from numpy import random
from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps
class PhotoMetricDistortion(object):
def __init__(self,
brightness_delta=32,
contrast_range=(0.5, 1.5),
saturation_range=(0.5, 1.5),
... | 1 | 17,595 | it seems `random.uniform(0, 1)` similar to `random.randint(2)`, all have 1/2 probabilities. | open-mmlab-mmdetection | py |
@@ -121,7 +121,11 @@ class AutoScaleConnection(AWSQueryConnection):
for i in xrange(1, len(items)+1):
if isinstance(items[i-1], dict):
for k, v in items[i-1].iteritems():
- params['%s.member.%d.%s' % (label, i, k)] = v
+ if isinstance(v, dict)... | 1 | # Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/
# Copyright (c) 2011 Jann Kleen
#
# 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 limitat... | 1 | 7,845 | Added to support EBS volume creation, used like this: blockDeviceMap = [] blockDeviceMap.append( {'DeviceName':'/dev/sdc', 'VirtualName' : 'ephemeral0'}) blockDeviceMap.append( {'DeviceName':'/dev/sdh', 'Ebs': {'VolumeSize' : '100'} }) | boto-boto | py |
@@ -17,6 +17,8 @@ type mockedSigner struct {
signatureToReturn identity.Signature
}
+var testMysteriumApiUrl = "http://testUrl"
+
func (signer *mockedSigner) Sign(message []byte) (identity.Signature, error) {
return signer.signatureToReturn, nil
} | 1 | package server
import (
"bytes"
"github.com/mysterium/node/identity"
"github.com/stretchr/testify/assert"
"io"
"net/url"
"testing"
)
type testPayload struct {
Value string `json:"value"`
}
type mockedSigner struct {
signatureToReturn identity.Signature
}
func (signer *mockedSigner) Sign(message []byte) (ide... | 1 | 10,590 | We shouldn't depend that url is `mysterium` - it can be just `testRequestURL`. Also, `URL` has to be upper-case. | mysteriumnetwork-node | go |
@@ -689,8 +689,9 @@ VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceImageFormatProperties2(VkPhysica
const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo,
VkImageFormatProp... | 1 | /* Copyright (c) 2015-2019 The Khronos Group Inc.
* Copyright (c) 2015-2019 Valve Corporation
* Copyright (c) 2015-2019 LunarG, Inc.
* Copyright (C) 2015-2019 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 m... | 1 | 9,929 | We could delay this look-up now and only do it in the non-skip case. I suspect this is true for (almost) all of the top-level refactored functions. | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -144,6 +144,15 @@ std::string MetaServiceUtils::schemaTagKey(GraphSpaceID spaceId, TagID tagId, in
return key;
}
+std::string MetaServiceUtils::schemaTagPrefix(GraphSpaceID spaceId, TagID tagId) {
+ std::string key;
+ key.reserve(kTagsTable.size() + sizeof(GraphSpaceID) + sizeof(TagID));
+ key.appen... | 1 | /* Copyright (c) 2018 - present, VE Software Inc. All rights reserved
*
* This source code is licensed under Apache 2.0 License
* (found in the LICENSE.Apache file in the root directory)
*/
#include "meta/MetaServiceUtils.h"
#include <thrift/lib/cpp2/protocol/Serializer.h>
#include <thrift/lib/cpp2/protocol/Compa... | 1 | 16,132 | Typically, to be simple, we could reserve a const length space. | vesoft-inc-nebula | cpp |
@@ -0,0 +1,2 @@
+from .reader import *
+from .builder import Builder | 1 | 1 | 9,547 | Need to add a license and copyright header to each file. | google-flatbuffers | java | |
@@ -7,6 +7,8 @@
<% end %>
<%= form.inputs do %>
+ <%= hidden_field_tag "coupon_id" %>
+
<% if signed_out? %>
<ul class="checkout-signin-signup-toggle">
<li> | 1 | <%= semantic_form_for checkout, url: checkouts_path(checkout.plan), html: { method: 'post' } do |form| %>
<%= form.semantic_errors %>
<% if signed_in? %>
<h2 class="one-step-away">Hey <%= current_user.first_name %>, you're one step away. Enter payment below to start learning with Upcase now!</h2>
<% end %>
... | 1 | 16,984 | If I'm not mistaken, this line is now outside of the `if signed_out?` block, right? Any concerns about that? Seems odd that we wouldn't accept coupons for signed in users, but I want to make sure we understand the ramifications of this change. | thoughtbot-upcase | rb |
@@ -130,7 +130,7 @@ public abstract class PostgrePrivilege implements DBAPrivilege, Comparable<Postg
@NotNull
@Override
- public DBPDataSource getDataSource() {
+ public PostgreDataSource getDataSource() {
return owner.getDataSource();
}
| 1 | /*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2021 DBeaver Corp and others
*
* 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/LICE... | 1 | 11,078 | Please remove the unused import of DBPDataSource. | dbeaver-dbeaver | java |
@@ -43,7 +43,7 @@ namespace Microsoft.DotNet.Build.Tasks.Feed
public void LogError(string data)
{
- _log.LogError(data);
+ _log.LogWarning(data);
}
public void LogInformation(string data) | 1 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using NuGet.Common;
using System.Threading.Tasks;
using MSBuild = Microsoft.Build.Utilities;
namespace Microsoft.D... | 1 | 14,024 | I think you should add some extra message here saying it was originally sent as an error, for diagnosability. | dotnet-buildtools | .cs |
@@ -144,14 +144,14 @@ void test3() {
ExplicitBitVect bv(2048);
AvalonTools::getAvalonFP("c1cocc1", true, bv, 2048, false, true, 0x006FFF);
BOOST_LOG(rdInfoLog) << "c1cocc1 " << bv.getNumOnBits() << std::endl;
- TEST_ASSERT(bv.getNumOnBits() == 53);
+ TEST_ASSERT(bv.getNumOnBits() == 48);
}
{
... | 1 | // $Id$
//
// Created by Greg Landrum, July 2008
//
//
// Expected test results here correspond to v1.0 of the open-source
// avalontoolkit
//
#include <RDGeneral/RDLog.h>
#include <GraphMol/RDKitBase.h>
#include <GraphMol/SmilesParse/SmilesParse.h>
#include <GraphMol/FileParsers/FileParsers.h>
#include <RDGeneral... | 1 | 14,514 | I believe that all the changes in this file are not valid for v1.2 of the Avalon toolkit. | rdkit-rdkit | cpp |
@@ -509,6 +509,7 @@ public class DBService {
} else {
// carrying over auditEnabled from original role
role.setAuditEnabled(originalRole.getAuditEnabled());
+ mergeOriginalRoleAndMetaRoleAttributes(originalRole, role);
requestSuccess = con.updateRole(domainName... | 1 | /*
* Copyright 2016 Yahoo 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 | 5,163 | we cannot change the behavior of the processRole - that method is used in lots of places. this call must be done only in the method where templates are being handled. | AthenZ-athenz | java |
@@ -63,7 +63,9 @@ const (
// ECSAgentExecConfigDir is the directory where ECS Agent will write the ExecAgent config files to
ECSAgentExecConfigDir = ecsAgentExecDepsDir + "/" + ContainerConfigDirName
// HostExecConfigDir is the dir where ExecAgents Config files will live
- HostExecConfigDir = hostExecDepsDir + "/... | 1 | // +build linux
// 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 "l... | 1 | 25,568 | I think we probably want to follow the same naming convention that we do with `execAgentConfigFileNameTemplate` (using the SHA in the name of the file). This file might be confgurable in the future and when that happens we will be ready. Plus it's pretty much the same code that we already use for the config file. | aws-amazon-ecs-agent | go |
@@ -380,6 +380,14 @@ static void send_resource_update(struct link *manager)
total_resources->disk.total = MAX(0, local_resources->disk.total);
total_resources->disk.largest = MAX(0, local_resources->disk.largest);
total_resources->disk.smallest = MAX(0, local_resources->disk.smallest);
+
+ //if workers ... | 1 | /*
Copyright (C) 2008- The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "work_queue.h"
#include "work_queue_protocol.h"
#include "work_queue_internal.h"
#include "work_queue_resources.h"
#include "work_queue_process.h"
#includ... | 1 | 15,230 | If following above, this would be: end_time = time(0) + manual_wall_time_option, which is simpler. Also, make the check manual_wall_time_option > 0, otherwise negative times would terminate the worker right away. | cooperative-computing-lab-cctools | c |
@@ -116,6 +116,10 @@ func (err wrappedFatalError) Cause() error {
return err.error
}
+func (err wrappedFatalError) Unwrap() error {
+ return err.error
+}
+
// IsFatalError returns true if err conforms to the Fatal interface
// and calling the Fatal method returns true.
func IsFatalError(err error) (isFatal bool... | 1 | // Package fserrors provides errors and error handling
package fserrors
import (
"fmt"
"io"
"net/http"
"strings"
"time"
"github.com/rclone/rclone/lib/errors"
)
// Retrier is an optional interface for error as to whether the
// operation should be retried at a high level.
//
// This should be returned from Upda... | 1 | 10,640 | If we aren't using `errors.Is` we don't need the `Unwrap` as we have `Cause` which is what pkg/errors uses. | rclone-rclone | go |
@@ -4,8 +4,9 @@ import (
"io/ioutil"
"os"
+ "k8s.io/klog"
+
"github.com/kubeedge/beehive/pkg/common/config"
- "github.com/kubeedge/beehive/pkg/common/log"
"github.com/kubeedge/beehive/pkg/core"
"github.com/kubeedge/beehive/pkg/core/context"
"github.com/kubeedge/kubeedge/cloud/pkg/cloudhub/channelq" | 1 | package cloudhub
import (
"io/ioutil"
"os"
"github.com/kubeedge/beehive/pkg/common/config"
"github.com/kubeedge/beehive/pkg/common/log"
"github.com/kubeedge/beehive/pkg/core"
"github.com/kubeedge/beehive/pkg/core/context"
"github.com/kubeedge/kubeedge/cloud/pkg/cloudhub/channelq"
"github.com/kubeedge/kubeedge... | 1 | 13,468 | redundant empty line | kubeedge-kubeedge | go |
@@ -150,6 +150,7 @@ bool ConfigManager::load()
boolean[ONLINE_OFFLINE_CHARLIST] = getGlobalBoolean(L, "showOnlineStatusInCharlist", false);
boolean[YELL_ALLOW_PREMIUM] = getGlobalBoolean(L, "yellAlwaysAllowPremium", false);
boolean[FORCE_MONSTERTYPE_LOAD] = getGlobalBoolean(L, "forceMonsterTypesOnLoad", true);
+ ... | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2019 Mark Samman <mark.samman@gmail.com>
*
* 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; eithe... | 1 | 16,906 | The config.lua.dist still shows `houseAccountOwner` | otland-forgottenserver | cpp |
@@ -11,7 +11,6 @@
namespace Sonata\MediaBundle\Command;
-use Sonata\ClassificationBundle\Model\ContextInterface;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; | 1 | <?php
/*
* This file is part of the Sonata Project package.
*
* (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\Command;
use Sonata\Classification... | 1 | 6,913 | I think we can leave this import and use non FQNs in the code. | sonata-project-SonataMediaBundle | php |
@@ -1654,9 +1654,10 @@ class TargetLocator {
* when the driver has changed focus to the specified window.
*/
window(nameOrHandle) {
+ let paramName = this.driver_.getExecutor().w3c ? 'handle' : 'name';
return this.driver_.schedule(
new command.Command(command.Name.SWITCH_TO_WINDOW).
- ... | 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,590 | I'd rather just send the parameter twice than break encapsulation here. There's already precedence with webelement IDs | SeleniumHQ-selenium | rb |
@@ -79,11 +79,9 @@ namespace Microsoft.DotNet.Build.Tasks.Feed
public async Task<bool> PushItemsToFeedAsync(IEnumerable<string> items, bool allowOverwrite)
{
Log.LogMessage(MessageImportance.Low, $"START pushing items to feed");
- Random rnd = new Random();
try
... | 1 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.Build.Framework;
using Microsoft.DotNet.Build.CloudTestTasks;
using Microsoft.WindowsAzure.Storage;... | 1 | 14,110 | We should probably exit early if there are no items in the list. | dotnet-buildtools | .cs |
@@ -16,7 +16,7 @@ def _private_func3(param1): # [missing-raises-doc]
raise Exception('Example')
-def public_func1(param1): # [missing-param-doc, missing-type-doc]
+def public_func1(param1): # [missing-any-param-doc]
"""This is a test docstring without params"""
print(param1)
| 1 | """Fixture for testing missing documentation in docparams."""
def _private_func1(param1): # [missing-return-doc, missing-return-type-doc]
"""This is a test docstring without returns"""
return param1
def _private_func2(param1): # [missing-yield-doc, missing-yield-type-doc]
"""This is a test docstring w... | 1 | 16,318 | As we can't use old names we should warn in whats new for 2.12 that this can happen. | PyCQA-pylint | py |
@@ -0,0 +1,13 @@
+// +build testbincover
+
+package main
+
+import (
+ "testing"
+
+ "github.com/confluentinc/bincover"
+)
+
+func TestBincoverRunMain(t *testing.T) {
+ bincover.RunTest(main)
+} | 1 | 1 | 23,658 | good job finding this package, I hope it's actively maintained | antrea-io-antrea | go | |
@@ -82,7 +82,6 @@ void getDevicePCIBusNum(int deviceID, char* pciBusID) {
int main() {
unsetenv("HIP_VISIBLE_DEVICES");
- unsetenv("CUDA_VISIBLE_DEVICES");
std::vector<std::string> devPCINum;
char pciBusID[100]; | 1 | /* Copyright (c) 2015-2016 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, co... | 1 | 8,479 | same changes as in hipEnvVar.cpp | ROCm-Developer-Tools-HIP | cpp |
@@ -1,6 +1,11 @@
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809L
+#endif
+#include <string.h>
#include <assert.h>
#include <libinput.h>
#include <stdlib.h>
+#include <wayland-util.h>
#include <wlr/backend/session.h>
#include <wlr/interfaces/wlr_tablet_tool.h>
#include <wlr/types/wlr_input_device.h> | 1 | #include <assert.h>
#include <libinput.h>
#include <stdlib.h>
#include <wlr/backend/session.h>
#include <wlr/interfaces/wlr_tablet_tool.h>
#include <wlr/types/wlr_input_device.h>
#include <wlr/util/log.h>
#include "backend/libinput.h"
#include "util/signal.h"
struct wlr_tablet_tool *create_libinput_tablet_tool(
stru... | 1 | 11,292 | NULL check should be before this line | swaywm-wlroots | c |
@@ -177,7 +177,7 @@ public class WildernessLocationsPlugin extends Plugin
|| (this.pvpWorld && WorldType.isAllPvpWorld(client.getWorldType())));
if (renderLocation)
{
- if (client.getLocalPlayer().getWorldLocation() != worldPoint)
+ if (client.getLocalPlayer() != null && client.getLocalPlayer().getWorldLo... | 1 | /*******************************************************************************
* Copyright (c) 2019 openosrs
* Redistributions and modifications of this software are permitted as long as this notice remains in its original unmodified state at the top of this file.
* If there are any questions comments, or feedback... | 1 | 16,017 | Seems like client.getlocalplayer is being called a lot, would it be worth it to do final Player player = client.getlocalplayer? | open-osrs-runelite | java |
@@ -116,9 +116,9 @@ ex_expr::exp_return_type ex_comp_clause::processNulls(char *op_data[],
// then move boolean unknown value to result and return.
if (getOperand(i)->getNullFlag() && (!op_data[i])) // missing value
{
- // move null value to result.
- *(Lng32 *)op_data[2 * MAX_OPERANDS] ... | 1 | /**********************************************************************
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. ... | 1 | 22,156 | this change is not correct. 3-valued boolean logic requires that comparison of null to another value during intermediate operations should make the result null and not false. The place where null becomes false is at the very end of that expression. As an example, with the changed logic, this expression will return inco... | apache-trafodion | cpp |
@@ -95,6 +95,7 @@ func NewReplacer(r *http.Request, rr *ResponseRecorder, emptyValue string) Repla
dir, _ := path.Split(r.URL.Path)
return dir
}(),
+ "{locale}": r.Header.Get("Detected-Locale"),
},
emptyValue: emptyValue,
} | 1 | package middleware
import (
"net"
"net/http"
"net/url"
"os"
"path"
"strconv"
"strings"
"time"
)
// Replacer is a type which can replace placeholder
// substrings in a string with actual values from a
// http.Request and ResponseRecorder. Always use
// NewReplacer to get one of these. Any placeholders
// made ... | 1 | 8,208 | This can already be done with `{>Detected-Locale}`, why make another way to do it? | caddyserver-caddy | go |
@@ -2376,10 +2376,11 @@ public class DatasetPage implements java.io.Serializable {
requestContext.execute("PF('selectFilesForRestrict').show()");
return "";
} else {
- boolean validSelection = false;
+ boolean validSelection = true;
... | 1 | package edu.harvard.iq.dataverse;
import edu.harvard.iq.dataverse.provenance.ProvPopupFragmentBean;
import edu.harvard.iq.dataverse.api.AbstractApiBean;
import edu.harvard.iq.dataverse.authorization.AuthenticationServiceBean;
import edu.harvard.iq.dataverse.authorization.Permission;
import edu.harvard.iq.dataverse.aut... | 1 | 38,849 | These changes just match the logic update in the next method that was done previously - to assure the whole set of files is valid rather than that there is at least one that would be changed. | IQSS-dataverse | java |
@@ -30,6 +30,11 @@ func (s *server) bytesUploadHandler(w http.ResponseWriter, r *http.Request) {
jsonhttp.InternalServerError(w, "cannot get or create tag")
return
}
+ w.Header().Set(SwarmTagUidHeader, fmt.Sprint(tag.Uid))
+ w.WriteHeader(http.StatusContinue)
+ if f, ok := w.(http.Flusher); ok {
+ f.Flush()
+ ... | 1 | // Copyright 2020 The Swarm Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package api
import (
"fmt"
"net/http"
"strings"
"github.com/ethersphere/bee/pkg/file"
"github.com/ethersphere/bee/pkg/file/splitter"
"github.com/ethe... | 1 | 11,928 | Why setting the status to Continue as at the end it is written OK? Status should be written only once. | ethersphere-bee | go |
@@ -140,10 +140,10 @@ func deps() {
cmd("go get -u github.com/pmezard/go-difflib/difflib"),
cmd("./scripts/install-rust-proofs.sh"),
cmd("./scripts/install-bls-signatures.sh"),
+ cmd("./proofs/bin/paramcache"),
+ cmd("./scripts/copy-groth-params.sh"),
}
- cmds = append(cmds, hydrateParamCache()...)
-
f... | 1 | package main
import (
"fmt"
gobuild "go/build"
"io"
"log"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"sync"
"github.com/filecoin-project/go-filecoin/util/version"
)
var lineBreak = "\n"
func init() {
log.SetFlags(0)
if runtime.GOOS == "windows" {
lineBreak = "\r\n"
}
}
// command is a struc... | 1 | 16,948 | Howdy! You'll want to do this same thing (replace `hydrateParamCache` with `proofs/bin/paramcache` and then do the copy) in `smartdeps`, too. | filecoin-project-venus | go |
@@ -46,6 +46,16 @@ import (
// CmdSnaphotCreateOptions holds the options for snapshot
// create command
+var (
+ snapshotCreateCommandHelpText = `
+ usage: mayactl snapshot create --volname <vol> --snapname <snap>
+
+ this command creates a volume snapshot
+
+ note: the volume should exit before itself
+ `
+)
+
... | 1 | /*
Copyright 2017 The OpenEBS Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | 1 | 8,216 | nit : Remove the extra lines | openebs-maya | go |
@@ -184,6 +184,7 @@ type Options struct {
ServerName string `json:"server_name"`
Host string `json:"addr"`
Port int `json:"port"`
+ DontListen bool `json:"dont_listen"`
ClientAdvertise string `json:"-"`
Trace... | 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 | 13,669 | Instead of adding a new option, I wonder if we could decide on a port that would disable listening. For instance, port set to 0 means that we use default port 4222. Setting to -1 means that we let OS pick a random free port. We could say anything negative lower than -1 (say -2) means disabled? You don't have to update ... | nats-io-nats-server | go |
@@ -2511,6 +2511,9 @@ class ThriftRequestHandler(object):
if report.metadata:
return report.metadata.get("analyzer", {}).get("name")
+ if report.check_name.startswith('clang-diagnostic-'):
+ return 'clang-tidy'
+
# Processing PList files.
_, _,... | 1 | # -------------------------------------------------------------------------
#
# Part of the CodeChecker project, under the Apache License v2.0 with
# LLVM Exceptions. See LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# ---------------------------------------------------... | 1 | 12,551 | Should we add some default case if non of the above return some analyzer name? Something like `unknown analyzer`? | Ericsson-codechecker | c |
@@ -115,7 +115,7 @@ module Faker
keywords << :special_characters if legacy_special_characters != NOT_GIVEN
end
- min_alpha = mix_case ? 2 : 0
+ min_alpha = mix_case && min_length > 1 ? 2 : 0
temp = Lorem.characters(number: min_length, min_alpha: min_alpha)
diff_leng... | 1 | # frozen_string_literal: true
module Faker
class Internet < Base
class << self
def email(legacy_name = NOT_GIVEN, legacy_separators = NOT_GIVEN, name: nil, separators: nil, domain: nil)
warn_for_deprecated_arguments do |keywords|
keywords << :name if legacy_name != NOT_GIVEN
key... | 1 | 10,137 | Nvm. The original version is best... *hides from the angry rubocop* | faker-ruby-faker | rb |
@@ -100,14 +100,13 @@ func (c *client) Call(
return nil, err
}
- body, cleanup, err := marshal(req.Encoding, protoReq)
+ body, err := marshal(req.Encoding, protoReq)
if err != nil {
return nil, yarpcencoding.RequestBodyEncodeError(req, err)
}
- defer cleanup()
reqBuf := &yarpc.Buffer{}
- if _, err := ... | 1 | // Copyright (c) 2018 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... | 1 | 18,153 | we can drop this and use the returned body above, right? | yarpc-yarpc-go | go |
@@ -142,12 +142,12 @@ module Travis
def install
sh.if "$(rvm use $(travis_internal_ruby) do ruby -e \"puts RUBY_VERSION\") = 1.9*" do
- cmd(dpl_install_command(WANT_18), echo: false, assert: !allow_failure, timing: true)
+ cmd(dpl_install_command(WANT_18), ech... | 1 | require 'travis/build/addons/deploy/conditions'
require 'travis/build/addons/deploy/config'
module Travis
module Build
class Addons
class Deploy < Base
class Script
VERSIONED_RUNTIMES = %w(
d
dart
elixir
ghc
go
haxe
... | 1 | 15,826 | Is echoing enabled on purpose here or it's a remainder of your tests? | travis-ci-travis-build | rb |
@@ -98,6 +98,7 @@ module Bolt
end
def run_command(targets, command, options = {}, &callback)
+ @logger.notice(options['_description']) if options.key?('_description')
@logger.info("Starting command run '#{command}' on #{targets.map(&:uri)}")
notify = proc { |event| @notifier.notify(callba... | 1 | # frozen_string_literal: true
# Used for $ERROR_INFO. This *must* be capitalized!
require 'English'
require 'json'
require 'concurrent'
require 'logging'
require 'bolt/result'
require 'bolt/config'
require 'bolt/notifier'
require 'bolt/result_set'
require 'bolt/puppetdb'
module Bolt
class Executor
attr_reader :... | 1 | 8,427 | I think this should just be worked into the next message and follow the verbosity of it. | puppetlabs-bolt | rb |
@@ -106,6 +106,7 @@ export const selectors = {
*
* @since 1.14.0
*
+ * @param {Object} urlParams URL parameters to be passed to the query.
* @return {(string|undefined)} AdSense account site overview URL (or `undefined` if not loaded).
*/
getServiceAccountSiteURL: createRegistrySelector( ( select ) =>... | 1 | /**
* `modules/adsense` data store: service.
*
* Site Kit by Google, Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses... | 1 | 35,906 | This also needs to be reverted. | google-site-kit-wp | js |
@@ -105,6 +105,13 @@ const (
TLFJournalBackgroundWorkEnabled
)
+type tlfJournalPauseType int
+
+const (
+ journalPausedFromConflict tlfJournalPauseType = 1 << iota
+ journalPausedFromSignal
+)
+
func (bws TLFJournalBackgroundWorkStatus) String() string {
switch bws {
case TLFJournalBackgroundWorkEnabled: | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"fmt"
"path/filepath"
"runtime"
"sync"
"time"
"github.com/keybase/backoff"
"github.com/keybase/client/go/logger"
"github.com/keybase/c... | 1 | 15,192 | `FromCommand` seems to fit better, since with my suggestion below, all pauses will raise a signal on `needPause`. Also maybe the format `journalPauseConflict` and `journalPauseCommand` is better, since the journal isn't necessarily paused yet once we raise a pause signal. | keybase-kbfs | go |
@@ -236,7 +236,7 @@ func IsServiceNonRetryableError(err error) bool {
// IsServiceNonRetryableErrorGRPC checks if the error is a non retryable error.
func IsServiceNonRetryableErrorGRPC(err error) bool {
if err == context.DeadlineExceeded {
- return true
+ return false
}
if st, ok := status.FromError(err); ... | 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 | 9,259 | This is fix from another PR #120. | temporalio-temporal | go |
@@ -20,7 +20,9 @@ class MultiInterface(Interface):
datatype = 'multitabular'
- subtypes = ['dataframe', 'dictionary', 'array', 'dask']
+ subtypes = ['dictionary', 'dataframe', 'array', 'dask']
+
+ multi = True
@classmethod
def init(cls, eltype, data, kdims, vdims): | 1 | import numpy as np
from ..util import max_range
from .interface import Interface
class MultiInterface(Interface):
"""
MultiInterface allows wrapping around a list of tabular datasets
including dataframes, the columnar dictionary format or 2D tabular
NumPy arrays. Using the split method the list of tab... | 1 | 19,000 | I *think* it makes sense to try the more general dictionary (i.e standard python literals) format first. Might be other implications I haven't figured out yet. Then again, ``MultiInterface`` is pretty new so it probably doesn't matter wrt backwards compatibility. | holoviz-holoviews | py |
@@ -32,9 +32,13 @@ class FixMediaContextCommand extends ContainerAwareCommand
*/
public function execute(InputInterface $input, OutputInterface $output)
{
+ if (!$this->getContainer()->has('sonata.media.manager.category')) {
+ throw new \LogicException('The classification feature is di... | 1 | <?php
/*
* This file is part of the Sonata Project package.
*
* (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\Command;
use Sonata\Classification... | 1 | 9,179 | lol that variable name | sonata-project-SonataMediaBundle | php |
@@ -31,8 +31,8 @@ const (
ChainFilterForward = ChainNamePrefix + "-FORWARD"
ChainFilterOutput = ChainNamePrefix + "-OUTPUT"
- ChainFailsafeIn = ChainNamePrefix + "-FAILSAFE-IN"
- ChainFailsafeOut = ChainNamePrefix + "-FAILSAFE-OUT"
+ ChainFailsafeIn = ChainNamePrefix + "-failsafe-in"
+ ChainFailsafeOut = Chain... | 1 | // Copyright (c) 2016-2017 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 | 14,857 | Upper case is reserved for our versions of top-level chains i.e. the `FORWARD` chain jumps to `cali-FORWARD`. | projectcalico-felix | go |
@@ -3373,10 +3373,14 @@ void nano::json_handler::receive ()
}
if (!ec)
{
+ // Representative is only used by receive_action when opening accounts
+ // Set a wallet default representative for new accounts
+ nano::account representative (wallet->store.representative (node.wallets.tx_begin... | 1 | #include <nano/lib/config.hpp>
#include <nano/lib/json_error_response.hpp>
#include <nano/lib/timer.hpp>
#include <nano/node/common.hpp>
#include <nano/node/ipc.hpp>
#include <nano/node/json_handler.hpp>
#include <nano/node/json_payment_observer.hpp>
#include <nano/node/node.hpp>
#include <nano/node/node_rpc_config.hpp... | 1 | 16,046 | json_handler::receive () has already started a read tx that can be used here right? | nanocurrency-nano-node | cpp |
@@ -84,6 +84,9 @@ describe( 'CompatibilityChecks', () => {
it( 'should make API requests to "setup-checks, health-checks and AMP Project test URL', async () => {
const token = 'test-token-value';
+ global._googlesitekitBaseData = global._googlesitekitBaseData || {};
+ global._googlesitekitBaseData[ 'isWP5.0+' ... | 1 | /**
* CompatibilityChecks component tests.
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/L... | 1 | 33,987 | We should add the definition to `.storybook/config.js` as well. | google-site-kit-wp | js |
@@ -96,7 +96,7 @@ ex_expr::exp_return_type ex_branch_clause::eval(char *op_data[],
switch (getOperType())
{
case ITM_AND:
- if (*(Lng32 *)op_data[1] == 0)
+ if (*(Lng32 *)op_data[1] == 0 || *(Lng32 *)op_data[1] == -1) // null treated as false
{
*(Lng32 *)op_data[0] = 0;
setNextClause(b... | 1 | /* -*-C++-*-
*****************************************************************************
*
* File: <file>
* Description:
*
*
* Created: 7/10/95
* Language: C++
*
*
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// ... | 1 | 22,420 | I don't believe this is correct. Consider the query, "select a from t1x where not(b = 0 and c = 0)". When B and C are both null, both equal predicates evaluate to null, and the AND evaluates to null. The NOT then also evaluates to null. The WHERE clause should treat the result of the NOT as false. But with this fix, th... | apache-trafodion | cpp |
@@ -72,7 +72,12 @@ final class IntArrayDocIdSet extends DocIdSet {
@Override
public int advance(int target) throws IOException {
- i = Arrays.binarySearch(docs, i + 1, length, target);
+ int bound = 1;
+ int offset = Math.max(0, i);
+ while(offset + bound < length && docs[offset + bound]... | 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 | 29,138 | `bound/2` is generally the previous bound that we tested, except when `bound` is equal to 1. It won't break in that case since callers are not supposed to call advance on a target that is lte the current doc ID, but this might still make room for bugs? | apache-lucene-solr | java |
@@ -65,8 +65,12 @@ function Admin(db, topology, promiseLibrary) {
* @method
* @param {object} command The command hash
* @param {object} [options] Optional settings.
- * @param {(ReadPreference|string)} [options.readPreference] The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRE... | 1 | 'use strict';
const executeOperation = require('./utils').executeOperation;
const applyWriteConcern = require('./utils').applyWriteConcern;
const addUser = require('./operations/db_ops').addUser;
const executeDbAdminCommand = require('./operations/db_ops').executeDbAdminCommand;
const removeUser = require('./operatio... | 1 | 14,935 | Can we remove `raw`, `fullResult`, and `serializeFunctions`? | mongodb-node-mongodb-native | js |
@@ -110,6 +110,8 @@ type (
TLS RootTLS `yaml:"tls"`
// Metrics is the metrics subsystem configuration
Metrics *Metrics `yaml:"metrics"`
+ // Settings for authentication and authorization
+ Security Security `yaml:"security"`
}
// RootTLS contains all TLS settings for the Temporal server | 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,791 | [Nit] I don't have a proposed suggestion, but security seems too generic of a name here. | temporalio-temporal | go |
@@ -0,0 +1,19 @@
+const config = require('../lib/config')
+const util = require('../lib/util')
+const path = require('path')
+const fs = require('fs-extra')
+
+const createDist = (options) => {
+ config.update(options)
+ config.buildConfig = 'Release'
+
+ let cmdOptions = config.defaultOptions
+ const args = util.b... | 1 | 1 | 5,253 | do we need to force a buildConfig here? I know it's in muon, but that might actually be making things harder for people | brave-brave-browser | js | |
@@ -302,6 +302,10 @@ bool Client::Process() {
}
if (AutoFireEnabled()) {
+ if (this->GetTarget() == this) {
+ this->MessageString(Chat::TooFarAway, TRY_ATTACKING_SOMEONE);
+ auto_fire = false;
+ }
EQ::ItemInstance *ranged = GetInv().GetItem(EQ::invslot::slotRange);
if (ranged)
{ | 1 | /* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2003 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program... | 1 | 11,021 | Shouldn't need this-> here. | EQEmu-Server | cpp |
@@ -1,4 +1,3 @@
-# Copyright (c) OpenMMLab. All rights reserved.
import math
import torch | 1 | # Copyright (c) OpenMMLab. All rights reserved.
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import (ConvModule, DepthwiseSeparableConvModule,
bias_init_with_prob)
from mmcv.ops.nms import batched_nms
from mmdet.core import (MlvlPointGenerator, bbo... | 1 | 25,625 | Why delete this? | open-mmlab-mmdetection | py |
@@ -10,6 +10,17 @@ export function extend(obj, props) {
return obj;
}
+/** Invoke or update a ref, depending on whether it is a function or object ref.
+ * @param {object|function} [ref=null]
+ * @param {any} [value]
+ */
+export function applyRef(ref, value) {
+ if (ref!=null) {
+ if (typeof ref=='function') r... | 1 | /**
* Copy all properties from `props` onto `obj`.
* @param {object} obj Object onto which properties should be copied.
* @param {object} props Object from which to copy properties.
* @returns {object}
* @private
*/
export function extend(obj, props) {
for (let i in props) obj[i] = props[i];
return obj;
}
/**
... | 1 | 12,081 | This line is here to be compatible with the current way `refs` work, right? | preactjs-preact | js |
@@ -10,7 +10,11 @@
<strong><%= name %>
</td>
<td>
- <%= value %>
+ <% if value.class == BigDecimal %>
+ <%= number_to_currency(value) %>
+ <% else %>
+ <%= value %>
+ <% end %>
</td>
</tr>
<%- end %> | 1 | <table width="100%" class="data_container cart_properties table">
<tr class='header'>
<td class="first" width="33%" scope="col" colspan="2">
<h5>FY15 Credit Card Purchase Request</h5>
</td>
</tr>
<%- proposal.fields_for_display.each do |name, value| %>
<tr class="cart_item_information">
<t... | 1 | 12,915 | Hmm, I wonder if we can safely assume all decimals should be displayed as $$...ok for now I suppose. | 18F-C2 | rb |
@@ -443,4 +443,17 @@ describe RSpec::Core::Example, :parent_metadata => 'sample' do
expect(ex.description).to match(/contains the example/)
end
end
+
+ describe "setting the current example" do
+ it "sets RSpec.current_example to the example that is currently running" do
+ group = RSpec::Core::E... | 1 | require 'spec_helper'
require 'pp'
require 'stringio'
describe RSpec::Core::Example, :parent_metadata => 'sample' do
let(:example_group) do
RSpec::Core::ExampleGroup.describe('group description')
end
let(:example_instance) do
example_group.example('example description') { }
end
it_behaves_like "met... | 1 | 9,481 | Good spec :). Very clear and easy to see what it's doing. | rspec-rspec-core | rb |
@@ -0,0 +1,12 @@
+class ExploreController < ApplicationController
+ def orgs
+ @newest_orgs = Organization.active.order('created_at DESC').limit(3)
+ @most_active_orgs = OrgThirtyDayActivity.most_active_orgs
+ @stats_by_sector = OrgStatsBySector.recent
+ @org_by_30_day_commits = OrgThirtyDayActivity.send("... | 1 | 1 | 7,109 | Shouldn't we need to sanitize the `params[:filter]` from a defined expected values? | blackducksoftware-ohloh-ui | rb | |
@@ -10,6 +10,18 @@ from dagster.core.launcher.base import LaunchRunContext, RunLauncher
from dagster.grpc.types import ExecuteRunArgs
from dagster.serdes import ConfigurableClass, serialize_dagster_namedtuple
from dagster.utils.backcompat import experimental
+from dagster.utils.backoff import backoff
+
+
+# The ECS ... | 1 | import os
import typing
from dataclasses import dataclass
import boto3
import dagster
import requests
from dagster import Field, check
from dagster.core.launcher.base import LaunchRunContext, RunLauncher
from dagster.grpc.types import ExecuteRunArgs
from dagster.serdes import ConfigurableClass, serialize_dagster_named... | 1 | 14,571 | Should we bite the bullet and poll for the full 5 minutes that AWS recommends? If we do that, we'll probably want to leave some kind of breadcrumb in the event log to let users know why it's taking so long to launch. | dagster-io-dagster | py |
@@ -36,7 +36,7 @@ import java.util.concurrent.TimeUnit;
import java.util.function.Predicate;
import java.util.function.Supplier;
-import com.google.common.base.Objects;
+import com.google.common.base.MoreObjects;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.cloud.Aliases;
import org... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 1 | 28,460 | Guava changed `Objects` -> `MoreObjects` | apache-lucene-solr | java |
@@ -20,8 +20,11 @@
package mocks
-import mock "github.com/stretchr/testify/mock"
-import persistence "github.com/temporalio/temporal/common/persistence"
+import (
+ mock "github.com/stretchr/testify/mock"
+
+ persistence "github.com/temporalio/temporal/common/persistence"
+)
// MetadataManager is an autogenerat... | 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 | 9,144 | All these hand generated mocks can be deleted. I think we already moved everything to gomocks. | temporalio-temporal | go |
@@ -1251,7 +1251,7 @@ Document.prototype.inspect = function (options) {
*/
Document.prototype.equals = function (doc) {
- return this.get('_id') === doc.get('_id');
+ return this.get('_id').equals(doc.get('_id'));
};
/** | 1 | /**
* Module dependencies.
*/
var EventEmitter = require('events').EventEmitter
, MongooseError = require('./error')
, MixedSchema = require('./schema/mixed')
, Schema = require('./schema')
, ValidatorError = require('./schematype').ValidatorError
, utils = require('./utils')
, clone = utils.clone
, is... | 1 | 11,576 | what about string/number etc _ids? this will fail. | Automattic-mongoose | js |
@@ -682,7 +682,7 @@ func TestRemoteMachineSetReconcile(t *testing.T) {
t.Errorf("machineset %v has unexpected labels:\nexpected: %v\nactual: %v", eMS.Name, eMS.Labels, rMS.Labels)
}
if !reflect.DeepEqual(eMS.ObjectMeta.Annotations, rMS.ObjectMeta.Annotations) {
- t.Errorf("machineset %v ... | 1 | package remotemachineset
import (
"context"
"encoding/json"
"fmt"
"reflect"
"testing"
controllerutils "github.com/openshift/hive/pkg/controller/utils"
"github.com/aws/aws-sdk-go/aws"
"github.com/golang/mock/gomock"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/c... | 1 | 12,987 | Looks like the test had a bug prior to this. | openshift-hive | go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.