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
@@ -38,9 +38,10 @@ import org.apache.lucene.search.MaxScoreAccumulator.DocAndScore; */ public abstract class TopScoreDocCollector extends TopDocsCollector<ScoreDoc> { - abstract static class ScorerLeafCollector implements LeafCollector { + /** Scorable leaf collector */ + public abstract static class ScorerLeaf...
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,050
This is used in o.a.l.sandbox.search.LargeNumHitsTopDocsCollector.
apache-lucene-solr
java
@@ -1,11 +1,11 @@ # optimizer optimizer = dict(type='SGD', lr=0.02, momentum=0.9, weight_decay=0.0001) -optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2)) +optimizer_config = dict(grad_clip=None) # learning policy lr_config = dict( policy='step', warmup='linear', warmup_iters=500, - ...
1
# optimizer optimizer = dict(type='SGD', lr=0.02, momentum=0.9, weight_decay=0.0001) optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2)) # learning policy lr_config = dict( policy='step', warmup='linear', warmup_iters=500, warmup_ratio=1.0 / 3, step=[8, 11]) total_epochs = 12
1
19,019
We may also do the same for `schedule_2x.py` and `schedule_20e.py`.
open-mmlab-mmdetection
py
@@ -4,6 +4,7 @@ class User < ActiveRecord::Base has_many :traces, -> { where(:visible => true) } has_many :diary_entries, -> { order(:created_at => :desc) } has_many :diary_comments, -> { order(:created_at => :desc) } + has_and_belongs_to_many :diary_entries_subscriptions, :class_name => "DiaryEntry", :join_t...
1
class User < ActiveRecord::Base require "xml/libxml" has_many :traces, -> { where(:visible => true) } has_many :diary_entries, -> { order(:created_at => :desc) } has_many :diary_comments, -> { order(:created_at => :desc) } has_many :messages, -> { where(:to_user_visible => true).order(:sent_on => :desc).prel...
1
10,178
Should foreign key here be something like `diary_entry_id`? Or above, in `diary_entry.rb`, it should be `diary_entry_id`?
openstreetmap-openstreetmap-website
rb
@@ -54,12 +54,13 @@ type ( namespaceEntry *cache.NamespaceCacheEntry // internal state - hasBufferedEvents bool - failWorkflowTaskInfo *failWorkflowTaskInfo - activityNotStartedCancelled bool - continueAsNewBuilder mutableState - stopProcessing bool // should s...
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,936
session is a new term. Should we call more like currentCommandBatch or something else?
temporalio-temporal
go
@@ -514,7 +514,7 @@ func (s *namespaceHandlerGlobalNamespaceEnabledNotMasterClusterSuite) TestUpdate _, err := s.MetadataManager.CreateNamespace(&persistence.CreateNamespaceRequest{ Namespace: &persistenceblobs.NamespaceDetail{ Info: &persistenceblobs.NamespaceInfo{ - Id: uuid.NewRandom(), + Id: ...
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,609
Will go fmt before squash.
temporalio-temporal
go
@@ -148,6 +148,7 @@ func DefaultConfig() Config { DockerGraphPath: "/var/lib/docker", ReservedMemory: 0, AvailableLoggingDrivers: []dockerclient.LoggingDriver{dockerclient.JsonFileDriver}, + PrivilegedCapable: true, } }
1
// Copyright 2014-2015 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
13,631
Setting this to `true` means that it will always get merged in. The way merging is done here is that if a value is its zero value (`false` for `bool`), the value is considered unchanged. In order for this to work, you'll need to change this to be a `*bool` type instead.
aws-amazon-ecs-agent
go
@@ -101,7 +101,6 @@ func newDefaultBootstrapConfig() *BootstrapConfig { // MiningConfig holds all configuration options related to mining. type MiningConfig struct { MinerAddress address.Address `json:"minerAddress"` - BlockSignerAddress address.Address `json:"blockSignerAddress"` AutoSealInterval...
1
package config import ( "encoding/json" "fmt" "io/ioutil" "os" "reflect" "regexp" "strings" "gx/ipfs/QmVmDhyTTUcQXFD1rRQ64fGLMSAoaQvNH3hwuaCFAPq2hy/errors" "github.com/filecoin-project/go-filecoin/address" "github.com/filecoin-project/go-filecoin/types" ) // Config is an in memory representation of the fi...
1
17,328
It was decided that blockSignerAddress is not only redundant (use the miner owner public key instead which is already stored), but does not belong in config.
filecoin-project-venus
go
@@ -70,6 +70,7 @@ setup( 'tenacity>=5.1.1', 'tqdm>=4.32', 'requests_futures==1.0.0', + 'jsonschema==3.*', ], extras_require={ 'pyarrow': [
1
import os import sys from pathlib import Path from setuptools import find_packages, setup from setuptools.command.install import install VERSION = Path(Path(__file__).parent, "quilt3", "VERSION").read_text().strip() def readme(): readme_short = """ Quilt manages data like code (with packages, repositories, ...
1
19,614
are we not asking for trouble here by not pinning this? or does 3.* imply all of the draft versions we'd try to validate?
quiltdata-quilt
py
@@ -39,10 +39,8 @@ class TemporalMemoryCompatibilityTest(unittest.TestCase): results1 = createAndRunNetwork(TPRegion, "bottomUpOut", checkpointMidway=False, - temporalImp="tm_py") + ...
1
#!/usr/bin/env python # ---------------------------------------------------------------------- # 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 ...
1
20,585
No, we want to compare `tm_py` and `tm_cpp` in this test.
numenta-nupic
py
@@ -47,6 +47,9 @@ const ( // TODO(liu-cong) configurable timeout decoupleSinkTimeout = 30 * time.Second + // Limit for request payload in bytes (100Mb) + maxRequestBodyBytes = 100000000 + // EventArrivalTime is used to access the metadata stored on a // CloudEvent to measure the time difference between when a...
1
/* 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dist...
1
18,202
Let me know if we'd rather have this as an env variable.
google-knative-gcp
go
@@ -80,10 +80,10 @@ func NewVaultServiceAccount(name string) *corev1.ServiceAccount { } } -func NewVaultServiceAccountRole(namespace string) *rbacv1.ClusterRole { +func NewVaultServiceAccountRole(namespace, serviceAccountName string) *rbacv1.ClusterRole { return &rbacv1.ClusterRole{ ObjectMeta: metav1.ObjectM...
1
/* Copyright 2020 The cert-manager 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
27,462
question: what is happening here?
jetstack-cert-manager
go
@@ -14,6 +14,8 @@ public abstract class AbstractSetTest extends AbstractTraversableRangeTest { @Override abstract protected <T> Set<T> empty(); + abstract protected <T> Set<T> emptyWithNull(); + @Override abstract protected <T> Set<T> of(T element);
1
/* / \____ _ _ ____ ______ / \ ____ __ _______ * / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG * _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2016 Javaslang, http://javaslang.io * /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ ...
1
10,884
\[Checkstyle\] ERROR: 'protected' modifier out of order with the JLS suggestions\.
vavr-io-vavr
java
@@ -4,6 +4,18 @@ const chai = require('chai'); const expect = chai.expect; chai.use(require('chai-subset')); +const EJSON = require('mongodb-extjson'); +const getKmsProviders = localKey => { + const result = EJSON.parse(process.env.CSFLE_KMS_PROVIDERS || 'NOT_PROVIDED'); + if (localKey) { + result.local = { ke...
1
'use strict'; const BSON = require('bson'); const chai = require('chai'); const expect = chai.expect; chai.use(require('chai-subset')); // Tests for the ClientEncryption type are not included as part of the YAML tests. // In the prose tests LOCAL_MASTERKEY refers to the following base64: // .. code:: javascript // ...
1
19,429
Can we use EJSON from bson here? and in doing so avoid bringing in the deprecated `mongodb-extjson` lib `const { EJSON } = require('bson')`
mongodb-node-mongodb-native
js
@@ -262,9 +262,6 @@ class GridPlot(CompositePlot): show_legend = param.Boolean(default=False, doc=""" Legends add to much clutter in a grid and are disabled by default.""") - tick_format = param.String(default="%.2f", doc=""" - Formatting string for the GridPlot ticklabels.""") - xaxis = ...
1
from __future__ import division import numpy as np import matplotlib as mpl from mpl_toolkits.mplot3d import Axes3D # noqa (For 3D plots) from matplotlib import pyplot as plt from matplotlib import gridspec, animation import param from ...core import (OrderedDict, HoloMap, AdjointLayout, NdLayout, ...
1
15,325
So this parameter is now deprecated?
holoviz-holoviews
py
@@ -269,6 +269,7 @@ rseq_shared_fragment_flushtime_update(dcontext_t *dcontext) rseq_clear_tls_ptr(dcontext); } +#ifdef HAVE_RSEQ bool rseq_is_registered_for_current_thread(void) {
1
/* ******************************************************************************* * Copyright (c) 2019-2020 Google, Inc. All rights reserved. * *******************************************************************************/ /* * Redistribution and use in source and binary forms, with or without * modification, ...
1
22,880
Actually, it looks like HAVE_RSEQ is only used to determine whether the rseq.h header is around, which then only determines whether the regression test is built: it does not affect whether the core handles an application using rseq. The core rseq mangling code and all the code in rseq_linux.c is always enabled. I belie...
DynamoRIO-dynamorio
c
@@ -3,8 +3,7 @@ package cache import ( "sync" - "github.com/gofrs/uuid" - "github.com/spiffe/spire/pkg/common/selector" + "github.com/spiffe/spire/proto/spire/common" ) type Subscriber interface {
1
package cache import ( "sync" "github.com/gofrs/uuid" "github.com/spiffe/spire/pkg/common/selector" ) type Subscriber interface { Updates() <-chan *WorkloadUpdate Finish() } type WorkloadUpdate struct { Entries []*Entry Bundle *Bundle FederatedBundles map[string]*Bundle } type subscriber...
1
11,008
I don't see a corresponding call to freeSelectorSet... am I missing something?
spiffe-spire
go
@@ -2,13 +2,13 @@ require "rails_helper" describe AuthCallbacksController do context '#create' do - it 'redirects to the dashboard path without an auth origin' do + it 'redirects to the practice path without an auth origin' do request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:github] r...
1
require "rails_helper" describe AuthCallbacksController do context '#create' do it 'redirects to the dashboard path without an auth origin' do request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:github] request.env['omniauth.origin'] = nil get :create, provider: 'github' should re...
1
12,830
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
thoughtbot-upcase
rb
@@ -40,9 +40,10 @@ namespace OpenTelemetry.Trace public const string HttpRouteKey = "http.route"; public const string HttpFlavorKey = "http.flavor"; - public const string DatabaseTypeKey = "db.type"; - public const string DatabaseInstanceKey = "db.instance"; + public const strin...
1
// <copyright file="SpanAttributeConstants.cs" company="OpenTelemetry Authors"> // Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://ww...
1
14,480
Is this part of spec?
open-telemetry-opentelemetry-dotnet
.cs
@@ -3725,6 +3725,18 @@ client_thread_run(void) byte *xsp; GET_STACK_PTR(xsp); void *crec = get_clone_record((reg_t)xsp); + /* i#2335: we support setup separate from start, and we want to allow a client + * to create a client thread during init, but we do not support that thread + * executing u...
1
/* ******************************************************************************* * Copyright (c) 2010-2019 Google, Inc. All rights reserved. * Copyright (c) 2011 Massachusetts Institute of Technology All rights reserved. * Copyright (c) 2000-2010 VMware, Inc. All rights reserved. * ****************************...
1
19,692
Hmm, do we need to do this for Windows too? It won't have this private loader TLS issue but it will run DR code in a separate thread before DR init is fully done which I think violates some assumptions. For Windows we would move this wait from win32/os.c to win32/callback.s intercept_new_thread where it checks whether ...
DynamoRIO-dynamorio
c
@@ -840,3 +840,8 @@ def kinesis_get_latest_records(stream_name, shard_id, count=10, env=None): while len(result) > count: result.pop(0) return result + + +def get_lambda_name_from_arn(arn): + attributes = arn.split(':') + return attributes[-1]
1
import os import re import json import time import boto3 import base64 import logging import six from six.moves.urllib.parse import quote_plus, unquote_plus from localstack import config from localstack.constants import ( REGION_LOCAL, LOCALHOST, MOTO_ACCOUNT_ID, ENV_DEV, APPLICATION_AMZ_JSON_1_1, APPLICATION_A...
1
10,997
We can remove this function and use `lambda_function_name(..)` in this file instead.
localstack-localstack
py
@@ -17,10 +17,12 @@ package metrics -import "time" +import ( + "time" +) -// CreateSender creates metrics sender with appropriate transport -func CreateSender(disableMetrics bool, metricsAddress string) *Sender { +// NewSender creates metrics sender with appropriate transport +func NewSender(disableMetrics bool,...
1
/* * Copyright (C) 2019 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,719
nitpick: `ApplicationVersion` could be `AppVersion`. It's smaller but gives the same understanding for purposes of the field.
mysteriumnetwork-node
go
@@ -537,6 +537,9 @@ func (handler *DCRedirectionHandlerImpl) PollWorkflowTaskQueue( return err }) + if resp == nil && err == nil { + return &workflowservice.PollWorkflowTaskQueueResponse{}, nil + } return resp, err }
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,573
nit: maybe prefer `resp = &workflowservice.PollWorkflowTaskQueueResponse{}` over adding another function exit points especially for non-error cases?
temporalio-temporal
go
@@ -107,6 +107,10 @@ module Mongoid # # @since 6.0.0 def client + client_options = send(:client_options) + if client_options[:read].is_a?(Symbol) + client_options = client_options.merge(read: {mode: client_options[:read]}) + end @client ||= (client = Clients.with_name(client_...
1
module Mongoid # Object encapsulating logic for setting/getting a collection and database name # and a client with particular options to use when persisting models. # # @since 6.0.0 class PersistenceContext extend Forwardable # Delegate the cluster method to the client. def_delegators :client, :...
1
11,891
Do we specifically need to keep the read preference as a symbol for use elsewhere? If not, I think it would be cleaner to just modify the options before caching them in the `client_options` method so that we don't do this check every time. If we do need it a a symbol elsewhere, I'd suggest either putting `return @clien...
mongodb-mongoid
rb
@@ -69,7 +69,8 @@ module.exports = class Webcam extends Plugin { 'picture' ], mirror: true, - facingMode: 'user' + facingMode: 'user', + preferredMimeType: null } // merge default options with the ones set by user
1
const { h } = require('preact') const { Plugin } = require('@uppy/core') const Translator = require('@uppy/utils/lib/Translator') const getFileTypeExtension = require('@uppy/utils/lib/getFileTypeExtension') const canvasToBlob = require('@uppy/utils/lib/canvasToBlob') const supportsMediaRecorder = require('./supportsMed...
1
12,235
Since this is for video only, should it be called `preferredVideoMimeType`? If we add it for pictures later, it will likely need to be a different option.
transloadit-uppy
js
@@ -398,6 +398,8 @@ static bool ImageLayoutMatches(const VkImageAspectFlags aspect_mask, VkImageLayo // Utility type for ForRange callbacks struct LayoutUseCheckAndMessage { + using LayoutEntry = image_layout_map::ImageSubresourceLayoutMap::LayoutEntry; + using RangeGenerator = image_layout_map::ImageSubresou...
1
/* Copyright (c) 2015-2021 The Khronos Group Inc. * Copyright (c) 2015-2021 Valve Corporation * Copyright (c) 2015-2021 LunarG, Inc. * Copyright (C) 2015-2021 Google Inc. * Modifications Copyright (C) 2020-2021 Advanced Micro Devices, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (t...
1
16,683
That doesn't make sense. LayoutEntry doesn't match the generator concept.
KhronosGroup-Vulkan-ValidationLayers
cpp
@@ -284,7 +284,7 @@ func TestAppDeployOpts_getAppDockerfilePath(t *testing.T) { mockError := errors.New("mockError") mockManifest := []byte(`name: appA -type: 'Load Balanced Web App' +type: 'Load Balanced Web Svc' image: build: appA/Dockerfile `)
1
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cli import ( "errors" "fmt" "testing" "github.com/aws/amazon-ecs-cli-v2/internal/pkg/addons" "github.com/aws/amazon-ecs-cli-v2/internal/pkg/archer" "github.com/golang/mock/gomock" "github.com/s...
1
12,896
I think the customer visible strings should be "Service" instead of "Svc" to make it obvious to them
aws-copilot-cli
go
@@ -108,13 +108,13 @@ public class JavaProcessJobTest { props.put(AbstractProcessJob.WORKING_DIR, workingDir.getCanonicalPath()); props.put("type", "java"); props.put("fullPath", "."); - + props.put(CommonJobProperties.PROJECT_NAME, "test_project"); props.put(CommonJobProperties.FLOW_ID, "t...
1
/* * Copyright 2014 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
11,808
Explain why this property is necessary?
azkaban-azkaban
java
@@ -141,7 +141,8 @@ func securityDeposit(ps *EVMParams, stateDB vm.StateDB, gasLimit *uint64) error func ExecuteContracts(blk *Block, ws state.WorkingSet, bc Blockchain) { gasLimit := GasLimit blk.receipts = make(map[hash.Hash32B]*Receipt) - for idx, execution := range blk.Executions { + _, _, executions := action...
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
12,878
It should accept executions as the input
iotexproject-iotex-core
go
@@ -25,7 +25,10 @@ def single_gpu_test(model, with torch.no_grad(): result = model(return_loss=False, rescale=True, **data) + batch_size = len(result) if show or out_dir: + assert batch_size == 1, 'show or out during test only support ' \ + ...
1
import os.path as osp import pickle import shutil import tempfile import time import mmcv import torch import torch.distributed as dist from mmcv.runner import get_dist_info from mmdet.core import encode_mask_results, tensor2imgs def single_gpu_test(model, data_loader, show=F...
1
21,295
Is this limitation necessary?
open-mmlab-mmdetection
py
@@ -81,9 +81,13 @@ type IssuerSpec struct { } type IssuerConfig struct { - ACME *ACMEIssuer `json:"acme,omitempty"` - CA *CAIssuer `json:"ca,omitempty"` - Vault *VaultIssuer `json:"vault,omitempty"` + ACME *ACMEIssuer `json:"acme,omitempty"` + CA *CAIssuer `json:"ca,omitempty"` +...
1
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
1
12,694
:question: Should there be validation to ensure that only one of these attributes is used?
jetstack-cert-manager
go
@@ -33,11 +33,11 @@ */ namespace VuFind\Search\Solr; +use Interop\Container\ContainerInterface; use Laminas\EventManager\EventInterface; - use Laminas\EventManager\SharedEventManagerInterface; -use Laminas\ServiceManager\ServiceLocatorInterface; -use VuFindSearch\Backend\BackendInterface; + +use VuFindSearch\Bac...
1
<?php /** * Solr deduplication (merged records) listener. * * See https://vufind.org/wiki/indexing:deduplication for details on how this is * used. * * PHP version 7 * * Copyright (C) Villanova University 2013. * Copyright (C) The National Library of Finland 2013-2020. * * This program is free software; you...
1
30,884
I would recommend using Psr\Container\ContainerInterface here instead of Interop\Container\ContainerInterface; both currently work, but the Interop version is deprecated and will eventually be removed, so using the Psr version will save us time in the future.
vufind-org-vufind
php
@@ -312,7 +312,7 @@ func TestLocalExec(t *testing.T) { err = app.Exec("web", true, "pwd") assert.NoError(err) out := stdout() - assert.Contains(out, "/var/www/html/docroot") + assert.Contains(out, "/var/www/html") stdout = testcommon.CaptureStdOut() switch app.GetType() {
1
package platform import ( "fmt" "path/filepath" "testing" "time" "os" "strings" log "github.com/Sirupsen/logrus" "github.com/drud/ddev/pkg/dockerutil" "github.com/drud/ddev/pkg/fileutil" "github.com/drud/ddev/pkg/testcommon" "github.com/drud/ddev/pkg/util" "github.com/stretchr/testify/assert" ) var ( ...
1
11,402
This would also change back to /var/www/html/docroot if we go that way.
drud-ddev
php
@@ -12,7 +12,7 @@ import info.nightscout.androidaps.MainApp; */ public class SP { - private static SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(MainApp.instance().getApplicationContext()); + public static SharedPreferences sharedPreferences = PreferenceManager.getDefaul...
1
package info.nightscout.androidaps.utils; import android.content.SharedPreferences; import android.preference.PreferenceManager; import java.util.Map; import info.nightscout.androidaps.MainApp; /** * Created by mike on 17.02.2017. */ public class SP { private static SharedPreferences sharedPreferences = Pref...
1
32,327
Does this need to be public? Can't one of the helper functions below pass the data? If it really needs to be public, could it be write-protected?
MilosKozak-AndroidAPS
java
@@ -216,11 +216,6 @@ func RunAPIAndWait(ctx context.Context, nd *node.Node, config *config.APIConfig, } func CreateServerEnv(ctx context.Context, nd *node.Node) *Env { - var storageAPI *storage.API - if nd.StorageProtocol != nil { - storageAPI = storage.NewAPI(nd.StorageProtocol.StorageClient, nd.StorageProtocol.S...
1
package commands import ( "context" "fmt" "net/http" _ "net/http/pprof" // nolint: golint "os" "os/signal" "syscall" "time" "github.com/filecoin-project/go-filecoin/internal/pkg/protocol/storage" cmdkit "github.com/ipfs/go-ipfs-cmdkit" cmds "github.com/ipfs/go-ipfs-cmds" cmdhttp "github.com/ipfs/go-ipfs-...
1
23,534
Thanks. Now that you've improved this we should just init and expose the StorageAPI on the node, like the other.s
filecoin-project-venus
go
@@ -116,6 +116,15 @@ public class Key implements Comparable<Key> { return toRawKey(Arrays.copyOf(value, value.length + 1)); } + /** + * nextPrefix key will be key with next available rid. + * + * @return a new key current rid+1. + */ + public Key nextPrefix() { + return toRawKey(prefixNext(value)...
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
9,554
it will be better if you can provide some examples
pingcap-tispark
java
@@ -21,6 +21,8 @@ public abstract class LongRunningOperationDetailView { public abstract String operationReturnType(); + public abstract String operationResponseType(); + public static Builder newBuilder() { return new AutoValue_LongRunningOperationDetailView.Builder(); }
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
19,867
"return type" and "response type" have never really been contrasted before, and it's unclear what their meaning is here. Could you clarify?
googleapis-gapic-generator
java
@@ -10,6 +10,7 @@ import sys import traceback import subprocess import shlex +import json # TODO: This is a cross-subpackage import! from libcodechecker.log import build_action
1
# ------------------------------------------------------------------------- # The CodeChecker Infrastructure # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # -------------------------------------------------------------------------...
1
8,090
Import order has been violated here.
Ericsson-codechecker
c
@@ -250,11 +250,14 @@ func (api *API) MessagePreview(ctx context.Context, from, to address.Address, me // it does not change any state. It is use to interrogate actor state. The from address // is optional; if not provided, an address will be chosen from the node's wallet. func (api *API) MessageQuery(ctx context.Co...
1
package plumbing import ( "context" "fmt" "io" "strings" "time" "github.com/filecoin-project/go-filecoin/internal/pkg/block" "github.com/filecoin-project/go-filecoin/internal/pkg/chainsync/status" "github.com/filecoin-project/go-filecoin/internal/pkg/piecemanager" "github.com/filecoin-project/go-filecoin/int...
1
22,720
Are you suggesting deleting the concept of message querying from plumbing (sounds like more trouble than its worth) or suggesting deleting the snapshot based implementation?
filecoin-project-venus
go
@@ -114,6 +114,9 @@ func addJoinOtherFlags(cmd *cobra.Command, joinOptions *types.JoinOptions) { cmd.Flags().StringVar(&joinOptions.TarballPath, types.TarballPath, joinOptions.TarballPath, "Use this key to set the temp directory path for KubeEdge tarball, if not exist, download it") + + cmd.Flags().StringVarP(&j...
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
21,607
I recommend using StringSliceVarP to resolve the label flag, like `-l key1=value1,key2=value2`. What do you think?
kubeedge-kubeedge
go
@@ -711,6 +711,18 @@ class Form extends WidgetBase } } } + /** + * Add tab icons + * + * @param array $icons + * @return void + */ + public function addTabIcons(array $icons) + { + $this->allTabs->primary->icons = $icons; + $this->allTabs->secondary-...
1
<?php namespace Backend\Widgets; use Lang; use Form as FormHelper; use Backend\Classes\FormTabs; use Backend\Classes\FormField; use Backend\Classes\WidgetBase; use Backend\Classes\WidgetManager; use Backend\Classes\FormWidgetBase; use October\Rain\Database\Model; use October\Rain\Html\Helper as HtmlHelper; use Applica...
1
16,138
@Samuell1 Will assigning the same icons array to all the tabs result in, for example, a primary tab called "Colours" and secondary tab called "Colours" having the same icon?
octobercms-october
php
@@ -437,6 +437,9 @@ def initTranslation(): finally: del callerFrame # Avoid reference problems with frames (per python docs) +def getTranslatedMessage(translatedMessage): + return _(translatedMessage) + def _translatedManifestPaths(lang=None, forBundle=False): if lang is None: lang = languageHandler.getLan...
1
# -*- coding: UTF-8 -*- #addonHandler.py #A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2012-2016 Rui Batista, NV Access Limited, Noelia Ruiz Martínez, Joseph Lee #This file is covered by the GNU General Public License. #See the file COPYING for more details. import sys import os.path import gettext import ...
1
19,073
A docstring for this function please.
nvaccess-nvda
py
@@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.AspNetCore.Hosting.Server.Features; + +namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal +{ + internal class ServerAddressesFeature : IServerAddressesFeature + { + public ICollection<string> A...
1
1
12,433
heads up @JunTaoLuo
aspnet-KestrelHttpServer
.cs
@@ -167,12 +167,12 @@ namespace NLog if (SkipAssembly(stackFrame)) continue; - if (stackFrame.GetMethod().Name == "MoveNext") + if (stackFrame.GetMethod()?.Name == "MoveNext") { if (stackFrames.Length > i) ...
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
16,932
.GetMethod() cannot return null now, correct?
NLog-NLog
.cs
@@ -11,7 +11,7 @@ define(['events', 'playbackManager', 'dom', 'browser', 'css!./iconosd', 'materia function getOsdElementHtml() { var html = ''; - html += '<i class="material-icons iconOsdIcon volume_up"></i>'; + html += '<i class="material-icons iconOsdIcon"></i>'; html += '<di...
1
define(['events', 'playbackManager', 'dom', 'browser', 'css!./iconosd', 'material-icons'], function (events, playbackManager, dom, browser) { 'use strict'; var currentPlayer; var osdElement; var iconElement; var progressElement; var enableAnimation; function getOsdElementHtml() { ...
1
13,405
Same thing here, I think the proper fix is elsewhere.
jellyfin-jellyfin-web
js
@@ -585,6 +585,17 @@ ExWorkProcRetcode ExHdfsScanTcb::work() openType // ); + if ((retcode < 0) && + ((errno == ENOENT) || (errno == EAGAIN))) + { + ComDiagsArea * diagsArea = NULL; + ...
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
12,809
errno is a global variable that might be set by any system library call. It is dangerous to rely on it except right after the system call where it is set. But in this code, it looks like the library call is buried inside ExpLOBInterfaceSelectCursor. It would be safer if the latter function saved errno after whatever sy...
apache-trafodion
cpp
@@ -50,7 +50,8 @@ class PackageNode(object): def __repr__(self): finfo = self._package.get_path()[:-len(PackageStore.PACKAGE_FILE_EXT)] pinfo = self._prefix - return "<%s %r %r>" % (self.__class__.__name__, finfo, pinfo) + kinfo = '\n'.join(self._keys()) if hasattr(self, '_keys') el...
1
""" Magic module that maps its submodules to Quilt tables. Submodules have the following format: quilt.data.$user.$package.$table E.g.: import quilt.data.$user.$package as $package print $package.$table or from quilt.data.$user.$package import $table print $table The corresponding data is looked up in `quilt...
1
14,978
`hasattr` is kinda terrible; just append extra info in the subclass.
quiltdata-quilt
py
@@ -75,6 +75,16 @@ DAY = HOUR * 24 WEEK = DAY * 7 MONTH = DAY * 31 YEAR = DAY * 365 + +# Set a flag to indicate whether the '%l' option can be used safely. +# On Windows, in particular the %l option in strftime is not supported. +#(It is not one of the documented Python formatters). +try: + datetime.now().strftim...
1
"""Copyright 2008 Orbitz WorldWide 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...
1
7,873
Fair warning, the way that exception block is written won't work in python3 Python 3.2.3 (default, Jun 8 2012, 05:36:09) [GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. > > > try: > > > ... raise ValueError("foo") > > > ... except ValueError,e: > >...
graphite-project-graphite-web
py
@@ -43,12 +43,15 @@ module Beaker end port = container.json["NetworkSettings"]["Ports"]["22/tcp"][0]["HostPort"] + forward_ssh_agent = @options['forward_ssh_agent'] || false + # Update host metadata host['ip'] = ip host['port'] = port host['ssh'] = { ...
1
module Beaker class Docker < Beaker::Hypervisor def initialize(hosts, options) require 'docker' @options = options @logger = options[:logger] @hosts = hosts # increase the http timeouts as provisioning images can be slow ::Docker.options = { :write_timeout => 300, :read_timeo...
1
8,104
This only updates the metadata and not the actual thing you are trying to solve for the docker hypervisor.
voxpupuli-beaker
rb
@@ -0,0 +1,18 @@ +// 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...
1
1
16,857
should this package be internal? don't we want to use it e.g. in go-contrib?
open-telemetry-opentelemetry-go
go
@@ -31,7 +31,7 @@ import ( // // A Document can be represented as a map[string]int or a pointer to a struct. For // structs, the exported fields are the document fields. -type Document = interface{} +type Document interface{} // A Collection is a set of documents. // TODO(jba): make the docstring look more like ...
1
// Copyright 2019 The Go Cloud Development Kit Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appli...
1
16,348
Just curious, why did you make this change?
google-go-cloud
go
@@ -1576,6 +1576,8 @@ def get_dummies( "Length of 'prefix' ({}) did not match the length of " "the columns being encoded ({}).".format(len(prefix), len(column_labels)) ) + elif isinstance(prefix, dict): + prefix = [prefix[column_label[0]] for column_label in column_labels] ...
1
# # Copyright (C) 2019 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
1
15,039
Can you handle error cases such as `pd.get_dummies(pdf, prefix={"A": "foo"})`?
databricks-koalas
py
@@ -166,8 +166,12 @@ func (agent *TestAgent) StartAgent() error { Links: agent.Options.ContainerLinks, } + if os.Getenv("ECS_FTEST_FORCE_NET_HOST") != "" { + hostConfig.NetworkMode = "host" + } + if agent.Options != nil { - // Override the default docker envrionment variable + // Override the default docker...
1
// +build !windows,functional // 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/apac...
1
17,946
Where is this environment variable being set?
aws-amazon-ecs-agent
go
@@ -22,9 +22,7 @@ class Registry(object): module (:obj:`nn.Module`): Module to be registered. """ if not issubclass(module_class, nn.Module): - raise TypeError( - 'module must be a child of nn.Module, but got {}'.format( - type(module_class))) ...
1
import torch.nn as nn class Registry(object): def __init__(self, name): self._name = name self._module_dict = dict() @property def name(self): return self._name @property def module_dict(self): return self._module_dict def _register_module(self, module_class...
1
17,143
`module_class ` is already a class and `type(module_class)` always returns `<class 'type'>`
open-mmlab-mmdetection
py
@@ -110,6 +110,17 @@ class SparkFileWriterFactory extends BaseFileWriterFactory<InternalRow> { builder.createWriterFunc(SparkOrcWriter::new); } + @Override + protected void configureEqualityDelete(ORC.DeleteWriteBuilder builder) { + builder.createWriterFunc((iSchema, typDesc) -> new SparkOrcWriter(iSchem...
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
43,045
Nit: The lambda can be replaced with a method reference: `SparkOrcWriter::new` I think.
apache-iceberg
java
@@ -1265,6 +1265,13 @@ def is_number(obj): else: return False +def is_int(obj, int_like=False): + real_int = isinstance(obj, int) or getattr(getattr(obj, 'dtype', None), 'kind', 'o') in 'ui' + if real_int or (int_like and hasattr(obj, 'is_integer') and obj.is_integer()): + return True + return ...
1
import sys, warnings, operator import json import time import types import numbers import inspect import itertools import string import unicodedata import datetime as dt from collections import defaultdict from contextlib import contextmanager from distutils.version import LooseVersion as _LooseVersion from functools ...
1
23,616
It would be nice to have a docstring that says what range of integer-like objects will be accepted, as well as what the int_like argument is meant for.
holoviz-holoviews
py
@@ -0,0 +1,5 @@ +class CreateLicensesView < ActiveRecord::Migration + def change + create_view :licenses + end +end
1
1
15,987
How do we manage updates to this view down the road?
thoughtbot-upcase
rb
@@ -19,6 +19,7 @@ package org.openqa.selenium.grid.graphql; import graphql.schema.DataFetcher; import graphql.schema.DataFetchingEnvironment; + import org.openqa.selenium.grid.distributor.Distributor; import org.openqa.selenium.internal.Require;
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
17,791
We can revert this to reduce the diff of the PR.
SeleniumHQ-selenium
js
@@ -1174,8 +1174,11 @@ public abstract class BasePointsFormatTestCase extends BaseIndexFileFormatTestCa Document doc = new Document(); doc.add(new IntPoint("id", 0)); - w.addDocument(doc); - // now we write another segment where the id field does have points: + IllegalArgumentException ex = + ...
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
39,264
I think we should refactor or drop this test, as it is not testing the points format now, but IndexingChain/FieldsInfos' logic. Maybe we could rename the test `testMergeMissing` and configure the first segment to not have the `id` field at all.
apache-lucene-solr
java
@@ -6,15 +6,6 @@ module RSpec # @private # Produces progress output while bisecting. class BisectProgressFormatter < BaseTextFormatter - # We've named all events with a `bisect_` prefix to prevent naming collisions. - Formatters.register self, :bisect_starting, :bisect_original_run_co...
1
RSpec::Support.require_rspec_core "formatters/base_text_formatter" module RSpec module Core module Formatters # @private # Produces progress output while bisecting. class BisectProgressFormatter < BaseTextFormatter # We've named all events with a `bisect_` prefix to prevent naming colli...
1
16,943
not sure I follow why all this goes away?
rspec-rspec-core
rb
@@ -46,7 +46,7 @@ def test_insert_mode(file_name, source, input_text, auto_insert, quteproc): quteproc.press_keys(input_text) elif source == 'clipboard': quteproc.send_cmd(':debug-set-fake-clipboard "{}"'.format(input_text)) - quteproc.send_cmd(':paste-primary') + quteproc.send_cmd(...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016 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 Softwa...
1
15,898
Is this `{clipboard}` or `{primary}`, as the deprecation message for `:paste-primary` says?
qutebrowser-qutebrowser
py
@@ -46,6 +46,18 @@ var ( Usage: "OpenVPN subnet netmask", Value: "255.255.255.0", } + // FlagOpenVPNPriceMinute sets the price per minute for provided OpenVPN service. + FlagOpenVPNPriceMinute = cli.Uint64Flag{ + Name: "openvpn.price-minute", + Usage: "Sets the price of the OpenVPN service per minute.", + V...
1
/* * Copyright (C) 2019 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
16,175
Human unreadable. IMHO user should input MYST value: 0.0006 @chompomonim, opinions?
mysteriumnetwork-node
go
@@ -643,15 +643,6 @@ class NVDAObject(documentBase.TextContainerObject,baseObject.ScriptableObject): return self.presType_layout if role in (controlTypes.ROLE_TABLEROW,controlTypes.ROLE_TABLECOLUMN,controlTypes.ROLE_TABLECELL) and (not config.conf["documentFormatting"]["reportTables"] or not config.conf["docum...
1
# -*- coding: UTF-8 -*- #NVDAObjects/__init__.py #A part of NonVisual Desktop Access (NVDA) #Copyright (C) 2006-2017 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Patrick Zajda, Babbage B.V., Davy Kager #This file is covered by the GNU General Public License. #See the file COPYING for more details. """Modul...
1
21,500
May be you could elaborate on why you removed this? I see some of this logic has been moved to ia2Web, but couldn't there be cases outside ia2Web (i.e. UIA) in which case ROLE_TABLEROW and ROLE_TABLECOLUMN are mapped to objects, in which case these objects will be of presentation type content erroneously?
nvaccess-nvda
py
@@ -2637,10 +2637,10 @@ void Game::playerAcceptTrade(uint32_t playerId) player->setTradeState(TRADE_ACCEPT); if (tradePartner->getTradeState() == TRADE_ACCEPT) { - Item* tradeItem1 = player->tradeItem; - Item* tradeItem2 = tradePartner->tradeItem; + Item* playerTradeItem = player->tradeItem; + Item* tradePart...
1
/** * The Forgotten Server - a free and open-source MMORPG server emulator * Copyright (C) 2018 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
15,606
This is not consistent. Either rename the first to `tradePlayerItem` (which is ugly) or the second to `partnerTradeItem` (:+1:)
otland-forgottenserver
cpp
@@ -50,6 +50,7 @@ func deps() { "go get -u github.com/alecthomas/gometalinter", "gometalinter --install", "go get -u github.com/stretchr/testify", + "go get -u github.com/xeipuuv/gojsonschema", } for _, name := range list {
1
package main import ( "fmt" "log" "os" "os/exec" "runtime" "strings" ) var lineBreak = "\n" func init() { log.SetFlags(0) if runtime.GOOS == "windows" { lineBreak = "\r\n" } } // run executes a given command on the shell, like // `run("git status")` func run(name string) string { args := strings.Split(n...
1
11,654
is there a reason we don't want to gx this dependency?
filecoin-project-venus
go
@@ -26,6 +26,18 @@ require_once("../inc/util.inc"); +// strip leading AMD or NVIDIA +// +function strip_vendor($model) { + foreach (array("AMD ", "NVIDIA ") as $maker) { + $n = strlen($maker); + if (substr($model, 0, $n) == $maker) { + return substr($model, $n); + } + } + r...
1
<?php // This file is part of BOINC. // http://boinc.berkeley.edu // Copyright (C) 2011 University of California // // BOINC 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 the...
1
15,842
I'd suggest to add "ATI " and "Intel(R) " to this list
BOINC-boinc
php
@@ -127,8 +127,8 @@ class Status extends ReportWidgetBase } } - foreach ($missingPlugins as $pluginCode) { - $warnings[] = Lang::get('backend::lang.warnings.plugin_missing', ['name' => '<strong>'.$pluginCode.'</strong>']); + foreach ($missingPlugins as $plugin) { + ...
1
<?php namespace System\ReportWidgets; use Lang; use Config; use BackendAuth; use System\Models\Parameter; use System\Models\LogSetting; use System\Classes\UpdateManager; use System\Classes\PluginManager; use Backend\Classes\ReportWidgetBase; use System\Models\EventLog; use System\Models\RequestLog; use System\Models\P...
1
18,538
This is using a different lang key, we should switch it to using the new key and remove the old key if it is no longer used.
octobercms-october
php
@@ -76,8 +76,9 @@ type SpecHandler interface { } var ( - nameRegex = regexp.MustCompile(api.Name + "=([0-9A-Za-z_-]+),?") - nodesRegex = regexp.MustCompile(api.SpecNodes + "=([0-9A-Za-z_-]+),?") + nameRegex = regexp.MustCompile(api.Name + "=([0-9A-Za-z_-]+),?") + //nodesRegex = regexp.MustCompile(ap...
1
package spec import ( "fmt" "regexp" "strconv" "strings" "github.com/libopenstorage/openstorage/api" "github.com/libopenstorage/openstorage/pkg/parser" "github.com/libopenstorage/openstorage/pkg/units" ) // SpecHandler provides conversion function from what gets passed in over the // plugin API to an api.Volu...
1
6,772
shouldn't this work? nodesRegex = regexp.MustCompile(api.SpecNodes + "=(('[0-9A-Za-z,_-]+')|([0-9A-Za-z_-]+)),?")
libopenstorage-openstorage
go
@@ -1,5 +1,6 @@ class Account::Encrypter - def before_create(account) + def before_validation(account) + return unless account.new_record? assign_activation_code_to_random_hash(account) encrypt_salt(account) end
1
class Account::Encrypter def before_create(account) assign_activation_code_to_random_hash(account) encrypt_salt(account) end def before_save(account) encrypt_email(account) if account.email_changed? encrypt_password(account) if account.password.present? end private def assign_activation_c...
1
6,864
You mentioned this change was prompted because the `before_create` action was actually a defect. This will be done only for a new record; why is `before_validation`, which will be called repeatedly as accounts get updated and saved, correct whereas `before_create` is not? It looks like one would want to assign and acti...
blackducksoftware-ohloh-ui
rb
@@ -95,6 +95,19 @@ namespace Datadog.Trace } } + if (Settings.GlobalSamplingRate != null) + { + var globalRate = (float)Settings.GlobalSamplingRate; + if (globalRate < 0f || globalRate > 1f) + { + Log.W...
1
using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Threading; using System.Threading.Tasks; using Datadog.Trace.Agent; using Datadog.Trace.Configuration; using Datadog.Trace.DogStatsd; using Datadog.Trace.Logging; using Datadog.Trace.Sampling; using Datadog.T...
1
16,385
What's the rationale for a default setting to not use a GlobalSamplingRate of 1? I don't know much about the sampling rate stuff
DataDog-dd-trace-dotnet
.cs
@@ -24,7 +24,8 @@ module Windows 'group' => 'Administrators', 'puppetpath' => '`cygpath -smF 35`/PuppetLabs/puppet/etc', 'puppetvardir' => '`cygpath -smF 35`/PuppetLabs/puppet/var', - 'puppetbindir' => '`cygpath -F 38`/Puppet Labs/Puppet Enterprise/bin', + #if an x8...
1
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'host')) require File.expand_path(File.join(File.dirname(__FILE__), '..', 'command_factory')) require File.expand_path(File.join(File.dirname(__FILE__), '..', 'command')) require File.expand_path(File.join(File.dirname(__FILE__), '..', 'options')) module...
1
4,643
Don't we know if it's 64 by this point? Do we have to test for the directory on every call, or can't we just split the value based on the platform?
voxpupuli-beaker
rb
@@ -35,6 +35,19 @@ class NoteListUtils { }) ); + menu.append( + new MenuItem({ + label: _('Assign Notebook'), + click: async () => { + props.dispatch({ + type: 'WINDOW_COMMAND', + name: 'moveToFolder', + noteIds: noteIds, + }); + }, + }) + ); + menu.appen...
1
const BaseModel = require('lib/BaseModel'); const { _ } = require('lib/locale.js'); const { bridge } = require('electron').remote.require('./bridge'); const Menu = bridge().Menu; const MenuItem = bridge().MenuItem; const eventManager = require('../../eventManager'); const InteropService = require('lib/services/InteropS...
1
12,152
It's not async
laurent22-joplin
js
@@ -66,11 +66,11 @@ namespace Examples.Console AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true); providerBuilder - .AddOtlpExporter(o => + .AddOtlpExporter((exporterOptions, metricReaderOptions) => ...
1
// <copyright file="TestMetrics.cs" company="OpenTelemetry Authors"> // Copyright The OpenTelemetry Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org...
1
23,017
Maybe we could add some use of `exporterOptions` in this example, otherwise the proper code would replace this variable name with an underscore?
open-telemetry-opentelemetry-dotnet
.cs
@@ -41,6 +41,11 @@ class Search extends WidgetBase */ public $scope; + /** + * @var bool Search on every key stroke. + */ + public $everykey = true; + // // Object properties //
1
<?php namespace Backend\Widgets; use Lang; use Backend\Classes\WidgetBase; /** * Search Widget * Used for building a toolbar, Renders a search container. * * @package october\backend * @author Alexey Bobkov, Samuel Georges */ class Search extends WidgetBase { // // Configurable properties // /*...
1
11,982
Maybe would be better to rename it to "onEveryKey" or "fireOnEveryKey".
octobercms-october
php
@@ -832,7 +832,7 @@ public class FilePage implements java.io.Serializable { // Always allow preview for PrivateUrlUser return true; } else { - return FileUtil.isPreviewAllowed(fileMetadata); + return fileDownloadHelper.isPreviewAllowed(fileMetadata); } ...
1
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package edu.harvard.iq.dataverse; import edu.harvard.iq.dataverse.DatasetVersionServiceBean.RetrieveDatasetVersionResponse; import edu...
1
45,554
if we're switching to calling FileDownloadHelper, we can just call that directly from the xhtml (see line 357 for example) and then remove this method completely. This is because the other thing it does is check PrivateURLUser, but the FileDownloadHelper method already does that. (and while we're at it, we can remove t...
IQSS-dataverse
java
@@ -274,11 +274,7 @@ public abstract class GapicInterfaceConfig implements InterfaceConfig { } public GapicMethodConfig getMethodConfig(String methodSimpleName, String fullName) { - GapicMethodConfig methodConfig = getMethodConfigMap().get(methodSimpleName); - if (methodConfig == null) { - throw new ...
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
24,130
is `fullName` still required as a parameter?
googleapis-gapic-generator
java
@@ -74,7 +74,7 @@ public class SeleniumServer extends JettyServer { getClass().getClassLoader()) .asSubclass(Routable.class); Constructor<? extends Routable> constructor = rcHandler.getConstructor(ActiveSessions.class); - LOG.info("Bound legacy RC support"); + LOG.finest("Bound le...
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
17,125
This informational message is important to users. Please leave.
SeleniumHQ-selenium
rb
@@ -470,7 +470,6 @@ func (o *initEnvOpts) deployEnv(app *config.Application) error { Name: o.Name, AppName: o.AppName(), Prod: o.IsProduction, - PublicLoadBalancer: true, // TODO: configure this based on user input or service Type needs? ToolsA...
1
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cli import ( "errors" "fmt" "net" "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/copilot-cli/internal/pkg/aws/cloudformation" "github.com/aws...
1
15,083
Why do we want to remove this one? Are we planning to substitute it?
aws-copilot-cli
go
@@ -4,13 +4,14 @@ import ( "fmt" "testing" - "github.com/golang/protobuf/proto" + legacyProto "github.com/golang/protobuf/proto" // nolint: staticcheck // deprecated library needed until WithDetails can take v2 "github.com/spiffe/spire/pkg/common/nodeutil" "github.com/spiffe/spire/proto/spire/common" "githu...
1
package nodeutil_test import ( "fmt" "testing" "github.com/golang/protobuf/proto" "github.com/spiffe/spire/pkg/common/nodeutil" "github.com/spiffe/spire/proto/spire/common" "github.com/spiffe/spire/proto/spire/types" "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" "google.golang.org/grpc...
1
15,127
We may create an issue to track this so we don't forget?
spiffe-spire
go
@@ -1,9 +1,12 @@ class ApplicationController < ActionController::Base + helper AvatarHelper + helper ButtonHelper + protect_from_forgery with: :exception attr_reader :page_context helper_method :page_context - + before_action :store_location def initialize(*params)
1
class ApplicationController < ActionController::Base protect_from_forgery with: :exception attr_reader :page_context helper_method :page_context before_action :store_location def initialize(*params) @page_context = {} super(*params) end rescue_from ParamRecordNotFound do render_404 end ...
1
6,796
This file has the executable bit set.
blackducksoftware-ohloh-ui
rb
@@ -177,6 +177,7 @@ func New(path string, baseKey []byte, o *Options, logger logging.Logger) (db *DB if db.capacity == 0 { db.capacity = defaultCapacity } + db.logger.Info("setting db capacity to :", db.capacity) if maxParallelUpdateGC > 0 { db.updateGCSem = make(chan struct{}, maxParallelUpdateGC) }
1
// Copyright 2018 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum 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 the License...
1
10,303
Improve the formatting of the message `.Infof("setting db capacity to: %v", db.capacity)` There is a space before `:` and this way it is easier to see the formatting.
ethersphere-bee
go
@@ -434,12 +434,13 @@ RTPSParticipantImpl* RTPSDomainImpl::find_local_participant( RTPSReader* RTPSDomainImpl::find_local_reader( const GUID_t& reader_guid) { - std::lock_guard<std::mutex> guard(RTPSDomain::m_mutex); + std::unique_lock<std::mutex> lock(RTPSDomain::m_mutex); for (const RTPSDomain::...
1
// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless re...
1
21,859
This lock cannot be released here, as it is protecting m_RTPSParticipants and the participant reference.
eProsima-Fast-DDS
cpp
@@ -967,6 +967,8 @@ Query.prototype.find = function (conditions, callback) { this.merge(conditions); } + prepareDiscriminatorCriteria(this); + try { this.cast(this.model); this._castError = null;
1
/*! * Module dependencies. */ var mquery = require('mquery'); var util = require('util'); var events = require('events'); var utils = require('./utils'); var Promise = require('./promise'); var helpers = require('./queryhelpers'); var Types = require('./schema/index'); var Document = require('./document'); var Quer...
1
12,037
we'll need this in `_findAndModify` too
Automattic-mongoose
js
@@ -148,7 +148,7 @@ public class SmartStoreInspectorActivity extends Activity implements AdapterView isGlobal = bundle == null || !bundle.containsKey(IS_GLOBAL_STORE) || bundle.getBoolean(IS_GLOBAL_STORE) || !hasUser; // dbName is set to DBOpenHelper.DEFAULT_DB_NAME // if no bundle, or no value for dbName in...
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
17,647
This is the fix for the crash. The function to create the intent to launch this activity requires `dbName`, so it has to be set to `null`. In such cases, the value for `dbName` will be set to `null` and cause issues throughout this activity. This adds a default value if the explicitly assigned value in `null`.
forcedotcom-SalesforceMobileSDK-Android
java
@@ -412,6 +412,11 @@ class WordDocument(UIADocumentWithTableNavigation,WordDocumentNode,WordDocumentB # Microsoft Word duplicates the full title of the document on this control, which is redundant as it appears in the title of the app itself. name=u"" + def event_textChange(self): + # Ensure Braille is updated w...
1
# This file is covered by the GNU General Public License. # A part of NonVisual Desktop Access (NVDA) # See the file COPYING for more details. # Copyright (C) 2016-2021 NV Access Limited, Joseph Lee, Jakub Lukowicz from comtypes import COMError from collections import defaultdict from scriptHandler import isScr...
1
34,383
Shouldn't we also trigger vision update here, so that if someone has caret highlighting enabled the correct character is highlighted?
nvaccess-nvda
py
@@ -338,7 +338,11 @@ public class GoGapicSurfaceTransformer implements ModelToViewTransformer<ProtoAp void addXExampleImports(InterfaceContext context, Iterable<? extends MethodModel> methods) { ImportTypeTable typeTable = context.getImportTypeTable(); typeTable.saveNicknameFor("context;;;"); - typeTabl...
1
/* Copyright 2016 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
1
28,192
Woah, how does this change, which includes semicolons, result in the baseline change? Are the semicolon chars just part of the internal representation of the import type?
googleapis-gapic-generator
java
@@ -51,7 +51,7 @@ class _NvdaLocationData: self.whichNVDA = builtIn.get_variable_value("${whichNVDA}", "source") if self.whichNVDA == "source": self._runNVDAFilePath = _pJoin(self.repoRoot, "source/nvda.pyw") - self.baseNVDACommandline = f"pyw -3.7-32 {self._runNVDAFilePath}" + self.baseNVDACommandline = ...
1
# A part of NonVisual Desktop Access (NVDA) # Copyright (C) 2020 NV Access Limited # This file may be used under the terms of the GNU General Public License, version 2 or later. # For more details see: https://www.gnu.org/licenses/gpl-2.0.html """This file provides robot library functions for NVDA system tests. ...
1
31,712
Can't you just use runnvda.bat here?
nvaccess-nvda
py
@@ -23,17 +23,6 @@ #include "selectors.h" #include "vstring.h" -/* To get rid of unused parameter warning in - * -Wextra */ -#ifdef UNUSED -#elif defined(__GNUC__) -# define UNUSED(x) UNUSED_ ## x __attribute__((unused)) -#elif defined(__LCLINT__) -# define UNUSED(x) /*@unused@*/ x -#else -# define UNUSED(x) x -#en...
1
/* * Copyright (c) 2010, Vincent Berthoux * * This source code is released for free distribution under the terms of the * GNU General Public License version 2 or (at your option) any later version. * * This module contains functions for generating tags for Objective C * language files. */ /* * INCLUDE FILE...
1
14,174
these definitions of UNUSED aren't the same as the one you imported, so callers should be fixed (if any)
universal-ctags-ctags
c
@@ -404,6 +404,7 @@ func (client *cniClient) createIPAMNetworkConfig(cfg *Config) (string, *libcni.N ipamNetworkConfig := IPAMNetworkConfig{ Name: ECSIPAMPluginName, + Type: ECSIPAMPluginName, CNIVersion: client.cniVersion, IPAM: ipamConfig, }
1
// Copyright 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" fil...
1
22,853
is type a free string too?
aws-amazon-ecs-agent
go
@@ -27,15 +27,16 @@ class WrapFunction(nn.Module): return self.wrapped_function(*args, **kwargs) -def ort_validate(model, feats, onnx_io='tmp.onnx'): +def ort_validate(model_func, feats, onnx_io='tmp.onnx'): """Validate the output of the onnxruntime backend is the same as the output generated by ...
1
import warnings from os import path as osp import numpy as np import onnx import onnxruntime as ort import torch import torch.nn as nn ort_custom_op_path = '' try: from mmcv.ops import get_onnxruntime_op_path ort_custom_op_path = get_onnxruntime_op_path() except (ImportError, ModuleNotFoundError): warning...
1
22,988
here input could be a normal function or an instance of torch.nn.Module.
open-mmlab-mmdetection
py
@@ -65,6 +65,7 @@ module Travis sh.echo 'Please open any issues at https://github.com/travis-ci/travis-ci/issues/new and cc @domenkozar @garbas @matthewbauer @grahamc', ansi: :green sh.cmd "nix-env --version" + sh.cmd "nix-instantiate --eval -E 'with import <nixpkgs> {}; lib.version or ...
1
# Maintained by # - Domen Kožar @domenkozar <domen@dev.si> # - Rok Garbas @garbas <rok@garbas.si> # - Matthew Bauer @matthewbauer <mjbauer95@gmail.com> # - Graham Christensen @grahamc <graham@grahamc.com> module Travis module Build class Script class Nix < Script ...
1
16,719
Example output: "19.03.git.a7f4a860d0c" At some point `nixpkgsVersion` was renamed to `version` since someone may use an old channel we fallback to `nixpkgsVersion` for backwards compatibility.
travis-ci-travis-build
rb
@@ -39,8 +39,6 @@ class LanguageTreeReadAction /** - * @IsGranted("SETTINGS_READ") - * * @SWG\Tag(name="Language") * @SWG\Parameter( * name="language",
1
<?php /** * Copyright © Bold Brand Commerce Sp. z o.o. All rights reserved. * See LICENSE.txt for license details. */ declare(strict_types = 1); namespace Ergonode\Core\Application\Controller\Api\LanguageTree; use Ergonode\Api\Application\Response\SuccessResponse; use Ergonode\Core\Domain\Repository\LanguageTreeR...
1
8,781
Class import is therefore redundant I guess :)
ergonode-backend
php
@@ -58,11 +58,13 @@ const ( infoTryingToStopNode = "Trying to stop the node..." infoNodeSuccessfullyStopped = "The node was successfully stopped." infoNodeStatus = "Last committed block: %d\nTime since last block: %s\nSync Time: %s\nLast consensus protocol: %s\nNext consensus pr...
1
// Copyright (C) 2019 Algorand, Inc. // This file is part of go-algorand // // go-algorand is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any l...
1
35,673
If parsing fails, don't act as no IP specified. Error out.
algorand-go-algorand
go
@@ -187,7 +187,9 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, final Object updateSync = new Object(); - public enum CHARTTYPE {PRE,BAS, IOB, COB, DEV, SEN}; + public enum CHARTTYPE {PRE, BAS, IOB, COB, DEV, SEN} + + ; private static final ScheduledExecutorSer...
1
package info.nightscout.androidaps.plugins.Overview; import android.annotation.SuppressLint; import android.app.Activity; import android.app.NotificationManager; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; impo...
1
30,079
... here the semicolon wanted to run away from the enum ;)
MilosKozak-AndroidAPS
java
@@ -76,12 +76,12 @@ public class ReplicateFromLeader { } log.info("Will start replication from leader with poll interval: {}", pollIntervalStr ); - NamedList<Object> slaveConfig = new NamedList<>(); - slaveConfig.add("fetchFromLeader", Boolean.TRUE); - slaveConfig.add(ReplicationHandler.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
35,998
Note that this is in the context of SolrCloud, so "secondary" doesn't apply and should be instead follower
apache-lucene-solr
java
@@ -1578,11 +1578,11 @@ EOF assert_response :success, "can't get changesets by closed-ness" assert_changesets [3, 5, 6, 7, 8, 9] - get :query, :closed => "true", :user => users(:normal_user).id + get :query, :closed => "true", :user => users(:normal_user) assert_response :success, "can't get chan...
1
require "test_helper" require "changeset_controller" class ChangesetControllerTest < ActionController::TestCase api_fixtures ## # test all routes which lead to this controller def test_routes assert_routing( { :path => "/api/0.6/changeset/create", :method => :put }, { :controller => "changeset...
1
10,563
This one is a query parameter and probably really should be ID and in fact I'm mystified as to how this is working because the controller code definitely wants a number for that parameter so the test framework must be converting it back to an ID as best I can tell.
openstreetmap-openstreetmap-website
rb
@@ -4177,9 +4177,11 @@ RelExpr * FileScan::preCodeGen(Generator * generator, TRUE); if (isHiveTable()) - // assign individual files and blocks to each ESPs - ((NodeMap *) getPartFunc()->getNodeMap())->assignScanInfos(hiveSearchKey_); - generator->setProcessLOB(TRUE); + { + // assign in...
1
/********************************************************************** // @@@ START COPYRIGHT @@@ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. ...
1
15,981
Need to ensure this is set to TRU for LOB datatype access too not just for hive .
apache-trafodion
cpp
@@ -1772,7 +1772,11 @@ class Series(_Frame, IndexOpsMixin): # ---------------------------------------------------------------------- - def _reduce_for_stat_function(self, sfun): + def _reduce_for_stat_function(self, sfun, numeric_only=None): + """ + :param sfun: the stats function to be use...
1
# # Copyright (C) 2019 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
1
9,872
You're using the Sphinx docstring style here (maybe because it's the default in PyCharm?). Instead, you should use the NumPy style (that you've also used in other places) to be more consistent with the rest of the project.
databricks-koalas
py
@@ -142,8 +142,16 @@ namespace Microsoft.AspNetCore.Server.Kestrel } else if (!hasListenOptions && !hasServerAddresses) { - _logger.LogDebug($"No listening endpoints were configured. Binding to {Constants.DefaultIPEndPoint} by default."); - ...
1
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Reflection; using Microsoft.AspNetCor...
1
11,837
Don't really need this since the rest of the method will no-op but it's also safe to return early.
aspnet-KestrelHttpServer
.cs
@@ -19,11 +19,13 @@ #include <fastdds/rtps/messages/RTPSMessageCreator.h> #include <fastdds/rtps/messages/CDRMessage.h> -#include <fastrtps/qos/ParameterList.h> #include <fastdds/dds/log/Log.hpp> +#include "../../fastdds/core/policy/ParameterList.hpp" + using namespace eprosima::fastrtps; +using ParameterList...
1
// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless re...
1
18,475
Don't use relative paths. src directory is already on the include search path
eProsima-Fast-DDS
cpp
@@ -0,0 +1,5 @@ +// 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. + +// [assembly: BenchmarkDotNet.Attributes.AspNetCoreBenchmark]
1
1
11,315
this file can be removed
dotnet-performance
.cs