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 |
|---|---|---|---|---|---|---|---|
@@ -94,9 +94,18 @@ public class LatLonShape {
return new Field[] {new LatLonTriangle(fieldName, lat, lon, lat, lon, lat, lon)};
}
+ /** create a query to find all indexed shapes that comply the {@link QueryRelation} with the provided point
+ **/
+ public static Query newPointQuery(String field, QueryRelat... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 1 | 29,661 | do we really need a relation or can we just assume INTERSECTS? | apache-lucene-solr | java |
@@ -16,7 +16,7 @@ import net.sourceforge.pmd.lang.java.oom.api.MetricVersion;
*
* @author Clément Fournier
*/
-public final class ParameterizedMetricKey {
+/* default */ final class ParameterizedMetricKey {
private static final Map<Integer, ParameterizedMetricKey> POOL = new HashMap<>();
| 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.oom;
import java.util.HashMap;
import java.util.Map;
import net.sourceforge.pmd.lang.java.oom.api.Metric;
import net.sourceforge.pmd.lang.java.oom.api.MetricKey;
import net.sourceforge.pmd.la... | 1 | 12,456 | Is this a `MetricKey` ? | pmd-pmd | java |
@@ -49,6 +49,9 @@ public class Constants {
public static final int DEFAULT_SSL_PORT_NUMBER = 8443;
public static final int DEFAULT_JETTY_MAX_THREAD_COUNT = 20;
+ // One Schedule's default End Time: 01/01/2050, 00:00:00, UTC
+ public static final long DEFAULT_SCHEDULE_END_EPOCH_TIME = 2524608000000L;
+
publ... | 1 | /*
* Copyright 2017 LinkedIn Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 13,330 | what's your rationale to pick up this date? | azkaban-azkaban | java |
@@ -11,6 +11,7 @@ import (
"strings"
"github.com/opencontainers/runc/libcontainer/cgroups"
+ "github.com/opencontainers/runc/libcontainer/cgroups/fscommon"
"github.com/opencontainers/runc/libcontainer/configs"
)
| 1 | // +build linux
package fs
import (
"bufio"
"fmt"
"os"
"path/filepath"
"strconv"
"strings"
"github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/opencontainers/runc/libcontainer/configs"
)
type BlkioGroup struct {
}
func (s *BlkioGroup) Name() string {
return "blkio"
}
func (s *BlkioGroup) Ap... | 1 | 18,176 | NIT: I'd have preferred that the new package be called "utils", but that's not a big deal. | opencontainers-runc | go |
@@ -1,6 +1,13 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX - License - Identifier: Apache - 2.0
+# Purpose
+# This code example demonstrates how to set the default encryption state for an
+# Amazon Simple Storage Solution (Amazon S3) bucket using server-side encryption (SSE)
+# wit... | 1 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX - License - Identifier: Apache - 2.0
require 'aws-sdk-s3'
# Sets the default encryption state for an Amazon S3 bucket using
# server-side encryption (SSE) with an
# AWS KMS customer master key (CMK).
#
# Prerequisites:
#
# - A... | 1 | 20,537 | Simple Storage **Service** | awsdocs-aws-doc-sdk-examples | rb |
@@ -201,12 +201,15 @@ class GarbageCollector extends AbstractDataHandlerListener implements SingletonI
$indexQueueItems = $this->getIndexQueue()->getItems($table, $uid);
foreach ($indexQueueItems as $indexQueueItem) {
$site = $indexQueueItem->getSite();
+ $solrConfiguration = $... | 1 | <?php
namespace ApacheSolrForTypo3\Solr;
/***************************************************************
* Copyright notice
*
* (c) 2010-2015 Ingo Renner <ingo@typo3.org>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/o... | 1 | 6,022 | I think, retrieving the setting could also be done outside the loop. What do you think? | TYPO3-Solr-ext-solr | php |
@@ -257,6 +257,7 @@ public class TransactionPool implements BlockAddedObserver {
transaction.getGasLimit(), chainHeadBlockHeader.getGasLimit()));
}
+ // TODO: this is where we would use the private state to do the validation against
return protocolContext
.getWorldStateArchive()
... | 1 | /*
* Copyright ConsenSys AG.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing... | 1 | 23,904 | This TODO isn't related to this change. We should remove it. | hyperledger-besu | java |
@@ -102,7 +102,7 @@ class ExternalDriverSupplier implements Supplier<WebDriver> {
Optional<Class<? extends Supplier<WebDriver>>> supplierClass = getDelegateClass();
if (supplierClass.isPresent()) {
Class<? extends Supplier<WebDriver>> clazz = supplierClass.get();
- logger.info("Using delegate supp... | 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,449 | We chose `info` in the test code for obvious reasons. Changing to `finest` makes debugging harder and noisier. | SeleniumHQ-selenium | java |
@@ -1689,7 +1689,14 @@ class RefactoringChecker(checkers.BaseTokenChecker):
and subscript == subscript.parent.target
):
# Ignore this subscript if it is the target of an assignment
- continue
+ if subscr... | 1 | # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/LICENSE
import collections
import copy
import itertools
import tokenize
from functools import reduce
from typing import List, Optional, Tuple, Union, cast
import astroid
from py... | 1 | 14,463 | I'm not really sure this is worth it. Keep in mind that every special case we add has the potential to introduce new errors and complicates the code further. For common cases that is acceptable, but in this instance I don't think it's beneficial. | PyCQA-pylint | py |
@@ -62,6 +62,11 @@ func (c *showCommand) Run(ctx context.Context, env *common_cli.Env, serverClient
return err
}
+ if agent.Selectors != nil {
+ for _, s := range agent.Selectors {
+ env.Printf("Selectors : %s:%s\n", s.Type, s.Value)
+ }
+ }
return nil
}
| 1 | package agent
import (
"errors"
"flag"
"github.com/mitchellh/cli"
"github.com/spiffe/go-spiffe/v2/spiffeid"
"github.com/spiffe/spire/cmd/spire-server/util"
common_cli "github.com/spiffe/spire/pkg/common/cli"
"github.com/spiffe/spire/pkg/server/api"
"github.com/spiffe/spire/proto/spire/api/server/agent/v1"
... | 1 | 16,052 | nit: this `if` isn't necessary since we immediately follow it up with a range over the slice, which works fine with a `nil` slice. | spiffe-spire | go |
@@ -3160,9 +3160,15 @@ void Game::playerChangeOutfit(uint32_t playerId, Outfit_t outfit)
}
Player* player = getPlayerByID(playerId);
+
if (!player) {
return;
}
+
+ const Outfit* playerOutfit = Outfits::getInstance()->getOutfitByLookType(player->getSex(), outfit.lookType);
+ if (!playerOutfit) {
+ outfit... | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2015 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 | 11,647 | Remove this line please. | otland-forgottenserver | cpp |
@@ -144,6 +144,7 @@ public class ZMSImpl implements Authorizer, KeyStore, ZMSHandler {
protected int domainNameMaxLen;
protected AuthorizedServices serverAuthorizedServices = null;
protected SolutionTemplates serverSolutionTemplates = null;
+ protected Map<String, Integer> eligibleTemplatesForAutoUpda... | 1 | /*
* Copyright 2016 Yahoo Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 5,115 | why is this is class field? it should be something local within the auto apply template method since we only need this once to process templates and never use again. | AthenZ-athenz | java |
@@ -39,14 +39,14 @@ module.exports = function(grunt) {
const { diff: rolesTable, notes: rolesFootnotes } = getDiff(
roles,
- axe.commons.aria.lookupTable.role,
+ axe.utils.getStandards().ariaRoles,
listType
);
const ariaQueryAriaAttributes = getAriaQueryAttribute... | 1 | /*eslint-env node */
'use strict';
const { roles, aria: props } = require('aria-query');
const mdTable = require('markdown-table');
const format = require('../shared/format');
module.exports = function(grunt) {
grunt.registerMultiTask(
'aria-supported',
'Task for generating a diff of supported aria roles an... | 1 | 16,920 | I agree with Stephen it's better to invoke getStandards() only once. | dequelabs-axe-core | js |
@@ -198,7 +198,7 @@ class GridInterface(DictInterface):
@classmethod
- def canonicalize(cls, dataset, data, coord_dims=None):
+ def canonicalize(cls, dataset, data, coord_dims=None, irregular_dims=[]):
"""
Canonicalize takes an array of values as input and
reorients and transpo... | 1 | from collections import OrderedDict, defaultdict, Iterable
try:
import itertools.izip as zip
except ImportError:
pass
import numpy as np
from .dictionary import DictInterface
from .interface import Interface, DataError
from ..dimension import Dimension
from ..element import Element
from ..dimension import Or... | 1 | 19,725 | After discussing what ``irregular_dims`` really is, we agreed that we need a better name that makes it clearer that this is more of an xarray concept of irregular dimensions than a holoviews one. | holoviz-holoviews | py |
@@ -35,7 +35,7 @@ public class Container {
private final ContainerId id;
public Container(Function<HttpRequest, HttpResponse> client, ContainerId id) {
- LOG.info("Created container " + id);
+ LOG.finest("Created container " + id);
this.client = Objects.requireNonNull(client);
this.id = Objects.... | 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,458 | This code is new and not tested well. While we may drop the log level before we ship 4.0, right now this is extremely helpful to users. | SeleniumHQ-selenium | js |
@@ -222,11 +222,16 @@ th svg {
}
td {
+ white-space: nowrap;
font-size: 14px;
}
td:first-child {
- width: 50%;
+ width: 100%;
+}
+
+td:nth-child(2) {
+ padding: 0 20px 0 20px;
}
th:last-child, | 1 | package browse
import (
"fmt"
"io/ioutil"
"net/http"
"text/template"
"github.com/mholt/caddy"
"github.com/mholt/caddy/caddyhttp/httpserver"
"github.com/mholt/caddy/caddyhttp/staticfiles"
)
func init() {
caddy.RegisterPlugin("browse", caddy.Plugin{
ServerType: "http",
Action: setup,
})
}
// setup co... | 1 | 11,358 | this makes sure there is some padding space around the size column | caddyserver-caddy | go |
@@ -47,6 +47,7 @@ extern "C" {
#include "Util/InputFileUtil.h"
#include "Util/GraphLoader.h"
#include "Util/StringUtil.h"
+#include "Util/LuaUtil.h"
using namespace std;
| 1 | /*
open source routing machine
Copyright (C) Dennis Luxen, 2010
This program 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
any later version.
This program is ... | 1 | 12,294 | Put these includes in alphabetical order | Project-OSRM-osrm-backend | cpp |
@@ -246,7 +246,12 @@ class JAB(Window):
continue
keyList=[]
# We assume alt if there are no modifiers at all and its not a menu item as this is clearly a nmonic
- if (binding.modifiers&JABHandler.ACCESSIBLE_ALT_KEYSTROKE) or (not binding.modifiers and self.role!=controlTypes.ROLE_MENUITEM):
+ altModif... | 1 | import ctypes
import re
import eventHandler
import keyLabels
import JABHandler
import controlTypes
from ..window import Window
from ..behaviors import EditableTextWithoutAutoSelectDetection, Dialog
import textInfos.offsets
from logHandler import log
from .. import InvalidNVDAObject
JABRolesToNVDARoles={
... | 1 | 18,032 | Can this just be an else? | nvaccess-nvda | py |
@@ -7,6 +7,7 @@ import torch.nn as nn
from mmcv.utils import print_log
from mmdet.core import auto_fp16
+from mmdet.utils import get_root_logger
class BaseDetector(nn.Module, metaclass=ABCMeta): | 1 | import warnings
from abc import ABCMeta, abstractmethod
import mmcv
import numpy as np
import torch.nn as nn
from mmcv.utils import print_log
from mmdet.core import auto_fp16
class BaseDetector(nn.Module, metaclass=ABCMeta):
"""Base class for detectors"""
def __init__(self):
super(BaseDetector, sel... | 1 | 19,885 | Merge this line with Line7 | open-mmlab-mmdetection | py |
@@ -19,7 +19,7 @@ module GeocoderHelper
html << result[:suffix] if result[:suffix]
if result[:type] and result[:id]
- html << content_tag(:small, :class => ["deemphasize", "search_details"]) do
+ html << content_tag(:small, :class => ["deemphasize", "search_details", "clearfix"]) do
link_... | 1 | module GeocoderHelper
def result_to_html(result)
html_options = { :class => "set_position", :data => {} }
if result[:min_lon] and result[:min_lat] and result[:max_lon] and result[:max_lat]
url = "?minlon=#{result[:min_lon]}&minlat=#{result[:min_lat]}&maxlon=#{result[:max_lon]}&maxlat=#{result[:max_lat]... | 1 | 8,751 | `clearfix` is needed to stop the `float:right` content overflowing the list item container. | openstreetmap-openstreetmap-website | rb |
@@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
{
- [ParameterizedJobConfig(typeof(CoreConfig))]
+ [AspNetCoreBenchmark]
public class StringUtilitiesBenchmark
{
private const int Iterations = 5... | 1 | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using BenchmarkDotNet.Attributes;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
namespace Microsoft.AspNetCore.Server.Kestre... | 1 | 14,570 | Can this be put on the assembly? | aspnet-KestrelHttpServer | .cs |
@@ -124,7 +124,8 @@ public class HealthCheckServlet extends HttpServlet {
if (results.isEmpty()) {
resp.setStatus(HttpServletResponse.SC_NOT_IMPLEMENTED);
} else {
- if (isAllHealthy(results)) {
+ final boolean alwaysOk = Boolean.parseBoolean(req.getParameter("always... | 1 | package com.codahale.metrics.servlets;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Map;
import java.util.SortedMap;
import java.util.concurrent.ExecutorService;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax... | 1 | 7,620 | Could we rename the parameter to `overrideStatusCode`? The name `alwaysOk` implies that the health check result would be always healthy. | dropwizard-metrics | java |
@@ -37,5 +37,9 @@ func (c *clusterApi) Routes() []*Route {
{verb: "GET", path: clusterSecretPath("/defaultsecretkey", cluster.APIVersion), fn: c.getDefaultSecretKey},
{verb: "PUT", path: clusterSecretPath("/defaultsecretkey", cluster.APIVersion), fn: c.setDefaultSecretKey},
{verb: "POST", path: clusterSecretPa... | 1 | package server
import (
client "github.com/libopenstorage/openstorage/api/client/cluster"
"github.com/libopenstorage/openstorage/cluster"
)
func (c *clusterApi) Routes() []*Route {
return []*Route{
{verb: "GET", path: "/cluster/versions", fn: c.versions},
{verb: "GET", path: clusterPath("/enumerate", cluster.A... | 1 | 6,865 | "/schedpolicy" is repeated, i would make it a constant and use it here and cluster client.go | libopenstorage-openstorage | go |
@@ -0,0 +1,14 @@
+module RSpec::Core::Ordering
+ class RandomOrdering
+ def order(items, configuration = RSpec.configuration)
+ Kernel.srand configuration.seed
+ ordering = items.shuffle
+ Kernel.srand # reset random generation
+ ordering
+ end
+
+ def built_in?
+ true
+ end
+ end... | 1 | 1 | 9,651 | Having a second `configuration` arg seems kinda odd to me as an interface. It looks like you're just using it as a form of dependency injection for the tests, right? Part of what makes it seem weird is that it's leaked into all the other orderers where they don't use `configuration` at all. Instead, what do you think a... | rspec-rspec-core | rb | |
@@ -248,8 +248,9 @@ class AddonsDialog(
self.getAddonsButton = generalActions.addButton(self, label=_("&Get add-ons..."))
self.getAddonsButton.Bind(wx.EVT_BUTTON, self.onGetAddonsClick)
# Translators: The label for a button in Add-ons Manager dialog to install an add-on.
- self.addButton = generalActions.addB... | 1 | # 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) 2012-2019 NV Access Limited, Beqa Gozalishvili, Joseph Lee,
# Babbage B.V., Ethan Holliger, Arnold Loubriat, Thomas Stivers
import os
import weakref
fro... | 1 | 34,445 | This button should also be disabled when in secure mode since it opens a web browser from which you can easily do a lot of insecure stuff. | nvaccess-nvda | py |
@@ -221,4 +221,11 @@ public interface Table {
* @return a {@link LocationProvider} to provide locations for new data files
*/
LocationProvider locationProvider();
+
+ /**
+ * Create a new {@link ExpireTableMetadata expire API} to manage table metadata files in this table and commit.
+ *
+ * @return a ... | 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 | 14,568 | Should this be done as part of `expireSnapshots`? I'd like to avoid adding a lot of operations to `Table` because it is already a large API. | apache-iceberg | java |
@@ -0,0 +1,18 @@
+package libp2p
+
+import (
+ "github.com/libp2p/go-libp2p-core/helpers"
+ "github.com/libp2p/go-libp2p-core/network"
+)
+
+type Stream struct {
+ network.Stream
+}
+
+func (s *Stream) FullClose() error {
+ return helpers.FullClose(s)
+}
+
+func NewStream(stream network.Stream) *Stream {
+ return &Stre... | 1 | 1 | 8,840 | I do not think that this type (and its constructor) have to be exported. | ethersphere-bee | go | |
@@ -55,7 +55,10 @@ func (r *receiptLog) SetData(data []byte) {
r.data = data
}
-func (r *receiptLog) Build(ctx context.Context, err error) *action.Log {
+func (r *receiptLog) Build(ctx context.Context, err error, skipLogOnErr bool) *action.Log {
+ if err != nil && skipLogOnErr {
+ return nil
+ }
blkCtx := proto... | 1 | // Copyright (c) 2020 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,359 | why add this? don't think it's correct? for instance, it returns ErrCandidateNotExist (not critical), in this case we should return a receipt with corresponding status | iotexproject-iotex-core | go |
@@ -0,0 +1,6 @@
+package caddytls
+
+import "github.com/xenolf/lego/acme"
+
+// ChallengeProvider type to be used in Caddy plugins over acme.ChallengeProvider directly, to avoid https://github.com/mattfarina/golang-broken-vendor
+type ChallengeProvider acme.ChallengeProvider | 1 | 1 | 10,974 | Instead of creating a new file, put this in tls.go, like right after or before DNSProviderConstructor is defined. | caddyserver-caddy | go | |
@@ -62,7 +62,8 @@ app.controller('AttendeeController', function($scope, AutoCompletionService) {
'role': 'REQ-PARTICIPANT',
'rsvp': 'TRUE',
'partstat': 'NEEDS-ACTION',
- 'cutype': 'INDIVIDUAL'
+ 'cutype': 'INDIVIDUAL',
+ 'language': OC.getLocale() // Use current user's timezone as a defaul... | 1 | /**
* Calendar App
*
* @author Raghu Nayyar
* @author Georg Ehrke
* @copyright 2016 Raghu Nayyar <hey@raghunayyar.com>
* @copyright 2016 Georg Ehrke <oc.list@georgehrke.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
*... | 1 | 6,115 | Instead of OC.getLocale() for the default value the default should be the value of the user value 'core' 'lang'. When loading the page this can be added to the parameters by retrieving $this->config->getUserValue($user->getUID(), 'core', 'lang'); in viewcontroller.php. | nextcloud-calendar | js |
@@ -42,7 +42,7 @@ namespace interface1
* \param[in] id Identifier of the result
* \return Result that corresponds to the given identifier
*/
-classifier::quality_metric::binary_confusion_matrix::ResultPtr ResultCollection::getResult(QualityMetricId id) const
+classifier::quality_metric::binary_confusion... | 1 | /* file: adaboost_quality_metric_set_types.cpp */
/*******************************************************************************
* Copyright 2014-2019 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obta... | 1 | 18,753 | Why interface1 ? It should be in inner so. | oneapi-src-oneDAL | cpp |
@@ -32,6 +32,16 @@ class User(UserMixin):
login_id=user['login_id'],
)
+ def to_dict(self):
+ return {
+ "id": self.id,
+ "created": self.created,
+ "musicbrainz_id": self.musicbrainz_id,
+ "auth_token": self.auth_token,
+ "gdpr_ag... | 1 | from flask import redirect, url_for, current_app, request
from flask_login import LoginManager, UserMixin, current_user
from functools import wraps
import listenbrainz.db.user as db_user
from werkzeug.exceptions import Unauthorized
from listenbrainz.webserver.errors import APIUnauthorized
login_manager = LoginManager(... | 1 | 20,004 | Ideally, I'd have converted dicts to object but this way was less changes so this way for now. | metabrainz-listenbrainz-server | py |
@@ -4061,8 +4061,17 @@ void t_c_glib_generator::generate_deserialize_field(ostream& out,
throw "compiler error: no C reader for base type " + t_base_type::t_base_name(tbase) + name;
}
out << ", error)) < 0)" << endl;
- out << indent() << " return " << error_ret << ";" << endl << indent() << "xfer +... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ma... | 1 | 17,144 | Why is that test different to line 4022 (allocate is not tested there)? Shouldn't that be consistent? | apache-thrift | c |
@@ -472,7 +472,15 @@ ExWorkProcRetcode ExHbaseAccessInsertSQTcb::work()
{
rc = applyPred(scanExpr());
if (rc == 1) // expr is true or no expr
- step_ = CREATE_MUTATIONS;
+ {
+ rc = evalInsDelPreCondExpr();
+ if (rc == -1)
+ step_ = HANDLE_ERROR;
+ else if (rc == 0)
+ step_ = IN... | 1 | // **********************************************************************
// @@@ START COPYRIGHT @@@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.... | 1 | 7,529 | Should we consider move this expression evaluation to SETUP_INSERT step since it evaluates from queue entry. Also, this expression is not evaluated in ExHbaseAccessVsbbUpsertTcb. | apache-trafodion | cpp |
@@ -143,7 +143,8 @@ namespace OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation
{
Name = activity.DisplayName,
- Kind = (OtlpTrace.Span.Types.SpanKind)(activity.Kind + 1), // TODO: there is an offset of 1 on the enum.
+ // There is an offset of 1 o... | 1 | // <copyright file="ActivityExtensions.cs" company="OpenTelemetry Authors">
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apa... | 1 | 19,339 | Don't see any more TODOs here.. | open-telemetry-opentelemetry-dotnet | .cs |
@@ -190,6 +190,13 @@ func (task *Task) DockerConfig(container *Container) (*docker.Config, *DockerCli
}
func (task *Task) dockerConfig(container *Container) (*docker.Config, *DockerClientConfigError) {
+ // Detect the name for S3 images
+ dockerImage := container.Image
+ if strings.HasPrefix(dockerImage, "s3://") {... | 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,890 | Can you extract this out to a constant? | aws-amazon-ecs-agent | go |
@@ -452,12 +452,12 @@ def main(args):
quiet_build=args.quiet_build,
logfile=logfile
)
-
- log_module = __load_module("log")
__update_if_key_exists(args, log_args, "verbose")
+ log_module = __load_module("log")
LOG.debug("Ca... | 1 | # -------------------------------------------------------------------------
# The CodeChecker Infrastructure
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
# -------------------------------------------------------------------------... | 1 | 7,390 | any testcase for saargs, and tidyargs argument processing? | Ericsson-codechecker | c |
@@ -18,6 +18,7 @@ namespace Microsoft.Cci.Writers.CSharp
private bool _forCompilation;
private bool _forCompilationIncludeGlobalprefix;
private bool _forCompilationThrowPlatformNotSupported;
+ private string _platformNotSupportedExceptionMessage;
private bool _includeFakeAttri... | 1 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using Microsoft.Cci.Extensions.C... | 1 | 12,547 | @ericstj do you think it is worth combining these two? With the presence of the message meaning it is enabled? | dotnet-buildtools | .cs |
@@ -271,8 +271,8 @@ func (s *ec2Ops) DeviceMappings() (map[string]string, error) {
if d.DeviceName != nil && d.Ebs != nil && d.Ebs.VolumeId != nil {
devName := *d.DeviceName
// Per AWS docs EC instances have the root mounted at
- // /dev/sda1, this label should be skipped
- if devName == "/dev/sda1" {
+ ... | 1 | package aws
import (
"fmt"
"strings"
"sync"
"time"
"github.com/Sirupsen/logrus"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/opsworks"
"github.com/libopenstorage/openstorage/api"
)
type ec2Ops struct {
instance string
ec2 *ec2.EC2
mutex sync.Mutex
}
const (
SetIdent... | 1 | 6,157 | why not use instance.RootDeviceName ? | libopenstorage-openstorage | go |
@@ -14,6 +14,7 @@
#include <ios> //std::ios_base::failure
#include <iostream> //std::cout
+#include <fstream> //std::ifstream
#include <mpi.h>
#include <stdexcept> //std::invalid_argument std::exception
#include <vector> | 1 | /*
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
* helloBPReader.cpp: Simple self-descriptive example of how to read a variable
* to a BP File.
*
* Try running like this from the build directory:
* mpirun -np 3 ./bin/hello_bpReader
*
... | 1 | 12,932 | not needed, ADIOS2 also needs to check for subfiles. ADIOS2 tries to remove dependency on serial `fstream`. | ornladios-ADIOS2 | cpp |
@@ -50,6 +50,12 @@ class DatabaseDriverReactNative {
});
}
+ loadExtension(path) {
+ return new Promise(() => {
+ throw new Error(`No extension support for ${path} in react-native-sqlite-storage`);
+ });
+ }
+
exec(sql, params = null) {
return new Promise((resolve, reject) => {
this.db_.executeSql( | 1 | const SQLite = require('react-native-sqlite-storage');
class DatabaseDriverReactNative {
constructor() {
this.lastInsertId_ = null;
}
open(options) {
// SQLite.DEBUG(true);
return new Promise((resolve, reject) => {
SQLite.openDatabase(
{ name: options.name },
db => {
this.db_ = db;
resol... | 1 | 15,184 | no need to wrap in new Promise - you can simply throw the exception | laurent22-joplin | js |
@@ -2438,3 +2438,17 @@ func getOCSPStatus(s tls.ConnectionState) (*ocsp.Response, error) {
}
return resp, nil
}
+
+func TestOCSPManualConfig(t *testing.T) {
+ o := DefaultTestOptions
+ o.HTTPHost = "127.0.0.1"
+ o.HTTPSPort = -1
+ o.TLSConfig = &tls.Config{ServerName: "localhost"}
+ cert, err := tls.LoadX509KeyPai... | 1 | // Copyright 2021 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wr... | 1 | 13,747 | Isn't this testing an implicit config, not a manual config? | nats-io-nats-server | go |
@@ -205,6 +205,12 @@ type Table struct {
// to what we calculate from chainToContents.
chainToDataplaneHashes map[string][]string
+ // chainsToFullRules contains the full rules, mapped from chain name to slices of rules in that chain.
+ chainsToFullRules map[string][]string
+
+ // hashToFullRules contains a mappi... | 1 | // Copyright (c) 2016-2019 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 | 17,083 | I don't think this is used any more, please remove. | projectcalico-felix | c |
@@ -42,9 +42,11 @@ func NewManager(mysteriumClient server.Client, dialogEstablisherFactory DialogEs
}
}
-func (manager *connectionManager) Connect(id identity.Identity, nodeKey string) error {
+func (manager *connectionManager) Connect(myId identity.Identity, nodeKey string) error {
manager.status = statusConnec... | 1 | package client_connection
import (
"errors"
"github.com/mysterium/node/communication"
"github.com/mysterium/node/identity"
"github.com/mysterium/node/openvpn"
"github.com/mysterium/node/openvpn/middlewares/client/auth"
"github.com/mysterium/node/openvpn/middlewares/client/bytescount"
"github.com/mysterium/node/... | 1 | 10,268 | shouldn't we name abbreviations up-cased? `myId` -> `myID`? | mysteriumnetwork-node | go |
@@ -287,7 +287,10 @@ export function recollectNodeTree(node, unmountOnly) {
else {
// If the node's VNode had a ref function, invoke it with null here.
// (this is part of the React spec, and smart for unsetting references)
- if (node[ATTR_KEY]!=null) applyRef(node[ATTR_KEY].ref, null);
+ if (node[ATTR_KEY]!=... | 1 | import { ATTR_KEY } from '../constants';
import { isSameNodeType, isNamedNode } from './index';
import { buildComponentFromVNode } from './component';
import { createNode, setAccessor } from '../dom/index';
import { unmountComponent } from './component';
import options from '../options';
import { applyRef } from '../ut... | 1 | 12,285 | This just always calls refs. I think we need to either hoist ref invocation back out of `setProperty()` (it used to happen during rendering), or wait for component recycling to go away. | preactjs-preact | js |
@@ -618,7 +618,10 @@ func runTest(t *testing.T, test testT) {
defer test.builder.Stop()
c := &controller{}
- c.Register(test.builder.Context)
+ _, _, err := c.Register(test.builder.Context)
+ if err != nil {
+ t.Errorf("Error registering the controller: %v", err)
+ }
c.accountRegistry = &accountstest.FakeRegis... | 1 | /*
Copyright 2020 The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing... | 1 | 26,702 | Oof. I may have missed this while reviewing #3805 | jetstack-cert-manager | go |
@@ -3,8 +3,12 @@
// caffe::Caffe functions so that one could easily call it from matlab.
// Note that for matlab, we will simply use float as the data type.
-#include <string>
-#include <vector>
+// these need to be included after boost on OS X
+#include <string> // NOLINT(build/include_order)
+#include <vector> ... | 1 | //
// matcaffe.cpp provides a wrapper of the caffe::Net class as well as some
// caffe::Caffe functions so that one could easily call it from matlab.
// Note that for matlab, we will simply use float as the data type.
#include <string>
#include <vector>
#include "mex.h"
#include "caffe/caffe.hpp"
#define MEX_ARGS i... | 1 | 28,701 | why the NOLINTs here? please just alphabetize the headers (should be easier than adding NOLINTs) unless there's a good reason not to... | BVLC-caffe | cpp |
@@ -0,0 +1,5 @@
+export default function() {
+ return <div />;
+}
+
+export const ReactComponent = () => <div />; | 1 | 1 | 32,556 | Should we maybe return `<svg />` instead? | google-site-kit-wp | js | |
@@ -11,6 +11,7 @@ const Cats = require('../lib/status-cats');
const Storage = require('../lib/storage');
const _ = require('lodash');
const cors = require('cors');
+const load_plugins = require('../lib/plugin-loader').load_plugins;
module.exports = function(config_hash) {
// Config | 1 | 'use strict';
const express = require('express');
const Error = require('http-errors');
const compression = require('compression');
const Auth = require('../lib/auth');
const Logger = require('../lib/logger');
const Config = require('../lib/config');
const Middleware = require('./web/middleware');
const Cats = require... | 1 | 17,393 | Please use camelCase in new code | verdaccio-verdaccio | js |
@@ -14,5 +14,6 @@ return [
'selectLocale' => 'Select one of the supported languages',
'contact' => 'Contact',
'contact-us' => 'Contact Us',
+ 'places' => 'Places',
]; | 1 | <?php
return [
'about' => 'About',
'help' => 'Help',
'language' => 'Language',
'fediverse' => 'Fediverse',
'opensource' => 'Open Source',
'terms' => 'Terms',
'privacy' => 'Privacy',
'l10nWip' => 'We’re still working on localization support',
'currentLocale' => 'Current locale',
'selectLocale' => ... | 1 | 11,325 | Looks like the whitespace is off here. Not sure if there's a space or two too many or if there is an issue with tabs vs. spaces, but you probably want to fix this :) | pixelfed-pixelfed | php |
@@ -17,7 +17,12 @@
## along with Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
-"""Base bundles."""
+"""Base bundles.
+
+.. note:: `bootstrap.js` bundle must be loaded after jQuery UI to avoid conflicts.
+ You can use `noConflict()` if yo... | 1 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2014 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) a... | 1 | 11,639 | This was just my laziness and I didn't copy the first line. Just remove it together with one empty line. Thanks | inveniosoftware-invenio | py |
@@ -9,8 +9,8 @@ use Shopsys\FrameworkBundle\Model\Pricing\Vat\Vat;
use Shopsys\FrameworkBundle\Model\Pricing\Vat\VatData;
use Shopsys\FrameworkBundle\Model\Product\Availability\Availability;
use Shopsys\FrameworkBundle\Model\Product\Availability\AvailabilityData;
-use Shopsys\FrameworkBundle\Model\Product\Product;
-... | 1 | <?php
namespace Tests\ShopBundle\Database\Model\Cart;
use Shopsys\FrameworkBundle\DataFixtures\Demo\UnitDataFixture;
use Shopsys\FrameworkBundle\Model\Cart\Item\CartItem;
use Shopsys\FrameworkBundle\Model\Customer\CustomerIdentifier;
use Shopsys\FrameworkBundle\Model\Pricing\Vat\Vat;
use Shopsys\FrameworkBundle\Model... | 1 | 11,517 | Why did you decide to change CartItemTest but you didnt change QueryBuilderWithRowManipulatorDataSourceTest? | shopsys-shopsys | php |
@@ -425,7 +425,15 @@ func (k *KeybaseServiceBase) LoadUserPlusKeys(ctx context.Context,
uid keybase1.UID, pollForKID keybase1.KID) (UserInfo, error) {
cachedUserInfo := k.getCachedUserInfo(uid)
if cachedUserInfo.Name != libkb.NormalizedUsername("") {
- return cachedUserInfo, nil
+ if pollForKID == keybase1.KID(... | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"fmt"
"sync"
"time"
"github.com/keybase/client/go/libkb"
"github.com/keybase/client/go/logger"
"github.com/keybase/client/go/protocol/ke... | 1 | 17,204 | This was sort of a pre-existing bug -- we should be busting our local cache if the key isn't present. However, `KBPKIClient.HasVerifyingKey` already took care of it on that path. This way is better though. | keybase-kbfs | go |
@@ -1,5 +1,6 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
+//go:build go1.15 && integration
// +build go1.15,integration
package cloudfront_test | 1 | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// +build go1.15,integration
package cloudfront_test
import (
"context"
"testing"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/awstesting/in... | 1 | 10,416 | Should this tag addition for generated files be handled explicitly in `private/model/cli/gen-api/main.go` | aws-aws-sdk-go | go |
@@ -4753,6 +4753,11 @@ public class MessagingController implements Runnable {
*/
private void notifyAccount(Context context, Account account,
LocalMessage message, int previousUnreadMessageCount) {
+ // if it's quiet time and notifications are disabled, then we shouldn't show a notification
... | 1 | package com.fsck.k9.controller;
import java.io.CharArrayWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.EnumSet;
import java.util.HashMap;
import java... | 1 | 13,070 | You want to return if it's quiet time and notifications during quiet time are **not** enabled. So this is either a logic error or it's bad naming of the setting/field/method. | k9mail-k-9 | java |
@@ -28,14 +28,11 @@ Workshops::Application.configure do
config.log_level = :info
config.log_formatter = ::Logger::Formatter.new
- HOST = 'learn.thoughtbot.com'
- config.action_mailer.default_url_options = {host: HOST}
-
config.middleware.use Rack::SslEnforcer,
hsts: false,
except: %r{^/podcast},
... | 1 | require Rails.root.join('config/initializers/mail')
Workshops::Application.configure do
config.cache_classes = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.action_controller.asset_host = "//d3v2mfwlau8x6c.cloudfront.net"
config.assets.compile =... | 1 | 10,330 | Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. | thoughtbot-upcase | rb |
@@ -144,7 +144,12 @@ module Travis
def source_ssh?
return false if prefer_https?
repo_private? && !installation? or
- repo_private? && custom_ssh_key?
+ repo_private? && custom_ssh_key? or
+ force_private? && !installation?
+ end
+
+ def force_private?
+ ... | 1 | require 'faraday'
require 'core_ext/hash/deep_merge'
require 'core_ext/hash/deep_symbolize_keys'
require 'travis/github_apps'
require 'travis/build/data/ssh_key'
# actually, the worker payload can be cleaned up a lot ...
module Travis
module Build
class Data
DEFAULTS = { }
DEFAULT_CACHES = {
... | 1 | 17,489 | cool, here (L146 && L148) maybe (repo_private? || force_private?) && !installation? to prevent double call of installation? | travis-ci-travis-build | rb |
@@ -33,7 +33,7 @@ provide a working environment for development.`,
func appStart() {
app, err := platform.GetActiveApp("")
if err != nil {
- util.Failed("Failed to start: %s", err)
+ util.Failed("Failed to GetActiveApp err: %v", err)
}
fmt.Printf("Starting environment for %s...\n", app.GetName()) | 1 | package cmd
import (
"fmt"
"os"
"github.com/drud/ddev/pkg/plugins/platform"
"github.com/drud/ddev/pkg/util"
"github.com/spf13/cobra"
)
// StartCmd represents the add command
var StartCmd = &cobra.Command{
Use: "start",
Aliases: []string{"add"},
Short: "Start the local development environment for a site... | 1 | 11,845 | this error carries a bit more meaning for us, but less meaning for users. we also lose the context of what command produced the failure. I'd prefer to keep the original error message. If we need better identification of GetActiveApp errors, maybe we could address that in the error messages it returns? | drud-ddev | go |
@@ -97,7 +97,7 @@ const (
const sendRouteSubsInGoRoutineThreshold = 1024 * 1024 // 1MB
// Warning when user configures cluster TLS insecure
-const clusterTLSInsecureWarning = "TLS Hostname verification disabled, system will not verify identity of the solicited route"
+const clusterTLSInsecureWarning = "TLS certific... | 1 | // Copyright 2013-2019 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 9,193 | Same: DO NOT USE IN PRODUCTION. Yes we should shout ;) | nats-io-nats-server | go |
@@ -134,7 +134,7 @@ namespace Microsoft.DotNet.Build.Tasks.Feed
await clientThrottle.WaitAsync();
string leaseId = string.Empty;
//this defines the lease for 15 seconds (max is 60) and 3000 milliseconds between requests
- AzureBlobLease blobLease = new AzureBlobLease(fe... | 1 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using MSBuild = Microsoft.Build.Utilities;
using System.Linq;
using... | 1 | 13,961 | This change may be hiding more errors, if we continue to see more. | dotnet-buildtools | .cs |
@@ -246,13 +246,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2
object IFeatureCollection.this[Type key]
{
- get => FastFeatureGet(key);
+ get => FastFeatureGet(key) ?? ConnectionFeatures?[key];
set => FastFeatureSet(key, value);
}
... | 1 | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Threading;
using System.Thread... | 1 | 13,895 | Beware of exposing the underlying features directly. Any mutable fields should be reset per request. | aspnet-KestrelHttpServer | .cs |
@@ -144,12 +144,18 @@ export function renderComponent(component, opts, mountAll, isChild) {
if (initialBase && base!==initialBase && inst!==initialChildComponent) {
let baseParent = initialBase.parentNode;
if (baseParent && base!==baseParent) {
- baseParent.replaceChild(base, initialBase);
if (!toU... | 1 | import { SYNC_RENDER, NO_RENDER, FORCE_RENDER, ASYNC_RENDER, ATTR_KEY } from '../constants';
import options from '../options';
import { extend } from '../util';
import { enqueueRender } from '../render-queue';
import { getNodeProps } from './index';
import { diff, mounts, diffLevel, flushMounts, recollectNodeTree, remo... | 1 | 11,090 | This is probably more nuanced than I can feasibly check in a PR review, haha. Was the issue here that `replaceChild()` removes `initialBase` from the DOM before `recollectNodeTree()` invokes `componentWillUnmount()` on the owning component? | preactjs-preact | js |
@@ -35,3 +35,6 @@ def testCanClickOnALinkThatOverflowsAndFollowIt(driver):
def testClickingALinkMadeUpOfNumbersIsHandledCorrectly(driver):
driver.find_element(By.LINK_TEXT, "333333").click()
WebDriverWait(driver, 3).until(EC.title_is("XHTML Test Page"))
+
+def testCannotClickDisabledButton(driver):
+ WebD... | 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 | 16,343 | I believe it's misleading name for the condition. I prefer "element_to_be_disable" We can have a condition, when element is enabled but we can't click it, because another element overlays above it. So, If we use "unclickable" we might mislead people, who use that condition to verify if element can be clicked | SeleniumHQ-selenium | py |
@@ -86,4 +86,8 @@ public class DataWriter<T> implements Closeable {
Preconditions.checkState(dataFile != null, "Cannot create data file from unclosed writer");
return dataFile;
}
+
+ public FileAppender<T> appender() {
+ return appender;
+ }
} | 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 | 33,702 | Do we need to expose it? It looks like it is only used in tests and only to obtain the final metrics. I think you can get the same by using `DataFile#lowerBounds` and `DataFile#upperBounds`. It seems `DataWriter` already exposes `toDataFile` that you can use. | apache-iceberg | java |
@@ -868,7 +868,7 @@ describe("date_utils", function() {
});
it("should return the 4 2021 year week", () => {
- const date = new Date("2021-01-18");
+ const date = new Date("2021-01-19");
assert(getWeek(date) === 3);
});
| 1 | import {
newDate,
addHours,
addDays,
subDays,
isEqual,
isSameDay,
isSameMonth,
isSameQuarter,
isSameYear,
isDayDisabled,
isDayExcluded,
isMonthDisabled,
isQuarterDisabled,
monthDisabledBefore,
monthDisabledAfter,
yearDisabledBefore,
yearDisabledAfter,
getEffectiveMinDate,
getEffect... | 1 | 7,987 | the test was failing likely due to locale issue. had to increment the date by 1 to make it pass | Hacker0x01-react-datepicker | js |
@@ -935,15 +935,8 @@ bool Levitate(const InstantSpell*, Creature* creature, const std::string& param)
bool InstantSpell::loadFunction(const pugi::xml_attribute& attr)
{
const char* functionName = attr.as_string();
- if (strcasecmp(functionName, "levitate") == 0) {
- function = Levitate;
- } else {
- std::cout << ... | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2017 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 | 14,671 | The changes below here can also be undone. | otland-forgottenserver | cpp |
@@ -1,13 +1,14 @@
package channelq
import (
+ "context"
"fmt"
"strings"
"sync"
"k8s.io/klog"
- "github.com/kubeedge/beehive/pkg/core/context"
+ beehiveContext "github.com/kubeedge/beehive/pkg/core/context"
"github.com/kubeedge/kubeedge/cloud/pkg/cloudhub/common/model"
)
| 1 | package channelq
import (
"fmt"
"strings"
"sync"
"k8s.io/klog"
"github.com/kubeedge/beehive/pkg/core/context"
"github.com/kubeedge/kubeedge/cloud/pkg/cloudhub/common/model"
)
// Read channel buffer size
const (
rChanBufSize = 10
)
// EventSet holds a set of events
type EventSet interface {
Ack() error
Get... | 1 | 14,548 | Instead of importing context besides beehivecontext, I'd suggest include golang context functionalities into beehivecontext. To keep channelq only rely on beehive. | kubeedge-kubeedge | go |
@@ -88,6 +88,9 @@ public class AddProductNutritionFactsData {
PREFIX_NUTRIMENT_LONG_NAME + "vitamin-k",
PREFIX_NUTRIMENT_LONG_NAME + "zinc"));
+ private AddProductNutritionFactsData() {
+ }
+
static String getCompleteEntryName(CustomValidatingEditTextView editText) {
return PREFI... | 1 | package openfoodfacts.github.scrachx.openfood.fragments;
import org.apache.commons.lang.StringUtils;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import openfoodfacts.github.scrachx.openfood.utils.CustomValidatingEditTextView;
public class AddProductNutritionFactsData {
static f... | 1 | 68,007 | I'm not sure about this one. Are you sure we don't need to initialize this fragment anywhere else? | openfoodfacts-openfoodfacts-androidapp | java |
@@ -644,6 +644,7 @@ public class LocalInsightPlugin extends PluginBase implements PumpInterface, Con
result.comment = ExceptionTranslator.getString(e);
}
} else if (detailedBolusInfo.carbs > 0) {
+ TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, tr... | 1 | package info.nightscout.androidaps.plugins.pump.insight;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Build;
import android... | 1 | 32,144 | You didn't set a source here, so it will probably fail. | MilosKozak-AndroidAPS | java |
@@ -52,7 +52,7 @@ func TestHandlerSucces(t *testing.T) {
headers.Set(BaggageHeaderPrefix+"BAR", "baz")
rpcHandler := transporttest.NewMockHandler(mockCtrl)
- httpHandler := handler{rpcHandler}
+ httpHandler := handler{rpcHandler, transport.NoDeps}
rpcHandler.EXPECT().Handle(
transporttest.NewContextMatcher... | 1 | // Copyright (c) 2016 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... | 1 | 10,478 | Might be easier to just do `handler{Handler: rpcHandler}` since zero-value of `Deps` is now valid. | yarpc-yarpc-go | go |
@@ -15,6 +15,10 @@ module Faker
def quote
fetch('movie.quote')
end
+
+ def title
+ fetch('movie.title')
+ end
end
end
end | 1 | # frozen_string_literal: true
module Faker
class Movie < Base
class << self
##
# Produces a quote from a movie.
#
# @return [String]
#
# @example
# Faker::Movie.quote #=> "Bumble bee tuna"
#
# @faker.version 1.8.1
def quote
fetch('movie.quote'... | 1 | 9,360 | Could you please add docs for this method? | faker-ruby-faker | rb |
@@ -132,9 +132,16 @@ public abstract class AbstractApexNode<T extends AstNode> extends AbstractNode i
@Override
public String toString() {
+ return getXPathNodeName();
+ }
+
+
+ @Override
+ public final String getXPathNodeName() {
return this.getClass().getSimpleName().replaceFirst(... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.apex.ast;
import net.sourceforge.pmd.lang.ast.AbstractNode;
import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.lang.ast.SourceCodePositioner;
import apex.jorje.data.Location;
imp... | 1 | 13,515 | we should probably `@Deprecated` this implementation to be removed in PMD 7.0.0 | pmd-pmd | java |
@@ -242,7 +242,11 @@ module Bolt
end
def shell
- @shell ||= Bolt::Shell::Bash.new(target, self)
+ @shell ||= if target.options['login-shell'] == 'powershell'
+ Bolt::Shell::Powershell.new(target, self)
+ else
+ Bolt::S... | 1 | # frozen_string_literal: true
require 'logging'
require 'shellwords'
require 'bolt/node/errors'
require 'bolt/node/output'
require 'bolt/util'
module Bolt
module Transport
class SSH < Simple
class Connection
attr_reader :logger, :user, :target
def initialize(target, transport_logger)
... | 1 | 14,458 | I wonder if 'unix' makes more sense for this now? I was thinking of putting up a 'cleanup' PR - I think I missed a few "remote" var names in the first PR, and want to reassess unifying the transport classes that just define `with_connection`. Renaming this could be part of that. | puppetlabs-bolt | rb |
@@ -52,8 +52,8 @@ namespace Microsoft.CodeAnalysis.Sarif.Converters
{
const string source = "<results> <cppcheck version=\"12.34\" /> <errors> </errors> </results>";
const string expected = @"{
- ""$schema"": ""http://json.schemastore.org/sarif-1.0.0-beta.5"",
- ""version"": ""1.0... | 1 | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.IO;
using System.Xml;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.CodeAnalysis.Sarif.Writers;
namespace Microsoft.... | 1 | 10,874 | Do something similar to what was done in JsonTests (can you derive from JsonTests?) | microsoft-sarif-sdk | .cs |
@@ -15,4 +15,4 @@
#
# https://packaging.python.org/guides/packaging-namespace-packages/#pkgutil-style-namespace-packages
-__path__ = __import__('pkgutil').extend_path(__path__, __name__)
+__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore | 1 | #
# Copyright (C) 2019 Databricks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 1 | 8,527 | Yes, not much we can do here. | databricks-koalas | py |
@@ -24,16 +24,16 @@ import (
"strings"
"time"
- "go.uber.org/zap"
+ _ "knative.dev/pkg/metrics/testing"
cev2 "github.com/cloudevents/sdk-go/v2"
-
"github.com/cloudevents/sdk-go/v2/binding"
"github.com/cloudevents/sdk-go/v2/binding/transformer"
"github.com/cloudevents/sdk-go/v2/protocol"
"github.com/cl... | 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 | 13,686 | Why do we need this? | google-knative-gcp | go |
@@ -0,0 +1,17 @@
+var bitcore = require('../bitcore');
+var Address = bitcore.Address;
+var bitcoreUtil = bitcore.util;
+var Script = bitcore.Script;
+var network = bitcore.networks.livenet;
+
+
+var script = ''; // write down your script here
+var s = Script.fromHumanReadable(script);
+var hash = bitcoreUtil.sha256rip... | 1 | 1 | 12,483 | Would prefer to see an actual script here. | bitpay-bitcore | js | |
@@ -191,7 +191,7 @@ public class FileHandler {
final long copied = Files.copy(from.toPath(), out);
final long length = from.length();
if (copied != length) {
- throw new IOException("Could not transfer all bytes.");
+ throw new IOException("Could not transfer all bytes of " + from.toP... | 1 | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... | 1 | 13,214 | seems reasonable to also want to include the 'to' location? | SeleniumHQ-selenium | java |
@@ -12,5 +12,4 @@ __all__ = [
'CustomDataset', 'XMLDataset', 'CocoDataset', 'VOCDataset', 'GroupSampler',
'DistributedGroupSampler', 'build_dataloader', 'to_tensor', 'random_scale',
'show_ann', 'get_dataset', 'ConcatDataset', 'RepeatDataset',
- 'ExtraAugmentation'
-]
+ 'ExtraAugmentation'] | 1 | from .custom import CustomDataset
from .xml_style import XMLDataset
from .coco import CocoDataset
from .voc import VOCDataset
from .loader import GroupSampler, DistributedGroupSampler, build_dataloader
from .utils import to_tensor, random_scale, show_ann, get_dataset
from .concat_dataset import ConcatDataset
from .repe... | 1 | 17,418 | This change is unnecessary. | open-mmlab-mmdetection | py |
@@ -61,7 +61,11 @@ public final class MiniatureListWidget<E> extends ScrollPane {
this.mappedElements = new MappedList<Element<E>, E>(items, value -> {
Element newElement = converter.apply(value);
- newElement.setOnMouseClicked(event -> setOnMouseClicked.accept(newElement, event));
+ ... | 1 | /*
* Copyright (C) 2015-2017 PÂRIS Quentin
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is... | 1 | 9,619 | Just as a note: Is it possible that the select css class is the same as the hover one? If this is true we should choose a different style for the selection css class, to make it more clear to the user I think. | PhoenicisOrg-phoenicis | java |
@@ -106,6 +106,11 @@ type ControllerOptions struct {
EnablePprof bool
DNS01CheckRetryPeriod time.Duration
+
+ // Annotations copied Certificate -> CertificateRequest,
+ // CertificateRequest -> Order. Slice of string literals that are
+ // treated as prefixes for annotation keys.
+ CopiedAnnotations []string
}
... | 1 | /*
Copyright 2020 The cert-manager Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing... | 1 | 28,583 | What about Secrets, are we not also trying to cover those? | jetstack-cert-manager | go |
@@ -37,7 +37,7 @@
#include <jansson.h>
#include "src/common/libutil/log.h"
-#include "src/common/libkvs/jansson_dirent.h"
+#include "src/common/libkvs/treeobj.h"
#include "commit.h"
#include "kvs_util.h" | 1 | /*****************************************************************************\
* Copyright (c) 2015 Lawrence Livermore National Security, LLC. Produced at
* the Lawrence Livermore National Laboratory (cf, AUTHORS, DISCLAIMER.LLNS).
* LLNL-CODE-658032 All rights reserved.
*
* This file is part of the Flux res... | 1 | 18,807 | (commit messge): how about > update internal commit API for RFC 11 | flux-framework-flux-core | c |
@@ -27,7 +27,7 @@ var eventErrorStates = []string{
}
var waiters = []request.WaiterOption{
- request.WithWaiterDelay(request.ConstantWaiterDelay(3 * time.Second)), // Poll for cfn updates every 3 seconds.
+ request.WithWaiterDelay(request.ConstantWaiterDelay(5 * time.Second)), // How long to wait in between poll cf... | 1 | // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// Package cloudformation provides a client to make API requests to AWS CloudFormation.
package cloudformation
import (
"context"
"errors"
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aw... | 1 | 16,114 | This will now wait for 2.5 hours, not 90 minutes, if the waiter delay is 5s | aws-copilot-cli | go |
@@ -14,6 +14,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
const EventUtil = {
trapEvent(event){
+ if(!event) return
event.preventDefault();
event.stopPropagation();
if(event.nativeEvent && event.nativeEvent.preventDefault){ | 1 | /*
Copyright (c) 2015, salesforce.com, 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 above copyright notice, this list of conditions and the followin... | 1 | 9,389 | See this error on console too so I don't think it's just test simulation. For some reason event doesn't show up sometimes | salesforce-design-system-react | js |
@@ -44,7 +44,7 @@ func main() {
cmds.NewCRICTL(externalCLIAction("crictl", dataDir)),
cmds.NewCtrCommand(externalCLIAction("ctr", dataDir)),
cmds.NewCheckConfigCommand(externalCLIAction("check-config", dataDir)),
- cmds.NewEtcdSnapshotCommand(etcdsnapshotCommand, cmds.NewEtcdSnapshotSubcommands(etcdsnapshotCo... | 1 | package main
import (
"bytes"
"os"
"os/exec"
"path/filepath"
"strings"
"syscall"
"github.com/pkg/errors"
"github.com/rancher/k3s/pkg/cli/cmds"
"github.com/rancher/k3s/pkg/configfilearg"
"github.com/rancher/k3s/pkg/data"
"github.com/rancher/k3s/pkg/datadir"
"github.com/rancher/k3s/pkg/dataverify"
"github.... | 1 | 9,525 | We're passing the same thing twice? | k3s-io-k3s | go |
@@ -245,7 +245,8 @@ func TestCreateInstance(t *testing.T) {
},
Spec: clusterv1.MachineSpec{
Bootstrap: clusterv1.Bootstrap{
- Data: pointer.StringPtr("user-data"),
+ // echo "user-data" | base64
+ Data: pointer.StringPtr("dXNlci1kYXRhCg=="),
},
},
}, | 1 | /*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, ... | 1 | 10,497 | Shouldn't the value in Bootstrap.Data be just a plain string? | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -209,7 +209,9 @@ namespace Datadog.Trace.AppSec
private void Report(ITransport transport, Span span, WafMatch[] results, bool blocked)
{
span.SetTag(Tags.AppSecEvent, "true");
- span.SetTraceSamplingPriority(SamplingPriority.UserKeep);
+ var samplingPirority = _se... | 1 | // <copyright file="Security.cs" company="Datadog">
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
// </copyright>
using System;
using System.Co... | 1 | 25,056 | @robertpi Isn't this changing the sampling priority when `KeepTraces==false`? The sampling priority could be `AutoReject` or `AutoKeep`, based on the sampling decision (or the user may have specified something else). Seems like we shouldn't be changing it in this case? | DataDog-dd-trace-dotnet | .cs |
@@ -17,6 +17,11 @@ const (
DefaultCADir = "/etc/kubeedge/ca"
DefaultCertDir = "/etc/kubeedge/certs"
+ DefaultCAURL = "/ca.crt"
+ DefaultCertURL = "/edge.crt"
+
+ DefaultCloudCoreReadyCheckURL = "/readyz"
+
DefaultStreamCAFile = "/etc/kubeedge/ca/streamCA.crt"
DefaultStreamCertFile = "/etc/kube... | 1 | package constants
import (
"time"
v1 "k8s.io/api/core/v1"
)
const (
DefaultConfigDir = "/etc/kubeedge/config/"
DefaultCAFile = "/etc/kubeedge/ca/rootCA.crt"
DefaultCAKeyFile = "/etc/kubeedge/ca/rootCA.key"
DefaultCertFile = "/etc/kubeedge/certs/server.crt"
DefaultKeyFile = "/etc/kubeedge/... | 1 | 17,235 | The const can also be used in cloud/pkg/cloudhub/servers/httpserver/server.go L46-47? | kubeedge-kubeedge | go |
@@ -82,7 +82,7 @@ Blockly.Procedures.allProcedureMutations = function(root) {
var blocks = root.getAllBlocks();
var mutations = [];
for (var i = 0; i < blocks.length; i++) {
- if (blocks[i].type === 'procedures_prototype') {
+ if (blocks[i].type == 'procedures_prototype') {
var mutation = blocks[i... | 1 | /**
* @license
* Visual Blocks Editor
*
* Copyright 2012 Google Inc.
* https://developers.google.com/blockly/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apach... | 1 | 8,913 | Use a constant for `procedures_prototype`. | LLK-scratch-blocks | js |
@@ -12,7 +12,7 @@ def bad_percent(arg):
def good_percent(arg):
'''Instead of passing multiple arguments, format the message'''
- raise KeyError('Bad key: %r' % arg)
+ raise KeyError(f'Bad key: {arg!r}')
def bad_multiarg(name, value):
'''Raising a formatted string and multiple additional arguments'... | 1 | '''
Complain about multi-argument exception constructors where the first argument
contains a percent sign, thus suggesting a % string formatting was intended
instead. The same holds for a string containing {...} suggesting str.format()
was intended.
'''
# pylint: disable=redundant-u-string-prefix
def bad_percent(arg)... | 1 | 15,061 | This file should probably not be touched as the formatting of the string seems to be a test in itself ? | PyCQA-pylint | py |
@@ -276,8 +276,11 @@ is_sys_kill(dcontext_t *dcontext, byte *pc, byte *xsp, siginfo_t *info);
int
sigaction_syscall(int sig, kernel_sigaction_t *act, kernel_sigaction_t *oact)
{
-#if defined(X64) && !defined(VMX86_SERVER) && defined(LINUX)
+#if !defined(VMX86_SERVER) && defined(LINUX)
/* PR 305020: must have SA... | 1 | /* **********************************************************
* Copyright (c) 2011-2017 Google, Inc. All rights reserved.
* Copyright (c) 2000-2010 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or witho... | 1 | 12,881 | style nit: missing leading '*' | DynamoRIO-dynamorio | c |
@@ -184,7 +184,7 @@ public class PrivateTransactionProcessor {
messageFrameStack.addFirst(initialFrame);
while (!messageFrameStack.isEmpty()) {
- process(messageFrameStack.peekFirst(), operationTracer);
+ process(messageFrameStack.peekFirst(), OperationTracer.NO_TRACING);
}
... | 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,479 | The operationTracer is passed into the processTransaction() method. We should probably pass the no tracing in one in from where it is called. | hyperledger-besu | java |
@@ -125,13 +125,10 @@ const (
// SPI on the Arduino Nano 33.
var (
- SPI0 = SPI{Bus: sam.SERCOM0_SPI,
- SCK: SPI0_SCK_PIN,
- MOSI: SPI0_MOSI_PIN,
- MISO: SPI0_MISO_PIN,
- DOpad: spiTXPad2SCK3,
- DIpad: sercomRXPad0,
- PinMode: PinSERCOM}
+ SPI0 = SPI{
+ Bus: sam.SERCOM0_SPI,
+ SERCOM: 0,
+ ... | 1 | // +build sam,atsamd21,arduino_nano33
// This contains the pin mappings for the Arduino Nano33 IoT board.
//
// For more information, see: https://store.arduino.cc/nano-33-iot
//
package machine
import "device/sam"
// used to reset into bootloader
const RESET_MAGIC_VALUE = 0x07738135
// GPIO Pins
const (
RX0 Pin =... | 1 | 7,752 | I believe this line was an error, it should have been `sercomRXPad1` to be consistent with the pin numbers. Resolving this ambiguity by following the pin numbers. | tinygo-org-tinygo | go |
@@ -0,0 +1,12 @@
+<div>
+ <p>
+ Hello,<br/>
+ The request, <%= @proposal.name %> (<%= @proposal.public_id %>), has been cancelled.
+ </p>
+</div>
+
+<p>
+ <strong>
+ <%= link_to "View This Request", proposal_url(@proposal), {target: 'C2'} %>
+ </strong>
+</p> | 1 | 1 | 13,389 | May be useful to have the reason here, though clearly not pressing. | 18F-C2 | rb | |
@@ -136,7 +136,7 @@ class GridInterface(DictInterface):
'of arrays must match. %s found that arrays '
'along the %s dimension do not match.' %
(cls.__name__, vdim.name))
- stack = np.stack if any(is_dask(arr) f... | 1 | from __future__ import absolute_import
import sys
import datetime as dt
from collections import OrderedDict, defaultdict, Iterable
try:
import itertools.izip as zip
except ImportError:
pass
import numpy as np
from .dictionary import DictInterface
from .interface import Interface, DataError
from ..dimension ... | 1 | 21,958 | These were inverted before | holoviz-holoviews | py |
@@ -4227,6 +4227,11 @@ public class DBService {
return null;
}
+ public Map<String, DomainRoleMember> getReviewMembers() {
+ // Currently unimplemented
+ return new HashMap<>();
+ }
+
public void processExpiredPendingMembers(int pendingRoleMemberLifespan, final String monitorIde... | 1 | /*
* Copyright 2016 Yahoo Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 1 | 5,050 | DB is implemented in PR 951 | AthenZ-athenz | java |
@@ -15,6 +15,16 @@ import (
"github.com/prometheus/client_golang/prometheus"
)
+const (
+ bytesToGB = 1073741824
+ bytesToMB = 1048567
+ micSec = 1000000
+ bytesToKB = 1024
+ minwidth = 0
+ maxwidth = 0
+ padding = 3
+)
+
// A gauge is a metric that represents a single numerical value that can
// arbitrar... | 1 | // Package collector is used to collect metrics by implementing
// prometheus.Collector interface. See function level comments
// for more details.
package collector
import (
"encoding/json"
"log"
"net/http"
"net/url"
"strconv"
"time"
"github.com/openebs/maya/types/v1"
"github.com/prometheus/client_golang/pro... | 1 | 7,106 | move all constants to `pkg/util/constants.go`, these constants had been used in `volume_stats.go` file too. So better to import them. | openebs-maya | go |
@@ -1,8 +1,8 @@
#appModules/winword.py
#A part of NonVisual Desktop Access (NVDA)
-#Copyright (C) 2006-2017 NV Access Limited, Manish Agrawal, Derek Riemer, Babbage B.V.
-#This file is covered by the GNU General Public License.
-#See the file COPYING for more details.
+# Copyright (C) 2006-2020 NV Access Limited, Man... | 1 | #appModules/winword.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2006-2017 NV Access Limited, Manish Agrawal, Derek Riemer, Babbage B.V.
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
import ctypes
import time
from comtypes import COMError, GUID... | 1 | 28,667 | Could you revisit the full header and add appropriate spaces after the hashes? | nvaccess-nvda | py |
@@ -102,6 +102,11 @@ class CodeEditor extends FormWidgetBase
*/
public $showPrintMargin = false;
+ /**
+ * @var string Hint to show above the code editor
+ */
+ public $codeHint = '';
+
//
// Object properties
// | 1 | <?php namespace Backend\FormWidgets;
use Backend\Models\Preference as BackendPreference;
use Backend\Classes\FormWidgetBase;
/**
* Code Editor
* Renders a code editor field.
*
* @package october\backend
* @author Alexey Bobkov, Samuel Georges
*/
class CodeEditor extends FormWidgetBase
{
//
// Configurab... | 1 | 17,410 | This should either be `hint` that takes a string to render inside of the partial container or probably better you should just render a separate hint field above the code field in the same tab. | octobercms-october | php |
@@ -4330,7 +4330,7 @@ func TestJetStreamCrossAccountMirrorsAndSources(t *testing.T) {
t.Fatalf("Did not receive correct response: %+v", scResp.Error)
}
- checkFor(t, 2*time.Second, 100*time.Millisecond, func() error {
+ checkFor(t, 4*time.Second, 100*time.Millisecond, func() error {
si, err := js2.StreamInfo(... | 1 | // Copyright 2020-2021 The NATS Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 12,708 | this was flapping | nats-io-nats-server | go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.