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 |
|---|---|---|---|---|---|---|---|
@@ -29,6 +29,7 @@ class ResourceType(object):
FOLDER = 'folder'
PROJECT = 'project'
GROUP = 'group'
+ BACKEND_SERVICE = 'backend_service'
FORWARDING_RULE = 'forwarding_rule'
BUCKETS_ACL = 'buckets_acl'
CLOUDSQL_ACL = 'cloudsql_instances' | 1 | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 1 | 26,110 | nit: Would you mind alpha-sorting this? | forseti-security-forseti-security | py |
@@ -55,6 +55,8 @@ public class ManifestFiles {
* @return a {@link ManifestReader}
*/
public static ManifestReader read(ManifestFile manifest, FileIO io, Map<Integer, PartitionSpec> specsById) {
+ Preconditions.checkArgument(manifest.content() == ManifestContent.DATA,
+ "Cannot read a delete manifes... | 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 | 20,158 | For my understanding, the DATA manifest & DELETE manifest could share the same read / write path so I think we could use the common reader+writer. Is there any other reason that we need to make them separate paths ? | apache-iceberg | java |
@@ -4,7 +4,7 @@
plan_title = @plan.title
user_name = @plan.owner.name
helpdesk_email = Rails.configuration.branding[:organisation][:helpdesk_email]
- contact_us_url = Rails.configuration.branding[:organisation][:contact_us_url]
+ contact_us = Rails.configuration.branding[:organisation][:contact_us_url] || co... | 1 | <%
tool_name = Rails.configuration.branding[:application][:name]
commenter_name = @commenter.name
plan_title = @plan.title
user_name = @plan.owner.name
helpdesk_email = Rails.configuration.branding[:organisation][:helpdesk_email]
contact_us_url = Rails.configuration.branding[:organisation][:contact_us_url]
... | 1 | 17,083 | that change should be sufficient for avoiding the override of contact_us_url helper. The one defined at the .yml it is within a hash so no problem should arise. | DMPRoadmap-roadmap | rb |
@@ -56,7 +56,7 @@ return [
'choose_file' => 'Datei auswählen',
'close' => 'Schließen',
'create' => 'Erstellen',
- 'create_and_add_another' => 'Erstellen und weitere hinzufügen',
+ 'create_and_add_another' => 'Erstellen und weiteres Element hinzufügen',
'create_and_conti... | 1 | <?php
return [
'page_title' => [
'dashboard' => 'Dashboard',
'detail' => '%entity_label_singular% <small>(#%entity_short_id%)</small>',
'edit' => '%entity_label_singular% <small>(#%entity_short_id%)</small> bearbeiten',
'index' => '%entity_label_plural%',
'new' => '%entity_l... | 1 | 12,720 | We actually had a discussion about this exactly in #3470, some languages seem to go for one, some for the other | EasyCorp-EasyAdminBundle | php |
@@ -50,6 +50,8 @@ public abstract class DynamicLangXApiView implements ViewModel {
public abstract List<LongRunningOperationDetailView> longRunningDescriptors();
+ public abstract List<GrpcStreamingDetailView> grpcStreamingDescriptors();
+
public abstract List<String> methodKeys();
public abstract Strin... | 1 | /* Copyright 2016 Google Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 1 | 20,728 | Is PHP the first dynamic MVVM language with grpc streaming support? | googleapis-gapic-generator | java |
@@ -41,6 +41,7 @@ SmilesMolSupplier::SmilesMolSupplier(const std::string &fileName,
if (!tmpStream || (!(*tmpStream)) || (tmpStream->bad())) {
std::ostringstream errout;
errout << "Bad input file " << fileName;
+ if (tmpStream) { delete tmpStream; }
throw BadFileException(errout.str());
}
dp_... | 1 | // $Id$
//
// Copyright (C) 2002-2011 Greg Landrum and Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <RD... | 1 | 18,590 | the `if` isn't necessary here; it's safe to call `delete` on `nullptr` | rdkit-rdkit | cpp |
@@ -156,6 +156,12 @@ ReturnCode_t DataWriter::assert_liveliness()
return impl_->assert_liveliness();
}
+bool DataWriter::remove_all_changes(
+ size_t* removed)
+{
+ return impl_->remove_all_changes(removed);
+}
+
} // namespace dds
} // namespace fastdds
} // namespace eprosima | 1 | // Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless re... | 1 | 18,439 | Change if the method's name finally changes to `clear_history` as proposed elsewhere | eProsima-Fast-DDS | cpp |
@@ -34,9 +34,8 @@ def showHelp(helpId: str):
noHelpMessage = _("No help available here.")
queueHandler.queueFunction(queueHandler.eventQueue, ui.message, noHelpMessage)
return
-
- import gui
- helpFile = gui.getDocFilePath("userGuide.html")
+ import documentationUtils
+ helpFile = documentationUtils.getDocFile... | 1 | # -*- coding: UTF-8 -*-
# A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2017-2020 NV Access Limited, Thomas Stivers
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.
import os
import tempfile
import typing
import wx
from logHandler import log
... | 1 | 31,810 | can this one also be moved to the top of the file? | nvaccess-nvda | py |
@@ -26,6 +26,8 @@ type AppliedToGroup struct {
metav1.ObjectMeta
// Pods is a list of Pods selected by this group.
Pods []GroupMemberPod
+ // GroupMembers is a list of resources selected by this group.
+ GroupMembers []GroupMember
}
// PodReference represents a Pod Reference. | 1 | // Copyright 2019 Antrea Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | 1 | 18,565 | So if I understand this correctly the externalEntities should be computed and stored in GroupMember, while current code usage of GroupMemberPod will be migrated to GroupMember later? | antrea-io-antrea | go |
@@ -1,13 +1,9 @@
-using System;
-using System.Collections.Generic;
-
-namespace Datadog.Tracer
+namespace Datadog.Tracer
{
public static class Tags
{
- public const string Service = "Datadog.Service";
- public const string Resource = "Datadog.Resource";
- public const string Error = "D... | 1 | using System;
using System.Collections.Generic;
namespace Datadog.Tracer
{
public static class Tags
{
public const string Service = "Datadog.Service";
public const string Resource = "Datadog.Resource";
public const string Error = "Datadog.Error";
public const string Type = "Dat... | 1 | 14,095 | Don't we have tests to change after this breaking change? probably we're not using hard coded strings in our tests when we create a `Span`? | DataDog-dd-trace-dotnet | .cs |
@@ -19,7 +19,7 @@ REPORT_FREQUENCY = 5000
SUBSCRIBER_NAME = "bq"
KEYSPACE_NAME_INCOMING = "ilisten"
KEYSPACE_NAME_UNIQUE = "ulisten"
-APP_CREDENTIALS_FILE = "bigquery-credentials.json"
+APP_CREDENTIALS_FILE = os.environ['GOOGLE_APPLICATION_CREDENTIALS']
# TODO:
# Big query hardcoded data set ids | 1 | #!/usr/bin/env python
import sys
import os
from datetime import datetime
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), ".."))
from redis import Redis
from redis_pubsub import RedisPubSubSubscriber, RedisPubSubPublisher, NoSubscriberNameSetException, WriteFailException
import ujson
import log... | 1 | 14,125 | will this fail if the env variable doesn't exist? Is this the preferred behaviour? | metabrainz-listenbrainz-server | py |
@@ -325,8 +325,9 @@ class SpatialPooler(object):
# Initialize a tiny random tie breaker. This is used to determine winning
# columns where the overlaps are identical.
- self._tieBreaker = 0.01*numpy.array([self._random.getReal64() for i in
- xrange(self._numColumns)... | 1 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013-2014, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This p... | 1 | 20,045 | bad line wrap | numenta-nupic | py |
@@ -1245,6 +1245,14 @@ void rai::bootstrap_server::receive_header_action (boost::system::error_code con
});
break;
}
+ case rai::message_type::bulk_pull_blocks:
+ {
+ auto this_l (shared_from_this ());
+ boost::asio::async_read (*socket, boost::asio::buffer (receive_buffer.data () + 8, si... | 1 | #include <rai/node/bootstrap.hpp>
#include <rai/node/common.hpp>
#include <rai/node/node.hpp>
#include <boost/log/trivial.hpp>
rai::block_synchronization::block_synchronization (boost::log::sources::logger_mt & log_a) :
log (log_a)
{
}
rai::block_synchronization::~block_synchronization ()
{
}
namespace
{
class add... | 1 | 13,168 | What does the `8` here represent? Can you give it a name? | nanocurrency-nano-node | cpp |
@@ -0,0 +1,12 @@
+from pymatgen.ext.matproj import MPRester, TaskType
+import os
+material_ids = ["mp-32800", "mp-23494"]
+task_types = [TaskType.GGA_OPT, TaskType.GGA_UNIFORM]
+file_patterns = ["vasprun*", "OUTCAR*"]
+with MPRester(os.environ["MP_API_KEY"]) as mpr:
+ meta, urls = mpr.get_download_info(
+ mat... | 1 | 1 | 19,257 | `MPRester(os.environ["MP_API_KEY"])` can be left simply as `MPRester()` and it will pick up the API key from the environment. What is the purpose of this file otherwise? Is it better suited for `dev_scripts`, or a test? | materialsproject-pymatgen | py | |
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20121114193521) do
+ActiveRecord::Schema.define(:version => 20121212214215) do
create_table "announcements", :force => true do |t|
t.datetime "created_at", :... | 1 | # encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative sou... | 1 | 6,654 | Looks like there may be more changes to this file than intended? | thoughtbot-upcase | rb |
@@ -117,7 +117,7 @@ func (eb *eventbus) pubCloudMsgToEdge() {
body, ok := accessInfo.GetContent().(map[string]interface{})
if !ok {
klog.Errorf("Message is not map type")
- return
+ continue
}
message := body["message"].(map[string]interface{})
topic := message["topic"].(string) | 1 | package eventbus
import (
"encoding/json"
"fmt"
"os"
"github.com/astaxie/beego/orm"
"k8s.io/klog/v2"
"github.com/kubeedge/beehive/pkg/core"
beehiveContext "github.com/kubeedge/beehive/pkg/core/context"
messagepkg "github.com/kubeedge/kubeedge/edge/pkg/common/message"
"github.com/kubeedge/kubeedge/edge/pkg/c... | 1 | 20,950 | when message type is not expected, contine to next loop instead of return to finish infinite loop | kubeedge-kubeedge | go |
@@ -2,6 +2,13 @@ package cmd
import (
"fmt"
+ "os"
+ osexec "os/exec"
+ "path/filepath"
+ "strings"
+ "testing"
+ "time"
+
"github.com/drud/ddev/pkg/ddevapp"
"github.com/drud/ddev/pkg/exec"
"github.com/drud/ddev/pkg/fileutil" | 1 | package cmd
import (
"fmt"
"github.com/drud/ddev/pkg/ddevapp"
"github.com/drud/ddev/pkg/exec"
"github.com/drud/ddev/pkg/fileutil"
"github.com/drud/ddev/pkg/nodeps"
"github.com/drud/ddev/pkg/testcommon"
"github.com/drud/ddev/pkg/util"
asrt "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/requi... | 1 | 14,675 | This change was not really intended but made by the linter of VS Code. And looking at other packages this looks like a best practise to place interal packages on the top and gh imports afterwards. | drud-ddev | php |
@@ -84,6 +84,10 @@ func (r *AWSMachine) ValidateUpdate(old runtime.Object) error {
delete(oldAWSMachineSpec, "providerID")
delete(newAWSMachineSpec, "providerID")
+ // allow changes to instanceID
+ delete(oldAWSMachineSpec, "instanceID")
+ delete(newAWSMachineSpec, "instanceID")
+
// allow changes to additional... | 1 | /*
Copyright 2019 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 | 16,861 | instanceID should stay the same for a AWSMachine? | kubernetes-sigs-cluster-api-provider-aws | go |
@@ -77,6 +77,7 @@ def _launch_local_catalog():
env = dict(REGISTRY_URL="http://localhost:5000",
S3_PROXY_URL=open_config["s3Proxy"],
ALWAYS_REQUIRE_AUTH="false",
+ NO_DOWNLOAD="false",
CATALOG_MODE="LOCAL",
SSO_AUTH="DISABLED",
... | 1 | """
Parses the command-line arguments and runs a command.
"""
import argparse
import subprocess
import time
import sys
import dns.resolver
import requests
from . import api, session
from . import __version__ as quilt3_version
from .session import open_url
from .util import get_from_config, catalog_s3_url, catalog_pa... | 1 | 18,644 | Since this is a dict don't you want `False` or do we clean that up elsewhere? | quiltdata-quilt | py |
@@ -23,6 +23,7 @@ from luigi.scheduler import DISABLED, DONE, FAILED, CentralPlannerScheduler
luigi.notifications.DEBUG = True
WORKER = 'myworker'
+HOST = 'localhost'
class CentralPlannerTest(unittest.TestCase): | 1 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 1 | 11,220 | what's the reason you had to add the `host` argument to all `get_work` calls? | spotify-luigi | py |
@@ -37,6 +37,13 @@ public class UpdatePermissionRootCommand extends AbstractCommand<Dataverse> {
}
}
+ @Override
+ public boolean onSuccess(CommandContext ctxt, Object r) {
+ return ctxt.dataverses().index((Dataverse) r,true);
+ }
+
+
+ //TODO: Review this as this will never be an in... | 1 | package edu.harvard.iq.dataverse.engine.command.impl;
import edu.harvard.iq.dataverse.Dataverse;
import edu.harvard.iq.dataverse.authorization.Permission;
import edu.harvard.iq.dataverse.engine.command.AbstractCommand;
import edu.harvard.iq.dataverse.engine.command.CommandContext;
import edu.harvard.iq.dataverse.engin... | 1 | 42,564 | This will never be a dataset so we can simplify the code here | IQSS-dataverse | java |
@@ -89,6 +89,15 @@ public abstract class AbstractBlockProcessor implements BlockProcessor {
private final MiningBeneficiaryCalculator miningBeneficiaryCalculator;
+ public AbstractBlockProcessor(final AbstractBlockProcessor blockProcessor) {
+ this(
+ blockProcessor.transactionProcessor,
+ bloc... | 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 | 19,840 | This should be moved into the PrivacyBlockProcessor instead of adding the constructor here. | hyperledger-besu | java |
@@ -38,7 +38,7 @@ import (
"github.com/pipe-cd/pipe/pkg/crypto"
"github.com/pipe-cd/pipe/pkg/datastore"
"github.com/pipe-cd/pipe/pkg/git"
- "github.com/pipe-cd/pipe/pkg/insight"
+ insightfilestore "github.com/pipe-cd/pipe/pkg/insight/insightstore"
"github.com/pipe-cd/pipe/pkg/model"
"github.com/pipe-cd/pipe/p... | 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 | 14,065 | nit: Remove "insightfilestore". I think "insightstore" is good enough and as I see we are using that name at other places too. | pipe-cd-pipe | go |
@@ -5,8 +5,8 @@ module RSpec::Core::Formatters
BisectProgressFormatter = Class.new(remove_const :BisectProgressFormatter) do
RSpec::Core::Formatters.register self
- def bisect_round_finished(notification)
- return super unless notification.round == 3
+ def bisect_round_started(notification)
+ ... | 1 | require 'rspec/core'
RSpec::Support.require_rspec_core "formatters/bisect_progress_formatter"
module RSpec::Core::Formatters
BisectProgressFormatter = Class.new(remove_const :BisectProgressFormatter) do
RSpec::Core::Formatters.register self
def bisect_round_finished(notification)
return super unless n... | 1 | 15,218 | It looks like you've removed `bisect_round_finished` but kept `bisect_round_started`. Seems a little odd that they aren't paired. Not sure if there's anything to do about that though... | rspec-rspec-core | rb |
@@ -29,6 +29,8 @@ from qutebrowser.mainwindow.statusbar.percentage import Percentage
def percentage(qtbot):
"""Fixture providing a Percentage widget."""
widget = Percentage()
+ # Force immedate update of percentage widget
+ widget.set_perc.throttle_set(-1)
qtbot.add_widget(widget)
return widg... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 22,923 | I'm not sure how to fix the lint and mypy warnings on this line. I could just ignore them, but I feel like the linter should know this exists. | qutebrowser-qutebrowser | py |
@@ -1,7 +1,7 @@
'use strict';
const Aspect = {
- SKIP_SESSION: Symbol('SKIP_SESSION')
+ SKIP_SESSION: 'SKIP_SESSION'
};
/** | 1 | 'use strict';
const Aspect = {
SKIP_SESSION: Symbol('SKIP_SESSION')
};
/**
* This class acts as a parent class for any operation and is responsible for setting this.options,
* as well as setting and getting a session.
* Additionally, this class implements `hasAspect`, which determines whether an operation has
*... | 1 | 15,369 | why remove `Symbol`? | mongodb-node-mongodb-native | js |
@@ -121,7 +121,7 @@ function getPunctuationRegExp() {
* Reference: https://en.wikipedia.org/wiki/Supplemental_Punctuation
* -> \u2E00-\u2E7F Reference
*/
- return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-.\/:;<=>?@\[\]^_`{|}~]/g;
+ return /[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&£¢¥§€()*+,\-.\/:;<=>?@\[\]^_`{|}... | 1 | /* global text */
/**
* Determine if a given string contains unicode characters, specified in options
*
* @method hasUnicode
* @memberof axe.commons.text
* @instance
* @param {String} str string to verify
* @param {Object} options config containing which unicode character sets to verify
* @property {Boolean} o... | 1 | 15,408 | Why are currency signs considered punctuation? They technically fall under the BMP range for Currency Symbols `\u20A0-\u20CF` (covered in `getUnicodeNonBmpRegExp`, which is itself a misnomer) | dequelabs-axe-core | js |
@@ -71,6 +71,7 @@ setup(
# Metadata
author='Philippe BIONDI',
author_email='phil(at)secdev.org',
+ maintainer='Pierre LALET, Guillaume VALADON',
description='Scapy: interactive packet manipulation tool',
license='GPLv2',
url='http://www.secdev.org/projects/scapy', | 1 | #! /usr/bin/env python
"""
Distutils setup file for Scapy.
"""
from distutils import archive_util
from distutils import sysconfig
from distutils.core import setup
from distutils.command.sdist import sdist
import os
EZIP_HEADER = """#! /bin/sh
PYTHONPATH=$0/%s exec python -m scapy.__init__
"""
def make_ezipfile(b... | 1 | 11,189 | You have forgotten a coma `,` | secdev-scapy | py |
@@ -35,7 +35,8 @@ def single_gpu_test(model, data_loader, show=False, out_dir=None):
img_show = mmcv.imresize(img_show, (ori_w, ori_h))
if out_dir:
- out_file = osp.join(out_dir, img_meta['filename'])
+ out_file = osp.join(out_dir,
+ ... | 1 | import os.path as osp
import pickle
import shutil
import tempfile
import mmcv
import torch
import torch.distributed as dist
from mmcv.runner import get_dist_info
from mmdet.core import tensor2imgs
def single_gpu_test(model, data_loader, show=False, out_dir=None):
model.eval()
results = []
dataset = data... | 1 | 19,406 | For different datasets, we may want to save the images differently. Sometimes the datasets are categorized into several subfolders, and we want to keep it when saving visualization results, and sometimes we just want to save all images in `out_dir`. An argument may be added to control the behavior. | open-mmlab-mmdetection | py |
@@ -788,7 +788,12 @@ public class FlexBuffers {
if (io == other.length) {
// in our buffer we have an additional \0 byte
// but this does not exist in regular Java strings, so we return now
- return c1 - c2;
+ int cmp = c1 ... | 1 | /*
* Copyright 2014 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 1 | 21,946 | if `other` could have a guaranteed `0` byte in it, this whole `if` could be removed, and above you could just add `|| c2 == '\0'` to get the same effect? | google-flatbuffers | java |
@@ -33,7 +33,11 @@ import org.apache.iceberg.exceptions.AlreadyExistsException;
public class CachingCatalog implements Catalog {
public static Catalog wrap(Catalog catalog) {
- return new CachingCatalog(catalog);
+ return wrap(catalog, true);
+ }
+
+ public static Catalog wrap(Catalog catalog, Boolean cas... | 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 | 16,743 | nit: can this be a primitive value? | apache-iceberg | java |
@@ -333,9 +333,14 @@ func (b Browse) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
// Browsing navigation gets messed up if browsing a directory
// that doesn't end in "/" (which it should, anyway)
- if !strings.HasSuffix(r.URL.Path, "/") {
- staticfiles.RedirectToDir(w, r)
- return 0, nil
+ ... | 1 | // Package browse provides middleware for listing files in a directory
// when directory path is requested instead of a specific file.
package browse
import (
"bytes"
"encoding/json"
"net/http"
"net/url"
"os"
"path"
"sort"
"strconv"
"strings"
"text/template"
"time"
"github.com/dustin/go-humanize"
"github... | 1 | 10,696 | This maybe not what we want. If `rewrite` occurred before, `r.URL.Path` contains the result and we should use it. Otherwise `rewrite` middleware will disfunction when combining with `browser`. | caddyserver-caddy | go |
@@ -197,7 +197,7 @@ class Engine(object):
# :type exception: BaseException
exception = None
try:
- modules = [self.provisioning, self.aggregator] + self.reporters
+ modules = [self.aggregator, self.provisioning] + self.reporters
modules += self.services
... | 1 | """
Main BZT classes
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 by applicable law or agreed to in... | 1 | 13,547 | Why change this? | Blazemeter-taurus | py |
@@ -5,9 +5,9 @@ declare(strict_types=1);
namespace Shopsys\FrameworkBundle\Component\Error;
use Psr\Log\LoggerInterface;
-use Symfony\Component\HttpKernel\EventListener\ExceptionListener;
+use Symfony\Component\HttpKernel\EventListener\ErrorListener;
-class NotLogFakeHttpExceptionsExceptionListener extends Except... | 1 | <?php
declare(strict_types=1);
namespace Shopsys\FrameworkBundle\Component\Error;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpKernel\EventListener\ExceptionListener;
class NotLogFakeHttpExceptionsExceptionListener extends ExceptionListener
{
/**
* @var \Shopsys\FrameworkBundle\Component\Error\Er... | 1 | 21,569 | _nitpick_ Isn't it now actually NotLogFakeHttpExceptions**Error**Listener ? | shopsys-shopsys | php |
@@ -82,6 +82,7 @@ namespace AutoRest.AzureResourceSchema
JsonSchema resourceDefinition = new JsonSchema();
resourceDefinition.JsonType = "object";
+ resourceDefinition.ResourceType = resourceType;
resourceDefinition.AddProperty("type", ... | 1 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using AutoRest.Core.Model;
namespace Au... | 1 | 23,284 | Why not just look for the "type" property instead of creating a ResourceType property? | Azure-autorest | java |
@@ -360,7 +360,8 @@ func (bc *blockchain) context(ctx context.Context, tipInfoFlag bool) (context.Co
protocol.WithBlockchainCtx(
ctx,
protocol.BlockchainCtx{
- Tip: tip,
+ Tip: tip,
+ ChainID: config.ChainID(),
},
),
bc.config.Genesis, | 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,645 | should use `bc.config.Blockchain.ChainID` | iotexproject-iotex-core | go |
@@ -17,13 +17,12 @@ import java.util.Collections;
import java.util.List;
import org.springframework.boot.context.properties.ConfigurationProperties;
import zipkin.storage.elasticsearch.ElasticsearchStorage;
-import zipkin.storage.elasticsearch.NativeClient;
@ConfigurationProperties("zipkin.storage.elasticsearch")... | 1 | /**
* Copyright 2015-2016 The OpenZipkin Authors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ... | 1 | 11,722 | this doesn't need to know about NativeClient | openzipkin-zipkin | java |
@@ -233,7 +233,8 @@ class ViolationAccess(object):
violation.get('full_name', ''),
violation.get('resource_data', ''),
violation.get('violation_data', ''),
- violation.get('rule_name', '')
+ violation.get('rule_name', ''),
+ ... | 1 | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 1 | 35,849 | I know we discussed if we should add in the resource_name to the hash, and I actually don't think it's required. The violation hash was recently updated (not released) to include the violated rule, so when the next release goes out, user's findings will get updated. The resource name doesn't hurt to have here, but not ... | forseti-security-forseti-security | py |
@@ -14,8 +14,11 @@ static void surface_attach(struct wl_client *client,
struct wl_resource *resource,
struct wl_resource *buffer, int32_t sx, int32_t sy) {
struct wlr_surface *surface = wl_resource_get_user_data(resource);
+ int scale = surface->current.scale;
surface->pending.invalid |= WLR_SURFACE_INVALID_B... | 1 | #include <assert.h>
#include <stdlib.h>
#include <wayland-server.h>
#include <wlr/util/log.h>
#include <wlr/egl.h>
#include <wlr/render/interface.h>
#include <wlr/types/wlr_surface.h>
static void surface_destroy(struct wl_client *client, struct wl_resource *resource) {
wl_resource_destroy(resource);
}
static void su... | 1 | 7,682 | The variable name is also misleading imo. The width from the buffer comes from `wl_shm_buffer_get_width` (or a similar EGL thing), which is what gets encoded into `surface->texture->width`. | swaywm-wlroots | c |
@@ -179,6 +179,8 @@ class Listen(object):
'time' : self.ts_since_epoch,
'tags' : {
'user_name' : escape(self.user_name),
+ 'artist_msid' : self.artist_msid,
+ 'recording_msid' : self.recording_msid,
},
'fields' : {
... | 1 | # coding=utf-8
from datetime import datetime
import calendar
from listenbrainz.utils import escape, convert_to_unix_timestamp
def flatten_dict(d, seperator='', parent_key=''):
"""
Flattens a nested dictionary structure into a single dict.
Args:
d: the dict to be flattened
seperator: the s... | 1 | 14,418 | Why are you using these tags to carry these msids? | metabrainz-listenbrainz-server | py |
@@ -439,8 +439,8 @@ int flb_config_set_property(struct flb_config *config,
flb_free(*s_val); /* release before overwriting */
}
- *s_val = malloc(flb_sds_len(tmp) * sizeof(char));
- strncpy(*s_val, tmp, flb_sds_len(tmp));
+ ... | 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* Fluent Bit
* ==========
* Copyright (C) 2019 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in co... | 1 | 10,313 | flb_strdup() should do the work here. note: use Fluent Bit memory wrappers | fluent-fluent-bit | c |
@@ -0,0 +1,6 @@
+// Copyright 2020 The Swarm Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:generate sh -c "protoc -I . -I \"$(go list -f '{{ .Dir }}' -m github.com/gogo/protobuf)/protobuf\" --gogofaster_out=. retrieval.pro... | 1 | 1 | 8,698 | This line should be separated from the package declaration by one line as it is not the package description. | ethersphere-bee | go | |
@@ -411,7 +411,7 @@ func TestRollDPoSConsensus(t *testing.T) {
require.NoError(t, err)
require.NoError(t, sf.Start(ctx))
for j := 0; j < numNodes; j++ {
- ws, err := sf.NewWorkingSet(nil)
+ ws, err := sf.NewWorkingSet()
require.NoError(t, err)
_, err = accountutil.LoadOrCreateAccount(ws, cha... | 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 | 20,068 | shadow: declaration of "err" shadows declaration at line 410 (from `govet`) | iotexproject-iotex-core | go |
@@ -1,15 +1,14 @@
package task_config
import (
+ "strings"
+ "time"
+
+ ds "github.com/c2h5oh/datasize"
"github.com/sonm-io/core/insonmnia/structs"
"github.com/sonm-io/core/proto"
)
-type DurationConfig struct {
- Since string `yaml:"since" required:"true"`
- Until string `yaml:"until" required:"true"`
-}
-
... | 1 | package task_config
import (
"github.com/sonm-io/core/insonmnia/structs"
"github.com/sonm-io/core/proto"
)
type DurationConfig struct {
Since string `yaml:"since" required:"true"`
Until string `yaml:"until" required:"true"`
}
type RatingConfig struct {
Buyer int64 `yaml:"buyer" required:"true"`
Supplier int... | 1 | 6,065 | Maybe next time better to make separate PR? | sonm-io-core | go |
@@ -254,6 +254,14 @@ class MaskTestMixin(object):
ori_shapes = tuple(meta['ori_shape'] for meta in img_metas)
scale_factors = tuple(meta['scale_factor'] for meta in img_metas)
+ if all(det_bbox.shape[0] == 0 for det_bbox in det_bboxes):
+ if torch.onnx.is_in_onnx_export():
+ ... | 1 | import logging
import sys
import torch
from mmdet.core import (bbox2roi, bbox_mapping, merge_aug_bboxes,
merge_aug_masks, multiclass_nms)
logger = logging.getLogger(__name__)
if sys.version_info >= (3, 7):
from mmdet.utils.contextmanagers import completed
class BBoxTestMixin(object):
... | 1 | 23,417 | line 316 also handles this case, need to simplify the logic. | open-mmlab-mmdetection | py |
@@ -122,9 +122,12 @@ type Options struct {
}
// openBucket returns a GCS Bucket that communicates using the given HTTP client.
-func openBucket(ctx context.Context, bucketName string, client *gcp.HTTPClient, opts *Options) (driver.Bucket, error) {
+func openBucket(ctx context.Context, bucketName string, client *gcp... | 1 | // Copyright 2018 The Go Cloud Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... | 1 | 12,571 | We used to have a simple check for bucket and object names, we then decided to remove it and rely on the backend service to check for the name. Is there any reason to add an empty name check now? | google-go-cloud | go |
@@ -983,7 +983,11 @@ bool RTPSParticipantImpl::sendSync(
for (auto& send_resource : send_resource_list_)
{
- send_resource->send(msg->buffer, msg->length, destination_loc);
+ // Calculate next timeout.
+ std::chrono::microseconds timeout =
+ std::chron... | 1 | // Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless re... | 1 | 15,445 | Line too long | eProsima-Fast-DDS | cpp |
@@ -638,6 +638,9 @@ MagicEffectNames magicEffectNames = {
{"orangeteleport", CONST_ME_ORANGETELEPORT},
{"greyteleport", CONST_ME_GREYTELEPORT},
{"lightblueteleport", CONST_ME_LIGHTBLUETELEPORT},
+ {"fatal", CONST_ME_FATAL},
+ {"dodge", CONST_ME_DODGE},
+ {"hourglass", CONST_ME_HOURGLASS},
};
ShootTypeN... | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2019 Mark Samman <mark.samman@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; eithe... | 1 | 19,773 | This isn't aligned though. | otland-forgottenserver | cpp |
@@ -533,7 +533,8 @@ class PAAHead(ATSSHead):
cls_scores. Besides, score voting is used when `` score_voting``
is set to True.
"""
- assert with_nms, 'PAA only supports "with_nms=True" now'
+ assert with_nms, 'PAA only supports "with_nms=True" now and it is ' \
+ ... | 1 | import numpy as np
import torch
from mmcv.runner import force_fp32
from mmdet.core import multi_apply, multiclass_nms
from mmdet.core.bbox.iou_calculators import bbox_overlaps
from mmdet.models import HEADS
from mmdet.models.dense_heads import ATSSHead
EPS = 1e-12
try:
import sklearn.mixture as skm
except ImportE... | 1 | 23,412 | it is mean -> it means PAAHead does not support test-time augmentation. | open-mmlab-mmdetection | py |
@@ -119,6 +119,7 @@ from invenio.legacy.bibcatalog.api import BIBCATALOG_SYSTEM
from invenio.legacy.bibdocfile.config import CFG_BIBDOCFILE_ICON_SUBFORMAT_RE, \
CFG_BIBDOCFILE_DEFAULT_ICON_SUBFORMAT
from invenio.utils.hash import md5
+from invenio.legacy.bibdocfile.registry import plugins
import invenio.legac... | 1 | ## This file is part of Invenio.
## Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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... | 1 | 13,224 | @lnielsen-cern thanks. I missed it :( | inveniosoftware-invenio | py |
@@ -97,7 +97,7 @@ const AnalyticsAdSenseDashboardWidgetTopPagesTable = ( { data } ) => {
chartsEnabled: false,
links: rows.map( ( row ) => row.dimensions[ 1 ] || '/' ),
PrimaryLink: withSelect( ( select, { href = '/' } ) => {
- const serviceURL = select( STORE_NAME ).getServiceReportURL( 'content-pages', {
+... | 1 | /**
* AnalyticsAdSenseDashboardWidgetTopPagesTable 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.ap... | 1 | 34,669 | @tofumatt, has it been changed intentionally? It doesn't seem to be required in IB, plus we haven't had `content-drilldown` before... If it has been changed intentionally, then should we update the `AnalyticsDashboardWidget` component to be use `content-drilldown` instead of `content-pages` as well? | google-site-kit-wp | js |
@@ -16,6 +16,7 @@
from apiclient import discovery
from oauth2client.client import GoogleCredentials
+
from retrying import retry
from google.cloud.security.common.gcp_api._supported_apis import SUPPORTED_APIS | 1 | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 1 | 25,282 | nit: don't think an extra line is needed here; as retrying is an installed library and should be grouped with the rest of the installed library. | forseti-security-forseti-security | py |
@@ -123,6 +123,13 @@ type PrometheusSpec struct {
// The labels to add to any time series or alerts when communicating with
// external systems (federation, remote storage, Alertmanager).
ExternalLabels map[string]string `json:"externalLabels,omitempty"`
+ // Enable access to prometheus web admin API. Defaults to... | 1 | // Copyright 2018 The prometheus-operator Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable ... | 1 | 12,182 | This should be a bool | prometheus-operator-prometheus-operator | go |
@@ -5129,12 +5129,12 @@ SwiftASTContext::GetReferentType(const CompilerType &compiler_type) {
if (compiler_type.IsValid() &&
llvm::dyn_cast_or_null<SwiftASTContext>(compiler_type.GetTypeSystem())) {
- swift::CanType swift_can_type(GetCanonicalSwiftType(compiler_type));
- swift::TypeBase *swift_type = ... | 1 | //===-- SwiftASTContext.cpp -------------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... | 1 | 17,075 | `if (llvm::dyn_cast_or_null<swift::WeakStorageType>(GetSwiftType(compiler_type).getPointer())` ? | apple-swift-lldb | cpp |
@@ -144,13 +144,13 @@ func (e *deployExecutor) generateCanaryManifests(manifests []provider.Manifest,
// Find config map manifests and duplicate them for CANARY variant.
configMaps := findConfigMapManifests(manifests)
- configMaps = duplicateManifests(configMaps, suffix)
- canaryManifests = append(canaryManifests... | 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 | 17,332 | The `generateVariantWorkloadManifests` function below relies on the config manifests specified in Git, but it was passed with the newly created canary's manifests where their name was updated. | pipe-cd-pipe | go |
@@ -19,9 +19,10 @@ use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
class ErgonodeAccountExtension extends Extension implements PrependExtensionInterface
{
/**
+ * @throws \Exception
+ *
* @param array $configs
*
- * @throws \Exception
*/
public function load(ar... | 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\Application\DependencyInjection;
use Nelmio\ApiDocBundle\NelmioApiDocBundle;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\De... | 1 | 9,204 | are this docs neccesary ? | ergonode-backend | php |
@@ -46,8 +46,8 @@ import java.util.List;
public class HttpCommandProcessor implements CommandProcessor {
private String pathToServlet;
- private String browserStartCommand;
- private String browserURL;
+ private final String browserStartCommand;
+ private final String browserURL;
private String sessionId;
... | 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,387 | Can you please revert changes to files in the `thoughtworks` package? This is legacy code and we will eventually phase out RC. | SeleniumHQ-selenium | js |
@@ -13,6 +13,8 @@ void SoftmaxWithLossLayer<Dtype>::LayerSetUp(
LossLayer<Dtype>::LayerSetUp(bottom, top);
LayerParameter softmax_param(this->layer_param_);
softmax_param.set_type("Softmax");
+ // no loss weight for the Softmax internal layer.
+ softmax_param.clear_loss_weight();
softmax_layer_ = LayerReg... | 1 | #include <algorithm>
#include <cfloat>
#include <vector>
#include "caffe/layers/softmax_loss_layer.hpp"
#include "caffe/util/math_functions.hpp"
namespace caffe {
template <typename Dtype>
void SoftmaxWithLossLayer<Dtype>::LayerSetUp(
const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) {
LossL... | 1 | 38,381 | This change suppose to resolve issue #2968. `loss_weight` should be of length 2, the second entry is ignored. | BVLC-caffe | cpp |
@@ -242,7 +242,17 @@ var filesToIgnore = map[string]bool{
func ignoreFile(filename string) bool {
_, base := path.Split(filename)
- return filesToIgnore[base] || strings.HasPrefix(base, "._")
+ if filesToIgnore[base] || strings.HasPrefix(base, "._") {
+ return true
+ }
+ // Treat the files to ignore as prefixes, ... | 1 | // Copyright 2018 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 kbfsedits
import (
"container/heap"
"encoding/json"
"fmt"
"path"
"sort"
"strings"
"sync"
"github.com/keybase/kbfs/kbfsmd"
)
const (
// The max number... | 1 | 20,579 | Is there an easy way to check for conflict suffix to avoid false positives here? | keybase-kbfs | go |
@@ -59,7 +59,7 @@ module Bolt
run_opts = {}
run_opts[:run_as] = opts['_run_as'] if opts['_run_as']
begin
- task = apply_prep.get_task(opts['task'], params)
+ task = @context.get_validated_task(opts['task'], params)
rescue Bolt::Error => e
raise Bolt::Plug... | 1 | # frozen_string_literal: true
module Bolt
class Plugin
class Task
def hooks
hook_descriptions.keys
end
def hook_descriptions
{
puppet_library: 'Run a task to install the Puppet agent package.',
resolve_reference: 'Run a task as a plugin.',
validate... | 1 | 18,938 | `apply_prep.run_task` also seems like it can just use `@context.run_task` | puppetlabs-bolt | rb |
@@ -36,6 +36,9 @@ define(["events", "layoutManager", "inputManager", "userSettings", "libraryMenu"
showYear: true,
centerText: true
});
+
+ // FIXME: Wait for all sections to load
+ autoFocus(page);
});
}
| 1 | define(["events", "layoutManager", "inputManager", "userSettings", "libraryMenu", "mainTabsManager", "cardBuilder", "dom", "imageLoader", "playbackManager", "emby-itemscontainer", "emby-tabs", "emby-button"], function (events, layoutManager, inputManager, userSettings, libraryMenu, mainTabsManager, cardBuilder, dom, im... | 1 | 12,179 | do you have any idea on how to fix it? | jellyfin-jellyfin-web | js |
@@ -159,3 +159,19 @@ class GCSTargetTest(_GCSBaseTestCase, FileSystemTargetTestMixin):
def create_target(self, format=None):
return gcs.GCSTarget(bucket_url(self.id()), format=format, client=self.client)
+
+ def test_close_twice(self):
+ # Ensure gcs._DeleteOnCloseFile().close() can be called ... | 1 | # -*- coding: utf-8 -*-
#
# Copyright 2015 Twitter 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 ... | 1 | 13,062 | You don't need to fix this (you've done so many iterations). But for next time, you can make this into a docstring so it'll have a nicer descriptive name when the tests are running. | spotify-luigi | py |
@@ -90,6 +90,15 @@ func (eni *ENIAttachment) StopAckTimer() {
eni.ackTimer.Stop()
}
+// HasExpired returns true if the ENI attachment object has exceeded the
+// threshold for notifying the backend of the attachment
+func (eni *ENIAttachment) HasExpired() bool {
+ eni.guard.RLock()
+ defer eni.guard.RUnlock()
+
+ ... | 1 | // Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may
// not use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// or in the "license" fil... | 1 | 17,682 | When does 'expiresAt' change? Do you need this? | aws-amazon-ecs-agent | go |
@@ -75,3 +75,15 @@ const Outfit* Outfits::getOutfitByLookType(PlayerSex_t sex, uint16_t lookType) c
}
return nullptr;
}
+
+const Outfit* Outfits::getOutfitByLookType(uint16_t lookType) const
+{
+ for (uint8_t sex = 0; sex <= 1; sex++) {
+ for (const Outfit& outfit : outfits[sex]) {
+ if (outfit.lookType == look... | 1 | /**
* The Forgotten Server - a free and open-source MMORPG server emulator
* Copyright (C) 2019 Mark Samman <mark.samman@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; eithe... | 1 | 17,215 | There are enums for genders + `PLAYERSEX_LAST`. | otland-forgottenserver | cpp |
@@ -23,9 +23,14 @@ func TestCalculateRollupFee(t *testing.T) {
data := make([]byte, 0, tt.dataLen)
fee := CalculateRollupFee(data, tt.gasUsed, big.NewInt(tt.dataPrice), big.NewInt(tt.executionPrice))
- dataFee := uint64((RollupBaseTxSize + len(data)) * int(tt.dataPrice))
+ zeroes, ones := zeroesAndOnes(da... | 1 | package core
import (
"math/big"
"testing"
)
var feeTests = map[string]struct {
dataLen int
gasUsed uint64
dataPrice int64
executionPrice int64
}{
"simple": {10000, 10, 20, 30},
"zero gas used": {10000, 0, 20, 30},
"zero data price": {10000, 0, 0, 30},
"zero exec... | 1 | 15,226 | Should this use the constants as well? Or intentionally covering the fact that the constants may change | ethereum-optimism-optimism | go |
@@ -58,7 +58,10 @@ class TopNContainer(object):
return self.extras
def __len__(self):
- return self._size
+ if self._size >= 0:
+ return self._size
+ else:
+ return len(self.best)
def __getitem__(self, which):
return self.best[which], self.extras[which] | 1 | # $Id$
#
# Copyright (C) 2003-2013 Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
from __future__ import print_function
i... | 1 | 15,553 | The case of a negative size (= keep all elements) was not handled in this function. | rdkit-rdkit | cpp |
@@ -70,13 +70,13 @@ var keys = map[Key]string{
EnableNamespaceNotActiveAutoForwarding: "system.enableNamespaceNotActiveAutoForwarding",
TransactionSizeLimit: "system.transactionSizeLimit",
MinRetentionDays: "system.minRetentionDays",
- MaxWorkflowTaskTimeout: ... | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... | 1 | 10,867 | I think we should keep this dynamic config knob for operations purpose. | temporalio-temporal | go |
@@ -60,7 +60,6 @@ class TestCharacterOffsets(unittest.TestCase):
obj = BasicTextProvider(text=u"\U0001f926\U0001f60a\U0001f44d") # 🤦😊👍
ti = obj.makeTextInfo(Offsets(5, 5))
ti.expand(textInfos.UNIT_CHARACTER) # Range at 👍
- self.assertEqual(ti.offsets, (4, 6)) # Two offsets
ti.move(textInfos.UNIT_CHARAC... | 1 | # -*- coding: UTF-8 -*-
#tests/unit/test_textInfos.py
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2018 NV Access Limited, Babbage B.V.
"""Unit tests for the textInfos module, its submodules and classes."""
i... | 1 | 32,288 | Was this intentional? Perhaps this could be replaced with another way to check the offsets? | nvaccess-nvda | py |
@@ -86,6 +86,7 @@ type PipelineManifest struct {
Version PipelineSchemaMajorVersion `yaml:"version"`
Source *Source `yaml:"source"`
Stages []PipelineStage `yaml:"stages"`
+ // ArtifactBuckets?
}
// Source defines the source of the artifacts to be built and deployed. | 1 | // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package manifest
import (
"bytes"
"errors"
"fmt"
"text/template"
"github.com/fatih/structs"
"gopkg.in/yaml.v3"
"github.com/aws/amazon-ecs-cli-v2/templates"
)
const (
GithubProviderName = "Gi... | 1 | 11,149 | the buckets are created via the stackset, customers don't need to provide them | aws-copilot-cli | go |
@@ -25,7 +25,7 @@ module Blacklight
# Execute a search query against solr
# @param [Hash] solr query parameters
def search params = {}
- send_and_receive blacklight_config.solr_path, { qt: blacklight_config.qt }.merge(params)
+ send_and_receive blacklight_config.solr_path, params.merge({ qt: bl... | 1 | module Blacklight
class SolrRepository
attr_accessor :blacklight_config, :blacklight_solr
# ActiveSupport::Benchmarkable requires a logger method
attr_accessor :logger
include ActiveSupport::Benchmarkable
def initialize blacklight_config
@blacklight_config = blacklight_config
end
... | 1 | 5,628 | This doesn't have the same behavior as before. Maybe you want `reverse_merge` (and it either just works or we implement it on `Blacklight::Solr::Request`) | projectblacklight-blacklight | rb |
@@ -6,6 +6,7 @@ module Travis
def setup
super
+ cmd "export PATH=/usr/local/ghc/#{ghc_version}/bin/:$PATH"
cmd 'cabal update', fold: 'cabal', retry: true
end
| 1 | module Travis
module Build
class Script
class Haskell < Script
DEFAULTS = {}
def setup
super
cmd 'cabal update', fold: 'cabal', retry: true
end
def announce
super
cmd 'ghc --version'
cmd 'cabal --version'
end
... | 1 | 11,071 | This should be ` /$(ghc_find #{config[:ghc]})/ ` instead of ` /#{ghc_version}/ `, I think. | travis-ci-travis-build | rb |
@@ -374,7 +374,7 @@ define(["appSettings", "browser", "events", "htmlMediaHelper"], function (appSet
return -1 !== supportedFeatures.indexOf(command.toLowerCase());
},
preferVisualCards: browser.android || browser.chrome,
- moreIcon: browser.android ? "dots-vert" : "dots-horiz",
+ ... | 1 | define(["appSettings", "browser", "events", "htmlMediaHelper"], function (appSettings, browser, events, htmlMediaHelper) {
"use strict";
function getBaseProfileOptions(item) {
var disableHlsVideoAudioCodecs = [];
if (item && htmlMediaHelper.enableHlsJsPlayer(item.RunTimeTicks, item.MediaType))... | 1 | 13,409 | We should deprecate this at some point. | jellyfin-jellyfin-web | js |
@@ -49,7 +49,9 @@ class FCOSHead(nn.Module):
use_sigmoid=True,
loss_weight=1.0),
conv_cfg=None,
- norm_cfg=dict(type='GN', num_groups=32, requires_grad=True)):
+ norm_cfg=dict(type='GN', num_groups=32, requires_grad=True),
+ ... | 1 | import torch
import torch.nn as nn
from mmcv.cnn import normal_init
from mmdet.core import distance2bbox, force_fp32, multi_apply, multiclass_nms
from ..builder import build_loss
from ..registry import HEADS
from ..utils import ConvModule, Scale, bias_init_with_prob
INF = 1e8
@HEADS.register_module
class FCOSHead(n... | 1 | 18,677 | Move these two arguments before `loss_cls`. | open-mmlab-mmdetection | py |
@@ -93,10 +93,16 @@ func GenerateSelfSignedX509CA(commonName string, extUsage []x509.ExtKeyUsage, ke
}
// GenerateServerX509UsingCA generates a TLS serverCert that is self-signed
-func GenerateServerX509UsingCA(commonName string, ca *tls.Certificate) (*tls.Certificate, *rsa.PrivateKey, error) {
+func GenerateServer... | 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 | 11,223 | [Super NIT]: i := serialNumber if i == 0 { i = mathrand.Int63n(...) } | temporalio-temporal | go |
@@ -14,8 +14,8 @@ namespace Microsoft.CodeAnalysis.Sarif.ConvertToSarif
public string InputFilePath { get; internal set; }
[Option(
- 'f',
- "format",
+ 't',
+ "tool",
HelpText = "The tool format of the input file.")]
public ToolForma... | 1 | // Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using CommandLine;
namespace Microsoft.CodeAnalysis.Sarif.ConvertToSarif
{
[Verb("convert", HelpText = "Convert a tool output log to SARIF format.")]
interna... | 1 | 10,158 | -f short form here collided with --force. :) | microsoft-sarif-sdk | .cs |
@@ -12,6 +12,5 @@ describe('preact', () => {
expect(cloneElement).to.be.a('function');
expect(createContext).to.be.a('function');
expect(options).to.exist.and.be.an('object');
- // expect(rerender).to.be.a('function');
});
}); | 1 | import { createElement, h, createContext, Component, Fragment, render, hydrate, cloneElement, options } from '../../src/index';
import { expect } from 'chai';
describe('preact', () => {
it('should be available as named exports', () => {
expect(h).to.be.a('function');
expect(createElement).to.be.a('function');
e... | 1 | 12,912 | I think it is better to describe in the release note that `rerender()` was removed. | preactjs-preact | js |
@@ -3,5 +3,5 @@ VERSION = ".".join(str(i) for i in IVERSION)
PATHOD = "pathod " + VERSION
MITMPROXY = "mitmproxy " + VERSION
-if __name__ == "__main__":
+if __name__ == "__main__": # pragma: no cover
print(VERSION) | 1 | IVERSION = (2, 0, 0)
VERSION = ".".join(str(i) for i in IVERSION)
PATHOD = "pathod " + VERSION
MITMPROXY = "mitmproxy " + VERSION
if __name__ == "__main__":
print(VERSION)
| 1 | 12,749 | We could also test this easily with `runpy.run_module`, what do you think? | mitmproxy-mitmproxy | py |
@@ -388,8 +388,10 @@ func decode(v reflect.Value, d Decoder) error {
if err != nil {
return err
}
- v.Set(reflect.ValueOf(val))
- return nil
+ if v.Type().AssignableTo(reflect.TypeOf(val)) {
+ v.Set(reflect.ValueOf(val))
+ return nil
+ }
}
// Handle implemented interfaces first. | 1 | // Copyright 2019 The Go Cloud Development Kit Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appli... | 1 | 20,363 | Is it OK to fall through if it's not assignable? I was kind of surprised when the tests passed. Maybe one of the options below ends up working? For the new tests, this panics because `**not assignable uuid.UUID to []uint8**`. `uuid.UUID` is an array, not a slice. | google-go-cloud | go |
@@ -133,7 +133,8 @@ func runAPIAndWait(ctx context.Context, nd *node.Node, config *config.Config, re
ctx: context.Background(),
api: api,
porcelainAPI: nd.PorcelainAPI,
- blockpAPI: nd.BlockAPI,
+ blockAPI: nd.BlockAPI,
+ retrievalAPI: nd.RetrievalAPI,
}
cfg := cmdhttp.NewServ... | 1 | package commands
import (
"context"
"fmt"
"net/http"
_ "net/http/pprof" // nolint: golint
"os"
"os/signal"
"syscall"
"time"
ma "gx/ipfs/QmNTCey11oxhb1AxDnQBRHtdhap6Ctud872NjAYPYYXPuc/go-multiaddr"
"gx/ipfs/QmQtQrtNioesAWtrx8csBvfY37gTe94d6wQ3VikZUjxD39/go-ipfs-cmds"
cmdhttp "gx/ipfs/QmQtQrtNioesAWtrx8csBvf... | 1 | 17,912 | I know this is after the fact but imo blockAPI should be blockMiningAPI. | filecoin-project-venus | go |
@@ -13,7 +13,11 @@ use Ergonode\SharedKernel\Domain\AbstractCode;
class AttributeCode extends AbstractCode
{
- public const PATTERN = '/^([a-zA-Z0-9_]+)$/';
+ public const NOT_SYSTEM_ATTRIBUTE_PATTERN = '/^(?!'.self::SYSTEM_ATTRIBUTE_PREFIX.')[a-zA-Z0-9_]+$/';
+
+ public const SYSTEM_ATTRIBUTE_PATTERN = '/... | 1 | <?php
/**
* Copyright © Ergonode Sp. z o.o. All rights reserved.
* See LICENSE.txt for license details.
*/
declare(strict_types=1);
namespace Ergonode\Attribute\Domain\ValueObject;
use Ergonode\SharedKernel\Domain\AbstractCode;
class AttributeCode extends AbstractCode
{
public const PATTERN = '/^([a-zA-Z0-9... | 1 | 9,621 | it's just a pattern as it was. SystemAttributeCode should have it's own definition and validate by it | ergonode-backend | php |
@@ -0,0 +1,17 @@
+/* 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 "LookUpEdgeIndexProcessor.h"
+
+namespace nebula {
+namespace storage {
+
+void LookUpE... | 1 | 1 | 26,081 | Similar to the code block when we use prefix, maybe we can unify them to base? | vesoft-inc-nebula | cpp | |
@@ -100,6 +100,15 @@ func (in *PodChaos) ValidateScheduler(spec *field.Path) field.ErrorList {
allErrs = append(allErrs, err...)
}
break
+ case PodNotReadyAction:
+ // We choose to ignore the Duration property even user define it
+ if in.Spec.Scheduler == nil {
+ allErrs = append(allErrs, field.Invalid(sc... | 1 | // Copyright 2020 Chaos Mesh 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 | 17,830 | I think `Duration` is useful for this action and we shouldn't ignore it. | chaos-mesh-chaos-mesh | go |
@@ -243,13 +243,10 @@ func (s *stream) Write(p []byte) (int, error) {
s.mutex.Lock()
}
- if err != nil {
- return 0, err
- }
if s.err != nil {
- return len(p) - len(s.dataForWriting), s.err
+ err = s.err
}
- return len(p), nil
+ return len(p) - len(s.dataForWriting), err
}
func (s *stream) GetWriteOff... | 1 | package quic
import (
"context"
"fmt"
"io"
"net"
"sync"
"time"
"github.com/lucas-clemente/quic-go/internal/flowcontrol"
"github.com/lucas-clemente/quic-go/internal/protocol"
"github.com/lucas-clemente/quic-go/internal/utils"
"github.com/lucas-clemente/quic-go/internal/wire"
)
type streamI interface {
Stre... | 1 | 7,110 | Everything below here can be replaced with `return s.err, len(p) - len(s.dataForWriting)`. | lucas-clemente-quic-go | go |
@@ -84,6 +84,12 @@ namespace Impl {
HIPLockArrays g_host_hip_lock_arrays = {nullptr, nullptr, 0};
void initialize_host_hip_lock_arrays() {
+#ifdef KOKKOS_ENABLE_IMPL_DESUL_ATOMICS
+ desul::Impl::init_lock_arrays();
+
+ DESUL_ENSURE_HIP_LOCK_ARRAYS_ON_DEVICE();
+#endif
+
if (g_host_hip_lock_arrays.atomic != nul... | 1 | /*
//@HEADER
// ************************************************************************
//
// Kokkos v. 3.0
// Copyright (2020) National Technology & Engineering
// Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Govern... | 1 | 17,217 | Again, we can also guard `g_host_hip_lock_arrays.atomic`, can't we? | kokkos-kokkos | cpp |
@@ -69,12 +69,13 @@ class ImportSimpleProductCommandHandler
);
if (!empty($attributesToRedispatch)) {
- $this->commandBus->dispatch(new ImportProductAttributesValueCommand(
+ $ImportProductAttributesValueCommand = new ImportProductAttributesValueCommand(
... | 1 | <?php
/**
* Copyright © Ergonode Sp. z o.o. All rights reserved.
* See LICENSE.txt for license details.
*/
declare(strict_types=1);
namespace Ergonode\Importer\Infrastructure\Handler;
use Ergonode\Importer\Domain\Command\Import\Attribute\ImportProductAttributesValueCommand;
use Ergonode\Importer\Infrastructure\Fi... | 1 | 9,526 | Variable name should start from lowercase latter | ergonode-backend | php |
@@ -47,12 +47,12 @@ import (
// certificate, ca, and private key is stored into the target Secret to
// complete Issuing the Certificate.
func TestIssuingController(t *testing.T) {
- config, stopFn := framework.RunControlPlane(t)
- defer stopFn()
-
- ctx, cancel := context.WithTimeout(context.Background(), time.Seco... | 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 | 29,104 | Why has this timeout doubled? | jetstack-cert-manager | go |
@@ -113,7 +113,7 @@ type Config struct {
IptablesRefreshInterval time.Duration `config:"seconds;90"`
IptablesPostWriteCheckIntervalSecs time.Duration `config:"seconds;30"`
IptablesLockFilePath string `config:"file;/run/xtables.lock"`
- IptablesLockTimeoutSecs time.Durati... | 1 | // Copyright (c) 2016-2017 Tigera, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by ... | 1 | 15,520 | Should IptablesPostWriteCheckIntervalSecs be set back to its previous smaller value, if use of the iptables lock is disabled? | projectcalico-felix | go |
@@ -335,6 +335,13 @@ class WebEngineCaret(browsertab.AbstractCaret):
"""
if js_elem is None:
return
+ if js_elem == "focused":
+ # we had a focused element, not a selected one. Just send <enter>
+ if tab:
+ self._tab.key_press(Qt.Key_Enter, modi... | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | 1 | 21,464 | You're missing a `return` here, but I'll add it :smile: | qutebrowser-qutebrowser | py |
@@ -116,7 +116,7 @@ static bool gles2_render_texture_with_matrix(struct wlr_renderer *wlr_renderer,
struct wlr_gles2_renderer *renderer =
gles2_get_renderer_in_context(wlr_renderer);
struct wlr_gles2_texture *texture =
- get_gles2_texture_in_context(wlr_texture);
+ gles2_get_texture(wlr_texture);
struct wl... | 1 | #include <assert.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <wayland-server-protocol.h>
#include <wayland-util.h>
#include <wlr/render/egl.h>
#include <wlr/render/interface.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_matrix... | 1 | 12,196 | Can you try adding back this assertion? I'd like to assert that the texture has been created in the same context as the renderer. | swaywm-wlroots | c |
@@ -234,7 +234,8 @@ class RouteFactory(object):
required_permission = self.method_permissions.get(method)
# For create permission, the object id is the plural endpoint.
- collection_path = service.collection_path.format(**request.matchdict)
+ plural_endpoint = service.collection_path.d... | 1 | import functools
from pyramid.settings import aslist
from pyramid.security import IAuthorizationPolicy, Authenticated
from zope.interface import implementer
from kinto.core import utils
from kinto.core.storage import exceptions as storage_exceptions
from kinto.core.authentication import prefixed_userid
# A permissio... | 1 | 10,212 | This won't work with Python 3 because it will already be a string. In that case we need to use `decode_header` from utils. | Kinto-kinto | py |
@@ -28,6 +28,8 @@ module Mongoid
raise Errors::InvalidDiscriminatorKeyTarget.new(self, self.superclass)
end
+ self._clear_types if self.respond_to?(:_clear_types)
+
if value
Mongoid::Fields::Validators::Macro.validate_field_name(self, value)
value = value.to_s | 1 | # frozen_string_literal: true
# encoding: utf-8
require "mongoid/fields/validators/macro"
module Mongoid
# Provides behavior around traversing the document graph.
#
# @since 4.0.0
module Traversable
extend ActiveSupport::Concern
def _parent
@__parent ||= nil
end
def _parent=(p)
... | 1 | 12,715 | Why is the respond_to check here? | mongodb-mongoid | rb |
@@ -229,7 +229,7 @@ class FunctionDocblockManipulator
continue;
}
- if ($chars[$i] === '\\' || preg_match('/\w/', $char)) {
+ if ($char === '\\' || preg_match('/\w/', $char)) {
if ($this->return_typehint_start === null) {
$this-... | 1 | <?php
namespace Psalm\Internal\FileManipulation;
use PhpParser;
use PhpParser\Node\Expr\ArrowFunction;
use PhpParser\Node\Expr\Closure;
use PhpParser\Node\FunctionLike;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Function_;
use Psalm\DocComment;
use Psalm\FileManipulation;
use Psalm\Internal\Analyzer\... | 1 | 11,324 | @orklah are you sure it's the same as `$chars[$i]`? It looks like `$i` is changed above, after `$char` assignment. | vimeo-psalm | php |
@@ -22,7 +22,7 @@ TEST(DeleteVertexTest, SimpleTest) {
std::unique_ptr<kvstore::KVStore> kv(TestUtils::initKV(rootPath.path()));
// Add vertices
{
- auto* processor = AddVerticesProcessor::instance(kv.get(), nullptr, nullptr);
+ auto* processor = AddVerticesProcessor::instance(kv.get(), nul... | 1 | /* Copyright (c) 2019 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "base/Base.h"
#include <gtest/gtest.h>
#include <rocksdb/db.h>
#include "fs/TempDir.h"
#include "storage/test/T... | 1 | 26,557 | I have a question? How do I construct a indexManager for testcase? | vesoft-inc-nebula | cpp |
@@ -73,6 +73,9 @@ int __FPGA_API__ opae_plugin_configure(opae_api_adapter_table *adapter,
{
UNUSED_PARAM(jsonConfig);
+ if (adapter == NULL || adapter->plugin.dl_handle == NULL)
+ return -1;
+
adapter->fpgaOpen = dlsym(adapter->plugin.dl_handle, "xfpga_fpgaOpen");
adapter->fpgaClose =
dlsym(adapter->plugin... | 1 | // Copyright(c) 2018, Intel Corporation
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the ... | 1 | 19,087 | These checks aren't needed. See pluginmgr.c : opae_plugin_mgr_load_dflt_plugins( ). | OPAE-opae-sdk | c |
@@ -554,15 +554,14 @@ class SearchRequest
/**
* Method to check if the query string is an empty string
- * (also empty string or whitespaces only are handled as empty).
+ * (also whitespaces only are handled as empty).
*
* When no query string is set (null) the method returns false.
... | 1 | <?php
namespace ApacheSolrForTypo3\Solr\Domain\Search;
/***************************************************************
* Copyright notice
*
* (c) 2015-2016 Timo Schmidt <timo.schmidt@dkd.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can ... | 1 | 6,937 | Please take a care about prefixing. | TYPO3-Solr-ext-solr | php |
@@ -70,6 +70,17 @@ public interface WorldUpdater extends MutableWorldView {
return account == null ? createAccount(address) : account;
}
+ /**
+ * Retrieves the provided account for a sender of a transaction if it exists, or creates it if it
+ * doesn't.
+ *
+ * @param address the address of the acco... | 1 | /*
* Copyright ConsenSys AG.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing... | 1 | 24,568 | this line doesn't match what the rest says | hyperledger-besu | java |
@@ -1,4 +1,4 @@
-// +build !linux linux,android
+// +build windows linux,android
/*
* Copyright (C) 2017 The "MysteriumNetwork/node" Authors. | 1 | // +build !linux linux,android
/*
* 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 you... | 1 | 13,152 | Since it's not working for linux, maybe leave the !linux in there as well? | mysteriumnetwork-node | go |
@@ -60,6 +60,9 @@ func (i *IncludeWorkflow) populate(ctx context.Context, s *Step) error {
// Copy Sources up to parent resolving relative paths as we go.
for k, v := range i.w.Sources {
+ if v == "" {
+ continue
+ }
if _, ok := s.w.Sources[k]; ok {
return fmt.Errorf("source %q already exists in workfl... | 1 | // Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... | 1 | 6,618 | Should we remove the key-value pair entirely? Same for workflows in general. We have a "sourceExists" method that checks if a key is there if I remember correctly. | GoogleCloudPlatform-compute-image-tools | go |
@@ -96,7 +96,7 @@ public class ContentSoqlSyncDownTarget extends SoqlSyncDownTarget {
@Override
public JSONArray startFetch(SyncManager syncManager, long maxTimeStamp) throws IOException, JSONException {
- String queryToRun = maxTimeStamp > 0 ? SoqlSyncDownTarget.addFilterForReSync(getQuery(), maxTim... | 1 | /*
* Copyright (c) 2015, 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 notice, this... | 1 | 15,589 | Unrelated bug fix | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -173,15 +173,15 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
};
if (status === 'completed') {
- notification.title = globalize.translate('PackageInstallCompleted').replace('{0}', installation.Name + ' ' + installation.Version);
+ ... | 1 | define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'require'], function (serverNotifications, playbackManager, events, globalize, require) {
'use strict';
function onOneDocumentClick() {
document.removeEventListener('click', onOneDocumentClick);
document.removeEventListene... | 1 | 13,797 | We probably want to let the translation library handle the string replacement for these as well. | jellyfin-jellyfin-web | js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.