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 |
|---|---|---|---|---|---|---|---|
@@ -414,8 +414,8 @@ namespace Microsoft.DotNet.Build.Tasks
return Environment.GetEnvironmentVariable("TMPDIR");
else if (DirExists(Environment.GetEnvironmentVariable("TMP")))
return Environment.GetEnvironmentVariable("TMP");
- else if (DirExists(... | 1 | using Microsoft.Build.Framework;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Diagnostics;
namespace Microsoft.DotNet.Build.Tasks
{
public class CleanupVSTSAgent : ... | 1 | 12,756 | If all you're doing is checking for the existence of a directory as your "temp" directory, why does it matter what OS you're on? | dotnet-buildtools | .cs |
@@ -60,10 +60,11 @@
package server
import (
- "fmt"
+ v2 "github.com/algorand/go-algorand/daemon/algod/api/server/v2"
+ "github.com/algorand/go-algorand/daemon/algod/api/server/v2/generated"
"net/http"
- "github.com/gorilla/mux"
+ "github.com/labstack/echo/v4"
"github.com/algorand/go-algorand/daemon/algod/a... | 1 | // Copyright (C) 2019-2020 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) ... | 1 | 37,801 | nit- would be cleaner to import it once | algorand-go-algorand | go |
@@ -159,6 +159,14 @@ class GenericProxyHandler(BaseHTTPRequestHandler):
# allow pre-flight CORS headers by default
if 'Access-Control-Allow-Origin' not in response.headers:
self.send_header('Access-Control-Allow-Origin', '*')
+ if 'Access-Control-Allow-Headers' not ... | 1 | from six.moves.BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import requests
import os
import sys
import json
import traceback
import logging
import ssl
from requests.structures import CaseInsensitiveDict
from requests.models import Response, Request
from six import iteritems, string_types
from six.moves.soc... | 1 | 9,032 | Looks like there is a closing parenthesis `)` missing here. | localstack-localstack | py |
@@ -1684,8 +1684,8 @@ void PairTlsph::coeff(int narg, char **arg) {
} // end energy release rate failure criterion
else {
- sprintf(str, "unknown *KEYWORD: %s", arg[ioffset]);
- error->all(FLERR, str);
+ snprintf(str,128,... | 1 | /* ----------------------------------------------------------------------
*
* *** Smooth Mach Dynamics ***
*
* This file is part of the USER-SMD package for LAMMPS.
* Copyright (2014) Georg C. Ganzenmueller, georg.ganzenmueller@emi.fhg.de
* Fraunhofer Ernst-Mach Institute for High-Speed Dynamic... | 1 | 25,192 | this one bothers me. There are many places where this one is written to for an error message and just a single callsite is changed. | lammps-lammps | cpp |
@@ -706,6 +706,7 @@ func TestKBFSOpsGetBaseDirChildrenCacheSuccess(t *testing.T) {
ops := getOps(config, id)
n := nodeFromPath(t, ops, p)
+ config.mockMdserv.EXPECT().FastForwardBackoff().AnyTimes()
children, err := config.KBFSOps().GetDirChildren(ctx, n)
if err != nil {
t.Errorf("Got error on getdir: %+v"... | 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 (
"bytes"
"fmt"
"math/rand"
"testing"
"time"
"github.com/golang/mock/gomock"
"github.com/keybase/client/go/libkb"
"github.com/keybase/cl... | 1 | 16,889 | You can put this in `kbfsOpsInit()` in you want, so we don't have to call it in every test. | keybase-kbfs | go |
@@ -528,8 +528,10 @@ drx_insert_counter_update(void *drcontext, instrlist_t *ilist, instr_t *where,
}
}
#elif defined(AARCHXX)
+# ifdef ARM_32
/* FIXME i#1551: implement 64-bit counter support */
- ASSERT(!is_64, "DRX_COUNTER_64BIT is not implemented");
+ ASSERT(!is_64, "DRX_COUNTER_64BIT i... | 1 | /* **********************************************************
* Copyright (c) 2013-2019 Google, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following... | 1 | 22,700 | `ARM_32` is what clients define as an input to DR, and is not always defined internally: we use just `ARM` to mean AArch32. | DynamoRIO-dynamorio | c |
@@ -38,8 +38,11 @@ import javax.annotation.Nullable;
/** A field declaration wrapper around a Discovery Schema. */
public class DiscoveryField implements FieldModel, TypeModel {
private final List<DiscoveryField> properties;
+ // Dereferenced schema for use rendering type names and determining properties, type, a... | 1 | /* Copyright 2017 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 | 25,027 | s/for use/to use for/ | googleapis-gapic-generator | java |
@@ -60,7 +60,7 @@ class UserCreatedEventProjector
'language' => $event->getLanguage()->getCode(),
'password' => $event->getPassword()->getValue(),
'is_active' => $event->isActive(),
- 'avatar_id' => $event->getAvatarId() ? $event->getAvatarId()->getValue... | 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\Account\Persistence\Dbal\Projector\User;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\DBALException;
use Ergonode\Account\Domain\Event\User\UserCr... | 1 | 8,712 | ` $event->getAvatarFilename()` this function return `string` or `null`. In this place ` $event->getAvatarFilename()->getValue()` return `Fatal error ` | ergonode-backend | php |
@@ -34,7 +34,7 @@ import (
var (
// ErrPersistenceLimitExceeded is the error indicating QPS limit reached.
- ErrPersistenceLimitExceeded = serviceerror.NewResourceExhausted("Persistence Max QPS Reached.")
+ ErrPersistenceLimitExceeded = serviceerror.NewUnavailable("Persistence Max QPS Reached.")
)
type ( | 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 | 12,910 | why not creating a new error type for server's own resource limit exceed error and do conversion within rpc interceptor? | temporalio-temporal | go |
@@ -27,13 +27,10 @@ namespace OpenTelemetry.Instrumentation.AspNet
public class AspNetInstrumentationOptions
{
/// <summary>
- /// Gets or sets <see cref="TextMapPropagator"/> for context propagation. Default value: <see cref="CompositeTextMapPropagator"/> with <see cref="TraceContextPropagato... | 1 | // <copyright file="AspNetInstrumentationOptions.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... | 1 | 17,767 | Could be a timing thing here. When options are created they'll copy the ref for the current default propagator. If user sets through SDK the global propagator after that, it won't be reflected. Could leave it null here and then when it is used in instrumentation do `options.Propagator ?? Propagators.DefaultTextMapPropa... | open-telemetry-opentelemetry-dotnet | .cs |
@@ -158,7 +158,6 @@ public class TransactionSimulator {
callParams.getFrom() != null ? callParams.getFrom() : DEFAULT_FROM;
BlockHeader blockHeaderToProcess = header;
-
if (transactionValidationParams.isAllowExceedingBalance()) {
updater.getOrCreate(senderAddress).getMutable().setBalance(Wei... | 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,183 | Unrelated file. Please remove from PR. | hyperledger-besu | java |
@@ -2663,6 +2663,7 @@ static work_queue_msg_code_t process_http_request( struct work_queue *q, struct
} else {
// Other requests get raw JSON data.
send_worker_msg(q,w,"Content-type: text/plain\n\n");
+ send_worker_msg(q,w,"Access-Control-Allow-Origin: *\n\n");
process_queue_status(q, w, &path[1], st... | 1 | /*
Copyright (C) 2014- The University of Notre Dame
This software is distributed under the GNU General Public License.
See the file COPYING for details.
*/
#include "work_queue.h"
#include "work_queue_protocol.h"
#include "work_queue_internal.h"
#include "work_queue_resources.h"
#include "cctools.h"
#include "int_siz... | 1 | 15,210 | Careful: you only want two newlines after the final header message. (That indicates the end of headers and the start of data.) | cooperative-computing-lab-cctools | c |
@@ -9,6 +9,9 @@ def request(flow):
flow.request.headers.pop('If-Modified-Since', None)
flow.request.headers.pop('Cache-Control', None)
+ # do not force https redirection
+ flow.request.headers.pop('Upgrade-Insecure-Requests', None)
+
# proxy connections to SSL-enabled hosts
if flow.request.p... | 1 | import re
from six.moves import urllib
# set of SSL/TLS capable hosts
secure_hosts = set()
def request(flow):
flow.request.headers.pop('If-Modified-Since', None)
flow.request.headers.pop('Cache-Control', None)
# proxy connections to SSL-enabled hosts
if flow.request.pretty_host in secure_hosts:
... | 1 | 12,209 | This will not work on Python 3 (to which we are transitioning) because `.content` is bytes, not a str. Can you make the pattern a bytes object as well (like so: `b"pattern"`)? | mitmproxy-mitmproxy | py |
@@ -85,7 +85,7 @@ const ariaRoles = {
},
combobox: {
type: 'composite',
- requiredOwned: ['textbox', 'listbox', 'tree', 'grid', 'dialog'],
+ requiredOwned: ['listbox', 'tree', 'grid', 'dialog', 'textbox'],
requiredAttrs: ['aria-expanded'],
// Note: because aria-controls is not well supported we will not
... | 1 | // Source: https://www.w3.org/TR/wai-aria-1.1/#roles
/* easiest way to see allowed roles is to filter out the global ones
from the list of inherited states and properties. The dpub spec
does not have the global list so you'll need to copy over from
the wai-aria one:
const globalAttrs = Array.from(
docu... | 1 | 15,753 | This was to allow the tests to pass when the order of the required was different. Silly, but we don't have an easy way to check for "equal but order doesn't matter" in chai. | dequelabs-axe-core | js |
@@ -16546,6 +16546,18 @@ RelInternalSP::costMethod() const
} // RelInternalSP::costMethod()
//<pb>
+CostMethod *
+HbaseDelete::costMethod() const
+{
+ if (CmpCommon::getDefault(HBASE_DELETE_COSTING) == DF_OFF)
+ return RelExpr::costMethod(); // returns cost 1 cost object
+
+ static THREAD_P CostMethodHbaseDel... | 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 | 7,769 | maybe say "returns the default cost method that returns an object of cost 1". | apache-trafodion | cpp |
@@ -293,6 +293,19 @@ func (r *DefaultRuleRenderer) endpointIptablesChain(
},
})
+ rules = append(rules, Rule{
+ Match: Match().ProtocolNum(ProtoUDP).
+ DestPorts(uint16(r.Config.VXLANPort)).
+ VXLANVNI(uint32(r.Config.VXLANVNI)),
+ Action: DropAction{},
+ Comment: "Drop VXLAN encapped packets originating... | 1 | // Copyright (c) 2016-2018 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... | 1 | 16,987 | I believe these rules will be enforced both (1) on egress from a local workload, and (2) on ingress **to** a local workload. Right? I understand that we definitely want (1), but do we really want to enforce (2) as well? | projectcalico-felix | c |
@@ -125,7 +125,9 @@ public class SalesforceNetworkPlugin extends ForcePlugin {
try {
// Not a 2xx status
if (!response.isSuccess()) {
- callbackContext.error(response.asString());
+ JSONObject er... | 1 | /*
* Copyright (c) 2016-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,801 | Use `response.asJsonObject()` instead. Also, use `put()` instead of `putOpt()`, `null` as a value is fine. | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -113,7 +113,7 @@ describe('PasswordEditor', () => {
const editorHolder = $('.handsontableInputHolder');
const editor = editorHolder.find('.handsontableInput');
- expect(parseInt(editorHolder.css('z-index'), 10)).toBeGreaterThan(0);
+ expect(editorHolder.is(':visible')).toBe(true);
editor.val... | 1 | describe('PasswordEditor', () => {
const id = 'testContainer';
beforeEach(function() {
this.$container = $(`<div id="${id}" style="width: 300px; height: 300px;"></div>`).appendTo('body');
});
afterEach(function() {
if (this.$container) {
destroy();
this.$container.remove();
}
});
... | 1 | 14,925 | Are you sure? We've changed it during an introduction of the IME support. | handsontable-handsontable | js |
@@ -46,7 +46,7 @@ class QueryBuilder
$queryBuilder->leftJoin('entity.'.$sortFieldParts[0], $sortFieldParts[0]);
}
- if (!empty($dqlFilter)) {
+ if (null !== $dqlFilter) {
$queryBuilder->andWhere($dqlFilter);
}
| 1 | <?php
namespace EasyCorp\Bundle\EasyAdminBundle\Search;
use Doctrine\Bundle\DoctrineBundle\Registry;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\QueryBuilder as DoctrineQueryBuilder;
/**
* @author Javier Eguiluz <javier.eguiluz@gmail.com>
*/
class QueryBuilder
{
/** @var Registry */
private $doctrine;... | 1 | 11,332 | I think here we want the use of `empty()` to take care of empty strings. If you put `dql_filter: ''` in your YAML config ... this will add `->andWhere('')` and it will fail, right? | EasyCorp-EasyAdminBundle | php |
@@ -170,14 +170,12 @@ func (p *Agent) Start(ctx context.Context) error {
p2pMsgLatency.WithLabelValues("broadcast", strconv.Itoa(int(broadcast.MsgType)), status).Observe(float64(latency))
}()
if err = proto.Unmarshal(data, &broadcast); err != nil {
- err = errors.Wrap(err, "error when marshaling broadcast m... | 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,598 | this is golang's named return, err is defined, `return` is equivalent to `return err` the current code has no problem | iotexproject-iotex-core | go |
@@ -202,7 +202,7 @@ ostree_gpg_verify_result_get_all (OstreeGpgVerifyResult *result,
* ostree_gpg_verify_result_describe:
* @result: an #OstreeGpgVerifyResult
* @signature_index: which signature to describe
- * @output_buffer: a #GString to hold the description
+ * @output_buffer: (out): a #GString to hold the de... | 1 | /*
* Copyright (C) 2015 Red Hat, Inc.
* Copyright (C) 2019 Collabora Ltd.
*
* SPDX-License-Identifier: LGPL-2.0+
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* versio... | 1 | 17,222 | I don't think this is right; in Rust terms it's like a `&mut String`, in Java `StringBuilder` - it's not a return value from the function which is what `(out)` is for. | ostreedev-ostree | c |
@@ -7,9 +7,9 @@ from ..registry import LOSSES
def _expand_binary_labels(labels, label_weights, label_channels):
bin_labels = labels.new_full((labels.size(0), label_channels), 0)
- inds = torch.nonzero(labels >= 1).squeeze()
+ inds = torch.nonzero((labels >= 0) & (labels < label_channels)).squeeze()
i... | 1 | import torch
import torch.nn as nn
import torch.nn.functional as F
from ..registry import LOSSES
def _expand_binary_labels(labels, label_weights, label_channels):
bin_labels = labels.new_full((labels.size(0), label_channels), 0)
inds = torch.nonzero(labels >= 1).squeeze()
if inds.numel() > 0:
bin... | 1 | 18,965 | If the label is not binary, should we rename this function? | open-mmlab-mmdetection | py |
@@ -421,10 +421,12 @@ class JMeterExecutor(ScenarioExecutor, WidgetProvider, FileLister):
:param file_list:
:return: etree
"""
+ cur_path = r"${__BeanShell(import org.apache.jmeter.services.FileServer; FileServer.getFileServer()" \
+ r".getBaseDir();)}${__BeanShell(Fi... | 1 | """
Module holds all stuff regarding JMeter tool usage
Copyright 2015 BlazeMeter 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... | 1 | 13,468 | This is very-very bad idea because of its performance impact | Blazemeter-taurus | py |
@@ -6,6 +6,7 @@ import (
"database/sql"
"encoding/json"
"fmt"
+ "github.com/sonm-io/core/proto"
"math/big"
"net"
"sync" | 1 | package dwh
import (
"context"
"crypto/ecdsa"
"database/sql"
"encoding/json"
"fmt"
"math/big"
"net"
"sync"
"time"
"github.com/grpc-ecosystem/go-grpc-prometheus"
_ "github.com/mattn/go-sqlite3"
log "github.com/noxiouz/zapctx/ctxlog"
"github.com/pkg/errors"
"github.com/sonm-io/core/blockchain"
"github.co... | 1 | 7,833 | WHY U NOT SORT IMPORTS? | sonm-io-core | go |
@@ -0,0 +1,11 @@
+module SignInRequestHelpers
+ def sign_in_as(user)
+ post(
+ "/session",
+ session: {
+ email: user.email,
+ password: user.password,
+ },
+ )
+ end
+end | 1 | 1 | 16,741 | Put a comma after the last item of a multiline hash. | thoughtbot-upcase | rb | |
@@ -12,7 +12,7 @@ __version__ = param.Version(release=(1,7,0), fpath=__file__,
commit="$Format:%h$", reponame='holoviews')
from .core import archive # noqa (API import)
-from .core.dimension import OrderedDict, Dimension # noqa (API import)
+from .cor... | 1 | from __future__ import print_function, absolute_import
import os, sys, pydoc
import numpy as np # noqa (API import)
_cwd = os.path.abspath(os.path.split(__file__)[0])
sys.path.insert(0, os.path.join(_cwd, '..', 'param'))
import param
__version__ = param.Version(release=(1,7,0), fpath=__file__,
... | 1 | 17,859 | How come we need ``Dimensioned`` in the top-level namespace? | holoviz-holoviews | py |
@@ -75,9 +75,9 @@ import net.runelite.client.util.Text;
import net.runelite.client.util.WildcardMatcher;
@PluginDescriptor(
- name = "NPC Indicators",
- description = "Highlight NPCs on-screen and/or on the minimap",
- tags = {"highlight", "minimap", "npcs", "overlay", "respawn", "tags"}
+ name = "NPC Indicators",... | 1 | /*
* Copyright (c) 2018, James Swindle <wilingua@gmail.com>
* Copyright (c) 2018, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source ... | 1 | 15,284 | excess whitespace through plugin. | open-osrs-runelite | java |
@@ -138,7 +138,7 @@ void EdgeBasedGraphFactory::InsertEdgeBasedNode(const NodeID node_u, const NodeI
NodeID current_edge_source_coordinate_id = node_u;
// traverse arrays from start and end respectively
- for (const auto i : util::irange(0UL, geometry_size))
+ for (const auto i : util::irange(std::siz... | 1 | #include "extractor/edge_based_edge.hpp"
#include "extractor/edge_based_graph_factory.hpp"
#include "util/coordinate.hpp"
#include "util/coordinate_calculation.hpp"
#include "util/percent.hpp"
#include "util/integer_range.hpp"
#include "util/lua_util.hpp"
#include "util/simple_logger.hpp"
#include "util/timing_util.hpp... | 1 | 15,701 | What is the problem here? I feel we used this in a lot of places. | Project-OSRM-osrm-backend | cpp |
@@ -109,8 +109,7 @@ class RPN(BaseDetector):
for proposals, meta in zip(proposal_list, img_metas):
proposals[:, :4] /= proposals.new_tensor(meta['scale_factor'])
- # TODO: remove this restriction
- return proposal_list[0].cpu().numpy()
+ return [proposal.cpu().numpy(... | 1 | import mmcv
from mmdet.core import bbox_mapping, tensor2imgs
from ..builder import DETECTORS, build_backbone, build_head, build_neck
from .base import BaseDetector
@DETECTORS.register_module()
class RPN(BaseDetector):
"""Implementation of Region Proposal Network."""
def __init__(self,
backb... | 1 | 21,069 | Update the docstring. | open-mmlab-mmdetection | py |
@@ -7,10 +7,11 @@
package api
import (
- "errors"
"testing"
"time"
+ "github.com/pkg/errors"
+
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
| 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 | 22,820 | delete the empty line "github.com/pkg/errors" should be grouped with other third party packages same for the rest | iotexproject-iotex-core | go |
@@ -155,7 +155,7 @@ public class RemoteWebDriver implements WebDriver, JavascriptExecutor,
}
private void init(Capabilities capabilities) {
- capabilities = capabilities == null ? new ImmutableCapabilities() : capabilities;
+ this.capabilities = capabilities == null ? new ImmutableCapabilities() : capabil... | 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,454 | Assigning capabilities to the field here is not the best idea. Semantically this field contains the capabilities returned by the browser after session start. So here we sould better amend capabilities and return them from `init` method to pass later to `startSession` method (that will assign the capabilities returned b... | SeleniumHQ-selenium | rb |
@@ -110,8 +110,6 @@ module RSpec::Core
end
end
- alias_method :abort, :finish
-
def stop
@duration = (RSpec::Core::Time.now - @start).to_f if @start
notify :stop | 1 | module RSpec::Core
class Reporter
NOTIFICATIONS = %W[start message example_group_started example_group_finished example_started
example_passed example_failed example_pending start_dump dump_pending
dump_failures dump_summary seed close stop deprecation deprecation_sum... | 1 | 10,921 | Is this a breaking change, or is the API private? | rspec-rspec-core | rb |
@@ -0,0 +1,4 @@
+import pandas as pd
+
+test_data = pd.read_json("./dumps/courseData.json");
+test_data = {k: val.groupby('pk')['fields'].apply(list).apply(lambda x: x[0]).to_dict() for k, val in test_data.groupby("model")}; | 1 | 1 | 7,649 | I don't think we need this dependency in this project right now | kantord-LibreLingo | py | |
@@ -30,8 +30,9 @@ const (
// FanoutName is the name used for the fanout container.
FanoutName = "fanout"
// RetryName is the name used for the retry container.
- RetryName = "retry"
- BrokerCellLabelKey = "brokerCell"
+ RetryName = "retry"
+ BrokerCellLabelKey = "brokerCell"
+ BrokerSystem... | 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 | 17,294 | I don't think this is necessary since `CommonLabels` is a public func and every component name is also public constant. | google-knative-gcp | go |
@@ -155,14 +155,15 @@ module Bolt
"`task.py`) and the extension is case sensitive. When a target's name is `localhost`, "\
"Ruby tasks run with the Bolt Ruby interpreter by default.",
additionalProperties: {
- type: String,
+ typ... | 1 | # frozen_string_literal: true
module Bolt
class Config
module Transport
module Options
LOGIN_SHELLS = %w[sh bash zsh dash ksh powershell].freeze
# Definitions used to validate config options.
# https://github.com/puppetlabs/bolt/blob/main/schemas/README.md
TRANSPORT_OPTIONS... | 1 | 19,247 | The `_example` field should be updated to include an interpreter with an array value. | puppetlabs-bolt | rb |
@@ -532,12 +532,14 @@ var supportedKeyTypes = map[string]acme.KeyType{
// Map of supported protocols.
// HTTP/2 only supports TLS 1.2 and higher.
-var supportedProtocols = map[string]uint16{
+var SupportedProtocols = map[string]uint16{
"tls1.0": tls.VersionTLS10,
"tls1.1": tls.VersionTLS11,
"tls1.2": tls.Vers... | 1 | // Copyright 2015 Light Code Labs, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... | 1 | 11,995 | Put this in the godoc of SupportedProtocols instead. Preferably we would just use one map though. Why not just use this one? | caddyserver-caddy | go |
@@ -59,13 +59,12 @@ func (container *CronContainer) StopStatsCron() {
}
// newCronContainer creates a CronContainer object.
-func newCronContainer(dockerID *string, name *string, dockerGraphPath string) *CronContainer {
+func newCronContainer(dockerID *string, dockerGraphPath string) *CronContainer {
statePath :=... | 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,483 | I'd feel a little safer if the first argument were a string, not a *string unless there's a particular reason for making it a pointer. | aws-amazon-ecs-agent | go |
@@ -22,6 +22,7 @@ import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
| 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 | 19,390 | Can you please revert changes to files in the `thoughtworks` package? This is legacy code and we will eventually phase out RC. | SeleniumHQ-selenium | rb |
@@ -19,7 +19,10 @@ package org.openqa.selenium.grid.graphql;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
+
+import org.openqa.selenium.SessionNotCreatedException;
import org.openqa.selenium.grid.distributor.Distributor;
+import org.openqa.selenium.grid.sessionmap.SessionMap;
... | 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,779 | You can safely revert changes to this file. | SeleniumHQ-selenium | py |
@@ -127,7 +127,6 @@ class AnchorHead(nn.Module):
def loss_single(self, cls_score, bbox_pred, labels, label_weights,
bbox_targets, bbox_weights, num_total_samples, cfg):
- # classification loss
labels = labels.reshape(-1)
label_weights = label_weights.reshape(-1)
... | 1 | from __future__ import division
import numpy as np
import torch
import torch.nn as nn
from mmcv.cnn import normal_init
from mmdet.core import (AnchorGenerator, anchor_target, delta2bbox,
multi_apply, weighted_cross_entropy, weighted_smoothl1,
weighted_binary_cross_entro... | 1 | 17,191 | This deletion is unnecessary. | open-mmlab-mmdetection | py |
@@ -302,7 +302,10 @@ class Notification extends Component {
mdc-layout-grid__cell
mdc-layout-grid__cell--span-1
">
- <img className="googlesitekit-publisher-win__small-image" alt="" src={ smallImage } />
+ {
+ typeof smallImage === 'string'
+ ? <img className="go... | 1 | /**
* Notification component.
*
* Site Kit by Google, Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*... | 1 | 34,072 | I'm not a huge fan of this overloading of the prop; accepting very different types of arguments for props like this can be confusing, and wasn't part of the IB. I understand wanting to import the SVG directly, but the IB suggests using `${global._googlesitekitLegacyData.admin.assetsRoot}${userInputSuccessImage}` as the... | google-site-kit-wp | js |
@@ -21,10 +21,7 @@ import java.io.InputStream;
import java.io.StringWriter;
import java.lang.invoke.MethodHandles;
import java.nio.charset.StandardCharsets;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.concurrent.TimeU... | 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 | 36,363 | I've had this happen recently with IntelliJ, was this intentional? | apache-lucene-solr | java |
@@ -22,9 +22,10 @@
#include <string.h>
#include <string>
#include <vector>
-#include <map>
+#include <unordered_map>
#include "vulkan/vulkan.h"
#include "vk_format_utils.h"
+#include "hash_util.h"
struct VULKAN_FORMAT_INFO {
size_t size; | 1 | /* Copyright (c) 2015-2016 The Khronos Group Inc.
* Copyright (c) 2015-2016 Valve Corporation
* Copyright (c) 2015-2016 LunarG, 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
*
... | 1 | 8,705 | Order(1) vs Order(logN) -- not sure it's measurable at the ~200 element size of the table. All of the published comparisons start at ~1000 elements. | KhronosGroup-Vulkan-ValidationLayers | cpp |
@@ -33,6 +33,7 @@ import (
"github.com/mysteriumnetwork/node/core/connection"
"github.com/mysteriumnetwork/node/core/ip"
"github.com/mysteriumnetwork/node/core/location"
+ location_factory "github.com/mysteriumnetwork/node/core/location/factory"
"github.com/mysteriumnetwork/node/core/node"
"github.com/mysteri... | 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 | 14,209 | I don't know about this aliasing and 'factory'. Previous version was rather straightforward: `location.CreateLocationResolver`. Perhaps `location.CreateResolver` would be even better? What do we actually gain here from moving DI to a separate sub-package? | mysteriumnetwork-node | go |
@@ -47,6 +47,14 @@ void Engine::SetCallBack(std::function<void(const void *, std::string,
{
}
+static void engineThrowUp(const std::string &engineType,
+ const std::string &func)
+{
+ throw std::invalid_argument(
+ "ERROR: Engine bass class " + func + "() called. " + engineType +
... | 1 | /*
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* Engine.cpp
*
* Created on: Dec 19, 2016
* Author: wfg
*/
#include "Engine.h"
#include <ios> //std::ios_base::failure
#include "adios2/ADIOSMPI.h"
#include "adios2/core/Support.h"... | 1 | 11,539 | Use `UpperCamelCase` for function names | ornladios-ADIOS2 | cpp |
@@ -232,9 +232,12 @@ SchemaDate.prototype.cast = function(value) {
if (value instanceof Number || typeof value === 'number') {
date = new Date(value);
+ } else if (typeof value === 'string' && !isNaN(Number(value)) && (Number(value) >= 275761 || Number(value) < 0)) {
+ // string representation of millisec... | 1 | /*!
* Module requirements.
*/
var MongooseError = require('../error');
var utils = require('../utils');
var SchemaType = require('../schematype');
var CastError = SchemaType.CastError;
/**
* Date SchemaType constructor.
*
* @param {String} key
* @param {Object} options
* @inherits SchemaType
* @api public
... | 1 | 13,757 | I'm not 100% sold on this idea but I like it in general. Nice compromise between using the 'Date' constructor where possible and falling back to the pre #5880 behavior when it makes sense. However, instead of `Number(value) < 0`, let's do `Number(value) < MIN_YEAR` because `new Date('-2017')` is perfectly valid in JS a... | Automattic-mongoose | js |
@@ -138,8 +138,7 @@ public abstract class BaseHttpClusterStateProvider implements ClusterStateProvid
Set<String> liveNodes = new HashSet((List<String>)(cluster.get("live_nodes")));
this.liveNodes = liveNodes;
liveNodesTimestamp = System.nanoTime();
- //TODO SOLR-11877 we don't know the znode path; CLU... | 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 | 34,394 | Remember to close SOLR-11877 after this | apache-lucene-solr | java |
@@ -1124,7 +1124,7 @@ void Identifier::_exportToJSON(JSONFormatter *formatter) const {
//! @cond Doxygen_Suppress
static bool isIgnoredChar(char ch) {
return ch == ' ' || ch == '_' || ch == '-' || ch == '/' || ch == '(' ||
- ch == ')' || ch == '.' || ch == '&' || ch == ',';
+ ch == ')' || ch ... | 1 | /******************************************************************************
*
* Project: PROJ
* Purpose: ISO19111:2019 implementation
* Author: Even Rouault <even dot rouault at spatialys dot com>
*
******************************************************************************
* Copyright (c) 2018, Even ... | 1 | 12,405 | this change should be reverted | OSGeo-PROJ | cpp |
@@ -186,9 +186,15 @@ type mockedIdentityRegistry struct {
anyIdentityRegistered bool
}
+// IsRegistered mock
func (mir *mockedIdentityRegistry) IsRegistered(address common.Address) (bool, error) {
return mir.anyIdentityRegistered, nil
}
+// WaitForRegistrationEvent mock
+func (mir *mockedIdentityRegistry) Wa... | 1 | /*
* Copyright (C) 2017 The "MysteriumNetwork/node" Authors.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | 1 | 11,640 | This function signature is a bit complicated, some parameters are IN type (stopLoop which is modified from outside), others are OUT (registeredEvent channel which is modified inside function) I suggest the following signature -> SubscribeToRegistrationEvent(identityAddress) returns registeredEvent chan of type (Registe... | mysteriumnetwork-node | go |
@@ -45,7 +45,7 @@ const options = {
query: ['src/**/*.png', 'src/**/*.jpg', 'src/**/*.gif', 'src/**/*.svg']
},
copy: {
- query: ['src/**/*.json', 'src/**/*.ico']
+ query: ['src/**/*.json', 'src/**/*.ico', 'src/**/*.wav']
},
injectBundle: {
query: 'src/index.html' | 1 | const { src, dest, series, parallel, watch } = require('gulp');
const browserSync = require('browser-sync').create();
const del = require('del');
const babel = require('gulp-babel');
const concat = require('gulp-concat');
const terser = require('gulp-terser');
const htmlmin = require('gulp-htmlmin');
const imagemin = r... | 1 | 14,154 | `.wav`?! cannot we use something slightly more modern and compressed instead? :) I dunno, like `.mp3` or `.aac` or `.ogg`... | jellyfin-jellyfin-web | js |
@@ -1602,6 +1602,17 @@ luaA_client_swap(lua_State *L)
*ref_swap = c;
luaA_class_emit_signal(L, &client_class, "list", 0);
+
+ luaA_object_push(L, swap);
+ lua_pushboolean(L, true);
+ luaA_object_emit_signal(L, -4, "swapped", 2);
+ lua_pop(L, 2);
+
+ luaA_object_pus... | 1 | /*
* client.c - client management
*
* Copyright © 2007-2009 Julien Danjou <julien@danjou.info>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at... | 1 | 8,908 | Wouldn't a single signal call be enough? (without the boolean even) | awesomeWM-awesome | c |
@@ -17,6 +17,11 @@
<br/>
<%= note_event(@note.status, @note.closed_at, @note_comments.last.author) %>
<% end %>
+ <% if current_user && current_user != @note.author %>
+ <%= link_to new_report_url(reportable_id: @note.id, reportable_type: @note.class.name), :title => t('browse.note.report') d... | 1 | <% set_title(t('browse.note.title', :id => @note.id)) %>
<h2>
<a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
<%= t "browse.note.#{@note.status}_title", :note_name => @note.id %>
</h2>
<div class="browse-section">
<h4><%= t('browse.note.description') %></h4>
<div class="note-de... | 1 | 10,838 | I suspect that this whole block, which is going to be repeated a number of times, should probably be in a helper. I guess it would need to be given the object and the title and could probably figure out everything else from that? | openstreetmap-openstreetmap-website | rb |
@@ -218,6 +218,9 @@ class Document < AbstractBlock
# Public: Get the Reader associated with this document
attr_reader :reader
+ # Public: Get/Set the PathResolver instance used to resolve paths in this Document.
+ attr_reader :path_resolver
+
# Public: Get the Converter associated with this document
att... | 1 | # encoding: UTF-8
module Asciidoctor
# Public: The Document class represents a parsed AsciiDoc document.
#
# Document is the root node of a parsed AsciiDoc document. It provides an
# abstract syntax tree (AST) that represents the structure of the AsciiDoc
# document from which the Document object was parsed.
#
# Althou... | 1 | 5,862 | Should we expose this attribute in the Asciidoctor.js API ? | asciidoctor-asciidoctor | rb |
@@ -147,7 +147,7 @@ public interface Multimap<K, V> extends Traversable<Tuple2<K, V>>, Function1<K,
@Override
default boolean contains(Tuple2<K, V> element) {
- return get(element._1).map(v -> Objects.equals(v, element._2)).getOrElse(false);
+ return get(element._1).map(v -> v.contains(element... | 1 | /* / \____ _ _ ____ ______ / \ ____ __ _______
* / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG
* _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2016 Javaslang, http://javaslang.io
* /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ ... | 1 | 10,739 | I think contains on `Multimap` was broken - it should return true if one of the values is associated with the key? It that right | vavr-io-vavr | java |
@@ -57,6 +57,7 @@ public class TiConfiguration implements Serializable {
private static final int DEF_KV_CLIENT_CONCURRENCY = 10;
private static final List<TiStoreType> DEF_ISOLATION_READ_ENGINES =
ImmutableList.of(TiStoreType.TiKV, TiStoreType.TiFlash);
+ private static final int DEF_PREWRITE_CONCURRENCY... | 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 | 12,598 | delete this line | pingcap-tispark | java |
@@ -43,6 +43,7 @@ module Test
def self.setup_models
conn = ClientRequest.connection
+ return if conn.table_exists? "test_client_requests"
conn.create_table(:test_client_requests, force: true) do |t|
t.decimal :amount
t.string :project_title | 1 | module Test
def self.table_name_prefix
"test_"
end
class ClientRequest < ActiveRecord::Base
belongs_to :approving_official, class_name: User
def self.purchase_amount_column_name
:amount
end
include ClientDataMixin
include PurchaseCardMixin
def editable?
true
end
... | 1 | 17,735 | Presumably we no longer need `force: true` here. | 18F-C2 | rb |
@@ -339,6 +339,12 @@ hipError_t hipHostAlloc(void** ptr, size_t sizeBytes, unsigned int flags) {
// width in bytes
hipError_t ihipMallocPitch(void** ptr, size_t* pitch, size_t width, size_t height, size_t depth) {
hipError_t hip_status = hipSuccess;
+ if(ptr==NULL || ptr==0)
+ {
+ hip_status=hipErrorInvalidValue... | 1 | /*
Copyright (c) 2015 - present Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to us... | 1 | 6,609 | HIP runtime is compiled using a C++ compiler. So comparison to both NULL as well as 0 does not make sense. Just comparing to NULL is sufficient. | ROCm-Developer-Tools-HIP | cpp |
@@ -0,0 +1,10 @@
+<%= t("mailer.welcome_mailer.welcome_notification.header") %>
+
+<%= t("mailer.welcome_mailer.welcome_notification.para1") %>
+
+<%= t("mailer.welcome_mailer.welcome_notification.para2", help_url: help_url('') ) %>
+
+<%= t("mailer.welcome_mailer.welcome_notification.para3", feedback_url: feedback_url... | 1 | 1 | 16,624 | these urls are still in `a` tags so we should probably include these links separately for a non-HTML version | 18F-C2 | rb | |
@@ -507,8 +507,18 @@ func (s *Server) configureAccounts() error {
if opts.SystemAccount != _EMPTY_ {
// Lock may be acquired in lookupAccount, so release to call lookupAccount.
s.mu.Unlock()
- _, err := s.lookupAccount(opts.SystemAccount)
+ acc, err := s.lookupAccount(opts.SystemAccount)
s.mu.Lock()
+ if ... | 1 | // Copyright 2012-2019 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 10,546 | That's fine though, meaning that you can send to this channel under the server lock. The internalSendLoop will pick up the change when the server lock is released (if loop is blocked trying to grab the server lock). Even the way you do it here (releasing the lock, sending, then reacquiring) does not guarantee that the ... | nats-io-nats-server | go |
@@ -47,6 +47,7 @@ public interface CapabilityType {
String ELEMENT_SCROLL_BEHAVIOR = "elementScrollBehavior";
String HAS_TOUCHSCREEN = "hasTouchScreen";
String OVERLAPPING_CHECK_DISABLED = "overlappingCheckDisabled";
+ String ENABLE_DOWNLOADING = "chromium:enableDownloading";
String LOGGING_PREFS = "logg... | 1 | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... | 1 | 15,152 | The name `enableDownloading` implies this is a boolean capability. How about `downloadDir`? | SeleniumHQ-selenium | java |
@@ -28,10 +28,9 @@ public interface ValidatorManager {
Map<String, ValidationReport> validate(Project project, File projectDir);
/**
- * The ValidatorManager should have a default validator which checks for the most essential
- * components of a project. The ValidatorManager should always load the default v... | 1 | package azkaban.project.validator;
import azkaban.project.Project;
import azkaban.utils.Props;
import java.io.File;
import java.util.List;
import java.util.Map;
import org.apache.log4j.Logger;
/**
* ValidatorManager is responsible for loading the list of validators specified in the Azkaban
* validator configuration... | 1 | 14,782 | Found one internal team is using this method. Will coordinate with them about the migration solution. | azkaban-azkaban | java |
@@ -230,6 +230,18 @@ namespace Datadog.Trace.Configuration
/// </summary>
public const string DiagnosticSourceEnabled = "DD_DIAGNOSTIC_SOURCE_ENABLED";
+ /// <summary>
+ /// Configuration key for the application's server http statuses to set spans as errors by.
+ /// </summary>
... | 1 | namespace Datadog.Trace.Configuration
{
/// <summary>
/// String constants for standard Datadog configuration keys.
/// </summary>
public static class ConfigurationKeys
{
/// <summary>
/// Configuration key for the path to the configuration file.
/// Can only be set with an e... | 1 | 18,554 | The field `HttpServerErrorCodes` should be called `HttpServerErrorStatuses` | DataDog-dd-trace-dotnet | .cs |
@@ -35,6 +35,12 @@ MAXIMUM_LOOP_COUNT = 600
DEFAULT_BUCKET_FMT_V1 = 'gs://{}-data-{}'
DEFAULT_BUCKET_FMT_V2 = 'gs://{}-{}-data-{}'
+FORSETI_V1_RULE_FILES = [
+ 'bigquery_rules.yaml', 'blacklist_rules.yaml', 'bucket_rules.yaml',
+ 'cloudsql_rules.yaml', 'firewall_rules.yaml', 'forwarding_rules.yaml',
+ 'gro... | 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 a... | 1 | 28,848 | Can you please make each of these in a separate line. It will be easier to keep them sorted, and add/remove. | forseti-security-forseti-security | py |
@@ -170,10 +170,14 @@ public class ConfigSetsHandler extends RequestHandlerBase implements PermissionN
boolean overwritesExisting = zkClient.exists(configPathInZk, true);
- if (overwritesExisting && !req.getParams().getBool(ConfigSetParams.OVERWRITE, false)) {
- throw new SolrException(ErrorCode.BAD_RE... | 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 | 37,731 | should we error instead of silently ignoring the `cleanup` param? it defaults to `false`, so someone must have explicitly set it to `true` | apache-lucene-solr | java |
@@ -191,7 +191,7 @@ func NewReader(r io.ReaderAt, size int64) (*Reader, error) {
if len(archive.File) == 0 {
return nil, errors.New("archive is empty")
} else if fi := archive.File[0].FileInfo(); !fi.IsDir() {
- return nil, errors.New("archive root is not a directory")
+ return nil, fmt.Errorf("archive root di... | 1 | /*
* Copyright 2018 The Kythe Authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | 1 | 13,420 | There is no specific requirement that the root be called `root`, just that there is a single root directory and that it be the first entry in the zip. | kythe-kythe | go |
@@ -1,6 +1,9 @@
<% unless ENV['DISABLE_SANDBOX_WARNING'] == 'true' %>
<%= render partial: 'shared/sandbox_warning' %>
<% end %>
+<% if !current_page?(me_path) && current_user && current_user.requires_profile_attention? %>
+ <%= render partial: "shared/user_profile_warning" %>
+<% end %>
<header>
<div class='c... | 1 | <% unless ENV['DISABLE_SANDBOX_WARNING'] == 'true' %>
<%= render partial: 'shared/sandbox_warning' %>
<% end %>
<header>
<div class='container'>
<div id='header-identity'>
<div id="communicart_logo">Communicart</div>
<h1>Approval Portal</h1>
</div>
<%= render 'layouts/header_nav' %>
</div>... | 1 | 15,451 | perhaps we should encapsulate this logic in a helper method w a test? | 18F-C2 | rb |
@@ -0,0 +1,7 @@
+[ 'options_hash', 'defaults', 'command_line_parser', 'pe_version_scraper', 'parser' ].each do |file|
+ begin
+ require "beaker/options/#{file}"
+ rescue LoadError
+ require File.expand_path(File.join(File.dirname(__FILE__), 'options', file))
+ end
+end | 1 | 1 | 4,524 | Now that we're only using this repo as a Gem you shouldn't need to `require` an expanded local file path like below. | voxpupuli-beaker | rb | |
@@ -53,7 +53,8 @@ enum Timestamps implements Transform<Long, Integer> {
OffsetDateTime timestamp = Instant
.ofEpochSecond(timestampMicros / 1_000_000)
.atOffset(ZoneOffset.UTC);
- return (int) granularity.between(EPOCH, timestamp);
+ Integer year = Long.valueOf(granularity.between(EPOCH, ti... | 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 | 13,192 | This isn't necessarily a year. It may be months, days, or hours. Can we return `intValue()` directly instead? | apache-iceberg | java |
@@ -351,8 +351,6 @@ func (mtask *managedTask) waitEvent(stopWaiting <-chan struct{}) bool {
mtask.handleDesiredStatusChange(acsTransition.desiredStatus, acsTransition.seqnum)
return false
case dockerChange := <-mtask.dockerMessages:
- seelog.Infof("Managed task [%s]: got container [%s (Runtime ID: %s)] event: ... | 1 | // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" file acco... | 1 | 24,362 | this is redundant because it gets logged immediately on entering the handleContainerChange function | aws-amazon-ecs-agent | go |
@@ -126,7 +126,7 @@ func (e *Executor) reportRequiringApproval(ctx context.Context) {
var approvers []string
for _, v := range ds.GenericDeploymentConfig.DeploymentNotification.Mentions {
- if v.Event == "DEPLOYMENT_WAIT_APPROVAL" {
+ if e := "EVENT_" + v.Event; e == model.NotificationEventType_EVENT_DEPLOYMENT... | 1 | // Copyright 2020 The PipeCD 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 agree... | 1 | 20,539 | `ds.GenericDeploymentConfig.DeploymentNotification` in L128 is nullable. | pipe-cd-pipe | go |
@@ -42,4 +42,8 @@ public class CliqueMiningTracker {
public boolean blockCreatedLocally(final BlockHeader header) {
return CliqueHelpers.getProposerOfBlock(header).equals(localAddress);
}
+
+ public ProtocolContext getProtocolContext() {
+ return protocolContext;
+ }
} | 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 | 22,860 | this shouldn't be exposed here - this class isn't a carriage for this - its used internally to determine if/how we can mine. | hyperledger-besu | java |
@@ -265,13 +265,11 @@ public class FirefoxDriver extends RemoteWebDriver
@Override
public String installExtension(Path path) {
- Require.nonNull("Path", path);
return extensions.installExtension(path);
}
@Override
public void uninstallExtension(String extensionId) {
- Require.nonNull("Exte... | 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 | 19,125 | It's fine to leave these checks in. It'll make the exception come from `FirefoxDriver`, and that's probably clearer to a user. | SeleniumHQ-selenium | rb |
@@ -60,8 +60,9 @@ RSpec.configure do |config|
# Add modules for helpers
config.include ControllerSpecHelper, type: :controller
config.include RequestSpecHelper, type: :request
- [:feature, :request].each do |type|
+ [:feature, :request, :model].each do |type|
config.include IntegrationSpecHelper, type: ... | 1 | # This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require 'spec_helper'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
# Add additional requires below this line. Rails is not loaded until this point!
require 'steps/user_steps'
r... | 1 | 13,230 | We don't want to include the `IntegrationSpecHelper` for models...mind moving this line out of the loop to be `config.include EnvironmentSpecHelper, type: :model`? | 18F-C2 | rb |
@@ -25,6 +25,9 @@ func TestWriteDrupalConfig(t *testing.T) {
err = WriteDrupalConfig(drupalConfig, file.Name())
assert.NoError(t, err)
+ os.Chmod(dir, 0755)
+ os.Chmod(file.Name(), 0666)
+
err = os.RemoveAll(dir)
assert.NoError(t, err)
} | 1 | package config
import (
"testing"
"os"
"io/ioutil"
"github.com/drud/ddev/pkg/cms/model"
"github.com/drud/ddev/pkg/testcommon"
"github.com/stretchr/testify/assert"
)
func TestWriteDrupalConfig(t *testing.T) {
dir := testcommon.CreateTmpDir("example")
file, err := ioutil.TempFile(dir, "file")
assert.NoErro... | 1 | 10,884 | Please check the return on these. | drud-ddev | go |
@@ -279,10 +279,14 @@ class Storage {
if (uplink == null) {
uplink = new Proxy({
url: file.url,
+ cache: true,
_autogenerated: true,
}, self.config);
}
- let savestream = self.local.add_tarball(name, filename);
+ let savestream = null;
+ if (... | 1 | 'use strict';
const assert = require('assert');
const async = require('async');
const Error = require('http-errors');
const semver = require('semver');
const Stream = require('stream');
const Local = require('./local-storage');
const Logger = require('./logger');
const MyStreams = require('./streams');
const Proxy = r... | 1 | 16,908 | Do we need `==` for true? | verdaccio-verdaccio | js |
@@ -17,7 +17,7 @@ class BaseEMAHook(Hook):
momentum (float): The momentum used for updating ema parameter.
Ema's parameter are updated with the formula:
`ema_param = (1-momentum) * ema_param + momentum * cur_param`.
- Defaults to 0.0002.
+ Defaults to 0.0001.
... | 1 | # Copyright (c) OpenMMLab. All rights reserved.
import math
from mmcv.parallel import is_module_wrapper
from mmcv.runner.hooks import HOOKS, Hook
class BaseEMAHook(Hook):
"""Exponential Moving Average Hook.
Use Exponential Moving Average on all parameters of model in training
process. All parameters hav... | 1 | 26,376 | Changing the default value may cause BC-breaking. Suggest changing this value in config. | open-mmlab-mmdetection | py |
@@ -325,7 +325,7 @@ class SimpleConfig(Logger):
slider_pos = max(slider_pos, 0)
slider_pos = min(slider_pos, len(FEE_ETA_TARGETS))
if slider_pos < len(FEE_ETA_TARGETS):
- num_blocks = FEE_ETA_TARGETS[slider_pos]
+ num_blocks = FEE_ETA_TARGETS[int(slider_pos)]
... | 1 | import json
import threading
import time
import os
import stat
import ssl
from decimal import Decimal
from typing import Union, Optional, Dict, Sequence, Tuple
from numbers import Real
from copy import deepcopy
from aiorpcx import NetAddress
from . import util
from . import constants
from .util import base_units, bas... | 1 | 13,981 | how does that happen? | spesmilo-electrum | py |
@@ -31,9 +31,9 @@
#
from __future__ import print_function
-import unittest
+import unittest, doctest
import os,sys
-
+from rdkit.six import exec_
from rdkit.six.moves import cPickle
from rdkit import rdBase | 1 | # $Id$
#
# Copyright (c) 2007-2014, Novartis Institutes for BioMedical Research Inc.
# 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 a... | 1 | 15,036 | This is gross/clever. :-) | rdkit-rdkit | cpp |
@@ -1,6 +1,6 @@
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
-class TestZhCnLocale < Test::Unit::TestCase
+class TestZhLocale < Test::Unit::TestCase
def setup
Faker::Config.locale = 'zh-CN'
end | 1 | require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
class TestZhCnLocale < Test::Unit::TestCase
def setup
Faker::Config.locale = 'zh-CN'
end
def teardown
Faker::Config.locale = nil
end
def test_ch_methods
assert Faker::Address.postcode.is_a? String
assert Faker::Address.sta... | 1 | 8,396 | Take a look at the name of this file. Definitely copy and | faker-ruby-faker | rb |
@@ -163,12 +163,15 @@ func NewVolumeInfo(URL string, volname string, namespace string) (volInfo *Volum
if resp.StatusCode == 500 {
fmt.Printf("Volume: %s not found at namespace: %q\n", volname, namespace)
err = util.InternalServerError
+ return
} else if resp.StatusCode == 503 {
fmt.Printf("maya api... | 1 | /*
Copyright 2017 The OpenEBS Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | 1 | 9,366 | Can you check with @mahebbar how to work this error. Should be different from 404. | openebs-maya | go |
@@ -46,7 +46,7 @@ setup(
'spark': ['pyspark>=2.4.0'],
'mlflow': ['mlflow>=1.0'],
},
- python_requires='>=3.5,<3.8',
+ python_requires='>=3.5',
install_requires=[
'pandas>=0.23.2',
'pyarrow>=0.10', | 1 | #!/usr/bin/env python
#
# 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 applic... | 1 | 15,518 | Do we still need the upper bound `<3.9`? | databricks-koalas | py |
@@ -229,7 +229,10 @@ function getPathsToCheck($f_paths): ?array
/** @var string */
$input_path = $input_paths[$i];
- if (realpath($input_path) === realpath(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'psalm')
+ if (
+ realpath($input_path) === realpath(dirna... | 1 | <?php
namespace Psalm;
use Composer\Autoload\ClassLoader;
use Phar;
use Psalm\Internal\Composer;
use function dirname;
use function strpos;
use function realpath;
use const DIRECTORY_SEPARATOR;
use function file_exists;
use function in_array;
use const PHP_EOL;
use function fwrite;
use const STDERR;
use function impl... | 1 | 10,344 | Does this mean `vendor/bin/psalm` is not a symlink (or whatever equivalent Windows has for symlinks) on Windows? | vimeo-psalm | php |
@@ -1,4 +1,4 @@
-package aws_test
+package aws
import (
"fmt" | 1 | package aws_test
import (
"fmt"
"os"
"testing"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/opsworks"
"github.com/libopenstorage/openstorage/pkg/storageops"
"github.com/libopenstorage/openstorage/pkg/storageops/aws"
"github.com/libopenstorage/openstorage/pkg/storageops/test"
uui... | 1 | 6,540 | @lpabon having a separate package name `aws_test` allows to test the package as if the tester was an external package. If the test package name is the same as the package being tested, the test package can also use methods and variables not exposed to the eventual user. | libopenstorage-openstorage | go |
@@ -54,8 +54,6 @@ func RunEndToEndTest(ctx context.Context, t *testing.T, exp *otlpmetric.Exporter
instruments := map[string]data{
"test-int64-counter": {sdkapi.CounterInstrumentKind, number.Int64Kind, 1},
"test-float64-counter": {sdkapi.CounterInstrumentKind, number.Float64Kind, 1},
- "test-int6... | 1 | // Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agre... | 1 | 17,085 | The exporter should still be able to test these histogram instrument kinds, right? Is there another reason to remove these? | open-telemetry-opentelemetry-go | go |
@@ -274,6 +274,13 @@ func (eval *BlockEvaluator) Round() basics.Round {
return eval.block.Round()
}
+// ResetTxnBytes resets the number of bytes tracked by the BlockEvaluator to
+// zero. This is a specialized operation used by the transaction pool to
+// simulate the effect of putting pending transactions in mul... | 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,766 | should this increment eval.Round somehow? | algorand-go-algorand | go |
@@ -91,7 +91,7 @@ class Blacklight::Solr::Response < ActiveSupport::HashWithIndifferentAccess
value.each { |v| force_to_utf8(v) }
when String
if value.encoding != Encoding::UTF_8
- Rails.logger.warn "Found a non utf-8 value in Blacklight::Solr::Response. \"#{value}\" Encoding is #{valu... | 1 | # frozen_string_literal: true
class Blacklight::Solr::Response < ActiveSupport::HashWithIndifferentAccess
extend ActiveSupport::Autoload
eager_autoload do
autoload :PaginationMethods
autoload :Response
autoload :Spelling
autoload :Facets
autoload :MoreLikeThis
autoload :GroupResponse
aut... | 1 | 7,101 | Although this change looks good. Maybe there are other inconsistent cases too? | projectblacklight-blacklight | rb |
@@ -21,7 +21,7 @@ module ApplicationHelper
'/auth/github'
end
- def format_resources(resources)
+ def format_markdown(resources)
BlueCloth.new(resources).to_html.html_safe
end
| 1 | module ApplicationHelper
def body_class
qualified_controller_name = controller.controller_path.gsub('/','-')
"#{qualified_controller_name} #{qualified_controller_name}-#{controller.action_name}"
end
def google_map_link_to(address, *options, &block)
google_link = "http://maps.google.com/maps?f=q&q=#{C... | 1 | 13,406 | This is a way better method name. | thoughtbot-upcase | rb |
@@ -1,7 +1,5 @@
class NewLanguageConfirmationsController < ApplicationController
def index
- redirect_to welcome_to_upcase_path(
- confirmation: true, language_selected: params[:language],
- ), notice: "Thanks for signing up. We will be in touch!"
+ redirect_to root_path, notice: t("marketing.show.lan... | 1 | class NewLanguageConfirmationsController < ApplicationController
def index
redirect_to welcome_to_upcase_path(
confirmation: true, language_selected: params[:language],
), notice: "Thanks for signing up. We will be in touch!"
end
end
| 1 | 18,286 | Prefer single-quoted strings when you don't need string interpolation or special symbols. | thoughtbot-upcase | rb |
@@ -1,3 +1,5 @@
+options = Array.isArray(options) ? options : [];
+
var invalid = [];
var attr, attrName, allowed, | 1 | var invalid = [];
var attr, attrName, allowed,
role = node.getAttribute('role'),
attrs = node.attributes;
if (!role) {
role = axe.commons.aria.implicitRole(node);
}
allowed = axe.commons.aria.allowedAttr(role);
if (role && allowed) {
for (var i = 0, l = attrs.length; i < l; i++) {
attr = attrs[i];
attrName = ... | 1 | 11,983 | I was wondering if this should allow per role specification, instead of (or in addition to) a generic "allowed everywhere". So you could do: `{ separator: ['aria-valuenow', 'aria-valuemin', 'aria-valuemax'] }`. You could still allow the array, and you could add a wildcard option for the "generic" case you've got now: `... | dequelabs-axe-core | js |
@@ -942,7 +942,8 @@ SQLVarChar::SQLVarChar(Lng32 maxLen,
FALSE, allowSQLnull, isUpShifted, isCaseInsensitive,
TRUE, cs, co, ce,
encoding, vcIndLen),
- clientDataType_(collHeap()) // Get heap from NABasicObject. Can't allocate on stack.
+ clientDataType_(collHeap()), // Get heap fr... | 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,310 | I'm confused by the name. The string was a Hive string but it isn't any longer? Why should we care? (I imagine I'll find the answer later... there is some different semantic that we want downstream...) | apache-trafodion | cpp |
@@ -31,12 +31,7 @@ import org.openqa.selenium.grid.sessionmap.SessionMap;
import org.openqa.selenium.grid.sessionmap.local.LocalSessionMap;
import org.openqa.selenium.netty.server.NettyServer;
import org.openqa.selenium.remote.SessionId;
-import org.openqa.selenium.remote.http.HttpClient;
-import org.openqa.selenium... | 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,921 | Could you please leave the explicit imports? | SeleniumHQ-selenium | java |
@@ -23,7 +23,7 @@ import (
"github.com/iotexproject/iotex-core/pkg/hash"
"github.com/iotexproject/iotex-core/pkg/keypair"
"github.com/iotexproject/iotex-core/pkg/log"
- "github.com/iotexproject/iotex-core/proto"
+ iproto "github.com/iotexproject/iotex-core/proto"
"github.com/iotexproject/iotex-core/state/factor... | 1 | // Copyright (c) 2018 IoTeX
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use of the cod... | 1 | 14,913 | Why need alias? | iotexproject-iotex-core | go |
@@ -148,6 +148,10 @@ func (c testTLFJournalConfig) teamMembershipChecker() kbfsmd.TeamMembershipCheck
return nil
}
+func (c testTLFJournalConfig) tlfIDGetter() tlfIDGetter {
+ return nil
+}
+
func (c testTLFJournalConfig) diskLimitTimeout() time.Duration {
return c.dlTimeout
} | 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 (
"math"
"os"
"reflect"
"sync"
"testing"
"time"
"github.com/keybase/client/go/protocol/keybase1"
"github.com/keybase/kbfs/ioutil"
"gith... | 1 | 18,436 | Shouldn't this be a `libfs.nullIDGetter` (exported, of course)? | keybase-kbfs | go |
@@ -156,6 +156,9 @@ const (
tealsignTooManyArg = "--set-lsig-arg-idx too large, maximum of %d arguments"
tealsignInfoWroteSig = "Wrote signature for %s to LSig.Args[%d]"
+ tealLogicSigSize = "%s: logicsig program size too large: %d > %d"
+ tealAppSize = "%s: app program size too large: %d > %d"
+
// Wa... | 1 | // Copyright (C) 2019-2021 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) ... | 1 | 42,078 | I dislike the messages.go pattern; the strings are only used once and make more sense in context. The other two added reportErrorf() calls in clerk.go have inline strings. | algorand-go-algorand | go |
@@ -118,9 +118,6 @@ Status FetchVerticesExecutor::prepareTags() {
if (!tagIdStatus.ok()) {
return tagIdStatus.status();
}
- auto tagId = tagIdStatus.value();
- tagNames_.push_back(tagName);
- tagIds_.push_back(tagId);
auto result =... | 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 "graph/FetchVerticesExecutor.h"
#include "meta/SchemaProviderIf.h"
#include "dataman/Sch... | 1 | 30,037 | Seems we don't need it anymore. | vesoft-inc-nebula | cpp |
@@ -54,7 +54,7 @@ class Guidance < ActiveRecord::Base
validates :published, inclusion: { message: INCLUSION_MESSAGE,
in: BOOLEAN_VALUES}
- validates :themes, presence: { message: PRESENCE_MESSAGE }
+ validates :themes, presence: { message: PRESENCE_MESSAGE }, if: :published?... | 1 | # Guidance provides information from organisations to Users, helping them when
# answering questions. (e.g. "Here's how to think about your data
# protection responsibilities...")
#
# == Schema Information
#
# Table name: guidances
#
# id :integer not null, primary key
# published :boo... | 1 | 18,167 | This might cause problems with the weird way we publish Guidance and Groups in the UI. We will have to make sure that UAT is thorough. | DMPRoadmap-roadmap | rb |
@@ -75,7 +75,7 @@ func NewRawExporter(config Config) (*Exporter, error) {
// defer pipeline.Stop()
// ... Done
func InstallNewPipeline(config Config) (*push.Controller, error) {
- controller, err := NewExportPipeline(config)
+ controller, err := NewExportPipeline(config, time.Hour)
if err != nil {
return cont... | 1 | // Copyright 2019, OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... | 1 | 11,311 | this default needs to be on order 1 minute, I'm not sure why we defaulted to 1 hour below... | open-telemetry-opentelemetry-go | go |
@@ -92,6 +92,15 @@ func (ACMEIssuer) CaddyModule() caddy.ModuleInfo {
func (iss *ACMEIssuer) Provision(ctx caddy.Context) error {
iss.logger = ctx.Logger(iss)
+ // expand email address, if non-empty
+ if iss.Email != "" {
+ email, err := caddy.NewReplacer().ReplaceOrErr(iss.Email, true, true)
+ if err != nil {
+... | 1 | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | 1 | 15,937 | I figure to make `{env.*}` work, right? I can't think of any other placeholder that makes sense here | caddyserver-caddy | go |
@@ -29,7 +29,9 @@ TestEnv::~TestEnv() {
void TestEnv::SetUp() {
FLAGS_load_data_interval_secs = 1;
// Create metaServer
- metaServer_ = nebula::meta::TestUtils::mockMetaServer(0, metaRootPath_.path());
+ metaServer_ = nebula::meta::TestUtils::mockMetaServer(
+ ... | 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 "graph/test/TestEnv.h"
#include "meta/test/TestUtils.h"
#include "storage/test/TestUtils... | 1 | 19,513 | Why change the port from 0 to getAvailablePort()? | vesoft-inc-nebula | cpp |
@@ -691,9 +691,9 @@ class TestSeleniumScriptGeneration(SeleniumTestCase):
content = fds.read()
target_lines = [
- "var_loc_keys=self.loc_mng.get_locator([{'name':'btn1',}])self.driver.find_element"
+ "var_loc_keys=self.loc_mng.get_locator([{'name':'btn1',}],30.0)self.driver... | 1 | import os
from bzt import TaurusConfigError
from bzt.six import PY2
from tests import RESOURCES_DIR
from tests.modules.selenium import SeleniumTestCase
class TestSeleniumScriptGeneration(SeleniumTestCase):
def test_modern_actions_generator(self):
self.configure({
"execution": [{
... | 1 | 15,535 | For me would be great don't repeat timeout sending in every get_locator call. Looks like it should be sent into LocatorsManager init. And possibly it should me non mandatory, something like that: `def __init__ (self, locators, timeout=60):` | Blazemeter-taurus | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.