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 |
|---|---|---|---|---|---|---|---|
@@ -52,6 +52,13 @@ type ChaosCondition struct {
Reason string `json:"reason"`
}
+const (
+ Injecting string = "injecting"
+ Running string = "running"
+ Finished string = "finished"
+ Paused string = "paused"
+)
+
type DesiredPhase string
const ( | 1 | // Copyright 2019 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 | 22,362 | using a certain type instead of using string directly. | chaos-mesh-chaos-mesh | go |
@@ -761,7 +761,7 @@ func TestCrConflictMergedRenameSetMtimeFile(t *testing.T) {
)
}
-// alice and both both rename(the same file, causing a copy.),
+// alice and both both rename the same file, causing a copy.,
func TestCrConflictRenameSameFile(t *testing.T) {
test(t,
users("alice", "bob"), | 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.
// These tests all do multiple operations while a user is unstaged.
package test
import (
"testing"
"time"
)
// bob and alice both write(to the same file),
func Tes... | 1 | 16,625 | fix trailing , | keybase-kbfs | go |
@@ -16,7 +16,7 @@
<% end %>
... <%= t'trace.trace.ago', :time_in_words_ago => time_ago_in_words(trace.timestamp) %></span>
<%= link_to t('trace.trace.more'), {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id}, {:title => t('trace.trace.trace_detai... | 1 | <tr>
<% cl = cycle('table0', 'table1') %>
<td class="<%= cl %>">
<% if STATUS != :gpx_offline %>
<% if trace.inserted %>
<a href="<%= url_for :controller => 'trace', :action => 'view', :id => trace.id, :display_name => trace.user.display_name %>"><img src="<%= url_for :controller => 'trace', :acti... | 1 | 11,034 | I've fixed it for this change but for future reference there's no point doing string substitution for a single value like that - it will just slow things down. Just use `:mlat => trace.latitude` etc instead. | openstreetmap-openstreetmap-website | rb |
@@ -10,11 +10,7 @@ namespace Ergonode\Product\Application\Model\Product\Attribute\Update;
use Symfony\Component\Validator\Constraints as Assert;
use Ergonode\Attribute\Application\Validator as AttributeAssert;
-use Ergonode\Product\Application\Validator as ProductAssert;
-/**
- * @ProductAssert\ProductAttribute()... | 1 | <?php
/**
* Copyright © Ergonode Sp. z o.o. All rights reserved.
* See LICENSE.txt for license details.
*/
declare(strict_types=1);
namespace Ergonode\Product\Application\Model\Product\Attribute\Update;
use Symfony\Component\Validator\Constraints as Assert;
use Ergonode\Attribute\Application\Validator as Attribut... | 1 | 9,722 | The form no logger needs validation? | ergonode-backend | php |
@@ -42,7 +42,7 @@ namespace OpenTelemetry.Metrics
if (this.getMetrics != null)
{
var metricsToExport = this.getMetrics(this.isDelta);
- if (metricsToExport != null)
+ if (metricsToExport != null && metricsToExport.Metrics.Count > 0)
... | 1 | // <copyright file="PullMetricProcessor.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.ap... | 1 | 20,732 | there'd be more changes in the area, when we implement "clean-up" of aggregators if no new updates. (i think we currently send metricitem to exporters with zero as value) | open-telemetry-opentelemetry-dotnet | .cs |
@@ -52,7 +52,9 @@ class CollectionViewTest(BaseWebTest, unittest.TestCase):
self.app.put_json('/buckets/sodas',
MINIMALIST_BUCKET,
headers=self.headers)
- self.app.get(other_bucket, headers=self.headers, status=404)
+ resp = self.app.get(other... | 1 | import unittest
from kinto.core.testing import get_user_headers
from .support import (BaseWebTest, MINIMALIST_BUCKET,
MINIMALIST_COLLECTION, MINIMALIST_RECORD)
class CollectionViewTest(BaseWebTest, unittest.TestCase):
collections_url = '/buckets/beers/collections'
collection_url = '/b... | 1 | 9,982 | Usually we only keep the assertions that are relevant to the specification (ie. the test title). For example, the test on the values of id and details is not properly relevant for the spec _collections are isolated by bucket_. I suggest that you only keep the assertions regarding `details` in dedicated tests similar to... | Kinto-kinto | py |
@@ -28,7 +28,7 @@ public class FieldAccessGenericParameter<T extends GenericClass<String, GenericC
<C extends Number> FieldAccessGenericParameter() {
C constructorGeneric = null;
- // access type dependant on constructor type arugments
+ // access type dependant on constructor type argumen... | 1 | /**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.typeresolution.testdata;
import net.sourceforge.pmd.typeresolution.testdata.dummytypes.GenericClass;
public class FieldAccessGenericParameter<T extends GenericClass<String, GenericClass<String, Integer... | 1 | 17,814 | The test sources are ok though, you don't need to remove those changes | pmd-pmd | java |
@@ -72,7 +72,7 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan
var apiClient = connectionManager.getApiClient(item.ServerId);
var options = {
- width: width,
+ maxWidth: width * 2,
type: "Primary"
};
| 1 | define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutManager', 'globalize', 'datetime', 'apphost', 'css!./listview', 'emby-ratingbutton', 'emby-playstatebutton'], function (itemHelper, mediaInfo, indicators, connectionManager, layoutManager, globalize, datetime, appHost) {
'use strict';
... | 1 | 13,594 | `maxWidth: width * 2,` Potentially, this will be the same as `getImageUrl`: 80px or 500px. I can't verify this - need for normal LiveTV tuner. | jellyfin-jellyfin-web | js |
@@ -161,9 +161,11 @@ public class EnginesFilter extends AbstractFilter {
* @return True if the given engine category fulfills the filter, false otherwise
*/
public boolean filter(EngineCategoryDTO engineCategory) {
- return searchTerm.map(
- searchTerm -> engineCategory.getSubCate... | 1 | package org.phoenicis.javafx.views.mainwindow.engines;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import org.phoenicis.engines.dto.EngineCategoryDTO;
import org.phoenicis.engines.dto.EngineSubCategoryDTO;
import org.phoenicis.engines.dto.EngineVersionDTO;
import o... | 1 | 12,467 | Not really related to this issue but should we use fuzzy search here as well (like for apps)? | PhoenicisOrg-phoenicis | java |
@@ -11,10 +11,10 @@ const mdUsageStr = `Usage:
kbfstool md [<subcommand>] [<args>]
The possible subcommands are:
- dump Dump metadata objects
- check Check metadata objects and their associated blocks for errors
- reset Reset a broken top-level folder
-
+ dump Dump metadata objects
+ check Che... | 1 | package main
import (
"fmt"
"github.com/keybase/kbfs/libkbfs"
"golang.org/x/net/context"
)
const mdUsageStr = `Usage:
kbfstool md [<subcommand>] [<args>]
The possible subcommands are:
dump Dump metadata objects
check Check metadata objects and their associated blocks for errors
reset Reset a broken to... | 1 | 14,600 | isn't the usual capitalization for subcommands force-qr? (don't care too much about it) | keybase-kbfs | go |
@@ -38,7 +38,7 @@ import java.lang.reflect.Proxy;
name = "ProxyNonConstantType",
link = "https://github.com/palantir/gradle-baseline#baseline-error-prone-checks",
linkType = LinkType.CUSTOM,
- severity = SeverityLevel.SUGGESTION,
+ severity = SeverityLevel.WARNING,
summ... | 1 | /*
* (c) Copyright 2020 Palantir Technologies 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 ... | 1 | 9,151 | Do you know how many repos have hit this? | palantir-gradle-baseline | java |
@@ -1,3 +1,13 @@
+<% if @filter.present? %>
+ <p><%= _(<<-TEXT
+ The data on the usage dashboard is historical in nature. This means that the number of records below may not
+ match the count shown on the usage dashboard. For example if one of your users created a plan in October and
+ then removed that plan ... | 1 | <div class="table-responsive">
<table class="table table-hover" id="my-plans">
<thead>
<tr>
<th scope="col"><%= _('Project Title') %> <%= paginable_sort_link('plans.title') %></th>
<th scope="col"><%= _('Template') %> <%= paginable_sort_link('templates.title') %></th>
<th s... | 1 | 18,982 | I'll be interested to see if our gettext rake tasks will pick up on this text to translate | DMPRoadmap-roadmap | rb |
@@ -933,6 +933,7 @@ void LuaScriptInterface::pushInstantSpell(lua_State* L, const InstantSpell& spel
setField(L, "mlevel", spell.getMagicLevel());
setField(L, "mana", spell.getMana());
setField(L, "manapercent", spell.getManaPercent());
+ setField(L, "params", spell.getHasParam());
setMetatable(L, -1, "Spell"... | 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,363 | I think you need to change line 928 value from 6 to 7 too, since now table will have 7 values | otland-forgottenserver | cpp |
@@ -126,3 +126,14 @@ def test_split_into_nhot_long(seed, st):
assert set(f1.names) == set(fr.names)
f1 = f1[..., fr.names]
assert f1.to_list() == fr.to_list()
+
+
+def test_split_into_nhot_view():
+ f0 = dt.Frame(A=["cat,dog,mouse", "mouse", None, "dog, cat"])
+ f1 = dt.split_into_nhot(f0[::-1, :])
+ ... | 1 | #!/usr/bin/env python
#-------------------------------------------------------------------------------
# Copyright 2018 H2O.ai
#
# 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://w... | 1 | 11,420 | Does `f0[::-1, :]` mean all the rows taken in a reverse order? | h2oai-datatable | py |
@@ -30,7 +30,7 @@ public class JavaProcessJobTest
" By JULIE BOSMAN \n" +
"Published: August 11, 2010 \n" +
" \n" +
- "Twelve years later, it may be Joe Fox�s turn to worry. Readers have gone from skipping small \n" +
+ "Twelve years later, it may be Joe Fox���s turn to worry. Readers have gone fro... | 1 | package azkaban.test.jobExecutor;
import java.io.IOException;
import java.util.Date;
import java.util.Properties;
import org.apache.log4j.Logger;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import azkaban.utils.Props;
import azka... | 1 | 9,638 | Looks like there are strange characters here. | azkaban-azkaban | java |
@@ -97,7 +97,7 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
status.Experiment.Phase = v1alpha1.ExperimentPhaseFinished
status.FailedMessage = emptyString
- } else if chaos.IsPaused() {
+ } else if chaos.GetPause() != "" {
if status.Experiment.Phase == v1alpha1.ExperimentPhaseRun... | 1 | // Copyright 2019 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,320 | It is better to have a check to ensure the format is valid. | chaos-mesh-chaos-mesh | go |
@@ -22,14 +22,16 @@ namespace AutoRest.Go.TemplateModels
private readonly string lroDescription = " This method may poll for completion. Polling can be canceled by passing the cancel channel argument. " +
"The channel will be used to cancel polling and any outs... | 1 | // Copyright (c) Microsoft Open Technologies, Inc. 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.Globalization;
using System.Linq;
using System.Net;
using AutoRest.Core.ClientModel;
usi... | 1 | 23,107 | How about `nextAlreadyDefined` variable name in method signature? | Azure-autorest | java |
@@ -459,7 +459,7 @@ func (s *clientIntegrationSuite) TestClientDataConverter_WithChild() {
// to ensure custom data converter is used, this number might be different if client changed.
d := dc.(*testDataConverter)
- s.Equal(3, d.NumOfCallToPayloads)
+ s.Equal(2, d.NumOfCallToPayloads)
s.Equal(2, d.NumOfCallFrom... | 1 | // The MIT License
//
// Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
//
// Copyright (c) 2020 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Soft... | 1 | 13,578 | In older SDK versions the data converter was called 3 times but now it is 2. This is because logic was changed deep in the interceptor chains on when values are serialized and encoded and such. Previously we invoked the data converter on results _even if there was an error_ (and most of the time they were nil). Now we ... | temporalio-temporal | go |
@@ -17,6 +17,7 @@ limitations under the License.
package main
import (
+ "github.com/google/knative-gcp/pkg/reconciler/events/build"
// The following line to load the gcp plugin (only required to authenticate against GKE clusters).
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
| 1 | /*
Copyright 2019 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
dist... | 1 | 10,733 | formatting... can this import go next to the other sources ones? | google-knative-gcp | go |
@@ -286,10 +286,10 @@ const char *options_list_str =
" -early Requests early injection (the default).\n"
" -late Requests late injection.\n"
# endif
- " -attach <pid> Attach to the process with the given pid. Pass 0\n"
- " ... | 1 | /* **********************************************************
* Copyright (c) 2011-2018 Google, Inc. All rights reserved.
* Copyright (c) 2008-2010 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or witho... | 1 | 15,258 | I don't understand why anyone would pass 0? If you don't want to attach to an existing process you just wouldn't pass -attach. I would remove that sentence and make 0 an invalid argument. | DynamoRIO-dynamorio | c |
@@ -77,8 +77,6 @@ void (*volatile s_current_function)(ThreadsExec &, const void *);
const void *volatile s_current_function_arg = nullptr;
struct Sentinel {
- Sentinel() {}
-
~Sentinel() {
if (s_thread_pool_size[0] || s_thread_pool_size[1] ||
s_thread_pool_size[2] || s_current_reduce_size || | 1 | /*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this softw... | 1 | 21,532 | This change is responsible for #2775 | kokkos-kokkos | cpp |
@@ -88,7 +88,11 @@ namespace Datadog.Trace.Tests.RuntimeMetrics
writer.PushEvents();
statsd.Verify(
- s => s.Increment(MetricsNames.ExceptionsCount, It.IsAny<int>(), It.IsAny<double>(), It.IsAny<string[]>()),
+ s => s.Increment(MetricsNames.Excep... | 1 | using System;
using System.Linq;
using System.Threading;
using Datadog.Trace.RuntimeMetrics;
using Datadog.Trace.Vendors.StatsdClient;
using Moq;
using Xunit;
namespace Datadog.Trace.Tests.RuntimeMetrics
{
[CollectionDefinition(nameof(RuntimeMetricsWriterTests), DisableParallelization = true)]
[Collection(name... | 1 | 19,343 | Should we add this to the other "never" verification in lines 71-73 above, too? | DataDog-dd-trace-dotnet | .cs |
@@ -175,12 +175,12 @@ class CaiApiClientImpl(gcp.ApiClientImpl):
dict: Generator of datasets.
"""
- resources = list(self.dao.iter_cai_assets(
+ resources = self.dao.iter_cai_assets(
ContentTypes.resource,
'google.cloud.bigquery.Dataset',
'//c... | 1 | # Copyright 2018 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 1 | 33,512 | Fixed this since it no longer needed to be switched from a generator to a list, this was missed when I cleaned up the dataset code in an earlier PR. | forseti-security-forseti-security | py |
@@ -70,7 +70,7 @@ public class NodeOptions {
Capabilities caps = info.getCanonicalCapabilities();
builders.stream()
.filter(builder -> builder.score(caps) > 0)
- .peek(builder -> LOG.info(String.format("Adding %s %d times", caps, info.getMaximumSimultaneousSessions())))
+ .pee... | 1 | // Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you m... | 1 | 17,124 | This is an informational message that allows someone to read the console output and understand how the grid node is configured. Please leave. | SeleniumHQ-selenium | java |
@@ -5,5 +5,17 @@ class ContributorFact < NameFact
.where(analysis_id: project.best_analysis_id)
.where.not(name_id: Position.where.not(name_id: nil).where(project_id: project.id).select(:name_id))
end
+
+ def first_for_name_id_and_project_id(name_id, project_id)
+ sql = <<-SQL
+ SE... | 1 | class ContributorFact < NameFact
class << self
def unclaimed_for_project(project)
ContributorFact.where.not(name_id: nil)
.where(analysis_id: project.best_analysis_id)
.where.not(name_id: Position.where.not(name_id: nil).where(project_id: project.id).select(:name_id))
end
end
end
| 1 | 7,038 | Can we convert this to an arel as below ContributorFact .joins(:project).where(projects: { id: project_id}) .where('name_id = ? or name_id in (?)', name_id, AnalysisAlias.select(:preferred_name_id) .joins(:project) .where(commit_name_id: name_id) ) | blackducksoftware-ohloh-ui | rb |
@@ -11,6 +11,12 @@ import (
type DevicesGroup struct {
}
+type CgroupParams struct {
+ initpid int
+}
+
+var cg CgroupParams
+
func (s *DevicesGroup) Name() string {
return "devices"
} | 1 | // +build linux
package fs
import (
"github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runc/libcontainer/system"
)
type DevicesGroup struct {
}
func (s *DevicesGroup) Name() string {
return "devices"
}
func (s *DevicesGroup) Ap... | 1 | 9,879 | Does this cause issues if you have lots of load on the machine? Having a global variable for this seems like a bad idea IMO. | opencontainers-runc | go |
@@ -1374,7 +1374,15 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
privacyParametersBuilder.setEnabled(true);
privacyParametersBuilder.setEnclaveUrl(privacyUrl);
if (privacyPublicKeyFile() != null) {
- privacyParametersBuilder.setEnclavePublicKeyUsingFile(privacyPubl... | 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 | 20,776 | We probably don't need to print the msg with e.getMessage(). It will be printed by the logger since we are passing the exception as a parameter. | hyperledger-besu | java |
@@ -29,17 +29,6 @@ from molecule.verifier import testinfra
from molecule.verifier.lint import flake8
-@pytest.fixture
-def _patched_testinfra_get_tests(mocker):
- m = mocker.patch('molecule.verifier.testinfra.Testinfra._get_tests')
- m.return_value = [
- 'foo.py',
- 'bar.py',
- ]
-
- retu... | 1 | # Copyright (c) 2015-2018 Cisco Systems, 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 | 7,812 | Can we get a test with multiple directories as per the initial example? | ansible-community-molecule | py |
@@ -317,8 +317,15 @@ def getStatusBar():
if not location:
return None
left, top, width, height = location
- bottom = top + height - 1
- obj = getDesktopObject().objectFromPoint(left, bottom)
+ x=1
+ while x<12:
+ bottom = top + height - x
+ if left<0:
+ left=0
+ obj = getDesktopObject().objectFromPoint(left... | 1 | #api.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2006-2012 NVDA Contributors
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
"""General functions for NVDA"""
import config
import textInfos
import review
import globalVars
from logHandler imp... | 1 | 17,530 | I assume this is because you were seeing cases where left was a negative number? When? | nvaccess-nvda | py |
@@ -11,10 +11,10 @@
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
-#include "fix_deposit.h"
-#include <mpi.h>
#include <cmath>
+#include <cstdlib>
#include <cstring>
+#include "fix_deposit.h"
#include "atom.h"
#include "ato... | 1 | /* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04... | 1 | 27,002 | this is undoing recent changes for increased consistency of include file statements. please restore to the original. | lammps-lammps | cpp |
@@ -24,12 +24,13 @@ public class BaselineErrorProneExtension {
private static final ImmutableList<String> DEFAULT_PATCH_CHECKS = ImmutableList.of(
// Baseline checks
+ "LambdaMethodReference",
+ "OptionalOrElseMethodInvocation",
"PreferBuiltInConcurrentKeySet",
... | 1 | /*
* (c) Copyright 2019 Palantir Technologies 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 ... | 1 | 7,271 | If these are applied in order, should `LambdaMethoReference` come after `OptionalOrElseMethodInvocation` | palantir-gradle-baseline | java |
@@ -42,7 +42,7 @@ namespace Microsoft.CodeAnalysis.Sarif
/// A dictionary whose keys are the strings representing the locations of scanned files
/// and whose values provide information about those files.
/// </param>
- void WriteFiles(IDictionary<string, IList<FileData>> fileDictionar... | 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.Collections.Generic;
namespace Microsoft.CodeAnalysis.Sarif
{
/// <summary>This interface serves as a sink for <see cref="SarifLog"/> format issues.<... | 1 | 10,856 | Why this rename? | microsoft-sarif-sdk | .cs |
@@ -149,7 +149,7 @@ def _patch_sysmodules():
try:
yield
finally:
- if mock_main:
+ if mock_main and sys.version_info < (3, 3):
sys.modules.pop("__main__")
| 1 | # -*- coding: utf-8 -*-
# Copyright (c) 2006-2015 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2008 Fabrice Douchant <Fabrice.Douchant@logilab.fr>
# Copyright (c) 2009 Vincent
# Copyright (c) 2009 Mads Kiilerich <mads@kiilerich.com>
# Copyright (c) 2011-2014 Google, Inc.
# Copyright (c) 2012 David ... | 1 | 10,882 | Why do we do this check here? `sys.version_info` cannot be less than 3.3 as pylint does not support older versions. I think we should avoid popping `__main__` altogether. | PyCQA-pylint | py |
@@ -199,6 +199,7 @@ def serv_cmd(codechecker_cfg, test_config):
'--port',
str(codechecker_cfg['viewer_port'])
])
+ # server_cmd.extend(['--verbose', 'debug'])
psql_cfg = codechecker_cfg.get('pg_db_config')
if psql_cfg: | 1 | # -----------------------------------------------------------------------------
# The CodeChecker Infrastructure
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
# ---------------------------------------------------------------------... | 1 | 7,496 | This can be removed too. | Ericsson-codechecker | c |
@@ -371,8 +371,11 @@ func (md *MDServerMemory) Put(ctx context.Context, rmds *RootMetadataSigned) err
// Consistency checks
if head != nil {
- err := head.MD.CheckValidSuccessorForServer(
- md.config.Crypto(), &rmds.MD)
+ id, err := md.config.Crypto().MakeMdID(&head.MD)
+ if err != nil {
+ return err
+ }
... | 1 | // Copyright 2016 Keybase Inc. All rights reserved.
// Use of this source code is governed by a BSD
// license that can be found in the LICENSE file.
package libkbfs
import (
"bytes"
"errors"
"fmt"
"reflect"
"sync"
"time"
"github.com/keybase/client/go/logger"
keybase1 "github.com/keybase/client/go/protocol"
... | 1 | 12,078 | I'm a little worried about the new extra calls to `MakeMdId`, since in most local-server KBFS profiles, hashing is the biggest CPU user, and not re-using the value calculated by the client will result in even more hashing. That said, I understand why you did it this way, and I don't have a concrete suggestion on how to... | keybase-kbfs | go |
@@ -29,9 +29,12 @@ import PreviewTable from 'GoogleComponents/preview-table';
*/
import { isDataZeroForReporting, getTopPagesReportDataDefaults } from '../util';
-const { __ } = wp.i18n;
-const { map } = lodash;
-const { Component } = wp.element;
+/**
+ * WordPress dependencies
+ */
+import { __ } from '@wordpress... | 1 | /**
* WPAnalyticsDashboardWidgetTopPagesTable component.
*
* Site Kit by Google, Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.... | 1 | 24,752 | `lodash` shouldn't be grouped under WordPress dependencies | google-site-kit-wp | js |
@@ -1,6 +1,7 @@
+# -*- coding: UTF-8 -*-
#appModules/miranda32.py
#A part of NonVisual Desktop Access (NVDA)
-#Copyright (C) 2006-2012 NVDA Contributors
+#Copyright (C) 2006-2019 NV Access Limited, Aleksey Sadovoy, Peter Vágner, Joseph Lee, Bill Dengler
#This file is covered by the GNU General Public License.
#See ... | 1 | #appModules/miranda32.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2006-2012 NVDA Contributors
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
import ui
import config
from ctypes import *
from ctypes.wintypes import *
import winKernel
from NVD... | 1 | 24,817 | Just curious, but how did you work out that Aleksey Sadovoy, Peter Vgner and Joseph Lee contributed to this file? Did you look at the repository history? | nvaccess-nvda | py |
@@ -264,6 +264,19 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal
_post.Reference();
_post.Dispose();
+ // We need this walk because we call ReadStop on 2 places:
+ // 1. On the dispatch pipe UvPipeHandle after reading the corre... | 1 | // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.T... | 1 | 13,107 | You could call OnStopRude() directly here to do the same thing. | aspnet-KestrelHttpServer | .cs |
@@ -643,6 +643,8 @@ func (a *WebAPI) ListUnregisteredApplications(ctx context.Context, _ *webservice
return &webservice.ListUnregisteredApplicationsResponse{}, nil
}
+ // TODO: Eliminate apps registered by another Piped
+ // In case that multiple Pipeds watches the same repo, it could be happen that one Piped ... | 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 | 23,160 | This TODO and this `sort` depend on how the UI looks like. So I think we should fix the UI before continuing on updating this web API. For example, in case the UI flow is as below, this API will receive a Piped ID and then return just ones belonging to that Piped. - User picks where they want to deploy first (select on... | pipe-cd-pipe | go |
@@ -24,6 +24,16 @@ import (
"github.com/spf13/cobra"
)
+var (
+ snapshotrevertHelpText = `
+Usage: mayactl snapshot revert [options]
+
+$ mayactl snapshot revert --volname <vol> --snapname <snap>
+
+This command displays status of available snapshotrevert.
+`
+)
+
/*type CmdSnaphotCreateOptions struct {
volName... | 1 | /*
Copyright 2017 The OpenEBS Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | 1 | 8,198 | This command rolls back the volume data to the specified snapshot. Once the roll back to snapshot is successful, all the data changes made after the snapshot was taken will be post. This command should be used cautiously and only when there is an issue with the current state of the data. | openebs-maya | go |
@@ -567,9 +567,12 @@ func TestAwslogsDriver(t *testing.T) {
})
}()
+ strs := strings.Split(*testTask.TaskArn, "/")
+ taskId := strs[len(strs)-1]
+
params := &cloudwatchlogs.GetLogEventsInput{
LogGroupName: aws.String(awslogsLogGroupName),
- LogStreamName: aws.String(containerId),
+ LogStreamName: aws.Str... | 1 | // +build functional
// 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/
//
... | 1 | 14,265 | should this be a separate/new functional test? | aws-amazon-ecs-agent | go |
@@ -458,6 +458,19 @@ describe Mongoid::QueryCache do
end
end
+ context 'when querying colleciton larger than the batch size' do
+ before do
+ 101.times { Band.create! }
+ end
+
+ it 'does not raise an exception when querying multiple times' do
+ expect do
+ Band.all.to_a
... | 1 | # frozen_string_literal: true
# encoding: utf-8
require "spec_helper"
describe Mongoid::QueryCache do
around do |spec|
Mongoid::QueryCache.clear_cache
Mongoid::QueryCache.cache { spec.run }
end
before(:all) do
# It is likely that there are other session leaks in the driver
# and/or Mongoid tha... | 1 | 12,831 | Can these also assert at least the length of arrays returned and ideally contents? | mongodb-mongoid | rb |
@@ -822,7 +822,7 @@ class Scheduler(object):
task.family = family
if not getattr(task, 'module', None):
task.module = module
- if not task.param_visibilities:
+ if not getattr(task, 'param_visibilities', None):
task.param_visibilities = _get_default(param_vi... | 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 | 18,422 | `hasattr(task, 'param_visibilities')` is more concise with the same effect, but either one works. | spotify-luigi | py |
@@ -364,6 +364,12 @@ MSGS = {
"end up in having multiple values passed for the aforementioned parameter in "
"case the method is called with keyword arguments.",
),
+ "W1114": (
+ "Positional arguments are out of order",
+ "arguments-out-of-order",
+ "Attributes given to a... | 1 | # -*- coding: utf-8 -*-
# Copyright (c) 2006-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr>
# Copyright (c) 2009 James Lingard <jchl@aristanetworks.com>
# Copyright (c) 2012-2014 Google, Inc.
# Copyright (c) 2014-2018 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2014 David Shea <dshea@redhat.com>
# Copy... | 1 | 11,229 | I would hedge this a little, maybe `Positional arguments appear to be out of order`. After all, it's just a guess. | PyCQA-pylint | py |
@@ -192,7 +192,8 @@ public class AccountActivity extends ThemedActivity implements AccountContract.V
@Override
public void showError() {
- SnackBarHandler.show(coordinatorLayout, getString(no_account_signed_in));
+ Snackbar snackbar = SnackBarHandler.show(coordinatorLayout, getString(no_accoun... | 1 | package org.fossasia.phimpme.accounts;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.BottomNavigationView;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget... | 1 | 13,022 | you can directly call show() method from **SnackBarHandler.show(coordinatorLayout, getString(no_account_signed_in)).show();** no need to create an extra object and then call the show method. | fossasia-phimpme-android | java |
@@ -306,6 +306,19 @@ StatusOr<std::vector<HostAddr>> NetworkUtils::toHosts(const std::string& peersSt
return hosts;
}
+std::string NetworkUtils::toHosts(const std::vector<HostAddr>& hosts) {
+ std::string hostsString = "";
+ for (auto& host : hosts) {
+ std::string addrStr = network::NetworkUtils::... | 1 | /* Copyright (c) 2018 vesoft inc. All rights reserved.
*
* This source code is licensed under Apache 2.0 License,
* attached with Common Clause Condition 1.0, found in the LICENSES directory.
*/
#include "base/Base.h"
#include "network/NetworkUtils.h"
#include <netdb.h>
#include <ifaddrs.h>
#include <arpa/inet.h>
... | 1 | 23,299 | concatHosts may be a better func name to explain this? | vesoft-inc-nebula | cpp |
@@ -0,0 +1,19 @@
+import { always } from 'ramda';
+
+/**
+ * A function that returns new empty string.
+ *
+ * @func stubString
+ * @memberOf RA
+ * @since {@link https://char0n.github.io/ramda-adjunct/2.1.0|v2.1.0}
+ * @category Function
+ * @sig ... -> ''
+ * @return {''}
+ * @example
+ *
+ * RA.stubString(); //=> ''... | 1 | 1 | 4,971 | A function that returns empty string. | char0n-ramda-adjunct | js | |
@@ -194,7 +194,12 @@ func parsePackage(state *core.BuildState, label, dependent core.BuildLabel, subr
}
} else {
filename, dir := buildFileName(state, label.PackageName, subrepo)
- if filename == "" {
+ if filename != "" {
+ pkg.Filename = filename
+ if err := state.Parser.ParseFile(state, pkg, pkg.Filena... | 1 | // Package parse implements handling parse tasks for BUILD files.
//
// The actual work to interpret them is done by the //src/parse/asp package; this
// package handles requests for parsing build targets and triggering them to
// start building when ready.
package parse
import (
"fmt"
"path"
"strings"
"gopkg.in/... | 1 | 9,604 | If it's not the root package, or if it is the root package but we don't add the psudo :pleasings rule there, print an error. | thought-machine-please | go |
@@ -17,7 +17,9 @@ import (
"strconv"
"github.com/go-playground/validator/v10"
+
corev1 "k8s.io/api/core/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/validation"
)
| 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 | 18,813 | can delete this line | chaos-mesh-chaos-mesh | go |
@@ -76,6 +76,18 @@ generic_data_store::generic_data_store(generic_data_reader *reader, model *m) :
if (opts->has_bool("verbose") && opts->get_bool("verbose")) {
m_verbose = true;
}
+
+ if (opts->has_string("use_tarball")) {
+ m_dir = m_reader->get_local_file_dir();
+ }
+
+ if (m_comm->get_num_models() ... | 1 | ////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2014-2016, Lawrence Livermore National Security, LLC.
// Produced at the Lawrence Livermore National Laboratory.
// Written by the LBANN Research Team (B. Van Essen, et al.) listed in
// the CONTRIBUTORS file. <lbann-dev@l... | 1 | 12,721 | Will it still be an issue if all the models use the same data set? | LLNL-lbann | cpp |
@@ -37,6 +37,8 @@ class WidgetsController < ApplicationController
def handle_xml_format
return unless request_format == 'xml'
@type = WIDGET_TYPES.select { |klass| controller_name.include?(klass) }[0]
+ @parent = @widget.send(@type)
+ fail ParamRecordNotFound unless @parent
render template: 'wid... | 1 | class WidgetsController < ApplicationController
WIDGET_TYPES = %w(account project stack organization)
helper :widgets
before_action :set_widget, except: :index
rescue_from ActiveRecord::RecordNotFound, with: :record_not_found
layout :false, except: :index
before_action :handle_xml_format, except: :index
... | 1 | 7,923 | How does this controller_name method work? Does this method grab the context of the url request? Wouldn't this always result in 'widget'? | blackducksoftware-ohloh-ui | rb |
@@ -18,6 +18,9 @@
* limitations under the License.
*/
+#define FS_CHUNK_SIZE_DEBUG(op) {flb_debug("[%d] %s -> fs_chunks_size = %zu", __LINE__, op->name, op->fs_chunks_size);}
+#define FS_CHUNK_SIZE_DEBUG_MOD(op, chunk, mod) {flb_debug("[%d] %s -> fs_chunks_size = %zu mod=%zd chunk=%s", __LINE__, op->name, op->... | 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* Fluent Bit
* ==========
* Copyright (C) 2019-2021 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 | 15,802 | Let's get rid of these for the final version and if you get rid of the macro I left last time I'd be more than grateful. | fluent-fluent-bit | c |
@@ -36,6 +36,8 @@ public class MetadataColumns {
Integer.MAX_VALUE - 1, "_file", Types.StringType.get(), "Path of the file in which a row is stored");
public static final NestedField ROW_POSITION = NestedField.required(
Integer.MAX_VALUE - 2, "_pos", Types.LongType.get(), "Ordinal position of a row in ... | 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 | 36,760 | Instead of `DELETE_MARK`, how about `IS_DELETED`? I don't think that "mark" is clear enough to describe what this is. Similarly, I think the docs should be "Whether the row has been deleted". There's no need to include "delete mark" because that's identifying something that is not defined (this column is _deleted and "... | apache-iceberg | java |
@@ -179,6 +179,19 @@ def init_worker(checked_num, action_num):
progress_actions = action_num
+def get_dependent_headers(buildaction, archive):
+ LOG.debug("Generating dependent headers via compiler...")
+ try:
+ dependencies = set(create_dependencies(buildaction))
+ except Exception as ex:
+ ... | 1 | # -------------------------------------------------------------------------
# The CodeChecker Infrastructure
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
# -------------------------------------------------------------------------... | 1 | 8,583 | Does it make sense to have this very thin wrapper that only calls `create_dependencies`? And maybe having `create_dependencies` return a set would be better than convert here? | Ericsson-codechecker | c |
@@ -401,7 +401,7 @@ int h2o_get_compressible_types(const h2o_headers_t *headers)
return compressible_types;
}
-h2o_iovec_t h2o_build_destination(h2o_req_t *req, const char *prefix, size_t prefix_len)
+h2o_iovec_t h2o_build_destination(h2o_req_t *req, const char *prefix, size_t prefix_len, int escape)
{
h2... | 1 | /*
* Copyright (c) 2014-2016 DeNA Co., Ltd., Kazuho Oku, Satoh Hiroh
*
* 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 ... | 1 | 11,243 | How about renaming `escape` to `use_path_normalized` or something to better indicate that it is a selection between `path` and `path_normalized`? | h2o-h2o | c |
@@ -41,4 +41,8 @@ public interface Accountable {
return Collections.emptyList();
}
+ /**
+ * An accountable that always returns 0
+ */
+ Accountable NULL_ACCOUNTABLE = () -> 0;
} | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 1 | 36,969 | Interface members are always `static final` right? | apache-lucene-solr | java |
@@ -0,0 +1,17 @@
+// +build nintendoswitch
+
+package runtime
+
+import (
+ "unsafe"
+)
+
+// Result svcOutputDebugString(const char *str, u64 size)
+//go:export svcOutputDebugString
+func svcOutputDebugString(str *byte, size uint64) uint64
+
+//go:export malloc
+func extalloc(size uintptr) unsafe.Pointer
+
+//export f... | 1 | 1 | 9,684 | It seems to me that this could be in the runtime_nintendoswitch.go file, or is there a reason to keep it separate? | tinygo-org-tinygo | go | |
@@ -1857,8 +1857,6 @@ unsigned SwiftExpressionParser::Parse(DiagnosticManager &diagnostic_manager,
log->PutCString(s.c_str());
}
- swift::performSILLinking(sil_module.get());
-
if (m_swift_ast_context->HasErrors()) {
DiagnoseSwiftASTContextError();
return 1; | 1 | //===-- SwiftExpressionParser.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 | 16,159 | I was actually looking at this code over the weekend and wondering whether we were trying to link here. I assume it's been cargo culted from something else in the compiler. | apple-swift-lldb | cpp |
@@ -0,0 +1,14 @@
+<div class="form-group">
+ <%= f.label _('Name'), for: :name, class: "control-label" %>
+ <%= f.text_field :name, as: :string, class: "form-control", 'data-toggle': 'tooltip', title: _('Add an appropriate name for your guidance group. This name will be used to tell the end user where the guidance ha... | 1 | 1 | 16,965 | nice extraction of the form for being used at new/edit. We should have more of these | DMPRoadmap-roadmap | rb | |
@@ -37,8 +37,8 @@ using namespace RDKit;
* Version 2 taken from J. Chem. Inf. Model. 56, 1 (2016)
*
* torsion-angle potential form:
- * V = V1*(1 + s1*cos(1x)) + V2*(1 + s2*cos(2x)) + V3*(1 + s3*cos(1x))
- * + V4*(1 + s4*cos(1x)) + V5*(1 + s5*cos(1x)) + V6*(1 + s6*cos(1x))
+ * V = V1*(1 + s1*cos(1x)) + V2*(1 ... | 1 | //
// Copyright (C) 2017 Sereina Riniker
//
// @@ 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 "TorsionPreferences.h"
#include <GraphMo... | 1 | 22,552 | Are the coefficients the actual bug fix? | rdkit-rdkit | cpp |
@@ -218,8 +218,8 @@ class PostgresTarget(luigi.Target):
try:
cursor.execute(sql)
- except psycopg2.ProgrammingError as e:
- if e.pgcode == psycopg2.errorcodes.DUPLICATE_TABLE:
+ except (psycopg2.ProgrammingError, psycopg2.IntegrityError) as e:
+ if e.pgcode in... | 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 | 17,923 | Why are the error code options in a list and not a tuple? | spotify-luigi | py |
@@ -135,7 +135,7 @@ class ExternalProjectAccessRuleBookTest(ForsetiTestCase):
TEST_ANCESTORS = [Project('123'),
Folder('456'),
Organization('7890')]
- TEST_BAD_ANC = [Project('123'),
+ TEST_BAD_ANCESTORS = [Project('123'),
Folder('456'),
... | 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 | 32,478 | Need alignment with the preceding line. | forseti-security-forseti-security | py |
@@ -28,10 +28,8 @@ public class MainnetProtocolSchedule {
public static final BigInteger DEFAULT_CHAIN_ID = BigInteger.ONE;
- public static ProtocolSchedule create() {
- return fromConfig(
- GenesisConfigFile.mainnet().getConfigOptions(), PrivacyParameters.DEFAULT, false);
- }
+ public static final ... | 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,068 | Changing from a static method to a constant is inessential to Type Transactions and has a long reach, adding many unneeded files and diff lines. | hyperledger-besu | java |
@@ -92,13 +92,14 @@ public final class TreeSet<T> implements SortedSet<T>, Serializable {
public static <T extends Comparable<? super T>> TreeSet<T> ofAll(java.lang.Iterable<? extends T> values) {
Objects.requireNonNull(values, "values is null");
- return new TreeSet<>(RedBlackTree.ofAll(values))... | 1 | /* / \____ _ ______ _____ / \____ ____ _____
* / \__ \/ \ / \__ \ / __// \__ \ / \/ __ \ Javaslang
* _/ // _\ \ \/ / _\ \\_ \/ // _\ \ /\ \__/ / Copyright 2014-2015 Daniel Dietrich
* /___/ \_____/\____/\_____/____/\___\_____/_/ \_/____/ Licensed under the Apache License... | 1 | 6,484 | There is one caveat: javaslang.collection.Iterator is Iterable. With Iterator it does not work. Let's revert this line. Does this happen elsewhere, too? I will double-check the code... | vavr-io-vavr | java |
@@ -659,7 +659,7 @@ class SimpleConfig(Logger):
except:
pass
- def format_amount(self, x, is_diff=False, whitespaces=False):
+ def format_amount(self, x, is_diff = True, whitespaces = False, add_thousands_sep = True):
return format_satoshis(
x,
nu... | 1 | import json
import threading
import time
import os
import stat
import ssl
from decimal import Decimal
from typing import Union, Optional, Dict, Sequence, Tuple
from numbers import Real
from copy import deepcopy
from aiorpcx import NetAddress
from . import util
from . import constants
from .util import base_units, bas... | 1 | 14,310 | Why change the default value of `is_diff`? | spesmilo-electrum | py |
@@ -37,7 +37,7 @@ readme_note = """
with open('README.rst') as fobj:
long_description = "\n\n" + readme_note + "\n\n" + fobj.read()
-install_requires = ['python-dateutil>=2.7.5,<3']
+install_requires = ['python-dateutil>=2.7.5,<3', 'tenacity>=6.3.0']
# Can't use python-daemon>=2.2.0 if on windows
# See ... | 1 | # Copyright (c) 2012 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 or agreed to in writing, s... | 1 | 19,977 | I think tacking on `,<7` would be a wise precaution in case of future incompatible changes in tenacity. | spotify-luigi | py |
@@ -38,7 +38,7 @@ final class NoDriverManager implements GalleryManagerInterface, MediaManagerInte
* @param int|null $limit
* @param int|null $offset
*/
- public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array
+ public function findBy(array $criteri... | 1 | <?php
declare(strict_types=1);
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\MediaBundle\Model;
u... | 1 | 12,209 | I don't think is necessary to remove the return type | sonata-project-SonataMediaBundle | php |
@@ -128,7 +128,11 @@ public class AuthenticatorService extends Service {
final String userId = ForceApp.decryptWithPasscode(mgr.getUserData(account, AuthenticatorService.KEY_USER_ID), passcodeHash);
final String orgId = ForceApp.decryptWithPasscode(mgr.getUserData(account, AuthenticatorService... | 1 | /*
* Copyright (c) 2011, 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 | 13,339 | Also added this check, since client secret is not used except in the IP bypass scenario. | forcedotcom-SalesforceMobileSDK-Android | java |
@@ -151,6 +151,8 @@ const baseActions = {
return;
}
+ // Clear any profile ID selection in the case that selection falls to the getProfiles resolver.
+ registry.dispatch( STORE_NAME ).setProfileID( '' );
registry.dispatch( STORE_NAME ).setPropertyID( propertyID );
if ( PROPERTY_CREATE === prope... | 1 | /**
* `modules/analytics` data store: properties.
*
* Site Kit by Google, 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
*
* https://www.apache.org/lic... | 1 | 33,549 | That's unrelated, but shouldn't there also be a call to `setInternalWebPropertyID`, making it empty, for this case? Otherwise, when selecting to create a new property, any previous internal web property ID will still be in state, potentially causing problems. | google-site-kit-wp | js |
@@ -37,7 +37,6 @@ func TestDevLogs(t *testing.T) {
out, err := system.RunCommand(DdevBin, args)
assert.NoError(err)
assert.Contains(string(out), "Server started")
- assert.Contains(string(out), "GET")
cleanup()
} | 1 | package cmd
import (
"testing"
"os"
"github.com/drud/ddev/pkg/testcommon"
"github.com/drud/drud-go/utils/system"
"github.com/stretchr/testify/assert"
)
func TestDevLogsBadArgs(t *testing.T) {
assert := assert.New(t)
testDir := testcommon.CreateTmpDir("no-valid-ddev-config")
err := os.Chdir(testDir)
if er... | 1 | 11,068 | I wonder if we should trigger a PHP error and ensure it ends up in the log? | drud-ddev | php |
@@ -247,6 +247,16 @@ describe TopicsController do
topic.closed.must_equal false
end
+ # TODO: Will need to figure out how javascript will affect the testing.
+ it 'admin can get to move_topic page' do
+ login_as admin
+ get :move_topic, id: topic.id
+ must_respond_with :success
+ must_render_t... | 1 | require 'test_helper'
describe TopicsController do
let(:forum) { create(:forum) }
let(:user) { create(:account) }
let(:admin) { create(:admin) }
let(:topic) { create(:topic) }
let(:topic_post) { create(:post) }
#-------------User with no account---------------
it 'index' do
get :index, forum_id: for... | 1 | 7,017 | The `move_topic` action be a `post` request since it changes the state of the object. | blackducksoftware-ohloh-ui | rb |
@@ -366,6 +366,9 @@ func doTestResults(tid int, state *core.BuildState, target *core.BuildTarget, ru
if runRemotely {
metadata, err = state.RemoteClient.Test(tid, target, run)
+ if metadata == nil {
+ metadata = new(core.BuildMetadata)
+ }
} else {
var stdout []byte
stdout, err = prepareAndRunTest(ti... | 1 | package test
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"os"
"path"
"strings"
"sync/atomic"
"time"
"gopkg.in/op/go-logging.v1"
"github.com/thought-machine/please/src/build"
"github.com/thought-machine/please/src/core"
"github.com/thought-machine/please/src/fs"
"github.com/thought-machine/please/src/w... | 1 | 9,455 | Should we just return a non-nil metadata from `Test`? | thought-machine-please | go |
@@ -15,6 +15,10 @@ class MailPreview < MailView
CommunicartMailer.comment_added_email(comment, email)
end
+ def whsc_email
+ CommunicartMailer.cart_notification_email(email, pending_approval)
+ end
+
private
| 1 | class MailPreview < MailView
def cart_notification_email
CommunicartMailer.cart_notification_email(email, pending_approval)
end
def cart_observer_email
CommunicartMailer.cart_observer_email(email, cart)
end
def approval_reply_received_email
CommunicartMailer.approval_reply_received_email(receive... | 1 | 12,229 | Noticing this is really just the same as cart_notification_email. Would be nice to be able to view custom templates. I may update this with some set up that will make viewing specific custom emails easily. | 18F-C2 | rb |
@@ -59,13 +59,8 @@ import static org.apache.solr.common.cloud.ZkStateReader.PULL_REPLICAS;
import static org.apache.solr.common.cloud.ZkStateReader.READ_ONLY;
import static org.apache.solr.common.cloud.ZkStateReader.REPLICATION_FACTOR;
import static org.apache.solr.common.cloud.ZkStateReader.TLOG_REPLICAS;
-import s... | 1 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | 1 | 39,184 | please don't use wildcard imports | apache-lucene-solr | java |
@@ -219,6 +219,8 @@ describe('Formulas general', () => {
});
it('should recalculate table after changing cell value (by reference)', () => {
+ let sourceDataReference = null;
+
const afterChange = jasmine.createSpy();
const hot = handsontable({
data: getDataSimpleExampleFormulas(), | 1 | describe('Formulas general', () => {
const id = 'testContainer';
beforeEach(function() {
this.$container = $(`<div id="${id}"></div>`).appendTo('body');
});
afterEach(function() {
if (this.$container) {
destroy();
this.$container.remove();
}
});
it('should calculate table (simple ... | 1 | 16,434 | Should we even fix this test? IMO it should be refactored to check that values are recalculated after `setSourceDataAtCell` and `setSourceDataAtRowProp` calls. This will be the correct way to alter the data since now and we're not testing this use case. | handsontable-handsontable | js |
@@ -46,11 +46,6 @@ class ModelRole(enum.IntEnum):
item = Qt.UserRole
-
-# Remember the last used directory
-last_used_directory = None
-
-
# All REFRESH_INTERVAL milliseconds, speeds will be recalculated and downloads
# redrawn.
_REFRESH_INTERVAL = 500 | 1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2019 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 | 23,349 | I'm not sure if this is standard practice, but I would prefer to leave this initialization here, if only to show that such a variable exists in this file (instead of inferring it from the globals). It can also cause weird issues if, for example, `init` isn't run before other methods. | qutebrowser-qutebrowser | py |
@@ -353,6 +353,7 @@ RDKit::SparseIntVect<boost::uint32_t> *MorganFingerprintHelper(
res = RDKit::MorganFingerprints::getFingerprint(
mol, static_cast<unsigned int>(radius), invars, froms, useChirality,
useBondTypes, useCounts, false, bitInfoMap);
+ throw "Value of nbits is Negative"
}... | 1 | //
// Copyright (C) 2007-2017 Greg Landrum
//
// @@ 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 <RDBoost/Wrap.h>
#include <GraphMol/At... | 1 | 18,020 | This isn't how you throw an exception in C++. I'd suggest you take a look elsewhere in the RDKit C++ codebase and see how ValueError exceptions are thrown. Hint: there's a function called `throw_value_error()` that you may find useful. | rdkit-rdkit | cpp |
@@ -662,7 +662,7 @@ TEST (active_transactions, restart_dropped)
}
// Verify the block was updated in the ledger
{
- auto block (node.store.block_get (node.store.tx_begin_read (), send1->hash ()));
+ auto block (node.store.block_get (node.store.tx_begin_write (), send1->hash ()));
ASSERT_EQ (work2, block->blo... | 1 | #include <nano/core_test/testutil.hpp>
#include <nano/lib/jsonconfig.hpp>
#include <nano/node/election.hpp>
#include <nano/node/testing.hpp>
#include <gtest/gtest.h>
using namespace std::chrono_literals;
TEST (active_transactions, confirm_one)
{
nano::system system;
nano::node_config node_config (24000, system.log... | 1 | 16,111 | Was changing this to a write transaction required? | nanocurrency-nano-node | cpp |
@@ -21,7 +21,8 @@ type Predicate struct {
Method string `json:"method"`
// Params are the parameters (or a subset of the parameters) used to call the actor method.
- Params []byte `json:"params"`
+ // The must all be individually abi encodable.
+ Params []interface{} `json:"params"`
}
// PaymentVoucher is a v... | 1 | package types
import (
cbor "github.com/ipfs/go-ipld-cbor"
"github.com/multiformats/go-multibase"
"github.com/filecoin-project/go-filecoin/address"
)
func init() {
cbor.RegisterCborType(Predicate{})
cbor.RegisterCborType(PaymentVoucher{})
}
// Predicate is an optional message that is sent to another actor and ... | 1 | 18,839 | nit: I think "They"? | filecoin-project-venus | go |
@@ -0,0 +1,7 @@
+namespace Nethermind.Core2
+{
+ public static class SszLimit
+ {
+ public const ulong ValidatorRegistryLimit = 1_099_511_627_776;
+ }
+} | 1 | 1 | 22,968 | is it a result of some multiplication or some other meaningful number? would be nice to display as a power of something or the mult | NethermindEth-nethermind | .cs | |
@@ -5,11 +5,11 @@ module Features
forum
office_hours
shows
- source_code
- video_tutorials
)
+ LICENSEABLE_FEATURES = %w(repositories video_tutorials)
FULFILLABLE_FEATURES = %w(mentor)
- ALL_FEATURES = GENERIC_FEATURES + FULFILLABLE_FEATURES
+ ALL_FEATURES = GENERIC_FEA... | 1 | module Features
class Factory
GENERIC_FEATURES = %w(
exercises
forum
office_hours
shows
source_code
video_tutorials
)
FULFILLABLE_FEATURES = %w(mentor)
ALL_FEATURES = GENERIC_FEATURES + FULFILLABLE_FEATURES
def initialize(user:)
@user = user
end
... | 1 | 11,740 | I think this class is a good example of where Payload could significantly improve things. I'm okay with this class as it stands. If you merge this in, I'd like to have a go at refactoring it after introducing Payload. | thoughtbot-upcase | rb |
@@ -2,6 +2,7 @@
from __future__ import unicode_literals
import unittest
import os
+import pytest
import colander
import mock | 1 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
import os
import colander
import mock
import six
from kinto.core import includeme
from kinto.core import DEFAULT_SETTINGS
from pyramid import httpexceptions
from pyramid import request as pyramid_request
from pyramid import testing
from k... | 1 | 9,950 | Just a small tip: I think you don't need to include pytest here. You can run tests using: - `pytest tests/path/to/my/test` under the virtualenv to run a single test. - `pytest tests/` under the virtualenv to run all the tests. - `make tests` to run all the tests for all python versions, like travis do. Hope this helps!... | Kinto-kinto | py |
@@ -31,6 +31,15 @@ from .options import Store
from .util import unique_iterator, group_sanitizer, label_sanitizer
+def sanitizer(name, replacements={':':'_', '/':'_', '\\':'_'}):
+ """
+ String sanitizer to avoid problematic characters in filenames.
+ """
+ for k,v in replacements.items():
+ nam... | 1 | """
Module defining input/output interfaces to HoloViews.
There are two components for input/output:
Exporters: Process (composite) HoloViews objects one at a time. For
instance, an exporter may render a HoloViews object as a
svg or perhaps pickle it.
Archives: A collection of HoloViews objects... | 1 | 16,187 | Might be worth sorting the replacement items so this is deterministic. | holoviz-holoviews | py |
@@ -29,6 +29,11 @@ type ChaosDashboardConfig struct {
EnableLeaderElection bool `envconfig:"ENABLE_LEADER_ELECTION"`
Database *DatabaseConfig
PersistTTL *PersistTTLConfig
+ // ClusterScoped means control Chaos Object in cluster level(all namespace),
+ ClusterScoped bool `envconfig:"CLUSTER... | 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,906 | Should we set the default `TargetNamespace ` to `chaos-testing`? I noticed that the installation script defaults to chaos-testing. | chaos-mesh-chaos-mesh | go |
@@ -31,7 +31,6 @@ namespace MvvmCross.ViewModels
{
try
{
- await Task.Yield();
await task;
}
catch(Exception e) | 1 | // Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MS-PL license.
// See the LICENSE file in the project root for more information.
using System;
using System.ComponentModel;
using System.Threading.Tasks;
namespace MvvmCross.ViewModels
{
//... | 1 | 13,846 | Why was this `Task.Yield` removed? It was added in purpose. | MvvmCross-MvvmCross | .cs |
@@ -162,8 +162,13 @@ public abstract class DiscoGapicMethodConfig extends MethodConfig {
}
Iterable<FieldConfig> requiredFieldConfigs =
- DiscoGapicMethodConfig.createFieldNameConfigs(
- DiscoGapicMethodConfig.getRequiredFields(
+ createFieldNameConfigs(
+ diagCollector,
... | 1 | /* Copyright 2017 Google Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in ... | 1 | 24,047 | You'll also want to do this below, for the `optionalFieldConfigs`. See `GapicMethodConfig.java:180`. | googleapis-gapic-generator | java |
@@ -134,7 +134,8 @@ Status GoExecutor::prepareOver() {
if (clause == nullptr) {
LOG(FATAL) << "Over clause shall never be null";
}
- edge_ = ectx()->schemaManager()->toEdgeType(*clause->edge());
+ auto space = ectx()->rctx()->session()->space();
+ edge_ = ectx()->sche... | 1 | /* Copyright (c) 2018 - present, VE Software Inc. All rights reserved
*
* This source code is licensed under Apache 2.0 License
* (found in the LICENSE.Apache file in the root directory)
*/
#include "base/Base.h"
#include "graph/GoExecutor.h"
#include "meta/SchemaManager.h"
#include "dataman/RowReader.h"
#include... | 1 | 16,349 | We'd better use "spaceId" as variable name here. Because i can't figure out the really type for "space" at the first glimpse due to "auto" used. | vesoft-inc-nebula | cpp |
@@ -37,6 +37,7 @@ partial class Build
AbsolutePath ArtifactsDirectory => Artifacts ?? (OutputDirectory / "artifacts");
AbsolutePath WindowsTracerHomeZip => ArtifactsDirectory / "windows-tracer-home.zip";
AbsolutePath BuildDataDirectory => RootDirectory / "build_data";
+ AbsolutePath LibSqreenDirectory... | 1 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using Nuke.Common;
using Nuke.Common.IO;
using Nuke.Common.ProjectModel;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.DotNet;
using Nuke.Common.Tools.MSBu... | 1 | 21,447 | I assume we have a package reference somewhere that pulls down the nuget package? | DataDog-dd-trace-dotnet | .cs |
@@ -575,12 +575,9 @@ func (s *Server) initEventTracking() {
}
s.sys.inboxPre = subject
// This is for remote updates for connection accounting.
-
- for _, subj := range []string{accConnsEventSubjOld, accConnsEventSubjNew} {
- subject = fmt.Sprintf(subj, "*")
- if _, err := s.sysSubscribe(subject, s.remoteConnsU... | 1 | // Copyright 2018-2020 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 | 11,533 | But why introduce publish on `accConnsEventSubjNew` subject if we never subscribe on that subject. What is the plan then? Replace subscription on "old" with "new" at one point? Not sure about all that.. | nats-io-nats-server | go |
@@ -269,7 +269,7 @@ void *ap6_thread(void *thread_context)
int ret;
struct timespec ts = { .tv_sec = 0, .tv_nsec = 100000 }; /* 100ms */
- fpga_token fme_token;
+ fpga_token fme_token = NULL;
fpga_handle fme_handle;
fpga_properties filter;
fpga_result res; | 1 | // Copyright(c) 2017, Intel Corporation
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the ... | 1 | 17,522 | can we use `nullptr` for consistency? | OPAE-opae-sdk | c |
@@ -38,7 +38,7 @@ class DomainRouterFactory
protected $routerConfiguration;
/**
- * @var \Symfony\Component\Routing\Router[]
+ * @var \Shopsys\FrameworkBundle\Component\Router\DomainRouter[]
*/
protected $routersByDomainId = [];
| 1 | <?php
namespace Shopsys\FrameworkBundle\Component\Router;
use Shopsys\FrameworkBundle\Component\Domain\Config\DomainConfig;
use Shopsys\FrameworkBundle\Component\Domain\Domain;
use Shopsys\FrameworkBundle\Component\Router\FriendlyUrl\FriendlyUrlRouterFactory;
use Symfony\Component\Config\Loader\LoaderInterface;
use S... | 1 | 16,305 | strange, for templating\EngineBundle it was `\Symfony\Bundle\FrameworkBundle\` | shopsys-shopsys | php |
@@ -1545,7 +1545,7 @@ ostree_sysroot_simple_write_deployment (OstreeSysroot *sysroot,
g_ptr_array_add (new_deployments, g_object_ref (deployment));
}
- if (!added_new)
+ if ((!added_new) && is_merge_or_booted)
{
g_ptr_array_add (new_deployments, g_object_ref (new... | 1 | /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
*
* Copyright (C) 2013 Colin Walters <walters@verbum.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
*... | 1 | 11,873 | But if we're on the merge deployment, and the next one is the booted deployment, we'll still be inserting between the merge and booted deployment, right? It seems like we would need e.g. `met_merge` and `met_booted` vars to keep track. | ostreedev-ostree | c |
@@ -1,3 +1,7 @@
-return !axe.commons.aria.isValidRole(node.getAttribute('role'), {
- allowAbstract: true
-});
+return (
+ axe.utils.tokenList(virtualNode.attr('role')).filter(role => {
+ return !axe.commons.aria.isValidRole(role, {
+ allowAbstract: true
+ });
+ }).length > 0
+); | 1 | return !axe.commons.aria.isValidRole(node.getAttribute('role'), {
allowAbstract: true
});
| 1 | 15,258 | Can you put the output of this into data, and list which roles are invalid? Same thing with abstract role. I know that's not strictly part of this PR, but it'd make the messaging about this a bunch better. | dequelabs-axe-core | js |
@@ -20,15 +20,15 @@ import org.hyperledger.besu.ethereum.core.Address;
import org.hyperledger.besu.tests.acceptance.dsl.WaitUtils;
import org.hyperledger.besu.tests.acceptance.dsl.condition.Condition;
import org.hyperledger.besu.tests.acceptance.dsl.node.Node;
-import org.hyperledger.besu.tests.acceptance.dsl.transa... | 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,480 | rename ibftTwo arg to bft | hyperledger-besu | java |
@@ -38,7 +38,7 @@ module Blacklight::SearchContext
end
def find_search_session
- if agent_is_crawler?
+ if agent_is_crawler? || skip_session_tracking?
nil
elsif params[:search_context].present?
find_or_initialize_search_session_from_params JSON.parse(params[:search_context]) | 1 | # frozen_string_literal: true
module Blacklight::SearchContext
extend ActiveSupport::Concern
# The following code is executed when someone includes Blacklight::Catalog::SearchSession in their
# own controller.
included do
if respond_to? :helper_method
helper_method :current_search_session, :search_se... | 1 | 8,427 | Should we go ahead and push `agent_is_crawler?` into the `skip_session_tracking?` method? | projectblacklight-blacklight | rb |
@@ -88,8 +88,11 @@ class CustomDataset(Dataset):
self.proposal_file = osp.join(self.data_root,
self.proposal_file)
# load annotations (and proposals)
- with self.file_client.get_local_path(self.ann_file) as local_path:
- self.dat... | 1 | # Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp
import warnings
from collections import OrderedDict
import mmcv
import numpy as np
from mmcv.utils import print_log
from terminaltables import AsciiTable
from torch.utils.data import Dataset
from mmdet.core import eval_map, eval_recalls
from .build... | 1 | 26,799 | How about we raise a warning here and simply change to use self.data_infos = self.load_annotations(self.ann_file) | open-mmlab-mmdetection | py |
@@ -1,9 +1,9 @@
# -*- coding: UTF-8 -*-
-#synthDrivers/_espeak.py
-#A part of NonVisual Desktop Access (NVDA)
-#Copyright (C) 2007-2017 NV Access Limited, Peter Vágner
-#This file is covered by the GNU General Public License.
-#See the file COPYING for more details.
+# synthDrivers/_espeak.py
+# A part of NonVisual De... | 1 | # -*- coding: UTF-8 -*-
#synthDrivers/_espeak.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2007-2017 NV Access Limited, Peter Vágner
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
import time
import nvwave
import threading
import queue
from c... | 1 | 31,544 | Please remove this line to comply with the standard for copyright headers. | nvaccess-nvda | py |
@@ -21,6 +21,9 @@ namespace Nethermind.Consensus.AuRa.Validators
{
internal static class AuRaValidatorsCollectionExtensions
{
- public static int MinSealersForFinalization(this IList<Address> validators) => validators.Count / 2 + 1;
+ public static int MinSealersForFinalization(this IList<Addre... | 1 | // Copyright (c) 2018 Demerzel Solutions Limited
// This file is part of the Nethermind library.
//
// The Nethermind library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of ... | 1 | 23,864 | seems incorrect - for 5 validators it will tell that 3 is enough to seal and you need 4 2/3 * 5 is 3.3 | NethermindEth-nethermind | .cs |
@@ -19,11 +19,16 @@
package org.apache.iceberg.hive;
-import java.io.Closeable;
-import java.util.Arrays;
+
+import com.github.benmanes.caffeine.cache.Cache;
+import com.github.benmanes.caffeine.cache.Caffeine;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.concurrent.Execu... | 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 | 34,823 | Nit: please remove unnecessary whitespace changes. | apache-iceberg | java |
@@ -73,9 +73,16 @@ public class NodeJSSampleMethodToViewTransformer implements SampleMethodToViewTr
List<SampleFieldView> fields = new ArrayList<>();
for (FieldInfo field : methodInfo.fields().values()) {
+ String name = field.name();
+ // Since the requestBody is named `resource`, all fields name... | 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,212 | Is this captured in a test? | googleapis-gapic-generator | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.