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 |
|---|---|---|---|---|---|---|---|
@@ -7469,7 +7469,14 @@ RelExpr *Scan::bindNode(BindWA *bindWA)
bindWA->setErrStatus();
return NULL;
}
-
+ if (naTable->hasLobColumn() && isSampleScan())
+ {
+ *CmpCommon::diags() << DgSqlCode(-4322)
+ << DgTableName(
+ naTable->getTableName().getQualifiedNameAsAnsiString());
+ ... | 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 | 8,354 | Does this mean we cannot update statistics with sampling on a table with LOB columns? | apache-trafodion | cpp |
@@ -47,7 +47,18 @@ namespace NLog.LayoutRenderers.Wrappers
[ThreadAgnostic]
public sealed class CachedLayoutRendererWrapper : WrapperLayoutRendererBase
{
- private string cachedValue;
+ /// <summary>
+ /// A value indicating when the cache is cleared.
+ /// </summary>
+ ... | 1 | //
// Copyright (c) 2004-2011 Jaroslaw Kowalski <jaak@jkowalski.net>
//
// 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 source code must retain the above co... | 1 | 11,772 | Look good, but I think a `[flags]` enum would be more future proof? Although i'm not sure if a flags-enum is working from the XML config. What do you think? | NLog-NLog | .cs |
@@ -1577,6 +1577,16 @@
require: '^uiGrid',
link: function($scope, $elm, $attrs, uiGridCtrl) {
var self = uiGridCtrl.grid;
+ $scope.treeButtonClass = function(row) {
+ if ( ( self.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.ch... | 1 | (function () {
'use strict';
/**
* @ngdoc overview
* @name ui.grid.treeBase
* @description
*
* # ui.grid.treeBase
*
* <div class="alert alert-warning" role="alert"><strong>Beta</strong> This feature is ready for testing, but it either hasn't seen a lot of use or has some known bugs.</div>
*... | 1 | 11,995 | Since I believe state will never be anything other than 'expanded' or collapse, you can rewrite this as follows: `return row.treeNode.state === 'expanded' ? 'ui-grid-icon-minus-squared' : 'ui-grid-icon-plus-squared'; ` | angular-ui-ui-grid | js |
@@ -32,10 +32,6 @@ import org.apache.solr.common.SolrException;
* Solr endpoints for SolrCloud collections, and then use the
* {@link LBHttp2SolrClient} to issue requests.
*
- * This class assumes the id field for your documents is called
- * 'id' - if this is not the case, you must set the right name
- * with {@... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 1 | 40,703 | the latter part can go but isn't the first part of this still sound -- that we assume "id"? | apache-lucene-solr | java |
@@ -27,14 +27,12 @@ var formatter = this;
string = function(value) {
if (value != null) {
value = value.replace(/\\/g, '\\\\');
- value = value.replace(/\"/g, '\\"');
+ value = value.replace(/\'/g, '\\\'');
value = value.replace(/\r/g, '\\r');
value = value.replace(/\n/g, '\\n');
- value = value.replace(... | 1 | /*
* Format for Selenium Remote Control Perl client.
*/
var subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader);
subScriptLoader.loadSubScript('chrome://selenium-ide/content/formats/remoteControl.js', this);
this.name = "perl-rc";
//... | 1 | 10,815 | Why is the escaping of @ and $ removed? | SeleniumHQ-selenium | rb |
@@ -0,0 +1,7 @@
+namespace Datadog.Trace.ClrProfiler.Interfaces
+{
+ internal interface IHasHttpUrl
+ {
+ string GetRawUrl();
+ }
+} | 1 | 1 | 14,649 | Nit: `Http` is redundant in this interface's name. | DataDog-dd-trace-dotnet | .cs | |
@@ -82,6 +82,19 @@ func NewCluster(ctx context.Context, cfg *ClusterConfig, creds credentials.Trans
if err != nil {
return nil, nil, err
}
+
+ exists, err := store.Exists(cfg.SynchronizableEntitiesPrefix)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to check if SynchronizableEntitiesPrefix exists: %s... | 1 | package hub
import (
"bytes"
"context"
"crypto/tls"
"encoding/json"
"fmt"
"net"
"reflect"
"strings"
"sync"
"time"
"github.com/docker/leadership"
"github.com/docker/libkv"
"github.com/docker/libkv/store"
"github.com/docker/libkv/store/boltdb"
"github.com/docker/libkv/store/consul"
log "github.com/noxio... | 1 | 5,999 | what if I set SynchronizableEntitiesPrefix to "a/b/c/d" in config? | sonm-io-core | go |
@@ -83,9 +83,13 @@ func (opts *InitAppOpts) Validate() error {
}
}
if opts.DockerfilePath != "" {
- if _, err := listDockerfiles(opts.fs, opts.DockerfilePath); err != nil {
+ isDir, err := afero.IsDir(opts.fs, opts.DockerfilePath)
+ if err != nil {
return err
}
+ if isDir {
+ return fmt.Errorf("dock... | 1 | // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"errors"
"fmt"
"os"
"path/filepath"
"strings"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/archer"
"github.com/aws/amazon-ecs-cli-v2/internal/pkg/aws/session"
"github.com/a... | 1 | 11,495 | nit: This error message doesn't mention that the path is a directory, maybe "Dockerfile path is a directory:%s, please provide path to file." | aws-copilot-cli | go |
@@ -26,6 +26,7 @@
# Copyright (c) 2020 Anthony <tanant@users.noreply.github.com>
# Copyright (c) 2021 Marc Mueller <30130371+cdce8p@users.noreply.github.com>
# Copyright (c) 2021 Peter Kolbus <peter.kolbus@garmin.com>
+# Copyright (c) 2021 Daniel van Noord <13665637+DanielNoord@users.noreply.github.com>
# Licen... | 1 | # Copyright (c) 2009-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2010 Daniel Harding <dharding@gmail.com>
# Copyright (c) 2012-2014 Google, Inc.
# Copyright (c) 2013-2020 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014 Brett Cannon <brett@python.org>
# Copyright (c) 2014 Arun Persau... | 1 | 14,958 | This is done automatically, you can skip it next time ;) | PyCQA-pylint | py |
@@ -128,6 +128,14 @@ class WebKitElement(webelem.AbstractWebElement):
value = javascript.string_escape(value)
self._elem.evaluateJavaScript("this.value='{}'".format(value))
+ def dispatch_event(self, event):
+ self._check_vanished()
+ if self._tab.is_deleted():
+ ... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 22,198 | This is needed in `set_value` because of `:open-editor` (you could open an editor, close the tab, then close the editor). I don't think it makes any sense to have it here? | qutebrowser-qutebrowser | py |
@@ -53,6 +53,10 @@ type agentConfig struct {
ConfigPath string
Umask string `hcl:"umask"`
+
+ ProfilingEnabled string `hcl:"profiling_enabled"`
+ ProfilingPort string `hcl:"profiling_port"`
+ ProfilingFreq string `hcl:"profiling_freq"`
}
type RunCLI struct { | 1 | package run
import (
"crypto/x509"
"encoding/pem"
"errors"
"flag"
"fmt"
"io/ioutil"
"net"
"net/url"
"os"
"os/signal"
"path/filepath"
"strconv"
"syscall"
"github.com/hashicorp/hcl"
"github.com/spiffe/spire/pkg/agent"
"github.com/spiffe/spire/pkg/common/catalog"
"github.com/spiffe/spire/pkg/common/log"... | 1 | 9,152 | Perhaps we can assume that profiling is enabled if ProfilingPort is set? And/or configure a default port and frequency, so we don't have to set three config vars every time? | spiffe-spire | go |
@@ -22,6 +22,7 @@ module Beaker
#HACK HACK HACK - add checks here to ensure that we have box + box_url
#generate the VagrantFile
v_file = "Vagrant.configure(\"2\") do |c|\n"
+ v_file << " c.ssh.forward_agent = true\n" unless options['forward_ssh_agent'].nil?
hosts.each do |host|
... | 1 | require 'open3'
module Beaker
class Vagrant < Beaker::Hypervisor
# Return a random mac address
#
# @return [String] a random mac address
def randmac
"080027" + (1..3).map{"%0.2X"%rand(256)}.join
end
def rand_chunk
(2 + rand(252)).to_s #don't want a 0, 1, or a 255
end
de... | 1 | 8,102 | This nil check won't correctly handle the case where forward_ssh_agent is set to false - it won't be nil but it should still not be set. | voxpupuli-beaker | rb |
@@ -521,7 +521,7 @@ func TestVoteTrackerFiltersDuplicateVoteOnce(t *testing.T) {
inputVotes[i] = helper.MakeValidVoteAcceptedVal(t, i, next, Val1)
expectedOutputs[i] = thresholdEvent{T: none}
case i == Num:
- inputVotes[i] = voteFilterRequestEvent{RawVote: inputVotes[Num-1].(voteAcceptedEvent).Vote.R}
+ ... | 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,523 | We could avoid passing proto since threshold isn't needed. | algorand-go-algorand | go |
@@ -1040,7 +1040,10 @@ func (di *Dependencies) AllowURLAccess(servers ...string) error {
return err
}
- if config.GetBool(config.FlagKeepConnectedOnFail) {
+ // Doesn't work as expected because some services share IP address with
+ // each other and with location oracle which is supposed to be routed
+ // throug... | 1 | /*
* Copyright (C) 2018 The "MysteriumNetwork/node" Authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | 1 | 17,257 | This route excluding needed for reconnect only when one connection is lost and we trying to establish another. I was thinking to make 2 separate flags for killswitch and reconnect enabling. This way we can keep killswitch working, but we don't need these routes excluded. | mysteriumnetwork-node | go |
@@ -124,8 +124,8 @@ RocksEngine::RocksEngine(GraphSpaceID spaceId,
}
CHECK(status.ok()) << status.ToString();
db_.reset(db);
- partsNum_ = allParts().size();
extractorLen_ = sizeof(PartitionID) + vIdLen;
+ partsNum_ = allParts().size();
LOG(INFO) << "open rocksdb on " << path;
backup(); | 1 | /* Copyright (c) 2018 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "kvstore/RocksEngine.h"
#include <folly/String.h>
#include <rocksdb/convenience.h>
#include "common/base/Base... | 1 | 31,659 | why can this modification avoid crash? | vesoft-inc-nebula | cpp |
@@ -1,8 +1,7 @@
module RedirectIfDisabled
def redirect_if_disabled
- account = current_user
- return unless account && account.access.disabled?
- request.env[:clearance].sign_out
- redirect_to disabled_account_url(account)
+ return unless @account && @account.access.disabled?
+ request.env[:cleara... | 1 | module RedirectIfDisabled
def redirect_if_disabled
account = current_user
return unless account && account.access.disabled?
request.env[:clearance].sign_out
redirect_to disabled_account_url(account)
end
end
| 1 | 9,180 | This looks good -- signing out the user if the current user is disabled | blackducksoftware-ohloh-ui | rb |
@@ -47,13 +47,13 @@ class Selection {
*/
this.selectedByCorner = false;
/**
- * The collection of the selection layer levels where the whole row was selected using the row header.
+ * The collection of the selection layer levels where the whole row was selected using the row header or the corner... | 1 | import Highlight, { AREA_TYPE, HEADER_TYPE, CELL_TYPE } from './highlight/highlight';
import SelectionRange from './range';
import { CellCoords } from './../3rdparty/walkontable/src';
import { isPressedCtrlKey } from './../utils/keyStateObserver';
import { createObjectPropListener, mixin } from './../helpers/object';
i... | 1 | 16,864 | The line exceeds 120 characters. | handsontable-handsontable | js |
@@ -62,6 +62,11 @@ func renderAppDescribe(desc map[string]interface{}) (string, error) {
ddevapp.RenderAppRow(appTable, desc)
output = fmt.Sprint(appTable)
+ output = output + "\n\nSite Information\n-----------------\n"
+ siteInfo := uitable.New()
+ siteInfo.AddRow("PHP version:", desc["php_version"])
+ output = ... | 1 | package cmd
import (
"fmt"
"github.com/drud/ddev/pkg/ddevapp"
"github.com/drud/ddev/pkg/output"
"github.com/drud/ddev/pkg/util"
"github.com/gosuri/uitable"
"github.com/spf13/cobra"
)
// DescribeCommand represents the `ddev config` command
var DescribeCommand = &cobra.Command{
Use: "describe [sitename]",
Sh... | 1 | 12,141 | Let's go ahead and change "Site" to "Project", since that's the path we've chosen. One less thing to alter in the other issue. | drud-ddev | php |
@@ -89,7 +89,6 @@ Prints out information about filecoin process and its environment.
sw.Printf("\nEnvironment\n")
sw.Printf("FilAPI: \t%s\n", info.Environment.FilAPI)
sw.Printf("FilPath:\t%s\n", info.Environment.FilPath)
- sw.Printf("GoPath: \t%s\n", info.Environment.GoPath)
// Print Config Info
... | 1 | package commands
import (
"encoding/json"
"io"
"os"
"runtime"
cmdkit "github.com/ipfs/go-ipfs-cmdkit"
cmds "github.com/ipfs/go-ipfs-cmds"
sysi "github.com/whyrusleeping/go-sysinfo"
"github.com/filecoin-project/go-filecoin/config"
"github.com/filecoin-project/go-filecoin/flags"
"github.com/filecoin-project/... | 1 | 21,307 | I am for this change iff we are sure the information is no longer helpful. I think this could still be valuable for certain scenarios, wbu? | filecoin-project-venus | go |
@@ -296,11 +296,16 @@ public class ImageRampupManagerImpl implements ImageRampupManager {
if (null == flow) {
log.info("Flow object is null, so continue");
final ImageRampup firstImageRampup = imageRampupList.get(0);
+
+ // Find the imageVersion in the Rampup list with maximum rampup per... | 1 | /*
* Copyright 2020 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 | 22,332 | I thought we decided on using the latest active version and not the one which is max ramped up. | azkaban-azkaban | java |
@@ -461,10 +461,13 @@ https://aws.amazon.com/premiumsupport/knowledge-center/ecs-pull-container-api-er
if err != nil {
if err == selector.ErrSubnetsNotFound {
log.Errorf(`No existing public subnets were found in VPC %s. You can either:
-- Create new public subnets and then import them.
-- Use the default Co... | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cli
import (
"errors"
"fmt"
"net"
"os"
"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.c... | 1 | 17,620 | can we update this to a `log.Warningf`? | aws-copilot-cli | go |
@@ -105,7 +105,11 @@ def connect_container_to_network(container, network):
def disconnect_container_from_network(container, network):
- subprocess.check_call(["docker", "network", "disconnect", network, container])
+ # subprocess.run instead of subprocess.check_call so we don't fail when
+ # trying to dis... | 1 | # pylint: disable=redefined-outer-name
import json
import os
import subprocess
from contextlib import contextmanager
import pytest
from .utils import BUILDKITE
@pytest.fixture(scope="module")
def docker_compose_cm(test_directory):
@contextmanager
def docker_compose(
docker_compose_yml=None,
... | 1 | 18,298 | can we get something emitted in the logs on non-zero exits to trace back to for problems like this failing on the first invocation? | dagster-io-dagster | py |
@@ -20,9 +20,10 @@ namespace storage {
TEST(DeleteVertexTest, SimpleTest) {
fs::TempDir rootPath("/tmp/DeleteVertexTest.XXXXXX");
std::unique_ptr<kvstore::KVStore> kv(TestUtils::initKV(rootPath.path()));
+ auto schemaMan = TestUtils::mockSchemaMan();
// Add vertices
{
- auto* processor = ... | 1 | /* Copyright (c) 2019 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "base/Base.h"
#include <gtest/gtest.h>
#include <rocksdb/db.h>
#include "fs/TempDir.h"
#include "storage/test/T... | 1 | 25,336 | Do we need `schema manager` at here ? | vesoft-inc-nebula | cpp |
@@ -0,0 +1,19 @@
+package parser
+
+//go:generate cargo build --release
+
+// #cgo LDFLAGS: -L${SRCDIR}/target/release -ldl -Wl,-Bstatic -lflux_parser -Wl,-Bdynamic
+// #include <stdlib.h>
+// void flux_parse_json(const char*);
+import "C"
+
+import (
+ "unsafe"
+)
+
+func Parse(input string) {
+ cstr := C.CString(inpu... | 1 | 1 | 12,039 | This won't work because of the permissions on the directory when this is included as a library. But, we may be able to do this. The key would be wrapping this command with either a script or a go binary that ensures the current directory is writable. If the current directory is not writable, it would attempt to make it... | influxdata-flux | go | |
@@ -153,6 +153,8 @@ func (r *REPL) executeLine(t string) (values.Value, error) {
return nil, err
}
+ r.scope.SetReturn(nil)
+
if _, err := r.interpreter.Eval(semPkg, r.scope, flux.StdLib()); err != nil {
return nil, err
} | 1 | // Package repl implements the read-eval-print-loop for the command line flux query console.
package repl
import (
"context"
"fmt"
"io/ioutil"
"os"
"os/signal"
"path/filepath"
"sort"
"strings"
"sync"
"syscall"
"github.com/influxdata/flux/ast"
prompt "github.com/c-bata/go-prompt"
"github.com/influxdata/f... | 1 | 9,624 | Correct me if I'm wrong, but is this necessary? Why not just use the value returned by `interpreter.Eval` and not mess with the scope? `interpreter.Eval` will return any produced side effects. This means TableObjects as well as any value resulting from any expression statements. | influxdata-flux | go |
@@ -162,12 +162,14 @@ func makeStatefulSetService(p *monitoringv1.Alertmanager, config Config) *v1.Ser
p.Spec.PortName = defaultPortName
}
+ labels := config.Labels.Merge(p.Spec.ServiceMetadata.Labels)
+ labels["operated-alertmanager"] = "true"
+
svc := &v1.Service{
ObjectMeta: metav1.ObjectMeta{
- Name: ... | 1 | // Copyright 2016 The prometheus-operator Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... | 1 | 14,927 | This service is global per namespace, not per Alertmanager/Prometheus/ThanosRuler instance. So this approach won't work. But maybe I missing out something, can you describe your use case here? | prometheus-operator-prometheus-operator | go |
@@ -32,6 +32,7 @@ type AttestedNode struct {
ExpiresAt time.Time `gorm:"index"`
NewSerialNumber string
NewExpiresAt *time.Time
+ CanReattest bool `gorm:"default:false"`
Selectors []*NodeSelector
} | 1 | package sqlstore
import (
"time"
)
// Model is used as a base for other models. Similar to gorm.Model without `DeletedAt`.
// We don't want soft-delete support.
type Model struct {
ID uint `gorm:"primary_key"`
CreatedAt time.Time
UpdatedAt time.Time
}
// Bundle holds a trust bundle.
type Bundle struct {
... | 1 | 18,246 | Do we need this default? Since we aren't using a sql.NullBool or *bool, an unset column will be interpreted as `false` already... We don't set a default on our other bool fields (e.g. entry admin and downstream columns). | spiffe-spire | go |
@@ -39,6 +39,18 @@ module ExportsHelper
"<strong>#{prefix}</strong> #{attribution.join(', ')}"
end
+ def download_plan_page_title(plan, phase, hash)
+ # If there is more than one phase show the plan title and phase title
+ return hash[:phases].many? ? "#{plan.title} - #{phase[:title]}" : plan.title
+ ... | 1 | # frozen_string_literal: true
module ExportsHelper
PAGE_MARGINS = {
top: "5",
bottom: "10",
left: "12",
right: "12",
}
def font_face
@formatting[:font_face].presence || "Arial, Helvetica, Sans-Serif"
end
def font_size
@formatting[:font_size].presence || "12"
end
def margin_top... | 1 | 18,314 | thanks for moving these over. makes more sense for them to be in the exports_helper | DMPRoadmap-roadmap | rb |
@@ -29,8 +29,9 @@ from qutebrowser.utils import message
from qutebrowser.config import config
from qutebrowser.keyinput import keyparser
from qutebrowser.utils import usertypes, log, objreg, utils
+from qutebrowser.config.parsers import keyconf
-
+
STARTCHARS = ":/?"
LastPress = usertypes.enum('LastPress', ['no... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-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 S... | 1 | 16,083 | That import now isn't needed anymore | qutebrowser-qutebrowser | py |
@@ -237,6 +237,8 @@ class WebDriver(RemoteWebDriver):
Returns identifier of installed addon. This identifier can later
be used to uninstall addon.
+ :param path: Full path to the addon that will be installed.
+
:Usage:
driver.install_addon('firebug.xpi')
""" | 1 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 1 | 14,956 | Can you update the `Usage` to be an absolute path as well? Something like `/path/to/firebug.xpi` | SeleniumHQ-selenium | py |
@@ -2,17 +2,13 @@
// The .NET Foundation licenses this file to you under the MS-PL license.
// See the LICENSE file in the project root for more information.
-
-using MvvmCross.Plugins;
-
namespace MvvmCross.Plugin.Accelerometer.Platform.Uap
{
- public class Plugin
- : IMvxPlugin
+ public class Plugi... | 1 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MS-PL license.
// See the LICENSE file in the project root for more information.
using MvvmCross.Plugins;
namespace MvvmCross.Plugin.Accelerometer.Platform.Uap
{
public class Plugin
... | 1 | 13,752 | This class is missing the `MvxPlugin` attribute | MvvmCross-MvvmCross | .cs |
@@ -596,6 +596,8 @@ def initialize():
if mainFrame:
raise RuntimeError("GUI already initialized")
mainFrame = MainFrame()
+ wxLang = core.getWxLang(languageHandler.getLanguage())
+ mainFrame.SetLayoutDirection(wxLang.LayoutDirection)
wx.GetApp().SetTopWindow(mainFrame)
# In wxPython >= 4.1,
# wx.CallAfter ... | 1 | # -*- coding: UTF-8 -*-
# A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2006-2020 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Mesar Hameed, Joseph Lee,
# Thomas Stivers, Babbage B.V.
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.
from .contex... | 1 | 31,917 | What if `wxLang` is returned `None` from `getWxLang` | nvaccess-nvda | py |
@@ -546,9 +546,9 @@ ResultCode NebulaStore::ingest(GraphSpaceID spaceId) {
auto files = nebula::fs::FileUtils::listAllFilesInDir(path.c_str(), true, "*.sst");
for (auto file : files) {
LOG(INFO) << "Ingesting extra file: " << file;
- auto code = engine->ingest(s... | 1 | /* Copyright (c) 2018 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "base/Base.h"
#include "kvstore/NebulaStore.h"
#include <folly/Likely.h>
#include <algorithm>
#include <cstdint... | 1 | 27,579 | Please don't do changing like this unless it _**really**_ cares. BTW. Please look around to infer our naming conventions. | vesoft-inc-nebula | cpp |
@@ -35,13 +35,13 @@ public class BaseSuite {
public static ExternalResource testEnvironment = new ExternalResource() {
@Override
protected void before() {
- log.info("Preparing test environment");
+ log.finest("Preparing test environment");
GlobalTestEnvironment.get(SeleniumTestEnvironment... | 1 | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... | 1 | 16,446 | This is in test code: understanding what we're doing is important in this context. | SeleniumHQ-selenium | py |
@@ -76,8 +76,8 @@ public class CommandLineUtils {
* @param isMainOptionCondition the conditions to test dependent options against. If all
* conditions are true, dependent options will be checked.
* @param dependentOptionsNames a list of option names that can't be used if condition is met.
- * Exam... | 1 | /*
* Copyright ConsenSys AG.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing... | 1 | 25,465 | prob should still have an example that has multiple option names even if you have to make it up. Or maybe we don't need this method? | hyperledger-besu | java |
@@ -246,9 +246,9 @@ class PlansController < ApplicationController
file_name = @plan.title.gsub(/ /, "_")
respond_to do |format|
- format.html
- format.csv { send_data @exported_plan.as_csv(@sections, @unanswered_question, @question_headings), filename: "#{file_name}.csv" }
- format.text { s... | 1 | class PlansController < ApplicationController
include ConditionalUserMailer
require 'pp'
helper PaginableHelper
helper SettingsTemplateHelper
after_action :verify_authorized, except: [:overview]
def index
authorize Plan
@plans = Plan.active(current_user).page(1)
@organisationally_or_publicly_vi... | 1 | 17,406 | I believe respond_to whitelists the formats passed to the block so if we don't want to display html, we can just remove the line format.html... | DMPRoadmap-roadmap | rb |
@@ -21,7 +21,7 @@ var LocalDevStopCmd = &cobra.Command{
err = app.Stop()
if err != nil {
log.Println(err)
- util.Failed("Failed to stop containers for %s. Run `ddev list` to ensure your site exists.", app.ContainerName())
+ util.Failed("Failed to stop containers for %s. Run `ddev list` to ensure your site... | 1 | package cmd
import (
log "github.com/Sirupsen/logrus"
"github.com/drud/ddev/pkg/util"
"github.com/spf13/cobra"
)
// LocalDevStopCmd represents the stop command
var LocalDevStopCmd = &cobra.Command{
Use: "stop",
Short: "Stop an application's local services.",
Long: `Stop will turn off the local containers an... | 1 | 11,051 | stylistic nitpick: I _feel_ like we've largely shown errors like this as "error: " vs. "error=". IMO colon/space reads better. | drud-ddev | php |
@@ -18,11 +18,16 @@
*/
#include <fastdds/rtps/writer/RTPSWriter.h>
+
+#include <fastdds/dds/log/Log.hpp>
+
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/messages/RTPSMessageCreator.h>
-#include <fastdds/dds/log/Log.hpp>
-#include <rtps/participant/RTPSParticipantImpl.h>
+
+#include <rtps... | 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 | 19,802 | We could put this implementation in `RTPSWriter::create_change_pool` and avoid an extra function. | eProsima-Fast-DDS | cpp |
@@ -25,6 +25,7 @@
package persistencetests
import (
+ "fmt"
"time"
"github.com/pborman/uuid" | 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 | 13,365 | should this file ends with _test.go? | temporalio-temporal | go |
@@ -382,7 +382,7 @@ class IPv6(_IPv6GuessPayload, Packet, IPTools):
if conf.checkIPsrc and conf.checkIPaddr and not in6_ismaddr(sd):
sd = inet_pton(socket.AF_INET6, sd)
- ss = inet_pton(socket.AF_INET6, self.src)
+ ss = inet_pton(socket.AF_INET6, ss)
return str... | 1 | #############################################################################
# #
# inet6.py --- IPv6 support for Scapy #
# see http://natisbad.org/IPv6/ #
# ... | 1 | 16,544 | It's because of this change. `ss` was unused and it made sense in the program. However I haven't read the IPv6 RFC so I'm unsure of what it does | secdev-scapy | py |
@@ -483,6 +483,7 @@ class DataManager {
*/
addChildAtIndex(parent, index, element) {
let childElement = element;
+ let flattenIndex;
if (!childElement) {
childElement = this.mockNode(); | 1 | import { rangeEach } from '../../../helpers/number';
import { objectEach } from '../../../helpers/object';
import { arrayEach } from '../../../helpers/array';
/**
* Class responsible for making data operations.
*
* @class
* @private
*/
class DataManager {
constructor(nestedRowsPlugin, hotInstance) {
/**
... | 1 | 20,014 | "Flatten" is a verb, so I'd probably go with `flattenedIndex` as a variable name here. | handsontable-handsontable | js |
@@ -1,5 +1,19 @@
const chalk = require('chalk')
+const valuesToMask = []
+/**
+ * Adds a list of strings that should be masked by the logger.
+ * This function can only be called once through out the life of the server.
+ * @param {Array} maskables a list of strings to be masked
+ */
+exports.addMaskables = (maskabl... | 1 | const chalk = require('chalk')
/**
* INFO level log
* @param {string} msg the message to log
* @param {string=} tag a unique tag to easily search for this message
* @param {string=} traceId a unique id to easily trace logs tied to a request
*/
exports.info = (msg, tag, traceId) => {
log(msg, tag, 'info', traceI... | 1 | 13,016 | If it can only be called once, perhaps a more appropriate name is something like `setMaskables`? `addX` sounds like you can add many `X`es by calling it many times | transloadit-uppy | js |
@@ -38,7 +38,7 @@ func downloadAndExtractConfigPackage(channel string, targetDir string) (err erro
}
func downloadConfigPackage(channelName string, targetDir string) (packageFile string, err error) {
- s3, err := s3.MakeS3SessionForDownload()
+ s3, err := s3.MakePublicS3SessionForDownload()
if err != nil {
ret... | 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,430 | Nodecfg should be downloading from a private bucket -- these shouldn't be for public consumption. In general these should be generic and expect environment to provide appropriate credentials and bucket. | algorand-go-algorand | go |
@@ -0,0 +1,17 @@
+# MicrosoftEdge.py
+#A part of NonVisual Desktop Access (NVDA)
+#This file is covered by the GNU General Public License.
+#See the file COPYING for more details.
+#Copyright (C) 2018 NV Access Limited, Joseph Lee
+
+"""appModule for Microsoft Edge main process"""
+
+import appModuleHandler
+import ui
... | 1 | 1 | 22,507 | Could you please end the file with an empty line? | nvaccess-nvda | py | |
@@ -76,7 +76,7 @@ public class ProtocolHandshake {
if (result.isPresent()) {
Result toReturn = result.get();
- LOG.info(String.format("Detected dialect: %s", toReturn.dialect));
+ LOG.finest(String.format("Detected dialect: %s", toReturn.dialect));
return toReturn;
... | 1 | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... | 1 | 16,445 | This is an incorrect change. The dialect spoken is an important part of the handshake and should be communicated to users. | SeleniumHQ-selenium | js |
@@ -89,7 +89,9 @@ func (v *Var) UnmarshalJSON(b []byte) error {
// Workflow is a single Daisy workflow workflow.
type Workflow struct {
// Populated on New() construction.
- Cancel chan struct{} `json:"-"`
+ Cancel chan struct{} `json:"-"`
+ isCanceled bool
+ isCanceledMx sync.Mutex
// Workflow template... | 1 | // Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | 1 | 13,354 | Can this be non-exported to avoid direct use? It would be a breaking change but using previous package version would work. | GoogleCloudPlatform-compute-image-tools | go |
@@ -145,7 +145,11 @@ func (w *watcher) ErrorAs(err error, i interface{}) bool {
return w.bucket.ErrorAs(err, i)
}
-// IsNotExist implements driver.IsNotExist.
-func (*watcher) IsNotExist(err error) bool {
- return gcerrors.Code(err) == gcerrors.NotFound
+// ErrorCode implements driver.ErrorCode.
+func (*watcher) E... | 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 | 14,031 | Nit: this is just `return gcerrors.Code(err)`, isn't it? | google-go-cloud | go |
@@ -189,12 +189,7 @@ func (smc *Client) ProposeDeal(ctx context.Context, miner address.Address, data
// create payment information
totalCost := price.MulBigInt(big.NewInt(int64(pieceSize * duration)))
if totalCost.GreaterThan(types.ZeroAttoFIL) {
- // The payment setup requires that the payment is mined into a b... | 1 | package storage
import (
"context"
"fmt"
"io"
"math/big"
"time"
"github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log"
"github.com/libp2p/go-libp2p-core/host"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/protocol"
"github.com/multiformats/go-multistream"
"github.com/pkg/err... | 1 | 20,924 | I don't know where this came from, but it's not a good idea. This is actually timing out after 5 rounds, not 5 blocks. 5 consecutive null blocks won't be that uncommon. Also when testing with a short block time, this is a very short duration that can contribute to flaky tests. | filecoin-project-venus | go |
@@ -47,7 +47,8 @@ def loadState():
global state
statePath=os.path.join(globalVars.appArgs.configPath,stateFilename)
try:
- state = cPickle.load(file(statePath, "r"))
+ with open(statePath, "r") as f:
+ state = cPickle.load(f)
if "disabledAddons" not in state:
state["disabledAddons"] = set()
if "pend... | 1 | # -*- coding: UTF-8 -*-
#addonHandler.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2012-2019 Rui Batista, NV Access Limited, Noelia Ruiz Martínez, Joseph Lee, Babbage B.V., Arnold Loubriat
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
import sys... | 1 | 25,483 | In Python 3 when pickling or unpickling objects, the file needs to be opened as binary so that no text encoding/decoding takes place. So for any open calls around pickle loads or dumps, the mode for reading must be rb and the mode for writing must be wb. | nvaccess-nvda | py |
@@ -2068,7 +2068,7 @@ const processRequest = (params) => {
}
else {
if (params.qstring.event && params.qstring.event.startsWith('[CLY]_group_')) {
- validateRead(params, 'core', countlyApi.data.fetch.fetchMergedEventGroups, pa... | 1 | /**
* Module for processing data passed to Countly
* @module api/utils/requestProcessor
*/
const Promise = require('bluebird');
const url = require('url');
const common = require('./common.js');
const countlyCommon = require('../lib/countly.common.js');
const { validateUser, validateRead, validateUserForRead, validate... | 1 | 14,332 | did you remove **params.qstring.method** intentionally? if so why? | Countly-countly-server | js |
@@ -90,6 +90,12 @@ public class TableProperties {
public static final String ORC_VECTORIZATION_ENABLED = "read.orc.vectorization.enabled";
public static final boolean ORC_VECTORIZATION_ENABLED_DEFAULT = false;
+ public static final String LOCALITY_ENABLED = "read.locality.enabled";
+ public static final Strin... | 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 | 37,157 | What is the current default? Is that inconsistent across uses and that's why this is null? | apache-iceberg | java |
@@ -477,6 +477,7 @@ func (cf CloudFormation) getLastDeployedAppConfig(appConfig *stack.AppStackConfi
if err != nil {
return nil, fmt.Errorf("parse previous deployed stackset %w", err)
}
+ previouslyDeployedConfig.App = appConfig.Name
return previouslyDeployedConfig, nil
}
| 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package cloudformation
import (
"context"
"errors"
"fmt"
"github.com/aws/aws-sdk-go/aws"
sdkcloudformation "github.com/aws/aws-sdk-go/service/cloudformation"
sdkcloudformationiface "github.com/aws/aws-s... | 1 | 17,252 | Why did we make this change? How come it wasn't an issue before | aws-copilot-cli | go |
@@ -4342,14 +4342,11 @@ TEST_F(VkLayerTest, InvalidDescriptorSet) {
// ObjectTracker should catch this.
// Create a valid cmd buffer
// call vk::CmdBindDescriptorSets w/ false Descriptor Set
+ ASSERT_NO_FATAL_FAILURE(Init());
uint64_t fake_set_handle = 0xbaad6001;
VkDescriptorSet bad_set =... | 1 | /*
* Copyright (c) 2015-2020 The Khronos Group Inc.
* Copyright (c) 2015-2020 Valve Corporation
* Copyright (c) 2015-2020 LunarG, Inc.
* Copyright (c) 2015-2020 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* Y... | 1 | 12,542 | Can you tighten scope by moving to of these variables? i.e. Move to ~4372? | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -90,7 +90,7 @@ public class RDATAFileReader extends TabularDataFileReader {
// RServe static variables
private static String RSERVE_HOST = System.getProperty("dataverse.rserve.host");
private static String RSERVE_USER = System.getProperty("dataverse.rserve.user");
- private static String RSERVE_PASSWORD = ... | 1 | /*
Copyright (C) 2005-2013, by the President and Fellows of Harvard College.
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
Unle... | 1 | 38,245 | Nice to see this `dataverse.rserve.password` fix rolled in. | IQSS-dataverse | java |
@@ -273,7 +273,7 @@ int parse_args(int argc, char *argv[])
break;
endptr = NULL;
config.target.bus = (int) strtoul(tmp_optarg, &endptr, 0);
- if (endptr != tmp_optarg + strlen(tmp_optarg)) {
+ if (endptr != tmp_optarg + strnlen_s(tmp_optarg, sizeof(tmp_optarg))) {
fprintf(stderr, "invalid bus: %s\... | 1 | // Copyright(c) 2017, Intel Corporation
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the ... | 1 | 14,915 | How about the following faster alternative that doesn't need `strlen()` at all: if (*tmp_optarg == '\0' || *endptr != '\0') { fprintf(...) ... This would treat the bus argument as invalid if it's either empty (`tmp_optarg` points to '\0') or invalid (`endptr` points to something other that a '\0'). Actually, the existi... | OPAE-opae-sdk | c |
@@ -7,6 +7,7 @@ class FeedbackMailer < ApplicationMailer
to: self.class.support_email,
subject: 'Feedback submission',
from: from,
+ cc: from,
body: message
)
end | 1 | class FeedbackMailer < ApplicationMailer
def feedback(sending_user, form_values)
form_strings = form_values.map { |key, val| "#{key}: #{val}" }
message = form_strings.join("\n")
from = sending_user.try(:email_address) || form_values[:email] || self.default_sender_email
mail(
to: self.class.suppo... | 1 | 14,036 | I could be missing something here, but the `from` and `cc` are the same. On the test email sent to gatewaycommunicator, these values are different. | 18F-C2 | rb |
@@ -32,13 +32,12 @@ describe('useEffect', () => {
return null;
}
- render(<Comp />, scratch);
- render(<Comp />, scratch);
-
- expect(cleanupFunction).to.be.not.called;
- expect(callback).to.be.calledOnce;
+ act(() => {
+ render(<Comp />, scratch);
+ render(<Comp />, scratch);
+ });
- render(<Comp... | 1 | import { act } from 'preact/test-utils';
import { createElement as h, render, useEffect } from '../../../src';
import { setupScratch, teardown } from '../../_util/helpers';
import { useEffectAssertions } from './useEffectAssertions.test';
import { scheduleEffectAssert } from './_util/useEffectUtil';
/** @jsx h */
de... | 1 | 14,278 | I'm honestly scared because act is now a hard requirement for useEffect which it wasn't before... This could break some tests :( | preactjs-preact | js |
@@ -632,8 +632,13 @@ void nano::active_transactions::update_difficulty (std::shared_ptr<nano::block>
{
node.logger.try_log (boost::str (boost::format ("Block %1% was updated from difficulty %2% to %3%") % block_a->hash ().to_string () % nano::to_string_hex (existing_election->difficulty) % nano::to_string_hex ... | 1 | #include <nano/lib/threading.hpp>
#include <nano/node/active_transactions.hpp>
#include <nano/node/election.hpp>
#include <nano/node/node.hpp>
#include <boost/format.hpp>
#include <boost/variant/get.hpp>
#include <numeric>
using namespace std::chrono;
nano::active_transactions::active_transactions (nano::node & nod... | 1 | 16,170 | Could use election from `info_a.election`, or is this deliberate? | nanocurrency-nano-node | cpp |
@@ -95,6 +95,15 @@ class EasyAdminExtension extends AbstractTypeExtension
{
return LegacyFormHelper::getType('form');
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function getExtendedTypes()
+ {
+ // needed to avoid a deprecation when using Symfony 4.2
+ return [Leg... | 1 | <?php
/*
* This file is part of the EasyAdminBundle.
*
* (c) Javier Eguiluz <javier.eguiluz@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace EasyCorp\Bundle\EasyAdminBundle\Form\Extension;
use EasyCorp\Bundle... | 1 | 11,653 | looks like this should be `return array(LegacyFormHelper::getType('form'));` | EasyCorp-EasyAdminBundle | php |
@@ -52,6 +52,8 @@ var Server = function(requestHandler) {
* with the server host when it has fully started.
*/
this.start = function(opt_port) {
+ assert(typeof opt_port !== 'function',
+ "start invoked with function, not port (mocha callback)?");
var port = opt_port || portprober.findF... | 1 | // Copyright 2013 Selenium committers
// Copyright 2013 Software Freedom Conservancy
//
// 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
/... | 1 | 11,552 | Maybe it would simpler to ignore opt_port if type !== 'number'? | SeleniumHQ-selenium | js |
@@ -223,10 +223,9 @@ Blockly.ScratchBlocks.VerticalExtensions.SCRATCH_EXTENSION = function() {
Blockly.ScratchBlocks.VerticalExtensions.registerAll = function() {
var categoryNames =
['control', 'data', 'data_lists', 'sounds', 'motion', 'looks', 'event',
- 'sensing', 'pen', 'operators', 'more'];
+ ... | 1 | /**
* @license
* Visual Blocks Editor
*
* Copyright 2017 Google Inc.
* https://developers.google.com/blockly/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apach... | 1 | 9,071 | Where was `name` being declared before? | LLK-scratch-blocks | js |
@@ -74,6 +74,18 @@ func (t testHelper) UnavailableDeployment() *appsv1.Deployment {
return d
}
+func (t testHelper) UnknownDeployment() *appsv1.Deployment {
+ d := &appsv1.Deployment{}
+ d.Name = "unknown"
+ d.Status.Conditions = []appsv1.DeploymentCondition{
+ {
+ Type: appsv1.DeploymentAvailable,
+ Status... | 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
dis... | 1 | 15,717 | nit: use `corev1.ConditionUnknown` | google-knative-gcp | go |
@@ -997,7 +997,10 @@ Mongoose.prototype.isValidObjectId = function(v) {
v = v.toString();
}
- if (typeof v === 'string' && (v.length === 12 || v.length === 24)) {
+ if (typeof v === 'string' && v.length === 12) {
+ return true;
+ }
+ if (typeof v === 'string' && v.length === 24 && /^[a-f0-9]*$/.test(v)... | 1 | 'use strict';
/*!
* Module dependencies.
*/
if (global.MONGOOSE_DRIVER_PATH) {
const deprecationWarning = 'The `MONGOOSE_DRIVER_PATH` global property is ' +
'deprecated. Use `mongoose.driver.set()` instead.';
const setDriver = require('util').deprecate(function() {
require('./driver').set(require(global... | 1 | 14,551 | You also need to add a similar check on line 992, there's another place where we check `length === 24` | Automattic-mongoose | js |
@@ -105,9 +105,14 @@ public class BftBlockCreatorFactory {
public Bytes createExtraData(final int round, final BlockHeader parentHeader) {
final BftContext bftContext = protocolContext.getConsensusState(BftContext.class);
final ValidatorProvider validatorProvider = bftContext.getValidatorProvider();
- c... | 1 | /*
* Copyright ConsenSys AG.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing... | 1 | 26,217 | nit: can extract the voteProvider as a local variable | hyperledger-besu | java |
@@ -1190,14 +1190,8 @@ public class QueryEqualityTest extends SolrTestCaseJ4 {
assertFuncEquals("gte(foo_i,2)", "gte(foo_i,2)");
assertFuncEquals("eq(foo_i,2)", "eq(foo_i,2)");
- boolean equals = false;
- try {
- assertFuncEquals("eq(foo_i,2)", "lt(foo_i,2)");
- equals = true;
- } catch (... | 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 | 27,802 | [0] Not suggesting you change it here, but....kindof weird that there's just not an `assertFuncNotEquals` | apache-lucene-solr | java |
@@ -61,3 +61,19 @@ func (bc *Blockchain) GetAccountantFee(accountantAddress common.Address) (uint16
return res.Value, err
}
+
+// IsRegistered checks wether the given identity is registered or not
+func (bc *Blockchain) IsRegistered(registryAddress, addressToCheck common.Address) (bool, error) {
+ caller, err := b... | 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 | 15,134 | why are we passing 'registryAddress' here? We probably should construct it together with bc. Registry is not something that change? | mysteriumnetwork-node | go |
@@ -2,7 +2,7 @@ import { pathOr, curry, merge } from 'ramda';
/**
* Flattens a property path so that its fields are spread out into the provided object.
- *
+ * It's like {@link RA.spreadPath|spreadPath}, but preserves object under property path
*
* @func flattenPath
* @memberOf RA | 1 | import { pathOr, curry, merge } from 'ramda';
/**
* Flattens a property path so that its fields are spread out into the provided object.
*
*
* @func flattenPath
* @memberOf RA
* @since {@link https://char0n.github.io/ramda-adjunct/1.19.0|v1.19.0}
* @category Object
* @sig
* [Idx] -> {k: v} -> {k: v}
* Id... | 1 | 4,930 | `.` at the end of the sentence | char0n-ramda-adjunct | js |
@@ -284,12 +284,16 @@ func (s *Service) checkAndAddPeers(ctx context.Context, peers pb.Peers) {
ctx, cancel := context.WithTimeout(ctx, pingTimeout)
defer cancel()
+ start := time.Now()
+
// check if the underlay is usable by doing a raw ping using libp2p
if _, err = s.streamer.Ping(ctx, multiUnderl... | 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 hive exposes the hive protocol implementation
// which is the discovery protocol used to inform and be
// informed about other peers in the networ... | 1 | 15,524 | wouldn't it be useful to split this into an error metric for the timing? | ethersphere-bee | go |
@@ -47,4 +47,8 @@ class TestFakerName < Test::Unit::TestCase
assert @tester.initials.match(/[A-Z]{3}/)
assert @tester.initials(2).match(/[A-Z]{2}/)
end
+
+ def test_fictional_character_name
+ assert @tester.fictional_character_name.match(/\w+/)
+ end
end | 1 | # frozen_string_literal: true
require_relative '../../test_helper'
class TestFakerName < Test::Unit::TestCase
def setup
@tester = Faker::Name
end
def test_name
assert @tester.name.match(/(\w+\.? ?){2,3}/)
end
def test_name_with_middle
assert @tester.name_with_middle.match(/(\w+\.? ?){3,4}/)
... | 1 | 9,121 | Not sure if this is good enough. Each generator will have it's own unit test anyway. Ideally, I think I'd want to test that each generator in the yml is actually a valid generator... | faker-ruby-faker | rb |
@@ -1293,6 +1293,8 @@ func newTestCFSM(
MintNewSecretBlock(gomock.Any(), gomock.Any(), gomock.Any()).Return(secretBlkToMint, nil).AnyTimes()
blockchain.EXPECT().
Nonce(gomock.Any()).Return(uint64(0), nil).AnyTimes()
+ blockchain.EXPECT().
+ MintNewBlockWithActionIterator(gomock.Any(), gomock.Any(), g... | 1 | // Copyright (c) 2018 IoTeX
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use of the cod... | 1 | 13,381 | line is 138 characters | iotexproject-iotex-core | go |
@@ -75,8 +75,9 @@ type Params struct {
TraceOpts []ocsql.TraceOption
}
-// Open opens a Cloud SQL database.
-func Open(ctx context.Context, certSource proxy.CertSource, params *Params) (*sql.DB, error) {
+// Open opens a Cloud SQL database. The second return value is a Wire cleanup
+// function that calls Close on... | 1 | // Copyright 2018 The Go Cloud Development Kit Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... | 1 | 16,940 | Nit: I would leave `Wire` out of the description; if you use this without wire you can still use it. | google-go-cloud | go |
@@ -14,10 +14,14 @@
*/
package com.google.api.codegen.transformer.ruby;
+import com.google.api.codegen.config.MethodConfig;
import com.google.api.codegen.transformer.ApiMethodParamTransformer;
import com.google.api.codegen.transformer.MethodTransformerContext;
+import com.google.api.codegen.transformer.SurfaceNa... | 1 | /* Copyright 2017 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 | 21,351 | Nit: each field can be on a separate line to make it visually easier to read. | googleapis-gapic-generator | java |
@@ -336,6 +336,7 @@ def get_analysis_statistics(inputs, limits):
statistics_files.append(compilation_db)
elif inp_f in ['compiler_includes.json',
'compiler_target.json',
+ 'compiler_info.json',
'metadata.... | 1 | # -------------------------------------------------------------------------
# The CodeChecker Infrastructure
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
# -------------------------------------------------------------------------... | 1 | 10,108 | Do we still have these files? Shouldn't we remove these? | Ericsson-codechecker | c |
@@ -22,6 +22,11 @@ import (
"github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha1"
)
+ const (
+ // Error reason generated when duration or renewBefore is invalid
+ ErrorDurationInvalid = "ErrDurationInvalid"
+)
+
type Interface interface {
// Setup initialises the issuer. This may include registerin... | 1 | /*
Copyright 2018 The Jetstack cert-manager contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | 1 | 13,784 | A lot of things to do with constants seemed to move since the original commit, so I stuck this here, Is there a better place for it? | jetstack-cert-manager | go |
@@ -171,7 +171,9 @@ var (
RepeatDecayStep: 1,
},
Dispatcher: Dispatcher{
- EventChanSize: 10000,
+ ActionChanSize: 1000,
+ BlockChanSize: 1000,
+ BlockSyncChanSize: 10,
},
API: API{
UseRDS: false, | 1 | // Copyright (c) 2019 IoTeX Foundation
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use... | 1 | 23,244 | is 10 too small compared to 1000? consider sync chan is unicast only (vs block chan is broadcast + unicast), i would say use 200~400 for BlockSyncChanSize my concern is that this would potentially slowdown sync speed of full-node | iotexproject-iotex-core | go |
@@ -297,7 +297,7 @@ module Bolt
errors.each do |error|
@logger.warn(error.details['original_error'])
end
- plans
+ plans.reject { |plan| get_plan_info(plan.first)['private'] }
end
end
| 1 | # frozen_string_literal: true
require 'bolt/applicator'
require 'bolt/executor'
require 'bolt/error'
require 'bolt/plan_result'
require 'bolt/util'
require 'etc'
module Bolt
class PAL
BOLTLIB_PATH = File.expand_path('../../bolt-modules', __dir__)
MODULES_PATH = File.expand_path('../../modules', __dir__)
... | 1 | 13,788 | A full parse of the plan here on listing the plans will be expensive from both a computation and IO perspective. | puppetlabs-bolt | rb |
@@ -19,3 +19,9 @@ const (
BUTTON3 = 15
BUTTON4 = 16
)
+
+// UART pins for NRF52840-DK
+const (
+ UART_TX_PIN = 6
+ UART_RX_PIN = 8
+) | 1 | // +build nrf,pca10040
package machine
// LEDs on the PCA10040 (nRF52832 dev board)
const (
LED = LED1
LED1 = 17
LED2 = 18
LED3 = 19
LED4 = 20
)
// Buttons on the PCA10040 (nRF52832 dev board)
const (
BUTTON = BUTTON1
BUTTON1 = 13
BUTTON2 = 14
BUTTON3 = 15
BUTTON4 = 16
)
| 1 | 5,882 | These constants use the `_PIN` suffix, while the other constants don't use it. I'm not sure what is best, but I would prefer to keep this consistent. Do you have an opinion on which it should be (with or without suffix)? | tinygo-org-tinygo | go |
@@ -1089,6 +1089,13 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
"Specifies the static node file containing the static nodes for this node to connect to")
private final Path staticNodesFile = null;
+ @SuppressWarnings({"FieldCanBeFinal", "FieldMayBeFinal"}) // PicoCLI require... | 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 | 24,919 | Hmm... this feels like discovery should come first. perhaps `--discovery-dns-url`? @NicolasMassart any opinions on this or ideas on who it should be run by? | hyperledger-besu | java |
@@ -1,3 +1,4 @@
+//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/* | 1 | // +build !ignore_autogenerated
/*
Copyright 2021 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 ... | 1 | 46,159 | why is this needed? | antrea-io-antrea | go |
@@ -23,7 +23,7 @@ DEFAULT_TYPE_ATTRIBUTES = ConfigTypeAttributes()
class ConfigType(object):
- def __init__(self, name=None, type_attributes=DEFAULT_TYPE_ATTRIBUTES, description=None):
+ def __init__(self, key, name, type_attributes=DEFAULT_TYPE_ATTRIBUTES, description=None):
type_obj = type(self)... | 1 | from collections import namedtuple
import six
from dagster import check
from .builtin_enum import BuiltinEnum
class ConfigTypeAttributes(
namedtuple('_ConfigTypeAttributes', 'is_builtin is_system_config is_named')
):
def __new__(cls, is_builtin=False, is_system_config=False, is_named=True):
return ... | 1 | 12,227 | I wonder if it'd be possible to autogenerate a key from the name within this function if one is not provided explicitly, rather than having all the callsites pass both the name and key (and usually as the same value)? Might give us a good place to implement a `name->key` function that isn't 1:1. | dagster-io-dagster | py |
@@ -110,6 +110,7 @@ public final class ThriftCodec implements Codec {
final Field IPV4 = new Field(TYPE_I32, 1);
final Field PORT = new Field(TYPE_I16, 2);
final Field SERVICE_NAME = new Field(TYPE_STRING, 3);
+ final Field IPV6 = new Field(TYPE_STRING, 4);
@Override
public Endpoint read(B... | 1 | /**
* Copyright 2015-2016 The OpenZipkin Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ... | 1 | 11,374 | @adriancole I do not see a change in the thrift file. Are there unit tests verifying that this manual serialization is compatible with the native Thrift serialization done by classes generated from `.thrift` IDL file? | openzipkin-zipkin | java |
@@ -506,7 +506,7 @@ Player* Game::getPlayerByGUID(const uint32_t& guid)
ReturnValue Game::getPlayerByNameWildcard(const std::string& s, Player*& player)
{
size_t strlen = s.length();
- if (strlen == 0 || strlen > 20) {
+ if (strlen == 0 || strlen > PLAYER_NAME_LENGHT) {
return RETURNVALUE_PLAYERWITHTHISNAMEISNOT... | 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 | 19,649 | spelling (variable name, all three changes) | otland-forgottenserver | cpp |
@@ -411,8 +411,16 @@ type KeybaseService interface {
[]keybase1.PublicKey, error)
// LoadTeamPlusKeys returns a TeamInfo struct for a team with the
- // specified TeamID.
- LoadTeamPlusKeys(ctx context.Context, tid keybase1.TeamID) (TeamInfo, error)
+ // specified TeamID. The caller can specify `desiredKeyGen` ... | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"time"
"github.com/keybase/client/go/libkb"
"github.com/keybase/client/go/logger"
"github.com/keybase/client/go/protocol/keybase1"
"githu... | 1 | 17,205 | I believe you meant "specify `desiredUID` and `desiredRole`"? | keybase-kbfs | go |
@@ -16,10 +16,9 @@ package openflow
import (
"fmt"
+ "github.com/vmware-tanzu/antrea/pkg/apis/networking/v1beta1"
"net"
- coreV1 "k8s.io/api/core/v1"
- v1 "k8s.io/api/networking/v1"
"k8s.io/klog"
"github.com/vmware-tanzu/antrea/pkg/agent/types" | 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 | 13,153 | Please follow the import style, move it to its similar group | antrea-io-antrea | go |
@@ -63,3 +63,18 @@ func IsUnrecognizedProcedureError(err error) bool {
_, ok := err.(errors.UnrecognizedProcedureError)
return ok
}
+
+// UnrecognizedEncodingError returns an error for the given request, such that
+// IsUnrecognizedEncodingError can distinguish it from other errors coming out
+// of router.Choose.... | 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 | 13,933 | Do we really need these? This is expanding on an API that we're about to do work on with the error stuff @kriskowal | yarpc-yarpc-go | go |
@@ -146,11 +146,9 @@ public class PasswordValidatorServiceBean implements java.io.Serializable {
* @return A List with error messages. Empty when the password is valid.
*/
public List<String> validate(String password, Date passwordModificationTime, boolean isHumanReadable) {
-// public List<String> ... | 1 | package edu.harvard.iq.dataverse.validation;
import edu.harvard.iq.dataverse.util.BundleUtil;
import edu.harvard.iq.dataverse.util.SystemConfig;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java... | 1 | 45,048 | passwordModificationTime is no longer used - did the change drop a time check that should be restored? Or should the param get dropped from the methods? | IQSS-dataverse | java |
@@ -40,7 +40,7 @@ namespace ScenarioMeasurement
source.Kernel.ProcessStart += evt =>
{
- if (processName.Equals(evt.ProcessName, StringComparison.OrdinalIgnoreCase) && pids.Contains(evt.ProcessID) && evt.CommandLine == commandLine)
+ if (processN... | 1 | using Microsoft.Diagnostics.Tracing;
using Microsoft.Diagnostics.Tracing.Parsers;
using Microsoft.Diagnostics.Tracing.Session;
using Reporting;
using System;
using System.Collections.Generic;
using System.Linq;
namespace ScenarioMeasurement
{
// [EventSource(Guid = "9bb228bd-1033-5cf0-1a56-c2dbbe0ebc86")]
// ... | 1 | 10,466 | Would it break here without trim? If so, can we do trim in Startup.cs so we don't need to add this code to every parser? | dotnet-performance | .cs |
@@ -115,7 +115,7 @@ var _ = Describe("with running container", func() {
It("iptables should succeed in getting the lock after 3s", func() {
iptCmd := cmdInContainer("iptables", "-w", "3", "-A", "FORWARD")
out, err := iptCmd.CombinedOutput()
- Expect(string(out)).To(ContainSubstring("Another app is currentl... | 1 | // +build fvtests
// Copyright (c) 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
//
// Unles... | 1 | 15,555 | Since we're using Logrus, probably best to use `Infof` to avoid confusion (Logrus' Printf behaves differently to the built in one) | projectcalico-felix | go |
@@ -155,13 +155,14 @@ Blockly.FlyoutButton.prototype.createDom = function() {
this.svgGroup_);
svgText.textContent = this.text_;
- this.width = svgText.getComputedTextLength() +
- 2 * Blockly.FlyoutButton.MARGIN;
+ this.width = svgText.getComputedTextLength();
if (!this.isLabel_) {
+ this.wid... | 1 | /**
* @license
* Visual Blocks Editor
*
* Copyright 2016 Google Inc.
* https://developers.google.com/blockly/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apach... | 1 | 8,646 | Hm, this looks like a change that should go upstream as well. | LLK-scratch-blocks | js |
@@ -1533,16 +1533,6 @@ func (core *coreService) ChainID() uint32 {
return core.bc.ChainID()
}
-// GetActionByActionHash returns action by action hash
-func (core *coreService) ActionByActionHash(h hash.Hash256) (action.SealedEnvelope, error) {
- if !core.hasActionIndex || core.indexer == nil {
- return action.Sea... | 1 | // Copyright (c) 2019 IoTeX Foundation
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use... | 1 | 24,415 | let's keep ActionByActionHash and delete getActionByActionHash | iotexproject-iotex-core | go |
@@ -64,4 +64,12 @@ class ProductVisibility
{
return $this->visible;
}
+
+ /**
+ * @return \Shopsys\FrameworkBundle\Model\Pricing\Group\PricingGroup
+ */
+ public function getPricingGroup(): PricingGroup
+ {
+ return $this->pricingGroup;
+ }
} | 1 | <?php
namespace Shopsys\FrameworkBundle\Model\Product;
use Doctrine\ORM\Mapping as ORM;
use Shopsys\FrameworkBundle\Model\Pricing\Group\PricingGroup;
/**
* @ORM\Table(name="product_visibilities")
* @ORM\Entity
*/
class ProductVisibility
{
/**
* @var \Shopsys\FrameworkBundle\Model\Product\Product
*
... | 1 | 16,921 | please use return type | shopsys-shopsys | php |
@@ -76,7 +76,7 @@ public class TestEdgeDriver extends RemoteWebDriver implements WebStorage, Locat
.findFirst().orElseThrow(WebDriverException::new);
service = (EdgeDriverService) builder.withVerbose(true).withLogFile(logFile.toFile()).build();
- LOG.info("edgedriver will log to " + l... | 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,118 | This is deliberately at this level. | SeleniumHQ-selenium | java |
@@ -237,7 +237,7 @@ class UploadWorkerThread(TransferThread):
except self._retry_exceptions as e:
log.error("Exception caught uploading part number %s for "
"vault %s, attempt: (%s / %s), filename: %s, "
- "exception: %s, msg: %s",
+ ... | 1 | # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. 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 ... | 1 | 11,661 | I'm going to go ahead and undo this change, I don't think it was intentional. | boto-boto | py |
@@ -163,7 +163,7 @@ namespace Datadog.AutoInstrumentation.ManagedLoader
/// As a result, the target framework moniker and the binary compatibility flags are initialized correctly.
/// </summary>
/// <remarks>
- /// The above logic is further specialised, depending on the kind of the cu... | 1 | using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Threading;
using Datadog.Util;
namespace Datadog.AutoInstrumentation.ManagedLoader
{
/// <summary>
/// Loads specified assemblies into the current AppDomain.
///
/// This is the only public class in t... | 1 | 23,156 | > specialised This isn't a typo in my neck of the woods | DataDog-dd-trace-dotnet | .cs |
@@ -29,6 +29,7 @@ import (
var packages = []string{
"github.com/google/knative-gcp/test/cmd/target",
+ "github.com/google/knative-gcp/test/cmd/storageTarget",
}
var packageToImageConfig = map[string]string{} | 1 | // +build e2e
/*
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... | 1 | 9,354 | will change to `storage_target` | google-knative-gcp | go |
@@ -38,7 +38,7 @@ class SecurityCenterTest(unittest_utils.ForsetiTestCase):
"""Set up."""
fake_global_configs = {
'securitycenter': {'max_calls': 1, 'period': 1.1}}
- cls.securitycenter_beta_api_client = securitycenter.SecurityCenterClient(version='v1beta1')
+ cls.securityce... | 1 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 1 | 33,884 | This would be better as `cls.securitycenter_client`, to match what is being instantiated. | forseti-security-forseti-security | py |
@@ -34,6 +34,15 @@ import appModules
import watchdog
import extensionPoints
from fileUtils import getFileVersionInfo
+import shlobj
+from functools import wraps
+
+# Path to the native system32 directory.
+nativeSys32: str = shlobj.SHGetFolderPath(None, shlobj.CSIDL.SYSTEM)
+# Path to the syswow64 directory if it ex... | 1 | # -*- coding: UTF-8 -*-
# A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2006-2019 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Patrick Zajda, Joseph Lee,
# Babbage B.V., Mozilla Corporation
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.
"""Man... | 1 | 34,135 | Could we have this initialization as part of the initialize method? | nvaccess-nvda | py |
@@ -15,7 +15,7 @@ export default AbstractEditController.extend({
showUpdateButton: true,
database: inject.service(),
- editController: inject.controller('patients/edit'),
+ editController: null,
filesystem: inject.service(),
photoFileNotSet: computed('model.photoFile', function() { | 1 | import AbstractEditController from 'hospitalrun/controllers/abstract-edit-controller';
import Ember from 'ember';
import { translationMacro as t } from 'ember-i18n';
const { computed, get, inject, isEmpty, RSVP, set } = Ember;
export default AbstractEditController.extend({
addAction: 'addPhoto',
editTitle: t('pat... | 1 | 13,725 | This line should be removed as editController is not used from this context anymore. | HospitalRun-hospitalrun-frontend | js |
@@ -9,11 +9,17 @@ import (
"github.com/influxdata/flux/plan"
)
+// Transformation represents functions that control of how the execution
+// engine will take in a flux Table, perform the necessary data processing
+// and return an output flux Table
type Transformation interface {
RetractTable(id DatasetID, key ... | 1 | package execute
import (
"context"
"fmt"
"github.com/influxdata/flux"
"github.com/influxdata/flux/memory"
"github.com/influxdata/flux/plan"
)
type Transformation interface {
RetractTable(id DatasetID, key flux.GroupKey) error
Process(id DatasetID, tbl flux.Table) error
UpdateWatermark(id DatasetID, t Time) e... | 1 | 11,750 | This is correct in concept but the method signature doesn't really communicate the same thing. In other words, if the function produces an output table where is it? Its not on the function signature. Can you explain where the output table is created? | influxdata-flux | go |
@@ -238,9 +238,14 @@ class DetectoRS_ResNet(ResNet):
pretrained=None,
init_cfg=None,
**kwargs):
- assert init_cfg is None, 'To prevent abnormal initialization ' \
- 'behavior, init_cfg is not allowed to be set'
- self.pr... | 1 | import torch.nn as nn
import torch.utils.checkpoint as cp
from mmcv.cnn import (build_conv_layer, build_norm_layer, constant_init,
kaiming_init)
from mmcv.runner import Sequential, load_checkpoint
from torch.nn.modules.batchnorm import _BatchNorm
from mmdet.utils import get_root_logger
from ..bui... | 1 | 24,070 | For insurance, it's best not to take it directly | open-mmlab-mmdetection | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.